aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-05 08:57:20 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-05 08:57:20 -0500
commitc238b4f4038e0e49bb241640610584a088b268b1 (patch)
tree8abc36df560982fe9badf6fad24a88f046bf6ac6 /sound/pci/hda/patch_realtek.c
parent13c947444f4355293b49f83b809f178393a0a4d9 (diff)
ALSA: hda - Split ALC268 acer model
There are actually two variants of ALC268 Acer implementation, one with an analog built-in mic (pin 0x19) and another with a digital mic (pin 0x12). Created a new model, acer-dmic, for the latter case now. So far, all known models are assigned to be analog-mic, according to the BIOS setup. If this doesn't match with the actual case, one needs to try model=acer-dmic, and fix the entry to point ALC268_ACER_DMIC if it works. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 15779d8c7564..425b0fc86f7d 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -114,6 +114,7 @@ enum {
114 ALC268_3ST, 114 ALC268_3ST,
115 ALC268_TOSHIBA, 115 ALC268_TOSHIBA,
116 ALC268_ACER, 116 ALC268_ACER,
117 ALC268_ACER_DMIC,
117 ALC268_ACER_ASPIRE_ONE, 118 ALC268_ACER_ASPIRE_ONE,
118 ALC268_DELL, 119 ALC268_DELL,
119 ALC268_ZEPTO, 120 ALC268_ZEPTO,
@@ -10714,6 +10715,22 @@ static struct snd_kcontrol_new alc268_acer_mixer[] = {
10714 { } 10715 { }
10715}; 10716};
10716 10717
10718static struct snd_kcontrol_new alc268_acer_dmic_mixer[] = {
10719 /* output mixer control */
10720 HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
10721 {
10722 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
10723 .name = "Master Playback Switch",
10724 .info = snd_hda_mixer_amp_switch_info,
10725 .get = snd_hda_mixer_amp_switch_get,
10726 .put = alc268_acer_master_sw_put,
10727 .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
10728 },
10729 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
10730 HDA_CODEC_VOLUME("Line In Boost", 0x1a, 0, HDA_INPUT),
10731 { }
10732};
10733
10717static struct hda_verb alc268_acer_aspire_one_verbs[] = { 10734static struct hda_verb alc268_acer_aspire_one_verbs[] = {
10718 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN}, 10735 {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
10719 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP}, 10736 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
@@ -11042,6 +11059,15 @@ static struct hda_input_mux alc268_acer_capture_source = {
11042 .num_items = 3, 11059 .num_items = 3,
11043 .items = { 11060 .items = {
11044 { "Mic", 0x0 }, 11061 { "Mic", 0x0 },
11062 { "Internal Mic", 0x1 },
11063 { "Line", 0x2 },
11064 },
11065};
11066
11067static struct hda_input_mux alc268_acer_dmic_capture_source = {
11068 .num_items = 3,
11069 .items = {
11070 { "Mic", 0x0 },
11045 { "Internal Mic", 0x6 }, 11071 { "Internal Mic", 0x6 },
11046 { "Line", 0x2 }, 11072 { "Line", 0x2 },
11047 }, 11073 },
@@ -11322,6 +11348,7 @@ static const char *alc268_models[ALC268_MODEL_LAST] = {
11322 [ALC268_3ST] = "3stack", 11348 [ALC268_3ST] = "3stack",
11323 [ALC268_TOSHIBA] = "toshiba", 11349 [ALC268_TOSHIBA] = "toshiba",
11324 [ALC268_ACER] = "acer", 11350 [ALC268_ACER] = "acer",
11351 [ALC268_ACER_DMIC] = "acer-dmic",
11325 [ALC268_ACER_ASPIRE_ONE] = "acer-aspire", 11352 [ALC268_ACER_ASPIRE_ONE] = "acer-aspire",
11326 [ALC268_DELL] = "dell", 11353 [ALC268_DELL] = "dell",
11327 [ALC268_ZEPTO] = "zepto", 11354 [ALC268_ZEPTO] = "zepto",
@@ -11417,6 +11444,23 @@ static struct alc_config_preset alc268_presets[] = {
11417 .unsol_event = alc268_acer_unsol_event, 11444 .unsol_event = alc268_acer_unsol_event,
11418 .init_hook = alc268_acer_init_hook, 11445 .init_hook = alc268_acer_init_hook,
11419 }, 11446 },
11447 [ALC268_ACER_DMIC] = {
11448 .mixers = { alc268_acer_dmic_mixer, alc268_capture_alt_mixer,
11449 alc268_beep_mixer },
11450 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
11451 alc268_acer_verbs },
11452 .num_dacs = ARRAY_SIZE(alc268_dac_nids),
11453 .dac_nids = alc268_dac_nids,
11454 .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt),
11455 .adc_nids = alc268_adc_nids_alt,
11456 .capsrc_nids = alc268_capsrc_nids,
11457 .hp_nid = 0x02,
11458 .num_channel_mode = ARRAY_SIZE(alc268_modes),
11459 .channel_mode = alc268_modes,
11460 .input_mux = &alc268_acer_dmic_capture_source,
11461 .unsol_event = alc268_acer_unsol_event,
11462 .init_hook = alc268_acer_init_hook,
11463 },
11420 [ALC268_ACER_ASPIRE_ONE] = { 11464 [ALC268_ACER_ASPIRE_ONE] = {
11421 .mixers = { alc268_acer_aspire_one_mixer, 11465 .mixers = { alc268_acer_aspire_one_mixer,
11422 alc268_capture_alt_mixer }, 11466 alc268_capture_alt_mixer },