diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-20 20:25:48 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-20 20:25:48 -0500 |
commit | 1725b82a6e2721612a3572d0336f51f1f1c3cf54 (patch) | |
tree | cd24cc1fe3272c588f12f7f6ab86efa84af42acc | |
parent | 5b2d1ecac2a79b9438aed731557b8912564cedfd (diff) |
ALSA: hda - make laptop-eapd model back for AD1986A
The changes specific for Samsung laptops seem unapplicable to other
hardware models like ASUS. The mic inputs are lost on such hardware
by the change 5d5d5f43f1b835c375de9bd270cce030d16e2871.
This patch adds back the old laptop-eapd model, and create a new
model "samsung" for the new one specific to Samsung laptops with
automatic mic selection feature.
Reference: kernel bugzilla #12070
http://bugzilla.kernel.org/show_bug.cgi?id=12070
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_analog.c | 49 |
2 files changed, 48 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 010aa66ab920..e55081fdc8ab 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -984,9 +984,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
984 | 6stack 6-jack, separate surrounds (default) | 984 | 6stack 6-jack, separate surrounds (default) |
985 | 3stack 3-stack, shared surrounds | 985 | 3stack 3-stack, shared surrounds |
986 | laptop 2-channel only (FSC V2060, Samsung M50) | 986 | laptop 2-channel only (FSC V2060, Samsung M50) |
987 | laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J) | 987 | laptop-eapd 2-channel with EAPD (ASUS A6J) |
988 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) | 988 | laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100) |
989 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) | 989 | ultra 2-channel with EAPD (Samsung Ultra tablet PC) |
990 | samsung 2-channel with EAPD (Samsung R65) | ||
990 | 991 | ||
991 | AD1988/AD1988B/AD1989A/AD1989B | 992 | AD1988/AD1988B/AD1989A/AD1989B |
992 | 6stack 6-jack | 993 | 6stack 6-jack |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 032cbb4bd985..0cc6be12b8b7 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -642,6 +642,36 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = { | |||
642 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), | 642 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), |
643 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | 643 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), |
644 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | 644 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), |
645 | HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT), | ||
646 | HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT), | ||
647 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | ||
648 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | ||
649 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | ||
650 | HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT), | ||
651 | HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT), | ||
652 | { | ||
653 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
654 | .name = "Capture Source", | ||
655 | .info = ad198x_mux_enum_info, | ||
656 | .get = ad198x_mux_enum_get, | ||
657 | .put = ad198x_mux_enum_put, | ||
658 | }, | ||
659 | { | ||
660 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | ||
661 | .name = "External Amplifier", | ||
662 | .info = ad198x_eapd_info, | ||
663 | .get = ad198x_eapd_get, | ||
664 | .put = ad198x_eapd_put, | ||
665 | .private_value = 0x1b | (1 << 8), /* port-D, inversed */ | ||
666 | }, | ||
667 | { } /* end */ | ||
668 | }; | ||
669 | |||
670 | static struct snd_kcontrol_new ad1986a_samsung_mixers[] = { | ||
671 | HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol), | ||
672 | HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw), | ||
673 | HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT), | ||
674 | HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT), | ||
645 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), | 675 | HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT), |
646 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), | 676 | HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT), |
647 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), | 677 | HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT), |
@@ -930,6 +960,7 @@ enum { | |||
930 | AD1986A_LAPTOP_EAPD, | 960 | AD1986A_LAPTOP_EAPD, |
931 | AD1986A_LAPTOP_AUTOMUTE, | 961 | AD1986A_LAPTOP_AUTOMUTE, |
932 | AD1986A_ULTRA, | 962 | AD1986A_ULTRA, |
963 | AD1986A_SAMSUNG, | ||
933 | AD1986A_MODELS | 964 | AD1986A_MODELS |
934 | }; | 965 | }; |
935 | 966 | ||
@@ -940,6 +971,7 @@ static const char *ad1986a_models[AD1986A_MODELS] = { | |||
940 | [AD1986A_LAPTOP_EAPD] = "laptop-eapd", | 971 | [AD1986A_LAPTOP_EAPD] = "laptop-eapd", |
941 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", | 972 | [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute", |
942 | [AD1986A_ULTRA] = "ultra", | 973 | [AD1986A_ULTRA] = "ultra", |
974 | [AD1986A_SAMSUNG] = "samsung", | ||
943 | }; | 975 | }; |
944 | 976 | ||
945 | static struct snd_pci_quirk ad1986a_cfg_tbl[] = { | 977 | static struct snd_pci_quirk ad1986a_cfg_tbl[] = { |
@@ -962,9 +994,9 @@ static struct snd_pci_quirk ad1986a_cfg_tbl[] = { | |||
962 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD), | 994 | SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD), |
963 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), | 995 | SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK), |
964 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), | 996 | SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP), |
965 | SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD), | 997 | SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_SAMSUNG), |
966 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD), | 998 | SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_SAMSUNG), |
967 | SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD), | 999 | SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_SAMSUNG), |
968 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), | 1000 | SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA), |
969 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), | 1001 | SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK), |
970 | SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP), | 1002 | SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP), |
@@ -1046,6 +1078,17 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
1046 | break; | 1078 | break; |
1047 | case AD1986A_LAPTOP_EAPD: | 1079 | case AD1986A_LAPTOP_EAPD: |
1048 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; | 1080 | spec->mixers[0] = ad1986a_laptop_eapd_mixers; |
1081 | spec->num_init_verbs = 2; | ||
1082 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | ||
1083 | spec->multiout.max_channels = 2; | ||
1084 | spec->multiout.num_dacs = 1; | ||
1085 | spec->multiout.dac_nids = ad1986a_laptop_dac_nids; | ||
1086 | if (!is_jack_available(codec, 0x25)) | ||
1087 | spec->multiout.dig_out_nid = 0; | ||
1088 | spec->input_mux = &ad1986a_laptop_eapd_capture_source; | ||
1089 | break; | ||
1090 | case AD1986A_SAMSUNG: | ||
1091 | spec->mixers[0] = ad1986a_samsung_mixers; | ||
1049 | spec->num_init_verbs = 3; | 1092 | spec->num_init_verbs = 3; |
1050 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; | 1093 | spec->init_verbs[1] = ad1986a_eapd_init_verbs; |
1051 | spec->init_verbs[2] = ad1986a_automic_verbs; | 1094 | spec->init_verbs[2] = ad1986a_automic_verbs; |