hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/sound/soc/codecs/rk1000_codec.c
....@@ -200,7 +200,7 @@
200200 unsigned int dai_fmt;
201201
202202 dai_fmt = rtd->card->dai_link[0].dai_fmt;
203
- iface = snd_soc_component_read32(component, ACCELCODEC_R09) & 0x1f3;
203
+ iface = snd_soc_component_read(component, ACCELCODEC_R09) & 0x1f3;
204204 snd_soc_component_write(component, ACCELCODEC_R0C, 0x17);
205205 snd_soc_component_write(component, ACCELCODEC_R04,
206206 ASC_INT_MUTE_L | ASC_INT_MUTE_R |
....@@ -217,7 +217,7 @@
217217 return 0;
218218 }
219219
220
-static int rk1000_codec_mute(struct snd_soc_dai *dai, int mute)
220
+static int rk1000_codec_mute(struct snd_soc_dai *dai, int mute, int stream)
221221 {
222222 struct snd_soc_component *component = dai->component;
223223 struct rk1000_codec_priv *rk1000_codec;
....@@ -276,7 +276,8 @@
276276 static struct snd_soc_dai_ops rk1000_codec_ops = {
277277 .hw_params = rk1000_codec_pcm_hw_params,
278278 .set_fmt = rk1000_codec_set_dai_fmt,
279
- .digital_mute = rk1000_codec_mute,
279
+ .mute_stream = rk1000_codec_mute,
280
+ .no_capture_mute = 1,
280281 };
281282
282283 #define RK1000_CODEC_RATES SNDRV_PCM_RATE_8000_192000
....@@ -355,13 +356,13 @@
355356 ASC_DITHER_ENABLE | ASC_BCLKDIV_4);
356357 /*2volume,input,output*/
357358 digital_gain = VOLUME_OUTPUT;
358
- if (snd_soc_component_read32(component, ACCELCODEC_R05) != 0x0f) {
359
+ if (snd_soc_component_read(component, ACCELCODEC_R05) != 0x0f) {
359360 snd_soc_component_write(component, ACCELCODEC_R05,
360361 (digital_gain >> 8) & 0xFF);
361362 snd_soc_component_write(component, ACCELCODEC_R06, digital_gain & 0xFF);
362363 }
363364
364
- if (snd_soc_component_read32(component, ACCELCODEC_R07) != 0x0f) {
365
+ if (snd_soc_component_read(component, ACCELCODEC_R07) != 0x0f) {
365366 snd_soc_component_write(component, ACCELCODEC_R07,
366367 (digital_gain >> 8) & 0xFF);
367368 snd_soc_component_write(component, ACCELCODEC_R08, digital_gain & 0xFF);