aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.com>2008-08-04 08:36:05 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-06 09:40:15 -0400
commite8f9ae2a4a0654e7798b8c0ae956e3f0fdc23c8d (patch)
tree1c8829007f2207d33c8512dd0a7098ddcbce5d54 /sound/pci/hda/patch_realtek.c
parent6ddfa7432adc24c7471abe9d338a78540d0d025b (diff)
ALSA: hda - Fix sound on NEC Versa S9100
This patch adds sound support for NEC Versa S9100 With it, we get sound on the internal speaker and headphone (with automute working) while there is no sound by default. External mic also works fine but I don't know if there is an internal one (if there is an internal mic it does not work currently), and I had to send back the hardware. Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 38017a129ba7..4bd26725355c 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -100,6 +100,7 @@ enum {
100 ALC262_BENQ_T31, 100 ALC262_BENQ_T31,
101 ALC262_ULTRA, 101 ALC262_ULTRA,
102 ALC262_LENOVO_3000, 102 ALC262_LENOVO_3000,
103 ALC262_NEC,
103 ALC262_AUTO, 104 ALC262_AUTO,
104 ALC262_MODEL_LAST /* last tag */ 105 ALC262_MODEL_LAST /* last tag */
105}; 106};
@@ -8948,6 +8949,41 @@ static void alc262_hippo1_unsol_event(struct hda_codec *codec,
8948} 8949}
8949 8950
8950/* 8951/*
8952 * nec model
8953 * 0x15 = headphone
8954 * 0x16 = internal speaker
8955 * 0x18 = external mic
8956 */
8957
8958static struct snd_kcontrol_new alc262_nec_mixer[] = {
8959 HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0e, 1, 0x0, HDA_OUTPUT),
8960 HDA_CODEC_MUTE_MONO("Speaker Playback Switch", 0x16, 0, 0x0, HDA_OUTPUT),
8961
8962 HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
8963 HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
8964 HDA_CODEC_VOLUME("Mic Boost", 0x18, 0, HDA_INPUT),
8965
8966 HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
8967 HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
8968 { } /* end */
8969};
8970
8971static struct hda_verb alc262_nec_verbs[] = {
8972 /* Unmute Speaker */
8973 {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
8974
8975 /* Headphone */
8976 {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC880_HP_EVENT},
8977 {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
8978
8979 /* External mic to headphone */
8980 {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
8981 /* External mic to speaker */
8982 {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
8983 {}
8984};
8985
8986/*
8951 * fujitsu model 8987 * fujitsu model
8952 * 0x14 = headphone/spdif-out, 0x15 = internal speaker, 8988 * 0x14 = headphone/spdif-out, 0x15 = internal speaker,
8953 * 0x1b = port replicator headphone out 8989 * 0x1b = port replicator headphone out
@@ -9731,11 +9767,13 @@ static const char *alc262_models[ALC262_MODEL_LAST] = {
9731 [ALC262_SONY_ASSAMD] = "sony-assamd", 9767 [ALC262_SONY_ASSAMD] = "sony-assamd",
9732 [ALC262_ULTRA] = "ultra", 9768 [ALC262_ULTRA] = "ultra",
9733 [ALC262_LENOVO_3000] = "lenovo-3000", 9769 [ALC262_LENOVO_3000] = "lenovo-3000",
9770 [ALC262_NEC] = "nec",
9734 [ALC262_AUTO] = "auto", 9771 [ALC262_AUTO] = "auto",
9735}; 9772};
9736 9773
9737static struct snd_pci_quirk alc262_cfg_tbl[] = { 9774static struct snd_pci_quirk alc262_cfg_tbl[] = {
9738 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO), 9775 SND_PCI_QUIRK(0x1002, 0x437b, "Hippo", ALC262_HIPPO),
9776 SND_PCI_QUIRK(0x1033, 0x8895, "NEC Versa S9100", ALC262_NEC),
9739 SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC), 9777 SND_PCI_QUIRK(0x103c, 0x12fe, "HP xw9400", ALC262_HP_BPC),
9740 SND_PCI_QUIRK(0x103c, 0x12ff, "HP xw4550", ALC262_HP_BPC), 9778 SND_PCI_QUIRK(0x103c, 0x12ff, "HP xw4550", ALC262_HP_BPC),
9741 SND_PCI_QUIRK(0x103c, 0x1306, "HP xw8600", ALC262_HP_BPC), 9779 SND_PCI_QUIRK(0x103c, 0x1306, "HP xw8600", ALC262_HP_BPC),
@@ -9946,6 +9984,16 @@ static struct alc_config_preset alc262_presets[] = {
9946 .input_mux = &alc262_fujitsu_capture_source, 9984 .input_mux = &alc262_fujitsu_capture_source,
9947 .unsol_event = alc262_lenovo_3000_unsol_event, 9985 .unsol_event = alc262_lenovo_3000_unsol_event,
9948 }, 9986 },
9987 [ALC262_NEC] = {
9988 .mixers = { alc262_nec_mixer },
9989 .init_verbs = { alc262_nec_verbs },
9990 .num_dacs = ARRAY_SIZE(alc262_dac_nids),
9991 .dac_nids = alc262_dac_nids,
9992 .hp_nid = 0x03,
9993 .num_channel_mode = ARRAY_SIZE(alc262_modes),
9994 .channel_mode = alc262_modes,
9995 .input_mux = &alc262_capture_source,
9996 },
9949}; 9997};
9950 9998
9951static int patch_alc262(struct hda_codec *codec) 9999static int patch_alc262(struct hda_codec *codec)