1 From: Takashi Iwai <tiwai@suse.de>
2 Subject: ALSA: hda - Split ALC268 acer model
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
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
16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
19 Documentation/sound/alsa/ALSA-Configuration.txt | 1
20 sound/pci/hda/patch_realtek.c | 44 ++++++++++++++++++++++++
21 2 files changed, 45 insertions(+)
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
29 + acer-dmic Acer laptops with digital-mic
30 acer-aspire Acer Aspire One
31 dell Dell OEM laptops (Vostro 1200)
33 --- a/sound/pci/hda/patch_realtek.c
34 +++ b/sound/pci/hda/patch_realtek.c
35 @@ -114,6 +114,7 @@ enum {
40 ALC268_ACER_ASPIRE_ONE,
43 @@ -10948,6 +10949,22 @@ static struct snd_kcontrol_new alc268_ac
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),
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),
58 + HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
59 + HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
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_
70 + { "Internal Mic", 0x1 },
75 +static struct hda_input_mux alc268_acer_dmic_capture_source = {
79 { "Internal Mic", 0x6 },
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,
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,
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,
111 [ALC268_ACER_ASPIRE_ONE] = {
112 .mixers = { alc268_acer_aspire_one_mixer,
113 alc268_capture_alt_mixer },