From: Takashi Iwai <tiwai@suse.de>
Subject: ALSA: hda - Fix conflicting Capture Source on cxt codecs
Patch-mainline: Never, only for SP3 kernel
References: bnc#872188

The "Capture Source" mixer element impelmented in patch_conexant.c
can become conflicting with "Rear Mic" and other capture switches
when expanded by alsa-lib simple mixer layer.  This confuses badly
PulseAudio, and results in the wrong mixer setups.

This patch simply replaces "Capture Source" with "Input Source" for
avoiding the problem.

The upstream has changed the code base drastically, thus no such
workaround is needed there.  Thus this is only for SP3 3.0 kernel.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_conexant.c |   16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3652,6 +3652,17 @@ static const struct snd_kcontrol_new cx_
 	{}
 };
 
+static const struct snd_kcontrol_new cx_auto_capture_mixers2[] = {
+	{
+		.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
+		.name = "Input Source",
+		.info = cx_auto_mux_enum_info,
+		.get = cx_auto_mux_enum_get,
+		.put = cx_auto_mux_enum_put
+	},
+	{}
+};
+
 static bool select_automic(struct hda_codec *codec, int idx, bool detect)
 {
 	struct conexant_spec *spec = codec->spec;
@@ -4345,7 +4356,10 @@ static int cx_auto_build_input_controls(
 	}
 
 	if (spec->private_imux.num_items > 1 && !spec->auto_mic) {
-		err = snd_hda_add_new_ctls(codec, cx_auto_capture_mixers);
+		if (multi_connection)
+			err = snd_hda_add_new_ctls(codec, cx_auto_capture_mixers2);
+		else
+			err = snd_hda_add_new_ctls(codec, cx_auto_capture_mixers);
 		if (err < 0)
 			return err;
 	}
