]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From c9280d681c4093405fc896dc25f81d5ff9de8183 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Thu, 15 Jan 2009 17:31:00 +0100 | |
4 | Subject: ALSA: hda - Fix (yet more) STAC925x issues | |
5 | Patch-mainline: 2.6.29-rc1 | |
6 | References: bnc#460478 | |
7 | ||
8 | The codec-parsing of STAC925x was utterly broken due to its unique | |
9 | design unlike other STAC codecs. It has a volume control only in NID | |
10 | 0x0e (similar as STAC9200), but the parser assumes that the amp is | |
11 | available on each DAC widget. | |
12 | ||
13 | The patch fixes the whole wrong stories: fix the initial volume, | |
14 | assign the fixed "Master" volume, and avoid to create wrong volume | |
15 | controls. | |
16 | ||
17 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
18 | --- | |
19 | sound/pci/hda/patch_sigmatel.c | 16 ++++++++++------ | |
20 | 1 file changed, 10 insertions(+), 6 deletions(-) | |
21 | ||
22 | --- a/sound/pci/hda/patch_sigmatel.c | |
23 | +++ b/sound/pci/hda/patch_sigmatel.c | |
24 | @@ -902,6 +902,8 @@ static struct hda_verb stac92hd71bxx_ana | |
25 | static struct hda_verb stac925x_core_init[] = { | |
26 | /* set dac0mux for dac converter */ | |
27 | { 0x06, AC_VERB_SET_CONNECT_SEL, 0x00}, | |
28 | + /* mute the master volume */ | |
29 | + { 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE }, | |
30 | {} | |
31 | }; | |
32 | ||
33 | @@ -1153,6 +1155,8 @@ static struct snd_kcontrol_new stac92hd7 | |
34 | }; | |
35 | ||
36 | static struct snd_kcontrol_new stac925x_mixer[] = { | |
37 | + HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT), | |
38 | + HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT), | |
39 | STAC_INPUT_SOURCE(1), | |
40 | HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT), | |
41 | HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT), | |
42 | @@ -3492,14 +3496,14 @@ static int stac92xx_parse_auto_config(st | |
43 | ||
44 | if ((err = stac92xx_add_dyn_out_pins(codec, &spec->autocfg)) < 0) | |
45 | return err; | |
46 | - if (spec->multiout.num_dacs == 0) | |
47 | + if (spec->multiout.num_dacs == 0) { | |
48 | if ((err = stac92xx_auto_fill_dac_nids(codec, &spec->autocfg)) < 0) | |
49 | return err; | |
50 | - | |
51 | - err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg); | |
52 | - | |
53 | - if (err < 0) | |
54 | - return err; | |
55 | + err = stac92xx_auto_create_multi_out_ctls(codec, | |
56 | + &spec->autocfg); | |
57 | + if (err < 0) | |
58 | + return err; | |
59 | + } | |
60 | ||
61 | /* setup analog beep controls */ | |
62 | if (spec->anabeep_nid > 0) { |