aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_analog.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r--sound/pci/hda/patch_analog.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index 6823f2bc10b3..511df07fa2a3 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -488,9 +488,13 @@ static struct snd_kcontrol_new ad1986a_mixers[] = {
488 { 488 {
489 .iface = SNDRV_CTL_ELEM_IFACE_MIXER, 489 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
490 .name = "PCM Playback Volume", 490 .name = "PCM Playback Volume",
491 .access = SNDRV_CTL_ELEM_ACCESS_READWRITE |
492 SNDRV_CTL_ELEM_ACCESS_TLV_READ |
493 SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK,
491 .info = ad1986a_pcm_amp_vol_info, 494 .info = ad1986a_pcm_amp_vol_info,
492 .get = ad1986a_pcm_amp_vol_get, 495 .get = ad1986a_pcm_amp_vol_get,
493 .put = ad1986a_pcm_amp_vol_put, 496 .put = ad1986a_pcm_amp_vol_put,
497 .tlv = { .c = snd_hda_mixer_amp_tlv },
494 .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT) 498 .private_value = HDA_COMPOSE_AMP_VAL(AD1986A_FRONT_DAC, 3, 0, HDA_OUTPUT)
495 }, 499 },
496 { 500 {
@@ -637,6 +641,7 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = {
637 .info = snd_hda_mixer_amp_volume_info, 641 .info = snd_hda_mixer_amp_volume_info,
638 .get = snd_hda_mixer_amp_volume_get, 642 .get = snd_hda_mixer_amp_volume_get,
639 .put = ad1986a_laptop_master_vol_put, 643 .put = ad1986a_laptop_master_vol_put,
644 .tlv = { .c = snd_hda_mixer_amp_tlv },
640 .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT), 645 .private_value = HDA_COMPOSE_AMP_VAL(0x1a, 3, 0, HDA_OUTPUT),
641 }, 646 },
642 { 647 {
@@ -791,6 +796,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
791 .config = AD1986A_3STACK }, /* ASUS A8N-VM CSM */ 796 .config = AD1986A_3STACK }, /* ASUS A8N-VM CSM */
792 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b3, 797 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81b3,
793 .config = AD1986A_3STACK }, /* ASUS P5RD2-VM / P5GPL-X SE */ 798 .config = AD1986A_3STACK }, /* ASUS P5RD2-VM / P5GPL-X SE */
799 { .pci_subvendor = 0x1043, .pci_subdevice = 0x81cb,
800 .config = AD1986A_3STACK }, /* ASUS M2NPV-VM */
794 { .modelname = "laptop", .config = AD1986A_LAPTOP }, 801 { .modelname = "laptop", .config = AD1986A_LAPTOP },
795 { .pci_subvendor = 0x144d, .pci_subdevice = 0xc01e, 802 { .pci_subvendor = 0x144d, .pci_subdevice = 0xc01e,
796 .config = AD1986A_LAPTOP }, /* FSC V2060 */ 803 .config = AD1986A_LAPTOP }, /* FSC V2060 */
@@ -803,6 +810,8 @@ static struct hda_board_config ad1986a_cfg_tbl[] = {
803 .config = AD1986A_LAPTOP_EAPD }, /* Samsung X60 Chane */ 810 .config = AD1986A_LAPTOP_EAPD }, /* Samsung X60 Chane */
804 { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024, 811 { .pci_subvendor = 0x144d, .pci_subdevice = 0xc024,
805 .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */ 812 .config = AD1986A_LAPTOP_EAPD }, /* Samsung R65-T2300 Charis */
813 { .pci_subvendor = 0x144d, .pci_subdevice = 0xc026,
814 .config = AD1986A_LAPTOP_EAPD }, /* Samsung X10-T2300 Culesa */
806 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153, 815 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1153,
807 .config = AD1986A_LAPTOP_EAPD }, /* ASUS M9 */ 816 .config = AD1986A_LAPTOP_EAPD }, /* ASUS M9 */
808 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213, 817 { .pci_subvendor = 0x1043, .pci_subdevice = 0x1213,
@@ -1626,10 +1635,12 @@ static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol,
1626{ 1635{
1627 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 1636 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
1628 struct ad198x_spec *spec = codec->spec; 1637 struct ad198x_spec *spec = codec->spec;
1629 if (spec->need_dac_fix) 1638 int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
1639 spec->num_channel_mode,
1640 &spec->multiout.max_channels);
1641 if (! err && spec->need_dac_fix)
1630 spec->multiout.num_dacs = spec->multiout.max_channels / 2; 1642 spec->multiout.num_dacs = spec->multiout.max_channels / 2;
1631 return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, 1643 return err;
1632 spec->num_channel_mode, &spec->multiout.max_channels);
1633} 1644}
1634 1645
1635/* 6-stack mode */ 1646/* 6-stack mode */
@@ -2460,7 +2471,7 @@ static void ad1988_auto_init_extra_out(struct hda_codec *codec)
2460 pin = spec->autocfg.speaker_pins[0]; 2471 pin = spec->autocfg.speaker_pins[0];
2461 if (pin) /* connect to front */ 2472 if (pin) /* connect to front */
2462 ad1988_auto_set_output_and_unmute(codec, pin, PIN_OUT, 0); 2473 ad1988_auto_set_output_and_unmute(codec, pin, PIN_OUT, 0);
2463 pin = spec->autocfg.hp_pin; 2474 pin = spec->autocfg.hp_pins[0];
2464 if (pin) /* connect to front */ 2475 if (pin) /* connect to front */
2465 ad1988_auto_set_output_and_unmute(codec, pin, PIN_HP, 0); 2476 ad1988_auto_set_output_and_unmute(codec, pin, PIN_HP, 0);
2466} 2477}
@@ -2512,7 +2523,7 @@ static int ad1988_parse_auto_config(struct hda_codec *codec)
2512 (err = ad1988_auto_create_extra_out(codec, 2523 (err = ad1988_auto_create_extra_out(codec,
2513 spec->autocfg.speaker_pins[0], 2524 spec->autocfg.speaker_pins[0],
2514 "Speaker")) < 0 || 2525 "Speaker")) < 0 ||
2515 (err = ad1988_auto_create_extra_out(codec, spec->autocfg.hp_pin, 2526 (err = ad1988_auto_create_extra_out(codec, spec->autocfg.hp_pins[0],
2516 "Headphone")) < 0 || 2527 "Headphone")) < 0 ||
2517 (err = ad1988_auto_create_analog_input_ctls(spec, &spec->autocfg)) < 0) 2528 (err = ad1988_auto_create_analog_input_ctls(spec, &spec->autocfg)) < 0)
2518 return err; 2529 return err;