aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/patch_realtek.c76
2 files changed, 76 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 7f14eb961622..b42458fe0ad5 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -833,6 +833,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
833 ALC268 833 ALC268
834 3stack 3-stack model 834 3stack 3-stack model
835 toshiba Toshiba A205 835 toshiba Toshiba A205
836 acer Acer laptops
836 auto auto-config reading BIOS (default) 837 auto auto-config reading BIOS (default)
837 838
838 ALC662 839 ALC662
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index a6fcfbce0c0e..b47934f87f8c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -103,6 +103,7 @@ enum {
103enum { 103enum {
104 ALC268_3ST, 104 ALC268_3ST,
105 ALC268_TOSHIBA, 105 ALC268_TOSHIBA,
106 ALC268_ACER,
106 ALC268_AUTO, 107 ALC268_AUTO,
107 ALC268_MODEL_LAST /* last tag */ 108 ALC268_MODEL_LAST /* last tag */
108}; 109};
@@ -8234,6 +8235,58 @@ static struct hda_verb alc268_eapd_verbs[] = {
8234 { } 8235 { }
8235}; 8236};
8236 8237
8238/* Toshiba specific */
8239#define alc268_toshiba_automute alc262_hippo_automute
8240
8241static struct hda_verb alc268_toshiba_verbs[] = {
8242 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8243 { } /* end */
8244};
8245
8246/* Acer specific */
8247#define alc268_acer_bind_master_vol alc262_fujitsu_bind_master_vol
8248#define alc268_acer_master_sw_put alc262_fujitsu_master_sw_put
8249#define alc268_acer_automute alc262_fujitsu_automute
8250
8251static struct snd_kcontrol_new alc268_acer_mixer[] = {
8252 /* output mixer control */
8253 HDA_BIND_VOL("Master Playback Volume", &alc268_acer_bind_master_vol),
8254 {
8255 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
8256 .name = "Master Playback Switch",
8257 .info = snd_hda_mixer_amp_switch_info,
8258 .get = snd_hda_mixer_amp_switch_get,
8259 .put = alc268_acer_master_sw_put,
8260 .private_value = HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
8261 },
8262 { }
8263};
8264
8265static struct hda_verb alc268_acer_verbs[] = {
8266 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
8267 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8268
8269 {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN},
8270 { }
8271};
8272
8273/* unsolicited event for HP jack sensing */
8274static void alc268_toshiba_unsol_event(struct hda_codec *codec,
8275 unsigned int res)
8276{
8277 if ((res >> 28) != ALC880_HP_EVENT)
8278 return;
8279 alc268_toshiba_automute(codec);
8280}
8281
8282static void alc268_acer_unsol_event(struct hda_codec *codec,
8283 unsigned int res)
8284{
8285 if ((res >> 28) != ALC880_HP_EVENT)
8286 return;
8287 alc268_acer_automute(codec, 1);
8288}
8289
8237/* 8290/*
8238 * generic initialization of ADC, input mixers and output mixers 8291 * generic initialization of ADC, input mixers and output mixers
8239 */ 8292 */
@@ -8619,12 +8672,15 @@ static void alc268_auto_init(struct hda_codec *codec)
8619static const char *alc268_models[ALC268_MODEL_LAST] = { 8672static const char *alc268_models[ALC268_MODEL_LAST] = {
8620 [ALC268_3ST] = "3stack", 8673 [ALC268_3ST] = "3stack",
8621 [ALC268_TOSHIBA] = "toshiba", 8674 [ALC268_TOSHIBA] = "toshiba",
8675 [ALC268_ACER] = "acer",
8622 [ALC268_AUTO] = "auto", 8676 [ALC268_AUTO] = "auto",
8623}; 8677};
8624 8678
8625static struct snd_pci_quirk alc268_cfg_tbl[] = { 8679static struct snd_pci_quirk alc268_cfg_tbl[] = {
8626 SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST), 8680 SND_PCI_QUIRK(0x1043, 0x1205, "ASUS W7J", ALC268_3ST),
8627 SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), 8681 SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA),
8682 SND_PCI_QUIRK(0x103c, 0x30cc, "TOSHIBA", ALC268_TOSHIBA),
8683 SND_PCI_QUIRK(0x1025, 0x0126, "Acer", ALC268_ACER),
8628 {} 8684 {}
8629}; 8685};
8630 8686
@@ -8644,7 +8700,8 @@ static struct alc_config_preset alc268_presets[] = {
8644 }, 8700 },
8645 [ALC268_TOSHIBA] = { 8701 [ALC268_TOSHIBA] = {
8646 .mixers = { alc268_base_mixer, alc268_capture_alt_mixer }, 8702 .mixers = { alc268_base_mixer, alc268_capture_alt_mixer },
8647 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs }, 8703 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
8704 alc268_toshiba_verbs },
8648 .num_dacs = ARRAY_SIZE(alc268_dac_nids), 8705 .num_dacs = ARRAY_SIZE(alc268_dac_nids),
8649 .dac_nids = alc268_dac_nids, 8706 .dac_nids = alc268_dac_nids,
8650 .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), 8707 .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt),
@@ -8653,6 +8710,23 @@ static struct alc_config_preset alc268_presets[] = {
8653 .num_channel_mode = ARRAY_SIZE(alc268_modes), 8710 .num_channel_mode = ARRAY_SIZE(alc268_modes),
8654 .channel_mode = alc268_modes, 8711 .channel_mode = alc268_modes,
8655 .input_mux = &alc268_capture_source, 8712 .input_mux = &alc268_capture_source,
8713 .input_mux = &alc268_capture_source,
8714 .unsol_event = alc268_toshiba_unsol_event,
8715 .init_hook = alc268_toshiba_automute,
8716 },
8717 [ALC268_ACER] = {
8718 .mixers = { alc268_acer_mixer, alc268_capture_alt_mixer },
8719 .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs,
8720 alc268_acer_verbs },
8721 .num_dacs = ARRAY_SIZE(alc268_dac_nids),
8722 .dac_nids = alc268_dac_nids,
8723 .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt),
8724 .adc_nids = alc268_adc_nids_alt,
8725 .hp_nid = 0x02,
8726 .num_channel_mode = ARRAY_SIZE(alc268_modes),
8727 .channel_mode = alc268_modes,
8728 .input_mux = &alc268_capture_source,
8729 .unsol_event = alc268_acer_unsol_event,
8656 }, 8730 },
8657}; 8731};
8658 8732