.. | .. |
---|
132 | 132 | return 0; |
---|
133 | 133 | } |
---|
134 | 134 | |
---|
| 135 | +static int dw_hdmi_i2s_prepare(struct device *dev, void *data, |
---|
| 136 | + struct hdmi_codec_daifmt *fmt, |
---|
| 137 | + struct hdmi_codec_params *hparms) |
---|
| 138 | +{ |
---|
| 139 | + struct dw_hdmi_i2s_audio_data *audio = data; |
---|
| 140 | + struct dw_hdmi *hdmi = audio->hdmi; |
---|
| 141 | + |
---|
| 142 | + dw_hdmi_audio_disable(hdmi); |
---|
| 143 | + |
---|
| 144 | + hdmi_write(audio, HDMI_AUD_CONF0_SW_RESET, HDMI_AUD_CONF0); |
---|
| 145 | + hdmi_write(audio, (u8)~HDMI_MC_SWRSTZ_I2SSWRST_REQ, HDMI_MC_SWRSTZ); |
---|
| 146 | + |
---|
| 147 | + dw_hdmi_audio_enable(hdmi); |
---|
| 148 | + |
---|
| 149 | + return 0; |
---|
| 150 | +} |
---|
| 151 | + |
---|
135 | 152 | static int dw_hdmi_i2s_audio_startup(struct device *dev, void *data) |
---|
136 | 153 | { |
---|
137 | 154 | struct dw_hdmi_i2s_audio_data *audio = data; |
---|
.. | .. |
---|
198 | 215 | |
---|
199 | 216 | static struct hdmi_codec_ops dw_hdmi_i2s_ops = { |
---|
200 | 217 | .hw_params = dw_hdmi_i2s_hw_params, |
---|
| 218 | + .prepare = dw_hdmi_i2s_prepare, |
---|
201 | 219 | .audio_startup = dw_hdmi_i2s_audio_startup, |
---|
202 | 220 | .audio_shutdown = dw_hdmi_i2s_audio_shutdown, |
---|
203 | 221 | .get_eld = dw_hdmi_i2s_get_eld, |
---|