]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.drivers/alsa-hda-stac925x-init-fix
Imported linux-2.6.27.39 suse/xen patches.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.drivers / alsa-hda-stac925x-init-fix
CommitLineData
2cb7cef9
BS
1From c9280d681c4093405fc896dc25f81d5ff9de8183 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Thu, 15 Jan 2009 17:31:00 +0100
4Subject: ALSA: hda - Fix (yet more) STAC925x issues
5Patch-mainline: 2.6.29-rc1
6References: bnc#460478
7
8The codec-parsing of STAC925x was utterly broken due to its unique
9design unlike other STAC codecs. It has a volume control only in NID
100x0e (similar as STAC9200), but the parser assumes that the amp is
11available on each DAC widget.
12
13The patch fixes the whole wrong stories: fix the initial volume,
14assign the fixed "Master" volume, and avoid to create wrong volume
15controls.
16
17Signed-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) {