]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Takashi Iwai <tiwai@suse.de> |
2 | Subject: ALSA: hda - Split ALC268 acer model | |
3 | Patch-mainline: | |
4 | References: bnc#420048 | |
5 | ||
6 | There are actually two variants of ALC268 Acer implementation, one | |
7 | with an analog built-in mic (pin 0x19) and another with a digital | |
8 | mic (pin 0x12). Created a new model, acer-dmic, for the latter case | |
9 | now. | |
10 | ||
11 | So far, all known models are assigned to be analog-mic, according to | |
12 | the BIOS setup. If this doesn't match with the actual case, one needs | |
13 | to try model=acer-dmic, and fix the entry to point ALC268_ACER_DMIC | |
14 | if it works. | |
15 | ||
16 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
17 | ||
18 | --- | |
19 | Documentation/sound/alsa/ALSA-Configuration.txt | 1 | |
20 | sound/pci/hda/patch_realtek.c | 44 ++++++++++++++++++++++++ | |
21 | 2 files changed, 45 insertions(+) | |
22 | ||
23 | --- a/Documentation/sound/alsa/ALSA-Configuration.txt | |
24 | +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |
25 | @@ -844,6 +844,7 @@ Prior to version 0.9.0rc4 options had a | |
26 | 3stack 3-stack model | |
27 | toshiba Toshiba A205 | |
28 | acer Acer laptops | |
29 | + acer-dmic Acer laptops with digital-mic | |
30 | acer-aspire Acer Aspire One | |
31 | dell Dell OEM laptops (Vostro 1200) | |
32 | zepto Zepto laptops | |
33 | --- a/sound/pci/hda/patch_realtek.c | |
34 | +++ b/sound/pci/hda/patch_realtek.c | |
35 | @@ -114,6 +114,7 @@ enum { | |
36 | ALC268_3ST, | |
37 | ALC268_TOSHIBA, | |
38 | ALC268_ACER, | |
39 | + ALC268_ACER_DMIC, | |
40 | ALC268_ACER_ASPIRE_ONE, | |
41 | ALC268_DELL, | |
42 | ALC268_ZEPTO, | |
43 | @@ -10948,6 +10949,22 @@ static struct snd_kcontrol_new alc268_ac | |
44 | { } | |
45 | }; | |
46 | ||
47 | +static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = { | |
48 | + /* output mixer control */ | |
49 | + HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol), | |
50 | + { | |
51 | + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, | |
52 | + .name = "Master Playback Switch", | |
53 | + .info = snd_hda_mixer_amp_switch_info, | |
54 | + .get = snd_hda_mixer_amp_switch_get, | |
55 | + .put = alc268_acer_master_sw_put, | |
56 | + .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT), | |
57 | + }, | |
58 | + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT), | |
59 | + HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT), | |
60 | + { } | |
61 | +}; | |
62 | + | |
63 | static struct hda_verb alc268_acer_aspire_one_verbs[] = { | |
64 | {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, | |
65 | {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, | |
66 | @@ -11280,6 +11297,15 @@ static struct hda_input_mux alc268_acer_ | |
67 | .num_items = 3, | |
68 | .items = { | |
69 | { "Mic", 0x0 }, | |
70 | + { "Internal Mic", 0x1 }, | |
71 | + { "Line", 0x2 }, | |
72 | + }, | |
73 | +}; | |
74 | + | |
75 | +static struct hda_input_mux alc268_acer_dmic_capture_source = { | |
76 | + .num_items = 3, | |
77 | + .items = { | |
78 | + { "Mic", 0x0 }, | |
79 | { "Internal Mic", 0x6 }, | |
80 | { "Line", 0x2 }, | |
81 | }, | |
82 | @@ -11560,6 +11586,7 @@ static const char *alc268_models[ALC268_ | |
83 | [ALC268_3ST] = "3stack", | |
84 | [ALC268_TOSHIBA] = "toshiba", | |
85 | [ALC268_ACER] = "acer", | |
86 | + [ALC268_ACER_DMIC] = "acer-dmic", | |
87 | [ALC268_ACER_ASPIRE_ONE] = "acer-aspire", | |
88 | [ALC268_DELL] = "dell", | |
89 | [ALC268_ZEPTO] = "zepto", | |
90 | @@ -11655,6 +11682,23 @@ static struct alc_config_preset alc268_p | |
91 | .unsol_event = alc268_acer_unsol_event, | |
92 | .init_hook = alc268_acer_init_hook, | |
93 | }, | |
94 | + [ALC268_ACER_DMIC] = { | |
95 | + .mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer, | |
96 | + alc268_beep_mixer }, | |
97 | + .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | |
98 | + alc268_acer_verbs }, | |
99 | + .num_dacs = ARRAY_SIZE(alc268_dac_nids), | |
100 | + .dac_nids = alc268_dac_nids, | |
101 | + .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), | |
102 | + .adc_nids = alc268_adc_nids_alt, | |
103 | + .capsrc_nids = alc268_capsrc_nids, | |
104 | + .hp_nid = 0x02, | |
105 | + .num_channel_mode = ARRAY_SIZE(alc268_modes), | |
106 | + .channel_mode = alc268_modes, | |
107 | + .input_mux = &alc268_acer_dmic_capture_source, | |
108 | + .unsol_event = alc268_acer_unsol_event, | |
109 | + .init_hook = alc268_acer_init_hook, | |
110 | + }, | |
111 | [ALC268_ACER_ASPIRE_ONE] = { | |
112 | .mixers = { alc268_acer_aspire_one_mixer, | |
113 | alc268_capture_alt_mixer }, |