Skip to content

Commit

Permalink
ALSA: hda: 92hd71xxx disable unmute support for codecs that don't hav…
Browse files Browse the repository at this point in the history
…e input amps

Some revisions of the 92hd71xxx codec families don't have input amps
on ports 0xa, 0xd and 0xf, so probe the widget caps on port 0xa and
check for support, if found run snd_hda_sequence_write_cache() on the
stac92hd71xxx_unmute_core_init verb list.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Matthew Ranostay authored and Takashi Iwai committed Jan 26, 2009
1 parent 70040c0 commit ca8d33f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions sound/pci/hda/patch_sigmatel.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,26 +858,25 @@ static struct hda_verb stac92hd83xxx_core_init[] = {
static struct hda_verb stac92hd71bxx_core_init[] = {
/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* unmute right and left channels for nodes 0x0a, 0xd, 0x0f */
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
};

#define HD_DISABLE_PORTF 2
#define HD_DISABLE_PORTF 1
static struct hda_verb stac92hd71bxx_analog_core_init[] = {
/* start of config #1 */

/* connect port 0f to audio mixer */
{ 0x0f, AC_VERB_SET_CONNECT_SEL, 0x2},
/* unmute right and left channels for node 0x0f */
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
/* start of config #2 */

/* set master volume and direct control */
{ 0x28, AC_VERB_SET_VOLUME_KNOB_CONTROL, 0xff},
/* unmute right and left channels for nodes 0x0a, 0xd */
{}
};

static struct hda_verb stac92hd71bxx_unmute_core_init[] = {
/* unmute right and left channels for nodes 0x0f, 0xa, 0x0d */
{ 0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{ 0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
{}
Expand Down Expand Up @@ -4942,6 +4941,7 @@ static struct hda_input_mux stac92hd71bxx_dmux = {
static int patch_stac92hd71bxx(struct hda_codec *codec)
{
struct sigmatel_spec *spec;
struct hda_verb *unmute_init = stac92hd71bxx_unmute_core_init;
int err = 0;

spec = kzalloc(sizeof(*spec), GFP_KERNEL);
Expand Down Expand Up @@ -5015,6 +5015,7 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)

/* disable VSW */
spec->init = &stac92hd71bxx_analog_core_init[HD_DISABLE_PORTF];
unmute_init++;
stac_change_pin_config(codec, 0xf, 0x40f000f0);
break;
case 0x111d7603: /* 6 Port with Analog Mixer */
Expand All @@ -5031,6 +5032,9 @@ static int patch_stac92hd71bxx(struct hda_codec *codec)
codec->slave_dig_outs = stac92hd71bxx_slave_dig_outs;
}

if (get_wcaps(codec, 0xa) & AC_WCAP_IN_AMP)
snd_hda_sequence_write_cache(codec, unmute_init);

spec->aloopback_mask = 0x50;
spec->aloopback_shift = 0;

Expand Down

0 comments on commit ca8d33f

Please sign in to comment.