[ALSA] hda-codec - Add support for Fujitsu PI1556 Realtek ALC880
authorTobin Davis <tdavis@dsl-only.net>
Wed, 7 Feb 2007 15:04:25 +0000 (16:04 +0100)
committerJaroslav Kysela <perex@suse.cz>
Fri, 9 Feb 2007 08:04:00 +0000 (09:04 +0100)
This patch adds support for the Fujitsu PI1556 laptop.
Issue:  Volume knob on system maxes out lower than alsamixer (0x35 vs 0x40).
Everything else works, and audio quality is good at 0x35.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Documentation/sound/alsa/ALSA-Configuration.txt
sound/pci/hda/patch_realtek.c

index 4f82145a939075c242b68b91a24765ba8e60defe..c30ff1bb2d1019aedfb8d96d97cd248b9e711b93 100644 (file)
@@ -785,6 +785,7 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
          asus-dig      ASUS with SPDIF out
          asus-dig2     ASUS with SPDIF out (using GPIO2)
          uniwill       3-jack
+         fujitsu       Fujitsu Laptops (Pi1536)
          F1734         2-jack
          lg            LG laptop (m1 express dual)
          lg-lw         LG LW20/LW25 laptop
index 583295deaecdcaca1a6ca63f20d222e960e6713c..145682b7807124430dbcec680668a2f01b64b7a2 100644 (file)
@@ -52,6 +52,7 @@ enum {
        ALC880_ASUS_DIG,
        ALC880_ASUS_W1V,
        ALC880_ASUS_DIG2,
+       ALC880_FUJITSU,
        ALC880_UNIWILL_DIG,
        ALC880_UNIWILL,
        ALC880_UNIWILL_P53,
@@ -1073,6 +1074,20 @@ static struct snd_kcontrol_new alc880_uniwill_mixer[] = {
        { } /* end */
 };
 
+static struct snd_kcontrol_new alc880_fujitsu_mixer[] = {
+       HDA_CODEC_VOLUME("Headphone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE("Headphone Playback Switch", 0x0c, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME("Speaker Playback Volume", 0x0d, 0x0, HDA_OUTPUT),
+       HDA_BIND_MUTE("Speaker Playback Switch", 0x0d, 2, HDA_INPUT),
+       HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
+       HDA_CODEC_VOLUME("Ext Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_MUTE("Ext Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
+       HDA_CODEC_VOLUME("Int Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
+       HDA_CODEC_MUTE("Int Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
+       { } /* end */
+};
+
 static struct snd_kcontrol_new alc880_uniwill_p53_mixer[] = {
        HDA_CODEC_VOLUME("HPhone Playback Volume", 0x0c, 0x0, HDA_OUTPUT),
        HDA_BIND_MUTE("HPhone Playback Switch", 0x0c, 2, HDA_INPUT),
@@ -1388,6 +1403,11 @@ static struct hda_verb alc880_uniwill_p53_init_verbs[] = {
        { }
 };
 
+static struct hda_verb alc880_beep_init_verbs[] = {
+       { 0x0b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(5) },
+       { }
+};
+
 /* toggle speaker-output according to the hp-jack state */
 static void alc880_uniwill_automute(struct hda_codec *codec)
 {
@@ -2357,6 +2377,8 @@ static const char *alc880_models[ALC880_MODEL_LAST] = {
        [ALC880_ASUS_DIG]       = "asus-dig",
        [ALC880_ASUS_DIG2]      = "asus-dig2",
        [ALC880_UNIWILL_DIG]    = "uniwill",
+       [ALC880_UNIWILL_P53]    = "uniwill-p53",
+       [ALC880_FUJITSU]        = "fujitsu",
        [ALC880_F1734]          = "F1734",
        [ALC880_LG]             = "lg",
        [ALC880_LG_LW]          = "lg-lw",
@@ -2427,6 +2449,7 @@ static struct snd_pci_quirk alc880_cfg_tbl[] = {
        SND_PCI_QUIRK(0x1695, 0x4012, "EPox EP-5LDA", ALC880_5ST_DIG),
        SND_PCI_QUIRK(0x1734, 0x10ac, "FSC", ALC880_UNIWILL),
        SND_PCI_QUIRK(0x1734, 0x107c, "FSC F1734", ALC880_F1734),
+       SND_PCI_QUIRK(0x1734, 0x10b0, "Fujitsu", ALC880_FUJITSU),
 
        SND_PCI_QUIRK(0x1854, 0x003b, "LG", ALC880_LG),
        SND_PCI_QUIRK(0x1854, 0x0068, "LG w1", ALC880_LG),
@@ -2635,7 +2658,21 @@ static struct alc_config_preset alc880_presets[] = {
                .num_dacs = ARRAY_SIZE(alc880_asus_dac_nids),
                .dac_nids = alc880_asus_dac_nids,
                .num_channel_mode = ARRAY_SIZE(alc880_w810_modes),
-               .channel_mode = alc880_w810_modes,
+               .channel_mode = alc880_threestack_modes,
+               .input_mux = &alc880_capture_source,
+               .unsol_event = alc880_uniwill_p53_unsol_event,
+               .init_hook = alc880_uniwill_p53_hp_automute,
+       },
+       [ALC880_FUJITSU] = {
+               .mixers = { alc880_fujitsu_mixer, 
+                           alc880_pcbeep_mixer, },
+               .init_verbs = { alc880_volume_init_verbs,
+                               alc880_uniwill_p53_init_verbs,
+                               alc880_beep_init_verbs },
+               .num_dacs = ARRAY_SIZE(alc880_dac_nids),
+               .dac_nids = alc880_dac_nids,
+               .num_channel_mode = ARRAY_SIZE(alc880_2_jack_modes),
+               .channel_mode = alc880_2_jack_modes,
                .input_mux = &alc880_capture_source,
                .unsol_event = alc880_uniwill_p53_unsol_event,
                .init_hook = alc880_uniwill_p53_hp_automute,