Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4225/pci
Modified Files:
intel8x0.c via82xx.c
Log Message:
Add AC97 quick manual override module parameter.
Index: intel8x0.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- intel8x0.c 3 Feb 2004 15:19:33 -0000 1.110
+++ intel8x0.c 5 Feb 2004 10:37:08 -0000 1.111
@@ -72,6 +72,7 @@
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 ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 0};
+static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT};
#ifdef SUPPORT_JOYSTICK
static int joystick[SNDRV_CARDS];
#endif
@@ -91,6 +92,9 @@
MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (0 = auto-detect).");
MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:0");
+MODULE_PARM(ac97_quirk, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
+MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",default:-1");
#ifdef SUPPORT_JOYSTICK
MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(joystick, "Enable joystick for Intel i8x0 soundcard.");
@@ -1765,7 +1769,7 @@
{ } /* terminator */
};
-static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock)
+static int __devinit snd_intel8x0_mixer(intel8x0_t *chip, int ac97_clock, int
ac97_quirk)
{
ac97_bus_t bus, *pbus;
ac97_t ac97, *x97;
@@ -1855,7 +1859,7 @@
chip->ac97[i] = x97;
}
/* tune up the primary codec */
- snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks);
+ snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, ac97_quirk);
/* enable separate SDINs for ICH4 */
if (chip->device_type == DEVICE_INTEL_ICH4)
pbus->isdin = 1;
@@ -2613,7 +2617,7 @@
return err;
}
- if ((err = snd_intel8x0_mixer(chip, ac97_clock[dev])) < 0) {
+ if ((err = snd_intel8x0_mixer(chip, ac97_clock[dev], ac97_quirk[dev])) < 0) {
snd_card_free(card);
return err;
}
@@ -2798,7 +2802,7 @@
#ifndef MODULE
-/* format is: snd-intel8x0=enable,index,id,ac97_clock,mpu_port,joystick */
+/* format is: snd-intel8x0=enable,index,id,ac97_clock,ac97_quirk,mpu_port,joystick */
static int __init alsa_card_intel8x0_setup(char *str)
{
@@ -2810,6 +2814,7 @@
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option(&str,&ac97_clock[nr_dev]) == 2
+ get_option(&str,&ac97_quirk[nr_dev]) == 2
#ifdef SUPPORT_MIDI
&& get_option(&str,&mpu_port[nr_dev]) == 2
#endif
Index: via82xx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- via82xx.c 2 Feb 2004 15:15:48 -0000 1.82
+++ via82xx.c 5 Feb 2004 10:37:10 -0000 1.83
@@ -82,6 +82,7 @@
static int joystick[SNDRV_CARDS];
#endif
static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};
+static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = AC97_TUNE_DEFAULT};
static int dxs_support[SNDRV_CARDS];
MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
@@ -104,6 +105,9 @@
MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(ac97_clock, "AC'97 codec clock (default 48000Hz).");
MODULE_PARM_SYNTAX(ac97_clock, SNDRV_ENABLED ",default:48000");
+MODULE_PARM(ac97_quirk, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
+MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",default:-1");
MODULE_PARM(dxs_support, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 =
disable, 3 = 48k only, 4 = no VRA)");
MODULE_PARM_SYNTAX(dxs_support, SNDRV_ENABLED ",allows:{{0,4}},dialog:list");
@@ -1559,7 +1563,7 @@
{ } /* terminator */
};
-static int __devinit snd_via82xx_mixer_new(via82xx_t *chip)
+static int __devinit snd_via82xx_mixer_new(via82xx_t *chip, int ac97_quirk)
{
ac97_bus_t bus;
ac97_t ac97;
@@ -1582,7 +1586,7 @@
if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
return err;
- snd_ac97_tune_hardware(chip->ac97, ac97_quirks);
+ snd_ac97_tune_hardware(chip->ac97, ac97_quirks, ac97_quirk);
if (chip->chip_type != TYPE_VIA686) {
/* use slot 10/11 */
@@ -2087,7 +2091,7 @@
if ((err = snd_via82xx_create(card, pci, chip_type, revision, ac97_clock[dev],
&chip)) < 0)
goto __error;
- if ((err = snd_via82xx_mixer_new(chip)) < 0)
+ if ((err = snd_via82xx_mixer_new(chip, ac97_quirk[dev])) < 0)
goto __error;
if (chip_type == TYPE_VIA686) {
@@ -2169,7 +2173,8 @@
#ifndef MODULE
/* format is: snd-via82xx=enable,index,id,
- mpu_port,joystick,ac97_clock,dxs_support */
+ mpu_port,joystick,
+ ac97_quirk,ac97_clock,dxs_support */
static int __init alsa_card_via82xx_setup(char *str)
{
@@ -2184,6 +2189,7 @@
#ifdef SUPPORT_JOYSTICK
get_option(&str,&joystick[nr_dev]) == 2 &&
#endif
+ get_option(&str,&ac97_quirk[nr_dev]) == 2 &&
get_option(&str,&ac97_clock[nr_dev]) == 2 &&
get_option(&str,&dxs_support[nr_dev]) == 2);
nr_dev++;
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog