diff options
-rw-r--r-- | Documentation/sound/alsa/ALSA-Configuration.txt | 3 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 76 |
2 files changed, 78 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt index 08256fcb2743..3413644dff1e 100644 --- a/Documentation/sound/alsa/ALSA-Configuration.txt +++ b/Documentation/sound/alsa/ALSA-Configuration.txt | |||
@@ -829,7 +829,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. | |||
829 | basic fixed pin assignment w/o SPDIF | 829 | basic fixed pin assignment w/o SPDIF |
830 | auto auto-config reading BIOS (default) | 830 | auto auto-config reading BIOS (default) |
831 | 831 | ||
832 | ALC268 | 832 | ALC267/268 |
833 | quanta-il1 Quanta IL1 mini-notebook | ||
833 | 3stack 3-stack model | 834 | 3stack 3-stack model |
834 | toshiba Toshiba A205 | 835 | toshiba Toshiba A205 |
835 | acer Acer laptops | 836 | acer Acer laptops |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 830d6626e10e..181db2177a1d 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -105,6 +105,7 @@ enum { | |||
105 | 105 | ||
106 | /* ALC268 models */ | 106 | /* ALC268 models */ |
107 | enum { | 107 | enum { |
108 | ALC267_QUANTA_IL1, | ||
108 | ALC268_3ST, | 109 | ALC268_3ST, |
109 | ALC268_TOSHIBA, | 110 | ALC268_TOSHIBA, |
110 | ALC268_ACER, | 111 | ALC268_ACER, |
@@ -9902,6 +9903,64 @@ static void alc268_dell_unsol_event(struct hda_codec *codec, | |||
9902 | 9903 | ||
9903 | #define alc268_dell_init_hook alc268_dell_automute | 9904 | #define alc268_dell_init_hook alc268_dell_automute |
9904 | 9905 | ||
9906 | static struct snd_kcontrol_new alc267_quanta_il1_mixer[] = { | ||
9907 | HDA_CODEC_VOLUME("Speaker Playback Volume", 0x2, 0x0, HDA_OUTPUT), | ||
9908 | HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT), | ||
9909 | HDA_CODEC_VOLUME("Headphone Playback Volume", 0x3, 0x0, HDA_OUTPUT), | ||
9910 | HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT), | ||
9911 | HDA_CODEC_VOLUME("Mic Capture Volume", 0x23, 0x0, HDA_OUTPUT), | ||
9912 | HDA_BIND_MUTE("Mic Capture Switch", 0x23, 2, HDA_OUTPUT), | ||
9913 | HDA_CODEC_VOLUME("Ext Mic Boost", 0x18, 0, HDA_INPUT), | ||
9914 | HDA_CODEC_VOLUME("Int Mic Boost", 0x19, 0, HDA_INPUT), | ||
9915 | { } | ||
9916 | }; | ||
9917 | |||
9918 | static struct hda_verb alc267_quanta_il1_verbs[] = { | ||
9919 | {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_HP_EVENT | AC_USRSP_EN}, | ||
9920 | {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, ALC880_MIC_EVENT | AC_USRSP_EN}, | ||
9921 | { } | ||
9922 | }; | ||
9923 | |||
9924 | static void alc267_quanta_il1_hp_automute(struct hda_codec *codec) | ||
9925 | { | ||
9926 | unsigned int present; | ||
9927 | |||
9928 | present = snd_hda_codec_read(codec, 0x15, 0, AC_VERB_GET_PIN_SENSE, 0) | ||
9929 | & AC_PINSENSE_PRESENCE; | ||
9930 | snd_hda_codec_write(codec, 0x14, 0, AC_VERB_SET_PIN_WIDGET_CONTROL, | ||
9931 | present ? 0 : PIN_OUT); | ||
9932 | } | ||
9933 | |||
9934 | static void alc267_quanta_il1_mic_automute(struct hda_codec *codec) | ||
9935 | { | ||
9936 | unsigned int present; | ||
9937 | |||
9938 | present = snd_hda_codec_read(codec, 0x18, 0, | ||
9939 | AC_VERB_GET_PIN_SENSE, 0) & 0x80000000; | ||
9940 | snd_hda_codec_write(codec, 0x23, 0, | ||
9941 | AC_VERB_SET_CONNECT_SEL, | ||
9942 | present ? 0x00 : 0x01); | ||
9943 | } | ||
9944 | |||
9945 | static void alc267_quanta_il1_automute(struct hda_codec *codec) | ||
9946 | { | ||
9947 | alc267_quanta_il1_hp_automute(codec); | ||
9948 | alc267_quanta_il1_mic_automute(codec); | ||
9949 | } | ||
9950 | |||
9951 | static void alc267_quanta_il1_unsol_event(struct hda_codec *codec, | ||
9952 | unsigned int res) | ||
9953 | { | ||
9954 | switch (res >> 26) { | ||
9955 | case ALC880_HP_EVENT: | ||
9956 | alc267_quanta_il1_hp_automute(codec); | ||
9957 | break; | ||
9958 | case ALC880_MIC_EVENT: | ||
9959 | alc267_quanta_il1_mic_automute(codec); | ||
9960 | break; | ||
9961 | } | ||
9962 | } | ||
9963 | |||
9905 | /* | 9964 | /* |
9906 | * generic initialization of ADC, input mixers and output mixers | 9965 | * generic initialization of ADC, input mixers and output mixers |
9907 | */ | 9966 | */ |
@@ -10324,6 +10383,7 @@ static void alc268_auto_init(struct hda_codec *codec) | |||
10324 | * configuration and preset | 10383 | * configuration and preset |
10325 | */ | 10384 | */ |
10326 | static const char *alc268_models[ALC268_MODEL_LAST] = { | 10385 | static const char *alc268_models[ALC268_MODEL_LAST] = { |
10386 | [ALC267_QUANTA_IL1] = "quanta-il1", | ||
10327 | [ALC268_3ST] = "3stack", | 10387 | [ALC268_3ST] = "3stack", |
10328 | [ALC268_TOSHIBA] = "toshiba", | 10388 | [ALC268_TOSHIBA] = "toshiba", |
10329 | [ALC268_ACER] = "acer", | 10389 | [ALC268_ACER] = "acer", |
@@ -10346,11 +10406,27 @@ static struct snd_pci_quirk alc268_cfg_tbl[] = { | |||
10346 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), | 10406 | SND_PCI_QUIRK(0x1179, 0xff10, "TOSHIBA A205", ALC268_TOSHIBA), |
10347 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), | 10407 | SND_PCI_QUIRK(0x1179, 0xff50, "TOSHIBA A305", ALC268_TOSHIBA), |
10348 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), | 10408 | SND_PCI_QUIRK(0x152d, 0x0763, "Diverse (CPR2000)", ALC268_ACER), |
10409 | SND_PCI_QUIRK(0x152d, 0x0771, "Quanta IL1", ALC267_QUANTA_IL1), | ||
10349 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), | 10410 | SND_PCI_QUIRK(0x1170, 0x0040, "ZEPTO", ALC268_ZEPTO), |
10350 | {} | 10411 | {} |
10351 | }; | 10412 | }; |
10352 | 10413 | ||
10353 | static struct alc_config_preset alc268_presets[] = { | 10414 | static struct alc_config_preset alc268_presets[] = { |
10415 | [ALC267_QUANTA_IL1] = { | ||
10416 | .mixers = { alc267_quanta_il1_mixer }, | ||
10417 | .init_verbs = { alc268_base_init_verbs, alc268_eapd_verbs, | ||
10418 | alc267_quanta_il1_verbs }, | ||
10419 | .num_dacs = ARRAY_SIZE(alc268_dac_nids), | ||
10420 | .dac_nids = alc268_dac_nids, | ||
10421 | .num_adc_nids = ARRAY_SIZE(alc268_adc_nids_alt), | ||
10422 | .adc_nids = alc268_adc_nids_alt, | ||
10423 | .hp_nid = 0x03, | ||
10424 | .num_channel_mode = ARRAY_SIZE(alc268_modes), | ||
10425 | .channel_mode = alc268_modes, | ||
10426 | .input_mux = &alc268_capture_source, | ||
10427 | .unsol_event = alc267_quanta_il1_unsol_event, | ||
10428 | .init_hook = alc267_quanta_il1_automute, | ||
10429 | }, | ||
10354 | [ALC268_3ST] = { | 10430 | [ALC268_3ST] = { |
10355 | .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, | 10431 | .mixers = { alc268_base_mixer, alc268_capture_alt_mixer, |
10356 | alc268_beep_mixer }, | 10432 | alc268_beep_mixer }, |