Blob Blame History Raw
From 5f8ddc6ee63a9057522923a6b2eb8c51993e1db0 Mon Sep 17 00:00:00 2001
From: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Date: Fri, 15 Jun 2018 21:56:19 -0400
Subject: [PATCH] ALSA: hda/ca0132: Restore PCM Analog Mic-In2
Git-commit: 5f8ddc6ee63a9057522923a6b2eb8c51993e1db0
Patch-mainline: v4.18-rc3
References: bsc#1051510

Commit 009b8f979bf8cb5f7ec6d3dd7683585122ed10f8 conditionalized
adding the "CA0132 Analog Mic-In2" PCM with a comment to the
effect that, "desktops don't use this ADC", but the test was set
up such that the ADC was only created for desktops.  Invert the
test.

Fixes: 009b8f979bf8 ("ALSA: hda/ca0132: update core functions for sbz + r3di")
Signed-off-by: Alastair Bridgewater <alastair.bridgewater@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 sound/pci/hda/patch_ca0132.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 49635d1c9c39..09ff85c622bb 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -5966,7 +5966,7 @@ static int ca0132_build_pcms(struct hda_codec *codec)
 	info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->adcs[0];
 
 	/* With the DSP enabled, desktops don't use this ADC. */
-	if (spec->use_alt_functions) {
+	if (!spec->use_alt_functions) {
 		info = snd_hda_codec_pcm_new(codec, "CA0132 Analog Mic-In2");
 		if (!info)
 			return -ENOMEM;
-- 
2.18.0