Commit a4e0e575 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Add ac97_quirk option

Documentation,ATIIXP driver
Added ac97_quirk option like intel and via drivers.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent a5b34076
...@@ -184,6 +184,8 @@ Module parameters ...@@ -184,6 +184,8 @@ Module parameters
Module for ATI IXP 150/200/250 AC97 controllers. Module for ATI IXP 150/200/250 AC97 controllers.
ac97_clock - AC'97 clock (defalut = 48000) ac97_clock - AC'97 clock (defalut = 48000)
ac97_quirk - AC'97 workaround for strange hardware
See the description of intel8x0 module for details.
spdif_aclink - S/PDIF transfer over AC-link (default = 1) spdif_aclink - S/PDIF transfer over AC-link (default = 1)
This module supports up to 8 cards and autoprobe. This module supports up to 8 cards and autoprobe.
......
...@@ -43,6 +43,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ ...@@ -43,6 +43,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */
static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */ static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; /* Enable this card */
static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000}; static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
static char *ac97_quirk[SNDRV_CARDS];
static int spdif_aclink[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1}; static int spdif_aclink[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
module_param_array(index, int, NULL, 0444); module_param_array(index, int, NULL, 0444);
...@@ -53,6 +54,8 @@ module_param_array(enable, bool, NULL, 0444); ...@@ -53,6 +54,8 @@ module_param_array(enable, bool, NULL, 0444);
MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller."); MODULE_PARM_DESC(enable, "Enable audio part of ATI IXP controller.");
module_param_array(ac97_clock, int, NULL, 0444); module_param_array(ac97_clock, int, NULL, 0444);
MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz)."); MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
module_param_array(ac97_quirk, charp, NULL, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
module_param_array(spdif_aclink, bool, NULL, 0444); module_param_array(spdif_aclink, bool, NULL, 0444);
MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link."); MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
...@@ -1328,7 +1331,11 @@ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *r ...@@ -1328,7 +1331,11 @@ static irqreturn_t snd_atiixp_interrupt(int irq, void *dev_id, struct pt_regs *r
* ac97 mixer section * ac97 mixer section
*/ */
static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock) static struct ac97_quirk ac97_quirks[] __devinitdata = {
{ } /* terminator */
};
static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock, const char *quirk_override)
{ {
ac97_bus_t *pbus; ac97_bus_t *pbus;
ac97_template_t ac97; ac97_template_t ac97;
...@@ -1375,7 +1382,7 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock) ...@@ -1375,7 +1382,7 @@ static int __devinit snd_atiixp_mixer_new(atiixp_t *chip, int clock)
return -ENODEV; return -ENODEV;
} }
/* snd_ac97_tune_hardware(chip->ac97, ac97_quirks); */ snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
return 0; return 0;
} }
...@@ -1568,7 +1575,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci, ...@@ -1568,7 +1575,7 @@ static int __devinit snd_atiixp_probe(struct pci_dev *pci,
chip->spdif_over_aclink = spdif_aclink[dev]; chip->spdif_over_aclink = spdif_aclink[dev];
if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev])) < 0) if ((err = snd_atiixp_mixer_new(chip, ac97_clock[dev], ac97_quirk[dev])) < 0)
goto __error; goto __error;
if ((err = snd_atiixp_pcm_new(chip)) < 0) if ((err = snd_atiixp_pcm_new(chip)) < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment