Commit 20a45e86 authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela

[ALSA] hda-codec - Fix Master volume with AD1986A laptop model

Use the bind-control for NID 0x1a and 0x1b as Master volume control
on AD1986 model=laptop as well as model=laptop-eapd.  This will fix
the missing output on some devices.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 2525fdc4
...@@ -498,13 +498,30 @@ static struct snd_kcontrol_new ad1986a_3st_mixers[] = { ...@@ -498,13 +498,30 @@ static struct snd_kcontrol_new ad1986a_3st_mixers[] = {
/* laptop model - 2ch only */ /* laptop model - 2ch only */
static hda_nid_t ad1986a_laptop_dac_nids[1] = { AD1986A_FRONT_DAC }; static hda_nid_t ad1986a_laptop_dac_nids[1] = { AD1986A_FRONT_DAC };
/* master controls both pins 0x1a and 0x1b */
static struct hda_bind_ctls ad1986a_laptop_master_vol = {
.ops = &snd_hda_bind_vol,
.values = {
HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT),
HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
0,
},
};
static struct hda_bind_ctls ad1986a_laptop_master_sw = {
.ops = &snd_hda_bind_sw,
.values = {
HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT),
HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
0,
},
};
static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { static struct snd_kcontrol_new ad1986a_laptop_mixers[] = {
HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Master Playback Volume", 0x1b, 0x0, HDA_OUTPUT), HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
HDA_CODEC_MUTE("Master Playback Switch", 0x1b, 0x0, HDA_OUTPUT), HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
/* HDA_CODEC_VOLUME("Headphone Playback Volume", 0x1a, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT), */
HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT),
HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT), HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT),
HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT), HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT),
...@@ -532,25 +549,6 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { ...@@ -532,25 +549,6 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = {
/* laptop-eapd model - 2ch only */ /* laptop-eapd model - 2ch only */
/* master controls both pins 0x1a and 0x1b */
static struct hda_bind_ctls ad1986a_laptop_master_vol = {
.ops = &snd_hda_bind_vol,
.values = {
HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT),
HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
0,
},
};
static struct hda_bind_ctls ad1986a_laptop_master_sw = {
.ops = &snd_hda_bind_sw,
.values = {
HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT),
HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
0,
},
};
static struct hda_input_mux ad1986a_laptop_eapd_capture_source = { static struct hda_input_mux ad1986a_laptop_eapd_capture_source = {
.num_items = 3, .num_items = 3,
.items = { .items = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment