Skip to content

Commit

Permalink
ALSA: hda - Fix (yet more) STAC925x issues
Browse files Browse the repository at this point in the history
The codec-parsing of STAC925x was utterly broken due to its unique
design unlike other STAC codecs.  It has a volume control only in NID
0x0e (similar as STAC9200), but the parser assumes that the amp is
available on each DAC widget.

The patch fixes the whole wrong stories: fix the initial volume,
assign the fixed "Master" volume, and avoid to create wrong volume
controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jan 15, 2009
1 parent 428549f commit c9280d6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,8 +885,8 @@ static struct hda_verb stac92hd71bxx_analog_core_init[] = {
static struct hda_verb stac925x_core_init[] = {
/* set dac0mux for dac converter */
{ 0x06, AC_VERB_SET_CONNECT_SEL, 0x00},
/* unmute and set max the selector */
{ 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, 0xb01f },
/* mute the master volume */
{ 0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
{}
};

Expand Down Expand Up @@ -1138,6 +1138,8 @@ static struct snd_kcontrol_new stac92hd71bxx_mixer[] = {
};

static struct snd_kcontrol_new stac925x_mixer[] = {
HDA_CODEC_VOLUME("Master Playback Volume", 0x0e, 0, HDA_OUTPUT),
HDA_CODEC_MUTE("Master Playback Switch", 0x0e, 0, HDA_OUTPUT),
STAC_INPUT_SOURCE(1),
HDA_CODEC_VOLUME("Capture Volume", 0x09, 0, HDA_OUTPUT),
HDA_CODEC_MUTE("Capture Switch", 0x14, 0, HDA_OUTPUT),
Expand Down Expand Up @@ -3573,13 +3575,12 @@ static int stac92xx_parse_auto_config(struct hda_codec *codec, hda_nid_t dig_out
err = stac92xx_auto_fill_dac_nids(codec);
if (err < 0)
return err;
err = stac92xx_auto_create_multi_out_ctls(codec,
&spec->autocfg);
if (err < 0)
return err;
}

err = stac92xx_auto_create_multi_out_ctls(codec, &spec->autocfg);

if (err < 0)
return err;

/* setup analog beep controls */
if (spec->anabeep_nid > 0) {
err = stac92xx_auto_create_beep_ctls(codec,
Expand Down

0 comments on commit c9280d6

Please sign in to comment.