diff options
author | Matthew Ranostay <mranostay@embeddedalley.com> | 2008-09-23 21:46:30 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-10-10 07:41:27 -0400 |
commit | fedb7569100ac858bea7954d82c74e5561bf2c03 (patch) | |
tree | 27925416d9c24ec0121b59b0c89cbc764ab069a9 /sound/pci/hda/patch_sigmatel.c | |
parent | cdad5b8db91ac46a8e226306d062fe4c896b2bed (diff) |
ALSA: hda: use last DAC defined for hp_pin
Patch allows the last DAC in the dac_nids for the hp_nid if there is an
available one this isn't in use by a line_out entry or if hp_nid isn't already
defined. This solves the issues with the 'Headphone Playback' mixer
controls on the 92hd73xxx branch and possibly others.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index bd0d6f8ab430..6e0a18bca23b 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -2817,6 +2817,10 @@ static int stac92xx_auto_create_multi_out_ctls(struct hda_codec *codec, | |||
2817 | } | 2817 | } |
2818 | } | 2818 | } |
2819 | 2819 | ||
2820 | if ((spec->multiout.num_dacs - cfg->line_outs) > 0 && | ||
2821 | cfg->hp_outs && !spec->multiout.hp_nid) | ||
2822 | spec->multiout.hp_nid = nid; | ||
2823 | |||
2820 | if (cfg->hp_outs > 1) { | 2824 | if (cfg->hp_outs > 1) { |
2821 | err = stac92xx_add_control(spec, | 2825 | err = stac92xx_add_control(spec, |
2822 | STAC_CTL_WIDGET_HP_SWITCH, | 2826 | STAC_CTL_WIDGET_HP_SWITCH, |
@@ -4083,8 +4087,6 @@ again: | |||
4083 | case STAC_DELL_M6: | 4087 | case STAC_DELL_M6: |
4084 | spec->init = dell_eq_core_init; | 4088 | spec->init = dell_eq_core_init; |
4085 | spec->num_smuxes = 0; | 4089 | spec->num_smuxes = 0; |
4086 | spec->multiout.hp_nid = | ||
4087 | spec->multiout.dac_nids[spec->multiout.num_dacs - 1]; | ||
4088 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; | 4090 | spec->mixer = &stac92hd73xx_6ch_mixer[DELL_M6_MIXER]; |
4089 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; | 4091 | spec->amp_nids = &stac92hd73xx_amp_nids[DELL_M6_AMP]; |
4090 | spec->num_amps = 1; | 4092 | spec->num_amps = 1; |