ALSA: HDA: Create mixers on ALC887

BugLink: http://launchpad.net/bugs/669092

ALC887 does not have any volume control ability on the mixer NIDs,
so put the volume controls on the dac NIDs instead. Without this
patch, ALC887 users cannot use alsamixer at all.

Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
David Henningsson 2010-11-09 14:35:30 +01:00 committed by Takashi Iwai
parent 5dbea6b1f2
commit 03b7a1ab55
1 changed files with 8 additions and 2 deletions

View File

@ -10816,6 +10816,9 @@ static int alc_auto_add_mic_boost(struct hda_codec *codec)
return 0; return 0;
} }
static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
const struct auto_pin_cfg *cfg);
/* almost identical with ALC880 parser... */ /* almost identical with ALC880 parser... */
static int alc882_parse_auto_config(struct hda_codec *codec) static int alc882_parse_auto_config(struct hda_codec *codec)
{ {
@ -10833,6 +10836,9 @@ static int alc882_parse_auto_config(struct hda_codec *codec)
err = alc880_auto_fill_dac_nids(spec, &spec->autocfg); err = alc880_auto_fill_dac_nids(spec, &spec->autocfg);
if (err < 0) if (err < 0)
return err; return err;
if (codec->vendor_id == 0x10ec0887)
err = alc861vd_auto_create_multi_out_ctls(spec, &spec->autocfg);
else
err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg); err = alc880_auto_create_multi_out_ctls(spec, &spec->autocfg);
if (err < 0) if (err < 0)
return err; return err;
@ -16963,7 +16969,7 @@ static void alc861vd_auto_init_analog_input(struct hda_codec *codec)
#define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c) #define alc861vd_idx_to_mixer_switch(nid) ((nid) + 0x0c)
/* add playback controls from the parsed DAC table */ /* add playback controls from the parsed DAC table */
/* Based on ALC880 version. But ALC861VD has separate, /* Based on ALC880 version. But ALC861VD and ALC887 have separate,
* different NIDs for mute/unmute switch and volume control */ * different NIDs for mute/unmute switch and volume control */
static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec, static int alc861vd_auto_create_multi_out_ctls(struct alc_spec *spec,
const struct auto_pin_cfg *cfg) const struct auto_pin_cfg *cfg)