diff mbox series

ASoC: cs4265: Add a MIC pre. route

Message ID 20180923230835.18483-1-flatmax@flatmax.org (mailing list archive)
State New, archived
Headers show
Series ASoC: cs4265: Add a MIC pre. route | expand

Commit Message

Matt Flax Sept. 23, 2018, 11:08 p.m. UTC
The cs4265 driver is missing a microphone preamp enable.
This patch enables/disables the microphone preamp when mic
selection is made using the kcontrol.

Signed-off-by: Matt Flax <flatmax@flatmax.org>
---
 sound/soc/codecs/cs4265.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Charles Keepax Sept. 24, 2018, 8:45 a.m. UTC | #1
On Mon, Sep 24, 2018 at 09:08:35AM +1000, Matt Flax wrote:
> The cs4265 driver is missing a microphone preamp enable.
> This patch enables/disables the microphone preamp when mic
> selection is made using the kcontrol.
> 
> Signed-off-by: Matt Flax <flatmax@flatmax.org>
> ---
>  sound/soc/codecs/cs4265.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
> index 275677de..332d714a 100644
> --- a/sound/soc/codecs/cs4265.c
> +++ b/sound/soc/codecs/cs4265.c
> @@ -230,6 +230,10 @@ static const struct snd_soc_dapm_route cs4265_audio_map[] = {
>  	{"DAI1 Capture", NULL, "DOUT"},
>  	{"DAI2 Capture", NULL, "DOUT"},
>  
> +	{ "Pre-amp MIC", NULL, "MICL" },
> +	{ "Pre-amp MIC", NULL, "MICR" },
> +	{ "ADC Mux", "MIC", "Pre-amp MIC" },
> +

This looks good but I think you should also remove the existing
routes that put the mic straight into the ADC Mux.

{"ADC Mux", "MIC", "MICL"},
{"ADC Mux", "MIC", "MICR"},

Thanks,
Charles
diff mbox series

Patch

diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c
index 275677de..332d714a 100644
--- a/sound/soc/codecs/cs4265.c
+++ b/sound/soc/codecs/cs4265.c
@@ -230,6 +230,10 @@  static const struct snd_soc_dapm_route cs4265_audio_map[] = {
 	{"DAI1 Capture", NULL, "DOUT"},
 	{"DAI2 Capture", NULL, "DOUT"},
 
+	{ "Pre-amp MIC", NULL, "MICL" },
+	{ "Pre-amp MIC", NULL, "MICR" },
+	{ "ADC Mux", "MIC", "Pre-amp MIC" },
+
 	/* Loopback */
 	{"Loopback", "Switch", "ADC"},
 	{"DAC", NULL, "Loopback"},