aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_sigmatel.c
diff options
context:
space:
mode:
authorTobin Davis <tdavis@dsl-only.net>2007-08-13 09:50:29 -0400
committerJaroslav Kysela <perex@perex.cz>2007-10-16 09:58:50 -0400
commitae0a8ed8bf9c2edee4b831dee91ae914b9641fdd (patch)
treea6ed335f4943c51c5b67073f79e97d3382338d19 /sound/pci/hda/patch_sigmatel.c
parent95e99fdadb34debebd8dd35bb5a18b253dece22d (diff)
[ALSA] This patch adds more support for Dell systems with Stac9205 codecs.
Tested against a couple of different systems (with different pin configs), but the others should also work. Also cleaned up some of the 9205 patch code. 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>
Diffstat (limited to 'sound/pci/hda/patch_sigmatel.c')
-rw-r--r--sound/pci/hda/patch_sigmatel.c64
1 files changed, 53 insertions, 11 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 4a981399abde..e096a48899c8 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -44,7 +44,9 @@ enum {
44 44
45enum { 45enum {
46 STAC_9205_REF, 46 STAC_9205_REF,
47 STAC_M43xx, 47 STAC_9205_DELL_M43,
48 STAC_9205_DELL_M44,
49 STAC_9205_M43xx,
48 STAC_9205_MODELS 50 STAC_9205_MODELS
49}; 51};
50 52
@@ -788,23 +790,58 @@ static unsigned int ref9205_pin_configs[12] = {
788 0x90a000f0, 0x90a000f0, 0x01441030, 0x01c41030 790 0x90a000f0, 0x90a000f0, 0x01441030, 0x01c41030
789}; 791};
790 792
793static unsigned int dell_m43_9205_pin_configs[12] = {
794 0x0321101f, 0x03a11020, 0x90a70330, 0x90170310,
795 0x400000fe, 0x400000ff, 0x400000fd, 0x40f000f9,
796 0x400000fa, 0x400000fc, 0x0144131f, 0x40c003f8,
797};
798
799static unsigned int dell_m44_9205_pin_configs[12] = {
800 0x0421101f, 0x04a11020, 0x400003fa, 0x90170310,
801 0x400003fb, 0x400003fc, 0x400003fd, 0x400003f9,
802 0x90a60330, 0x400003ff, 0x01441340, 0x40c003fe,
803};
804
805
791static unsigned int *stac9205_brd_tbl[STAC_9205_MODELS] = { 806static unsigned int *stac9205_brd_tbl[STAC_9205_MODELS] = {
792 [STAC_REF] = ref9205_pin_configs, 807 [STAC_9205_REF] = ref9205_pin_configs,
793 [STAC_M43xx] = NULL, 808 [STAC_9205_DELL_M43] = dell_m43_9205_pin_configs,
809 [STAC_9205_DELL_M44] = dell_m44_9205_pin_configs,
810 [STAC_9205_M43xx] = NULL,
794}; 811};
795 812
796static const char *stac9205_models[STAC_9205_MODELS] = { 813static const char *stac9205_models[STAC_9205_MODELS] = {
797 [STAC_9205_REF] = "ref", 814 [STAC_9205_REF] = "ref",
815 [STAC_9205_DELL_M43] = "dell-m43",
816 [STAC_9205_DELL_M44] = "dell-m44",
798}; 817};
799 818
800static struct snd_pci_quirk stac9205_cfg_tbl[] = { 819static struct snd_pci_quirk stac9205_cfg_tbl[] = {
801 /* SigmaTel reference board */ 820 /* SigmaTel reference board */
802 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668, 821 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x2668,
803 "DFI LanParty", STAC_9205_REF), 822 "DFI LanParty", STAC_9205_REF),
804 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x01f8, 823 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f8,
805 "Dell Precision", STAC_M43xx), 824 "Dell Precision", STAC_9205_M43xx),
806 SND_PCI_QUIRK(PCI_VENDOR_ID_INTEL, 0x01ff, 825 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f9,
807 "Dell Precision", STAC_M43xx), 826 "Dell Precision", STAC_9205_DELL_M43),
827 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fa,
828 "Dell Precision", STAC_9205_DELL_M43),
829 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fe,
830 "Dell Precision", STAC_9205_DELL_M43),
831 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01ff,
832 "Dell Precision", STAC_9205_DELL_M43),
833 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x0206,
834 "Dell Precision", STAC_9205_DELL_M43),
835 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f1,
836 "Dell Inspiron", STAC_9205_DELL_M44),
837 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01f2,
838 "Dell Inspiron", STAC_9205_DELL_M44),
839 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fc,
840 "Dell Inspiron", STAC_9205_DELL_M44),
841 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x01fd,
842 "Dell Inspiron", STAC_9205_DELL_M44),
843 SND_PCI_QUIRK(PCI_VENDOR_ID_DELL, 0x021f,
844 "Dell Inspiron", STAC_9205_DELL_M44),
808 {} /* terminator */ 845 {} /* terminator */
809}; 846};
810 847
@@ -2312,7 +2349,9 @@ static int patch_stac9205(struct hda_codec *codec)
2312 2349
2313 spec->multiout.dac_nids = spec->dac_nids; 2350 spec->multiout.dac_nids = spec->dac_nids;
2314 2351
2315 if (spec->board_config == STAC_M43xx) { 2352 switch (spec->board_config){
2353 case STAC_9205_M43xx:
2354 case STAC_9205_DELL_M43:
2316 /* Enable SPDIF in/out */ 2355 /* Enable SPDIF in/out */
2317 stac92xx_set_config_reg(codec, 0x1f, 0x01441030); 2356 stac92xx_set_config_reg(codec, 0x1f, 0x01441030);
2318 stac92xx_set_config_reg(codec, 0x20, 0x1c410030); 2357 stac92xx_set_config_reg(codec, 0x20, 0x1c410030);
@@ -2322,9 +2361,12 @@ static int patch_stac9205(struct hda_codec *codec)
2322 * GPIO2 High = Headphone Mute 2361 * GPIO2 High = Headphone Mute
2323 */ 2362 */
2324 spec->gpio_data = 0x00000005; 2363 spec->gpio_data = 0x00000005;
2325 } else 2364 break;
2326 spec->gpio_mask = spec->gpio_data = 2365 default:
2327 0x00000001; /* GPIO0 High = EAPD */ 2366 /* GPIO0 High = EAPD */
2367 spec->gpio_mask = spec->gpio_data = 0x00000001;
2368 break;
2369 }
2328 2370
2329 stac92xx_enable_gpio_mask(codec); 2371 stac92xx_enable_gpio_mask(codec);
2330 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20); 2372 err = stac92xx_parse_auto_config(codec, 0x1f, 0x20);