]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ALSA: hda - No 'Headphone as Line-out' swich without line-outs
authorTakashi Iwai <tiwai@suse.de>
Mon, 24 Nov 2008 06:51:11 +0000 (07:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 25 Nov 2008 14:15:05 +0000 (15:15 +0100)
STAC/IDT driver creates "Headphone as Line-Out" switch even if there
is no line-out pins on the machine.  For devices only with headpohnes
and speaker-outs, this switch shouldn't be created.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_sigmatel.c

index 5a29699c6fdb05f98fb40ae708d4b56ebd7c08a3..7f7d899ff13a3fb4572163124981d1ff04765e94 100644 (file)
@@ -2891,7 +2891,7 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec,
                        cfg->hp_outs && !spec->multiout.hp_nid)
                spec->multiout.hp_nid = nid;
 
-       if (cfg->hp_outs > 1) {
+       if (cfg->hp_outs > 1 && cfg->line_out_type == AUTO_PIN_LINE_OUT) {
                err = stac92xx_add_control(spec,
                        STAC_CTL_WIDGET_HP_SWITCH,
                        "Headphone as Line Out Switch",