forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/sound/soc/codecs/es8311.c
....@@ -244,10 +244,10 @@
244244 SND_SOC_DAPM_MUX("SDP OUT MUX", SND_SOC_NOPM, 0, 0,
245245 &es8311_adc_sdp_mux_controls),
246246 /* Digital Interface */
247
- SND_SOC_DAPM_AIF_OUT("I2S OUT", "Capture", 1,
247
+ SND_SOC_DAPM_AIF_OUT("I2S OUT", "I2S1 Capture", 1,
248248 SND_SOC_NOPM, 0, 0),
249249 /* Render path */
250
- SND_SOC_DAPM_AIF_IN("I2S IN", "Playback", 0,
250
+ SND_SOC_DAPM_AIF_IN("I2S IN", "I2S1 Playback", 0,
251251 SND_SOC_NOPM, 0, 0),
252252 /*DACs SDP DATA SRC MUX */
253253 SND_SOC_DAPM_MUX("DAC SDP SRC MUX", SND_SOC_NOPM, 0, 0,
....@@ -281,9 +281,9 @@
281281 u8 adciface = 0;
282282 u8 daciface = 0;
283283
284
- iface = snd_soc_component_read32(component, ES8311_RESET_REG00);
285
- adciface = snd_soc_component_read32(component, ES8311_SDPOUT_REG0A);
286
- daciface = snd_soc_component_read32(component, ES8311_SDPIN_REG09);
284
+ iface = snd_soc_component_read(component, ES8311_RESET_REG00);
285
+ adciface = snd_soc_component_read(component, ES8311_SDPOUT_REG0A);
286
+ daciface = snd_soc_component_read(component, ES8311_SDPIN_REG09);
287287
288288 /* set master/slave audio interface */
289289 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
....@@ -327,7 +327,7 @@
327327 return -EINVAL;
328328 }
329329
330
- iface = snd_soc_component_read32(component, ES8311_CLK_MANAGER_REG06);
330
+ iface = snd_soc_component_read(component, ES8311_CLK_MANAGER_REG06);
331331 /* clock inversion */
332332 if (((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_I2S) ||
333333 ((fmt & SND_SOC_DAIFMT_FORMAT_MASK) == SND_SOC_DAIFMT_LEFT_J)) {
....@@ -393,7 +393,7 @@
393393 u16 iface;
394394
395395 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
396
- iface = snd_soc_component_read32(component, ES8311_SDPIN_REG09) & 0xE3;
396
+ iface = snd_soc_component_read(component, ES8311_SDPIN_REG09) & 0xE3;
397397 /* bit size */
398398 switch (params_format(params)) {
399399 case SNDRV_PCM_FORMAT_S16_LE:
....@@ -411,7 +411,7 @@
411411 /* set iface */
412412 snd_soc_component_write(component, ES8311_SDPIN_REG09, iface);
413413 } else {
414
- iface = snd_soc_component_read32(component, ES8311_SDPOUT_REG0A) & 0xE3;
414
+ iface = snd_soc_component_read(component, ES8311_SDPOUT_REG0A) & 0xE3;
415415 /* bit size */
416416 switch (params_format(params)) {
417417 case SNDRV_PCM_FORMAT_S16_LE:
....@@ -477,7 +477,7 @@
477477 return 0;
478478 }
479479
480
-static int es8311_mute(struct snd_soc_dai *dai, int mute)
480
+static int es8311_mute(struct snd_soc_dai *dai, int mute, int stream)
481481 {
482482 struct snd_soc_component *component = dai->component;
483483 struct es8311_priv *es8311 = snd_soc_component_get_drvdata(component);
....@@ -508,8 +508,9 @@
508508 .shutdown = es8311_pcm_shutdown,
509509 .hw_params = es8311_pcm_hw_params,
510510 .set_fmt = es8311_set_dai_fmt,
511
- .digital_mute = es8311_mute,
511
+ .mute_stream = es8311_mute,
512512 .set_tristate = es8311_set_tristate,
513
+ .no_capture_mute = 1,
513514 };
514515
515516 static struct snd_soc_dai_driver es8311_dai = {