/[linux-patches]/genpatches-2.6/tags/2.6.28-1/2700_hda-asus-mic-input.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.28-1/2700_hda-asus-mic-input.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1451 - (show annotations) (download)
Thu Dec 25 01:56:17 2008 UTC (5 years, 8 months ago) by dsd
File size: 5457 byte(s)
2.6.28-1 release
1 From: Takashi Iwai <tiwai@suse.de>
2 Date: Fri, 21 Nov 2008 01:25:48 +0000 (+0100)
3 Subject: ALSA: hda - make laptop-eapd model back for AD1986A
4 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftiwai%2Fsound-2.6.git;a=commitdiff_plain;h=1725b82a6e2721612a3572d0336f51f1f1c3cf54
5
6 ALSA: hda - make laptop-eapd model back for AD1986A
7
8 The changes specific for Samsung laptops seem unapplicable to other
9 hardware models like ASUS. The mic inputs are lost on such hardware
10 by the change 5d5d5f43f1b835c375de9bd270cce030d16e2871.
11
12 This patch adds back the old laptop-eapd model, and create a new
13 model "samsung" for the new one specific to Samsung laptops with
14 automatic mic selection feature.
15
16 Reference: kernel bugzilla #12070
17 http://bugzilla.kernel.org/show_bug.cgi?id=12070
18
19 Signed-off-by: Takashi Iwai <tiwai@suse.de>
20 ---
21
22 diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
23 index 010aa66..e55081f 100644
24 --- a/Documentation/sound/alsa/ALSA-Configuration.txt
25 +++ b/Documentation/sound/alsa/ALSA-Configuration.txt
26 @@ -984,9 +984,10 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
27 6stack 6-jack, separate surrounds (default)
28 3stack 3-stack, shared surrounds
29 laptop 2-channel only (FSC V2060, Samsung M50)
30 - laptop-eapd 2-channel with EAPD (Samsung R65, ASUS A6J)
31 + laptop-eapd 2-channel with EAPD (ASUS A6J)
32 laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
33 ultra 2-channel with EAPD (Samsung Ultra tablet PC)
34 + samsung 2-channel with EAPD (Samsung R65)
35
36 AD1988/AD1988B/AD1989A/AD1989B
37 6stack 6-jack
38 diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
39 index 032cbb4..0cc6be1 100644
40 --- a/sound/pci/hda/patch_analog.c
41 +++ b/sound/pci/hda/patch_analog.c
42 @@ -642,6 +642,36 @@ static struct snd_kcontrol_new ad1986a_laptop_eapd_mixers[] = {
43 HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
44 HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
45 HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
46 + HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x17, 0, HDA_OUTPUT),
47 + HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x17, 0, HDA_OUTPUT),
48 + HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
49 + HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT),
50 + HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT),
51 + HDA_CODEC_VOLUME("Capture Volume", 0x12, 0x0, HDA_OUTPUT),
52 + HDA_CODEC_MUTE("Capture Switch", 0x12, 0x0, HDA_OUTPUT),
53 + {
54 + .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
55 + .name = "Capture Source",
56 + .info = ad198x_mux_enum_info,
57 + .get = ad198x_mux_enum_get,
58 + .put = ad198x_mux_enum_put,
59 + },
60 + {
61 + .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
62 + .name = "External Amplifier",
63 + .info = ad198x_eapd_info,
64 + .get = ad198x_eapd_get,
65 + .put = ad198x_eapd_put,
66 + .private_value = 0x1b | (1 << 8), /* port-D, inversed */
67 + },
68 + { } /* end */
69 +};
70 +
71 +static struct snd_kcontrol_new ad1986a_samsung_mixers[] = {
72 + HDA_BIND_VOL("Master Playback Volume", &ad1986a_laptop_master_vol),
73 + HDA_BIND_SW("Master Playback Switch", &ad1986a_laptop_master_sw),
74 + HDA_CODEC_VOLUME("PCM Playback Volume", 0x03, 0x0, HDA_OUTPUT),
75 + HDA_CODEC_MUTE("PCM Playback Switch", 0x03, 0x0, HDA_OUTPUT),
76 HDA_CODEC_VOLUME("Mic Playback Volume", 0x13, 0x0, HDA_OUTPUT),
77 HDA_CODEC_MUTE("Mic Playback Switch", 0x13, 0x0, HDA_OUTPUT),
78 HDA_CODEC_VOLUME("Mic Boost", 0x0f, 0x0, HDA_OUTPUT),
79 @@ -930,6 +960,7 @@ enum {
80 AD1986A_LAPTOP_EAPD,
81 AD1986A_LAPTOP_AUTOMUTE,
82 AD1986A_ULTRA,
83 + AD1986A_SAMSUNG,
84 AD1986A_MODELS
85 };
86
87 @@ -940,6 +971,7 @@ static const char *ad1986a_models[AD1986A_MODELS] = {
88 [AD1986A_LAPTOP_EAPD] = "laptop-eapd",
89 [AD1986A_LAPTOP_AUTOMUTE] = "laptop-automute",
90 [AD1986A_ULTRA] = "ultra",
91 + [AD1986A_SAMSUNG] = "samsung",
92 };
93
94 static struct snd_pci_quirk ad1986a_cfg_tbl[] = {
95 @@ -962,9 +994,9 @@ static struct snd_pci_quirk ad1986a_cfg_tbl[] = {
96 SND_PCI_QUIRK(0x1179, 0xff40, "Toshiba", AD1986A_LAPTOP_EAPD),
97 SND_PCI_QUIRK(0x144d, 0xb03c, "Samsung R55", AD1986A_3STACK),
98 SND_PCI_QUIRK(0x144d, 0xc01e, "FSC V2060", AD1986A_LAPTOP),
99 - SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_LAPTOP_EAPD),
100 - SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_LAPTOP_EAPD),
101 - SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_LAPTOP_EAPD),
102 + SND_PCI_QUIRK(0x144d, 0xc023, "Samsung X60", AD1986A_SAMSUNG),
103 + SND_PCI_QUIRK(0x144d, 0xc024, "Samsung R65", AD1986A_SAMSUNG),
104 + SND_PCI_QUIRK(0x144d, 0xc026, "Samsung X11", AD1986A_SAMSUNG),
105 SND_PCI_QUIRK(0x144d, 0xc027, "Samsung Q1", AD1986A_ULTRA),
106 SND_PCI_QUIRK(0x144d, 0xc504, "Samsung Q35", AD1986A_3STACK),
107 SND_PCI_QUIRK(0x17aa, 0x1011, "Lenovo M55", AD1986A_LAPTOP),
108 @@ -1046,6 +1078,17 @@ static int patch_ad1986a(struct hda_codec *codec)
109 break;
110 case AD1986A_LAPTOP_EAPD:
111 spec->mixers[0] = ad1986a_laptop_eapd_mixers;
112 + spec->num_init_verbs = 2;
113 + spec->init_verbs[1] = ad1986a_eapd_init_verbs;
114 + spec->multiout.max_channels = 2;
115 + spec->multiout.num_dacs = 1;
116 + spec->multiout.dac_nids = ad1986a_laptop_dac_nids;
117 + if (!is_jack_available(codec, 0x25))
118 + spec->multiout.dig_out_nid = 0;
119 + spec->input_mux = &ad1986a_laptop_eapd_capture_source;
120 + break;
121 + case AD1986A_SAMSUNG:
122 + spec->mixers[0] = ad1986a_samsung_mixers;
123 spec->num_init_verbs = 3;
124 spec->init_verbs[1] = ad1986a_eapd_init_verbs;
125 spec->init_verbs[2] = ad1986a_automic_verbs;

  ViewVC Help
Powered by ViewVC 1.1.20