From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr720126.outbound.protection.outlook.com ([40.107.72.126]:5968 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727336AbeH3WLy (ORCPT ); Thu, 30 Aug 2018 18:11:54 -0400 From: Sasha Levin To: "stable@vger.kernel.org" CC: Connor McAdams , Takashi Iwai , Sasha Levin Subject: [PATCH AUTOSEL 4.18 079/113] ALSA: hda/ca0132 - Add alt_functions unsolicited response Date: Thu, 30 Aug 2018 18:07:40 +0000 Message-ID: <20180830180714.36167-13-alexander.levin@microsoft.com> References: <20180830180714.36167-1-alexander.levin@microsoft.com> In-Reply-To: <20180830180714.36167-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Connor McAdams [ Upstream commit a1b7f016a1ae5e51f0e11a70cf1a5875d3ccee73 ] This patch fixes a previous oversight where the microphone unsolicited response would use the wrong input selection function. Signed-off-by: Connor McAdams Signed-off-by: Takashi Iwai Signed-off-by: Sasha Levin --- sound/pci/hda/patch_ca0132.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c index 3288bbc3687c..773beed9b2fe 100644 --- a/sound/pci/hda/patch_ca0132.c +++ b/sound/pci/hda/patch_ca0132.c @@ -6729,7 +6729,12 @@ static void hp_callback(struct hda_codec *codec, str= uct hda_jack_callback *cb) =20 static void amic_callback(struct hda_codec *codec, struct hda_jack_callbac= k *cb) { - ca0132_select_mic(codec); + struct ca0132_spec *spec =3D codec->spec; + + if (spec->use_alt_functions) + ca0132_alt_select_in(codec); + else + ca0132_select_mic(codec); } =20 static void ca0132_init_unsol(struct hda_codec *codec) --=20 2.17.1