aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiroshi Miura <miurahr@acm.org>2008-08-28 10:09:06 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-29 04:06:20 -0400
commit9f99a6386eb1ad1197a401495669315de2f19039 (patch)
tree418def0bd5124b9d09fd51619ed94f4257f86ca0
parent9e285e1a58bcf957cde9c0c559a1b9b0f708bb2f (diff)
ALSA: hda - Add support of Toshiba RX1
Added the support of Toshiba RX1 laptop with ALC262 codec chip. Related ALSA bug#3386: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3386 Signed-off-by: Hiroshi Miura <miurahr@acm.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt1
-rw-r--r--sound/pci/hda/patch_realtek.c53
2 files changed, 53 insertions, 1 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 374cfc02b2f9..fd3de679386f 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -832,6 +832,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
832 hippo_1 Hippo (Benq) with jack detection 832 hippo_1 Hippo (Benq) with jack detection
833 sony-assamd Sony ASSAMD 833 sony-assamd Sony ASSAMD
834 toshiba-s06 Toshiba S06 834 toshiba-s06 Toshiba S06
835 toshiba-rx1 Toshiba RX1
835 ultra Samsung Q1 Ultra Vista model 836 ultra Samsung Q1 Ultra Vista model
836 lenovo-3000 Lenovo 3000 y410 837 lenovo-3000 Lenovo 3000 y410
837 nec NEC Versa S9100 838 nec NEC Versa S9100
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index d1f5a766c3b2..4cfea551cab8 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -103,6 +103,7 @@ enum {
103 ALC262_LENOVO_3000, 103 ALC262_LENOVO_3000,
104 ALC262_NEC, 104 ALC262_NEC,
105 ALC262_TOSHIBA_S06, 105 ALC262_TOSHIBA_S06,
106 ALC262_TOSHIBA_RX1,
106 ALC262_AUTO, 107 ALC262_AUTO,
107 ALC262_MODEL_LAST /* last tag */ 108 ALC262_MODEL_LAST /* last tag */
108}; 109};
@@ -9712,6 +9713,25 @@ static struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = {
9712 { } /* end */ 9713 { } /* end */
9713}; 9714};
9714 9715
9716static struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = {
9717 HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol),
9718 {
9719 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
9720 .name = "Master Playback Switch",
9721 .info = snd_hda_mixer_amp_switch_info,
9722 .get = snd_hda_mixer_amp_switch_get,
9723 .put = alc262_sony_master_sw_put,
9724 .private_value = HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
9725 },
9726 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
9727 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
9728 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
9729 HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
9730 HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
9731 HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
9732 { } /* end */
9733};
9734
9715/* additional init verbs for Benq laptops */ 9735/* additional init verbs for Benq laptops */
9716static struct hda_verb alc262_EAPD_verbs[] = { 9736static struct hda_verb alc262_EAPD_verbs[] = {
9717 {0x20, AC_VERB_SET_COEF_INDEX, 0x07}, 9737 {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
@@ -10176,6 +10196,24 @@ static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = {
10176 { } 10196 { }
10177}; 10197};
10178 10198
10199static struct hda_verb alc262_toshiba_rx1_unsol_verbs[] = {
10200
10201 {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Front Speaker */
10202 {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
10203 {0x14, AC_VERB_SET_CONNECT_SEL, 0x01},
10204
10205 {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* MIC jack */
10206 {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Front MIC */
10207 {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) },
10208 {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) },
10209
10210 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, /* HP jack */
10211 {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
10212 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
10213 {}
10214};
10215
10216
10179#ifdef CONFIG_SND_HDA_POWER_SAVE 10217#ifdef CONFIG_SND_HDA_POWER_SAVE
10180#define alc262_loopbacks alc880_loopbacks 10218#define alc262_loopbacks alc880_loopbacks
10181#endif 10219#endif
@@ -10263,6 +10301,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = {
10263 [ALC262_BENQ_T31] = "benq-t31", 10301 [ALC262_BENQ_T31] = "benq-t31",
10264 [ALC262_SONY_ASSAMD] = "sony-assamd", 10302 [ALC262_SONY_ASSAMD] = "sony-assamd",
10265 [ALC262_TOSHIBA_S06] = "toshiba-s06", 10303 [ALC262_TOSHIBA_S06] = "toshiba-s06",
10304 [ALC262_TOSHIBA_RX1] = "toshiba-rx1",
10266 [ALC262_ULTRA] = "ultra", 10305 [ALC262_ULTRA] = "ultra",
10267 [ALC262_LENOVO_3000] = "lenovo-3000", 10306 [ALC262_LENOVO_3000] = "lenovo-3000",
10268 [ALC262_NEC] = "nec", 10307 [ALC262_NEC] = "nec",
@@ -10300,7 +10339,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
10300 SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD), 10339 SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
10301 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), 10340 SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
10302 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 10341 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
10303 ALC262_SONY_ASSAMD), 10342 ALC262_TOSHIBA_RX1),
10304 SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), 10343 SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06),
10305 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), 10344 SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
10306 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), 10345 SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
@@ -10508,6 +10547,18 @@ static struct alc_config_preset alc262_presets[] = {
10508 .unsol_event = alc262_toshiba_s06_unsol_event, 10547 .unsol_event = alc262_toshiba_s06_unsol_event,
10509 .init_hook = alc262_toshiba_s06_init_hook, 10548 .init_hook = alc262_toshiba_s06_init_hook,
10510 }, 10549 },
10550 [ALC262_TOSHIBA_RX1] = {
10551 .mixers = { alc262_toshiba_rx1_mixer },
10552 .init_verbs = { alc262_init_verbs, alc262_toshiba_rx1_unsol_verbs },
10553 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
10554 .dac_nids = alc262_dac_nids,
10555 .hp_nid = 0x03,
10556 .num_channel_mode = ARRAY_SIZE(alc262_modes),
10557 .channel_mode = alc262_modes,
10558 .input_mux = &alc262_capture_source,
10559 .unsol_event = alc262_hippo_unsol_event,
10560 .init_hook = alc262_hippo_automute,
10561 },
10511}; 10562};
10512 10563
10513static int patch_alc262(struct hda_codec *codec) 10564static int patch_alc262(struct hda_codec *codec)