diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-08-15 16:20:45 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2007-10-16 09:59:00 -0400 |
commit | 20a45e8644ef4f5e7dfd727859301c4c581e9489 (patch) | |
tree | 849d6036eea6af1c811f4f5e88a90a581fd1846c /sound | |
parent | 2525fdc42fdc4bb943ec2fa5a37e2ae139e1b6d3 (diff) |
[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: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 53cfa0da4964..bc4b797aa97b 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -498,13 +498,30 @@ static struct snd_kcontrol_new ad1986a_3st_mixers[] = { | |||
498 | /* laptop model - 2ch only */ | 498 | /* laptop model - 2ch only */ |
499 | static hda_nid_t ad1986a_laptop_dac_nids[1] = { AD1986A_FRONT_DAC }; | 499 | static hda_nid_t ad1986a_laptop_dac_nids[1] = { AD1986A_FRONT_DAC }; |
500 | 500 | ||
501 | /* master controls both pins 0x1a and 0x1b */ | ||
502 | static struct hda_bind_ctls ad1986a_laptop_master_vol = { | ||
503 | .ops = &snd_hda_bind_vol, | ||
504 | .values = { | ||
505 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | ||
506 | HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT), | ||
507 | 0, | ||
508 | }, | ||
509 | }; | ||
510 | |||
511 | static struct hda_bind_ctls ad1986a_laptop_master_sw = { | ||
512 | .ops = &snd_hda_bind_sw, | ||
513 | .values = { | ||
514 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | ||
515 | HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT), | ||
516 | 0, | ||
517 | }, | ||
518 | }; | ||
519 | |||
501 | static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { | 520 | static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { |
502 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 521 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
503 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | 522 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), |
504 | HDA_CODEC_VOLUME("Master Playback Volume", 0x1b, 0x0, HDA_OUTPUT), | 523 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), |
505 | HDA_CODEC_MUTE("Master Playback Switch", 0x1b, 0x0, HDA_OUTPUT), | 524 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), |
506 | /* HDA_CODEC_VOLUME("Headphone Playback Volume", 0x1a, 0x0, HDA_OUTPUT), | ||
507 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x1a, 0x0, HDA_OUTPUT), */ | ||
508 | HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT), | 525 | HDA_CODEC_VOLUME("CD Playback Volume", 0x15, 0x0, HDA_OUTPUT), |
509 | HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT), | 526 | HDA_CODEC_MUTE("CD Playback Switch", 0x15, 0x0, HDA_OUTPUT), |
510 | HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT), | 527 | HDA_CODEC_VOLUME("Line Playback Volume", 0x17, 0x0, HDA_OUTPUT), |
@@ -532,25 +549,6 @@ static struct snd_kcontrol_new ad1986a_laptop_mixers[] = { | |||
532 | 549 | ||
533 | /* laptop-eapd model - 2ch only */ | 550 | /* laptop-eapd model - 2ch only */ |
534 | 551 | ||
535 | /* master controls both pins 0x1a and 0x1b */ | ||
536 | static struct hda_bind_ctls ad1986a_laptop_master_vol = { | ||
537 | .ops = &snd_hda_bind_vol, | ||
538 | .values = { | ||
539 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | ||
540 | HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT), | ||
541 | 0, | ||
542 | }, | ||
543 | }; | ||
544 | |||
545 | static struct hda_bind_ctls ad1986a_laptop_master_sw = { | ||
546 | .ops = &snd_hda_bind_sw, | ||
547 | .values = { | ||
548 | HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), | ||
549 | HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT), | ||
550 | 0, | ||
551 | }, | ||
552 | }; | ||
553 | |||
554 | static struct hda_input_mux ad1986a_laptop_eapd_capture_source = { | 552 | static struct hda_input_mux ad1986a_laptop_eapd_capture_source = { |
555 | .num_items = 3, | 553 | .num_items = 3, |
556 | .items = { | 554 | .items = { |