[ALSA] hda-codec - Fix laptop models for Cxt5045
authorMarc Boucher <marc@linuxant.com>
Tue, 22 Jan 2008 14:15:59 +0000 (15:15 +0100)
committerJaroslav Kysela <perex@perex.cz>
Thu, 31 Jan 2008 16:30:09 +0000 (17:30 +0100)
Change laptop models to three different models, laptop-hpsense,
laptop-micsense and laptop-hpmicsense.  The first two correspond to
the old 'laptop' and 'fujitsu' models.
Reassigned the quirk table for the new models.

Signed-off-by: Marc Boucher <marc@linuxant.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Documentation/sound/alsa/ALSA-Configuration.txt
sound/pci/hda/patch_conexant.c

index ede4f34bf6330f99844594f4040a5d842d6364fa..07317da87bd15719f7c81678e3f718ff860bd49b 100644 (file)
@@ -945,8 +945,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
          auto          auto-config reading BIOS (default)
        
        Conexant 5045
-         laptop        Laptop config 
-         fujitsu       Fujitsu Si1520 laptop
+         laptop-hpsense    Laptop with HP sense (old model laptop)
+         laptop-micsense   Laptop with Mic sense (old model fujitsu)
+         laptop-hpmicsense Laptop with HP and Mic senses
          benq          Benq R55E
          test          for testing/debugging purpose, almost all controls
                        can be adjusted.  Appearing only when compiled with
index dab2ce137e17e0baedb9144d9c00f35b98f188b6..ea3559fe332804b1c7afd3bf007610dc841d6a06 100644 (file)
@@ -781,8 +781,9 @@ static int cxt5045_init(struct hda_codec *codec)
 
 
 enum {
-       CXT5045_LAPTOP,  /* Laptops w/ EAPD support */
-       CXT5045_FUJITSU, /* Laptops w/ EAPD support */ 
+       CXT5045_LAPTOP_HPSENSE,
+       CXT5045_LAPTOP_MICSENSE,
+       CXT5045_LAPTOP_HPMICSENSE,
        CXT5045_BENQ,
 #ifdef CONFIG_SND_DEBUG
        CXT5045_TEST,
@@ -791,27 +792,34 @@ enum {
 };
 
 static const char *cxt5045_models[CXT5045_MODELS] = {
-       [CXT5045_LAPTOP]        = "laptop",
-       [CXT5045_FUJITSU]       = "fujitsu",
-       [CXT5045_BENQ]          = "benq",
+       [CXT5045_LAPTOP_HPSENSE]        = "laptop-hpsense",
+       [CXT5045_LAPTOP_MICSENSE]       = "laptop-micsense",
+       [CXT5045_LAPTOP_HPMICSENSE]     = "laptop-hpmicsense",
+       [CXT5045_BENQ]                  = "benq",
 #ifdef CONFIG_SND_DEBUG
        [CXT5045_TEST]          = "test",
 #endif
 };
 
 static struct snd_pci_quirk cxt5045_cfg_tbl[] = {
-       SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV Series", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2120", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP),
+       SND_PCI_QUIRK(0x103c, 0x30a5, "HP", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30b2, "HP DV Series", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30b5, "HP DV2120", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30b7, "HP DV6000Z", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30bb, "HP DV8000", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30cd, "HP DV Series", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x103c, 0x30d9, "HP Spartan", CXT5045_LAPTOP_HPSENSE),
        SND_PCI_QUIRK(0x152d, 0x0753, "Benq R55E", CXT5045_BENQ),
-       SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_FUJITSU),
-       SND_PCI_QUIRK(0x1734, 0x10cb, "Fujitsu Si3515", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x1734, 0x110e, "Fujitsu V5505", CXT5045_LAPTOP),
-       SND_PCI_QUIRK(0x8086, 0x2111, "Conexant Reference board", CXT5045_LAPTOP),
+       SND_PCI_QUIRK(0x1734, 0x10ad, "Fujitsu Si1520", CXT5045_LAPTOP_MICSENSE),
+       SND_PCI_QUIRK(0x1734, 0x10cb, "Fujitsu Si3515", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x1734, 0x110e, "Fujitsu V5505", CXT5045_LAPTOP_HPSENSE),
+       SND_PCI_QUIRK(0x1509, 0x1e40, "FIC", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x1509, 0x2f05, "FIC", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x1509, 0x2f06, "FIC", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x1631, 0xc106, "Packard Bell", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x1631, 0xc107, "Packard Bell", CXT5045_LAPTOP_HPMICSENSE),
+       SND_PCI_QUIRK(0x8086, 0x2111, "Conexant Reference board", CXT5045_LAPTOP_HPSENSE),
        {}
 };
 
@@ -849,7 +857,7 @@ static int patch_cxt5045(struct hda_codec *codec)
                                                  cxt5045_models,
                                                  cxt5045_cfg_tbl);
        switch (board_config) {
-       case CXT5045_LAPTOP:
+       case CXT5045_LAPTOP_HPSENSE:
                codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
                spec->input_mux = &cxt5045_capture_source;
                spec->num_init_verbs = 2;
@@ -857,13 +865,23 @@ static int patch_cxt5045(struct hda_codec *codec)
                spec->mixers[0] = cxt5045_mixers;
                codec->patch_ops.init = cxt5045_init;
                break;
-       case CXT5045_FUJITSU:
+       case CXT5045_LAPTOP_MICSENSE:
                spec->input_mux = &cxt5045_capture_source;
                spec->num_init_verbs = 2;
                spec->init_verbs[1] = cxt5045_mic_sense_init_verbs;
                spec->mixers[0] = cxt5045_mixers;
                codec->patch_ops.init = cxt5045_init;
                break;
+       default:
+       case CXT5045_LAPTOP_HPMICSENSE:
+               codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
+               spec->input_mux = &cxt5045_capture_source;
+               spec->num_init_verbs = 3;
+               spec->init_verbs[1] = cxt5045_hp_sense_init_verbs;
+               spec->init_verbs[2] = cxt5045_mic_sense_init_verbs;
+               spec->mixers[0] = cxt5045_mixers;
+               codec->patch_ops.init = cxt5045_init;
+               break;
        case CXT5045_BENQ:
                codec->patch_ops.unsol_event = cxt5045_hp_unsol_event;
                spec->input_mux = &cxt5045_capture_source_benq;
@@ -879,6 +897,8 @@ static int patch_cxt5045(struct hda_codec *codec)
                spec->input_mux = &cxt5045_test_capture_source;
                spec->mixers[0] = cxt5045_test_mixer;
                spec->init_verbs[0] = cxt5045_test_init_verbs;
+               break;
+               
 #endif 
        }