aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/intel8x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/intel8x0.c')
-rw-r--r--sound/pci/intel8x0.c50
1 files changed, 45 insertions, 5 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 048d99e25ab0..c88d1eace1c4 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -59,6 +59,12 @@ MODULE_SUPPORTED_DEVICE("{{Intel,82801AA-ICH},"
59 "{SiS,SI7012}," 59 "{SiS,SI7012},"
60 "{NVidia,nForce Audio}," 60 "{NVidia,nForce Audio},"
61 "{NVidia,nForce2 Audio}," 61 "{NVidia,nForce2 Audio},"
62 "{NVidia,nForce3 Audio},"
63 "{NVidia,MCP04},"
64 "{NVidia,MCP501},"
65 "{NVidia,CK804},"
66 "{NVidia,CK8},"
67 "{NVidia,CK8S},"
62 "{AMD,AMD768}," 68 "{AMD,AMD768},"
63 "{AMD,AMD8111}," 69 "{AMD,AMD8111},"
64 "{ALI,M5455}}"); 70 "{ALI,M5455}}");
@@ -77,7 +83,7 @@ MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard.");
77module_param(id, charp, 0444); 83module_param(id, charp, 0444);
78MODULE_PARM_DESC(id, "ID string for Intel i8x0 soundcard."); 84MODULE_PARM_DESC(id, "ID string for Intel i8x0 soundcard.");
79module_param(ac97_clock, int, 0444); 85module_param(ac97_clock, int, 0444);
80MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect)."); 86MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = whitelist + auto-detect, 1 = force autodetect).");
81module_param(ac97_quirk, charp, 0444); 87module_param(ac97_quirk, charp, 0444);
82MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 88MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
83module_param(buggy_semaphore, bool, 0444); 89module_param(buggy_semaphore, bool, 0444);
@@ -1957,6 +1963,12 @@ static struct ac97_quirk ac97_quirks[] __devinitdata = {
1957 }, 1963 },
1958 { 1964 {
1959 .subvendor = 0x10cf, 1965 .subvendor = 0x10cf,
1966 .subdevice = 0x127d,
1967 .name = "Fujitsu Lifebook P7010",
1968 .type = AC97_TUNE_HP_ONLY
1969 },
1970 {
1971 .subvendor = 0x10cf,
1960 .subdevice = 0x127e, 1972 .subdevice = 0x127e,
1961 .name = "Fujitsu Lifebook C1211D", 1973 .name = "Fujitsu Lifebook C1211D",
1962 .type = AC97_TUNE_HP_ONLY 1974 .type = AC97_TUNE_HP_ONLY
@@ -2132,8 +2144,8 @@ static int __devinit snd_intel8x0_mixer(struct intel8x0 *chip, int ac97_clock,
2132 snd_intel8x0_codec_read_test(chip, codecs); 2144 snd_intel8x0_codec_read_test(chip, codecs);
2133 chip->ac97_sdin[codecs] = 2145 chip->ac97_sdin[codecs] =
2134 igetbyte(chip, ICHREG(SDM)) & ICH_LDI_MASK; 2146 igetbyte(chip, ICHREG(SDM)) & ICH_LDI_MASK;
2135 snd_assert(chip->ac97_sdin[codecs] < 3, 2147 if (snd_BUG_ON(chip->ac97_sdin[codecs] >= 3))
2136 chip->ac97_sdin[codecs] = 0); 2148 chip->ac97_sdin[codecs] = 0;
2137 } else 2149 } else
2138 chip->ac97_sdin[codecs] = i; 2150 chip->ac97_sdin[codecs] = i;
2139 codecs++; 2151 codecs++;
@@ -2686,6 +2698,28 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
2686 snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0); 2698 snd_ac97_update_power(chip->ac97[0], AC97_PCM_FRONT_DAC_RATE, 0);
2687} 2699}
2688 2700
2701static struct snd_pci_quirk intel8x0_clock_list[] __devinitdata = {
2702 SND_PCI_QUIRK(0x0e11, 0x008a, "AD1885", 41000),
2703 SND_PCI_QUIRK(0x1028, 0x00be, "AD1885", 44100),
2704 SND_PCI_QUIRK(0x1028, 0x0177, "AD1980", 48000),
2705 SND_PCI_QUIRK(0x1043, 0x80f3, "AD1985", 48000),
2706 { } /* terminator */
2707};
2708
2709static int __devinit intel8x0_in_clock_list(struct intel8x0 *chip)
2710{
2711 struct pci_dev *pci = chip->pci;
2712 const struct snd_pci_quirk *wl;
2713
2714 wl = snd_pci_quirk_lookup(pci, intel8x0_clock_list);
2715 if (!wl)
2716 return 0;
2717 printk(KERN_INFO "intel8x0: white list rate for %04x:%04x is %i\n",
2718 pci->subsystem_vendor, pci->subsystem_device, wl->value);
2719 chip->ac97_bus->clock = wl->value;
2720 return 1;
2721}
2722
2689#ifdef CONFIG_PROC_FS 2723#ifdef CONFIG_PROC_FS
2690static void snd_intel8x0_proc_read(struct snd_info_entry * entry, 2724static void snd_intel8x0_proc_read(struct snd_info_entry * entry,
2691 struct snd_info_buffer *buffer) 2725 struct snd_info_buffer *buffer)
@@ -3081,8 +3115,14 @@ static int __devinit snd_intel8x0_probe(struct pci_dev *pci,
3081 "%s with %s at irq %i", card->shortname, 3115 "%s with %s at irq %i", card->shortname,
3082 snd_ac97_get_short_name(chip->ac97[0]), chip->irq); 3116 snd_ac97_get_short_name(chip->ac97[0]), chip->irq);
3083 3117
3084 if (! ac97_clock) 3118 if (ac97_clock == 0 || ac97_clock == 1) {
3085 intel8x0_measure_ac97_clock(chip); 3119 if (ac97_clock == 0) {
3120 if (intel8x0_in_clock_list(chip) == 0)
3121 intel8x0_measure_ac97_clock(chip);
3122 } else {
3123 intel8x0_measure_ac97_clock(chip);
3124 }
3125 }
3086 3126
3087 if ((err = snd_card_register(card)) < 0) { 3127 if ((err = snd_card_register(card)) < 0) {
3088 snd_card_free(card); 3128 snd_card_free(card);