OSDN Git Service

ALSA: hda/ca0132 - Add alt_functions unsolicited response
authorConnor McAdams <conmanx360@gmail.com>
Wed, 8 Aug 2018 17:34:14 +0000 (13:34 -0400)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 Aug 2018 18:37:50 +0000 (20:37 +0200)
This patch fixes a previous oversight where the microphone unsolicited
response would use the wrong input selection function.

Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_ca0132.c

index 8b98d18..3e43d56 100644 (file)
@@ -6744,7 +6744,12 @@ static void hp_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
 
 static void amic_callback(struct hda_codec *codec, struct hda_jack_callback *cb)
 {
-       ca0132_select_mic(codec);
+       struct ca0132_spec *spec = codec->spec;
+
+       if (spec->use_alt_functions)
+               ca0132_alt_select_in(codec);
+       else
+               ca0132_select_mic(codec);
 }
 
 static void ca0132_init_unsol(struct hda_codec *codec)