summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-11-02 14:23:15 +0100
committerTakashi Iwai <tiwai@suse.de>2009-11-02 14:23:15 +0100
commitad87c64f00e01a694bf90bddc2b4a6c90796d13c (patch)
treed79ca7cd5e34a9213570dc64d77067a18119a8af
parenta1bf808849f25a4d668f81415ecebb2da9fecf8e (diff)
downloadblackbird-op-linux-ad87c64f00e01a694bf90bddc2b4a6c90796d13c.tar.gz
blackbird-op-linux-ad87c64f00e01a694bf90bddc2b4a6c90796d13c.zip
ALSA: hda - Don't check invalid HP pin
alc_automute_pin() might be called even if any HP pin is defined, and it will result in verbs with NID=0. This patch adds a check for the validity of HP widget before issuing any verbs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/hda/patch_realtek.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 148734d16132..ff20048504b6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -965,6 +965,8 @@ static void alc_automute_pin(struct hda_codec *codec)
unsigned int nid = spec->autocfg.hp_pins[0];
int i;
+ if (!nid)
+ return;
pincap = snd_hda_query_pin_caps(codec, nid);
if (pincap & AC_PINCAP_TRIG_REQ) /* need trigger? */
snd_hda_codec_read(codec, nid, 0, AC_VERB_SET_PIN_SENSE, 0);
OpenPOWER on IntegriCloud