summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-12-06 09:30:14 +0100
committerTakashi Iwai <tiwai@suse.de>2013-12-06 09:31:40 +0100
commitc9e4bdb7557ad152f8a41301e646403d9f0ad92c (patch)
treee649a57eb39f95afb9e6f25ad60ba7c64e4dbf45
parent5b8620bb84b2f66b7a776fbfc0d273f6c78d969c (diff)
downloadlinux-c9e4bdb7557ad152f8a41301e646403d9f0ad92c.tar.bz2
ALSA: hda - Allow capture-only configuration
We have blindly assumed that all valid configurations should have either analog or digital playback, but there can be capture-only configurations. The parser shouldn't escape in such a case. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/hda_generic.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 2729e881541d..5ba3106b9712 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -4334,7 +4334,8 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
spec->no_analog = 1;
goto dig_only;
}
- return 0; /* can't find valid BIOS pin config */
+ if (!cfg->num_inputs && !cfg->dig_in_pin)
+ return 0; /* can't find valid BIOS pin config */
}
if (!spec->no_primary_hp &&