Loading sound/soc/codecs/wcd9320.c +21 −1 Original line number Diff line number Diff line Loading @@ -5691,6 +5691,24 @@ static int taiko_codec_enable_anc_ear(struct snd_soc_dapm_widget *w, return ret; } static int taiko_codec_set_iir_gain(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = w->codec; int value = 0; switch (event) { case SND_SOC_DAPM_POST_PMU: value = snd_soc_read(codec, TAIKO_A_CDC_IIR1_GAIN_B1_CTL); snd_soc_write(codec, TAIKO_A_CDC_IIR1_GAIN_B1_CTL, value); break; default: pr_info("%s: event = %d not expected\n", __func__, event); break; } return 0; } /* Todo: Have seperate dapm widgets for I2S and Slimbus. * Might Need to have callbacks registered only for slimbus */ Loading Loading @@ -6138,6 +6156,9 @@ static const struct snd_soc_dapm_widget taiko_dapm_widgets[] = { &iir1_inp1_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), SND_SOC_DAPM_PGA_E("IIR1", TAIKO_A_CDC_CLK_SD_CTL, 0, 0, NULL, 0, taiko_codec_set_iir_gain, SND_SOC_DAPM_POST_PMU), SND_SOC_DAPM_MUX_E("IIR1 INP2 MUX", TAIKO_A_CDC_IIR1_GAIN_B2_CTL, 0, 0, &iir1_inp2_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), Loading @@ -6150,7 +6171,6 @@ static const struct snd_soc_dapm_widget taiko_dapm_widgets[] = { &iir1_inp4_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), SND_SOC_DAPM_MIXER("IIR1", TAIKO_A_CDC_CLK_SD_CTL, 0, 0, NULL, 0), SND_SOC_DAPM_MUX_E("IIR2 INP1 MUX", TAIKO_A_CDC_IIR2_GAIN_B1_CTL, 0, 0, &iir2_inp1_mux, taiko_codec_iir_mux_event, Loading Loading
sound/soc/codecs/wcd9320.c +21 −1 Original line number Diff line number Diff line Loading @@ -5691,6 +5691,24 @@ static int taiko_codec_enable_anc_ear(struct snd_soc_dapm_widget *w, return ret; } static int taiko_codec_set_iir_gain(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = w->codec; int value = 0; switch (event) { case SND_SOC_DAPM_POST_PMU: value = snd_soc_read(codec, TAIKO_A_CDC_IIR1_GAIN_B1_CTL); snd_soc_write(codec, TAIKO_A_CDC_IIR1_GAIN_B1_CTL, value); break; default: pr_info("%s: event = %d not expected\n", __func__, event); break; } return 0; } /* Todo: Have seperate dapm widgets for I2S and Slimbus. * Might Need to have callbacks registered only for slimbus */ Loading Loading @@ -6138,6 +6156,9 @@ static const struct snd_soc_dapm_widget taiko_dapm_widgets[] = { &iir1_inp1_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), SND_SOC_DAPM_PGA_E("IIR1", TAIKO_A_CDC_CLK_SD_CTL, 0, 0, NULL, 0, taiko_codec_set_iir_gain, SND_SOC_DAPM_POST_PMU), SND_SOC_DAPM_MUX_E("IIR1 INP2 MUX", TAIKO_A_CDC_IIR1_GAIN_B2_CTL, 0, 0, &iir1_inp2_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), Loading @@ -6150,7 +6171,6 @@ static const struct snd_soc_dapm_widget taiko_dapm_widgets[] = { &iir1_inp4_mux, taiko_codec_iir_mux_event, SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD), SND_SOC_DAPM_MIXER("IIR1", TAIKO_A_CDC_CLK_SD_CTL, 0, 0, NULL, 0), SND_SOC_DAPM_MUX_E("IIR2 INP1 MUX", TAIKO_A_CDC_IIR2_GAIN_B1_CTL, 0, 0, &iir2_inp1_mux, taiko_codec_iir_mux_event, Loading