1 /* SPDX-License-Identifier: GPL-2.0 */
3 * rt1308-sdw.h -- RT1308 ALSA SoC audio driver header
5 * Copyright(c) 2019 Realtek Semiconductor Corp.
8 #ifndef __RT1308_SDW_H__
9 #define __RT1308_SDW_H__
11 static const struct reg_default rt1308_reg_defaults
[] = {
142 { 0xc003 | (RT1308_DAC_SET
<< 4), 0x00 },
143 { 0xc001 | (RT1308_POWER
<< 4), 0x00 },
144 { 0xc002 | (RT1308_POWER
<< 4), 0x00 },
147 #define RT1308_SDW_OFFSET 0xc000
148 #define RT1308_SDW_OFFSET_BYTE0 0xc000
149 #define RT1308_SDW_OFFSET_BYTE1 0xc001
150 #define RT1308_SDW_OFFSET_BYTE2 0xc002
151 #define RT1308_SDW_OFFSET_BYTE3 0xc003
153 #define RT1308_SDW_RESET (RT1308_SDW_OFFSET | (RT1308_RESET << 4))
155 struct rt1308_sdw_priv
{
156 struct snd_soc_component
*component
;
157 struct regmap
*regmap
;
158 struct sdw_slave
*sdw_slave
;
159 enum sdw_slave_status status
;
160 struct sdw_bus_params params
;
165 struct sdw_stream_data
{
166 struct sdw_stream_runtime
*sdw_stream
;
169 #endif /* __RT1308_SDW_H__ */