Commit 9f99a638 authored by Hiroshi Miura's avatar Hiroshi Miura Committed by Jaroslav Kysela

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=3386Signed-off-by: default avatarHiroshi Miura <miurahr@acm.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@perex.cz>
parent 9e285e1a
...@@ -832,6 +832,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed. ...@@ -832,6 +832,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
hippo_1 Hippo (Benq) with jack detection hippo_1 Hippo (Benq) with jack detection
sony-assamd Sony ASSAMD sony-assamd Sony ASSAMD
toshiba-s06 Toshiba S06 toshiba-s06 Toshiba S06
toshiba-rx1 Toshiba RX1
ultra Samsung Q1 Ultra Vista model ultra Samsung Q1 Ultra Vista model
lenovo-3000 Lenovo 3000 y410 lenovo-3000 Lenovo 3000 y410
nec NEC Versa S9100 nec NEC Versa S9100
......
...@@ -103,6 +103,7 @@ enum { ...@@ -103,6 +103,7 @@ enum {
ALC262_LENOVO_3000, ALC262_LENOVO_3000,
ALC262_NEC, ALC262_NEC,
ALC262_TOSHIBA_S06, ALC262_TOSHIBA_S06,
ALC262_TOSHIBA_RX1,
ALC262_AUTO, ALC262_AUTO,
ALC262_MODEL_LAST /* last tag */ ALC262_MODEL_LAST /* last tag */
}; };
...@@ -9712,6 +9713,25 @@ static struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = { ...@@ -9712,6 +9713,25 @@ static struct snd_kcontrol_new alc262_lenovo_3000_mixer[] = {
{ } /* end */ { } /* end */
}; };
static struct snd_kcontrol_new alc262_toshiba_rx1_mixer[] = {
HDA_BIND_VOL("Master Playback Volume", &alc262_fujitsu_bind_master_vol),
{
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Master Playback Switch",
.info = snd_hda_mixer_amp_switch_info,
.get = snd_hda_mixer_amp_switch_get,
.put = alc262_sony_master_sw_put,
.private_value = HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
},
HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x01, HDA_INPUT),
HDA_CODEC_VOLUME("Front Mic Boost", 0x19, 0, HDA_INPUT),
{ } /* end */
};
/* additional init verbs for Benq laptops */ /* additional init verbs for Benq laptops */
static struct hda_verb alc262_EAPD_verbs[] = { static struct hda_verb alc262_EAPD_verbs[] = {
{0x20, AC_VERB_SET_COEF_INDEX, 0x07}, {0x20, AC_VERB_SET_COEF_INDEX, 0x07},
...@@ -10176,6 +10196,24 @@ static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = { ...@@ -10176,6 +10196,24 @@ static struct hda_verb alc262_HP_BPC_WildWest_init_verbs[] = {
{ } { }
}; };
static struct hda_verb alc262_toshiba_rx1_unsol_verbs[] = {
{0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT }, /* Front Speaker */
{0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
{0x14, AC_VERB_SET_CONNECT_SEL, 0x01},
{0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* MIC jack */
{0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 }, /* Front MIC */
{0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) },
{0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0) },
{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP }, /* HP jack */
{0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
{0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
{}
};
#ifdef CONFIG_SND_HDA_POWER_SAVE #ifdef CONFIG_SND_HDA_POWER_SAVE
#define alc262_loopbacks alc880_loopbacks #define alc262_loopbacks alc880_loopbacks
#endif #endif
...@@ -10263,6 +10301,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = { ...@@ -10263,6 +10301,7 @@ static const char *alc262_models[ALC262_MODEL_LAST] = {
[ALC262_BENQ_T31] = "benq-t31", [ALC262_BENQ_T31] = "benq-t31",
[ALC262_SONY_ASSAMD] = "sony-assamd", [ALC262_SONY_ASSAMD] = "sony-assamd",
[ALC262_TOSHIBA_S06] = "toshiba-s06", [ALC262_TOSHIBA_S06] = "toshiba-s06",
[ALC262_TOSHIBA_RX1] = "toshiba-rx1",
[ALC262_ULTRA] = "ultra", [ALC262_ULTRA] = "ultra",
[ALC262_LENOVO_3000] = "lenovo-3000", [ALC262_LENOVO_3000] = "lenovo-3000",
[ALC262_NEC] = "nec", [ALC262_NEC] = "nec",
...@@ -10300,7 +10339,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = { ...@@ -10300,7 +10339,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD), SND_PCI_QUIRK(0x104d, 0x900e, "Sony ASSAMD", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD), SND_PCI_QUIRK(0x104d, 0x9015, "Sony 0x9015", ALC262_SONY_ASSAMD),
SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
ALC262_SONY_ASSAMD), ALC262_TOSHIBA_RX1),
SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06), SND_PCI_QUIRK(0x1179, 0x0268, "Toshiba S06", ALC262_TOSHIBA_S06),
SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU), SND_PCI_QUIRK(0x10cf, 0x1397, "Fujitsu", ALC262_FUJITSU),
SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU), SND_PCI_QUIRK(0x10cf, 0x142d, "Fujitsu Lifebook E8410", ALC262_FUJITSU),
...@@ -10508,6 +10547,18 @@ static struct alc_config_preset alc262_presets[] = { ...@@ -10508,6 +10547,18 @@ static struct alc_config_preset alc262_presets[] = {
.unsol_event = alc262_toshiba_s06_unsol_event, .unsol_event = alc262_toshiba_s06_unsol_event,
.init_hook = alc262_toshiba_s06_init_hook, .init_hook = alc262_toshiba_s06_init_hook,
}, },
[ALC262_TOSHIBA_RX1] = {
.mixers = { alc262_toshiba_rx1_mixer },
.init_verbs = { alc262_init_verbs, alc262_toshiba_rx1_unsol_verbs },
.num_dacs = ARRAY_SIZE(alc262_dac_nids),
.dac_nids = alc262_dac_nids,
.hp_nid = 0x03,
.num_channel_mode = ARRAY_SIZE(alc262_modes),
.channel_mode = alc262_modes,
.input_mux = &alc262_capture_source,
.unsol_event = alc262_hippo_unsol_event,
.init_hook = alc262_hippo_automute,
},
}; };
static int patch_alc262(struct hda_codec *codec) static int patch_alc262(struct hda_codec *codec)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment