* Sound on newer arima notebook...
@ 2004-03-31 14:52 Pavel Machek
2004-03-31 15:08 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Pavel Machek @ 2004-03-31 14:52 UTC (permalink / raw)
To: perex, Tjeerd.Mulder, tiwai, kernel list
Hi!
...seems to work okay, except that mixers are strangely renumbered in
aumix. PCM2 has to be set to high if I want to hear something. Master
volume does not do anything.
Dmesg tells me:
Advanced Linux Sound Architecture Driver Version 1.0.2c (Thu Feb 05 15:41:49 2004 UTC).
via82xx: Assuming DXS channels with 48k fixed sample rate.
Please try dxs_support=1 or dxs_support=4 option
and report if it works on your machine.
PCI: Setting latency timer of device 0000:00:11.5 to 64
usb 2-1: new full speed USB device using address 2
codec_read: codec 0 is not valid [0xfe0000]
codec_read: codec 0 is not valid [0xfe0000]
codec_read: codec 0 is not valid [0xfe0000]
codec_read: codec 0 is not valid [0xfe0000]
ALSA device list:
#0: VIA 8235 at 0x1400, irq 22
With dxs_support=1 mixers were also renumbered, maybe in slightly
different way.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Sound on newer arima notebook...
2004-03-31 14:52 Sound on newer arima notebook Pavel Machek
@ 2004-03-31 15:08 ` Takashi Iwai
2004-04-01 8:09 ` via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...] Pavel Machek
0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2004-03-31 15:08 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
Hi Pavel,
At Wed, 31 Mar 2004 16:52:06 +0200,
Pavel Machek wrote:
>
> Hi!
>
> ...seems to work okay, except that mixers are strangely renumbered in
> aumix. PCM2 has to be set to high if I want to hear something. Master
> volume does not do anything.
tuning ac97_quirk option will help.
(perhaps ac97_quirk=1)
> Dmesg tells me:
>
> Advanced Linux Sound Architecture Driver Version 1.0.2c (Thu Feb 05 15:41:49 2004 UTC).
> via82xx: Assuming DXS channels with 48k fixed sample rate.
> Please try dxs_support=1 or dxs_support=4 option
> and report if it works on your machine.
> PCI: Setting latency timer of device 0000:00:11.5 to 64
> usb 2-1: new full speed USB device using address 2
> codec_read: codec 0 is not valid [0xfe0000]
> codec_read: codec 0 is not valid [0xfe0000]
> codec_read: codec 0 is not valid [0xfe0000]
> codec_read: codec 0 is not valid [0xfe0000]
these messages appear sometimes on some via boards.
i don't figure out yet what's wrong. it's often harmless.
> ALSA device list:
> #0: VIA 8235 at 0x1400, irq 22
>
> With dxs_support=1 mixers were also renumbered, maybe in slightly
> different way.
dxs_support option is irrelevant with the mixer configuration.
it's for PCM set up. check whether 44100Hz playback works with
dxs_support=1. if it's ok, please let us know the pci subsystem id,
so that it will be enabled as default.
--
Takashi Iwai <tiwai@suse.de> ALSA Developer - www.alsa-project.org
^ permalink raw reply [flat|nested] 12+ messages in thread
* via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-03-31 15:08 ` Takashi Iwai
@ 2004-04-01 8:09 ` Pavel Machek
2004-04-01 8:23 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Pavel Machek @ 2004-04-01 8:09 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, Tjeerd.Mulder, kernel list
Hi!
> > ...seems to work okay, except that mixers are strangely renumbered in
> > aumix. PCM2 has to be set to high if I want to hear something. Master
> > volume does not do anything.
>
> tuning ac97_quirk option will help.
> (perhaps ac97_quirk=1)
via82xx command line parsing code is *evil*. It has completely
different parameters as a module / in kernel, and in-kernel parameters
shift according to the joystick support! (which is config_time option). Ouch.
Is there some easy way to convert MODULE_PARM with an array to some
more modern interface?
Pavel
static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 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");
....
#if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
#define SUPPORT_JOYSTICK 1
#endif
....
/* format is: snd-via82xx=enable,index,id,
mpu_port,joystick,
ac97_quirk,ac97_clock,dxs_support */
static int __init alsa_card_via82xx_setup(char *str)
{
static unsigned __initdata nr_dev = 0;
if (nr_dev >= SNDRV_CARDS)
return 0;
(void)(get_option(&str,&enable[nr_dev]) == 2 &&
get_option(&str,&index[nr_dev]) == 2 &&
get_id(&str,&id[nr_dev]) == 2 &&
get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
#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++;
return 1;
}
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 8:09 ` via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...] Pavel Machek
@ 2004-04-01 8:23 ` Takashi Iwai
2004-04-01 8:29 ` Pavel Machek
0 siblings, 1 reply; 12+ messages in thread
From: Takashi Iwai @ 2004-04-01 8:23 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
At Thu, 1 Apr 2004 10:09:54 +0200,
Pavel Machek wrote:
>
> Hi!
>
> > > ...seems to work okay, except that mixers are strangely renumbered in
> > > aumix. PCM2 has to be set to high if I want to hear something. Master
> > > volume does not do anything.
> >
> > tuning ac97_quirk option will help.
> > (perhaps ac97_quirk=1)
>
> via82xx command line parsing code is *evil*. It has completely
> different parameters as a module / in kernel, and in-kernel parameters
> shift according to the joystick support! (which is config_time option). Ouch.
yep, i know it - it annoys me too...
> Is there some easy way to convert MODULE_PARM with an array to some
> more modern interface?
there is a patch pending in my tree to allow empty boot options, such
as
snd-via82xx=,,,,,2
but it doesn't improve so much.
perhaps the better way would be like
snd-via82xx=enable:1,ac97_quirk:4
??
in this way, it's hard to keep the compatibility with old boot
parameters, but i don't think no one will complain if they see it
nicer.
Takashi
>
> static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 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");
> ....
> #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE))
> #define SUPPORT_JOYSTICK 1
> #endif
> ....
> /* format is: snd-via82xx=enable,index,id,
> mpu_port,joystick,
> ac97_quirk,ac97_clock,dxs_support */
>
> static int __init alsa_card_via82xx_setup(char *str)
> {
> static unsigned __initdata nr_dev = 0;
>
> if (nr_dev >= SNDRV_CARDS)
> return 0;
> (void)(get_option(&str,&enable[nr_dev]) == 2 &&
> get_option(&str,&index[nr_dev]) == 2 &&
> get_id(&str,&id[nr_dev]) == 2 &&
> get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
> #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++;
> return 1;
> }
>
>
> --
> When do you have a heart between your knees?
> [Johanka's followup: and *two* hearts?]
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 8:23 ` Takashi Iwai
@ 2004-04-01 8:29 ` Pavel Machek
2004-04-01 8:37 ` Takashi Iwai
0 siblings, 1 reply; 12+ messages in thread
From: Pavel Machek @ 2004-04-01 8:29 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, Tjeerd.Mulder, kernel list
Hi!
> > via82xx command line parsing code is *evil*. It has completely
> > different parameters as a module / in kernel, and in-kernel parameters
> > shift according to the joystick support! (which is config_time option). Ouch.
>
> yep, i know it - it annoys me too...
>
> > Is there some easy way to convert MODULE_PARM with an array to some
> > more modern interface?
>
> there is a patch pending in my tree to allow empty boot options, such
> as
> snd-via82xx=,,,,,2
> but it doesn't improve so much.
>
> perhaps the better way would be like
>
> snd-via82xx=enable:1,ac97_quirk:4
>
> ??
>
> in this way, it's hard to keep the compatibility with old boot
> parameters, but i don't think no one will complain if they see it
> nicer.
Its so broken that we do not want compatibility, I believe. Having to
use snd-via82xx=,,,,,2 normally, but add one "," if joystick is
configured in is evil.
snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax
already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with
new param handling code. I'm just not sure how it is supposed to work
with arrays:
static char *psmouse_proto;
static unsigned int psmouse_max_proto = -1U;
module_param_named(proto, psmouse_proto, charp, 0);
MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare,
imps, exps). Useful for KVM switches.");
...automatically produces "proto" param for module and "psmouse.proto"
param for kernel.
Something similar should be the way to go.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 8:29 ` Pavel Machek
@ 2004-04-01 8:37 ` Takashi Iwai
2004-04-01 9:04 ` Takashi Iwai
2004-04-01 9:04 ` Pavel Machek
0 siblings, 2 replies; 12+ messages in thread
From: Takashi Iwai @ 2004-04-01 8:37 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
At Thu, 1 Apr 2004 10:29:05 +0200,
Pavel Machek wrote:
>
> Hi!
>
> > > via82xx command line parsing code is *evil*. It has completely
> > > different parameters as a module / in kernel, and in-kernel parameters
> > > shift according to the joystick support! (which is config_time option). Ouch.
> >
> > yep, i know it - it annoys me too...
> >
> > > Is there some easy way to convert MODULE_PARM with an array to some
> > > more modern interface?
> >
> > there is a patch pending in my tree to allow empty boot options, such
> > as
> > snd-via82xx=,,,,,2
> > but it doesn't improve so much.
> >
> > perhaps the better way would be like
> >
> > snd-via82xx=enable:1,ac97_quirk:4
> >
> > ??
> >
> > in this way, it's hard to keep the compatibility with old boot
> > parameters, but i don't think no one will complain if they see it
> > nicer.
>
> Its so broken that we do not want compatibility, I believe. Having to
> use snd-via82xx=,,,,,2 normally, but add one "," if joystick is
> configured in is evil.
>
> snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax
> already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with
> new param handling code.
oh that's good to know.
> I'm just not sure how it is supposed to work
> with arrays:
>
> static char *psmouse_proto;
> static unsigned int psmouse_max_proto = -1U;
> module_param_named(proto, psmouse_proto, charp, 0);
> MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare,
> imps, exps). Useful for KVM switches.");
>
> ...automatically produces "proto" param for module and "psmouse.proto"
> param for kernel.
>
> Something similar should be the way to go.
ok, i'll take a look at it.
thanks!
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 8:37 ` Takashi Iwai
@ 2004-04-01 9:04 ` Takashi Iwai
2004-04-01 9:04 ` Pavel Machek
1 sibling, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2004-04-01 9:04 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
[-- Attachment #1: Type: text/plain, Size: 124 bytes --]
Hi Pavel,
does the attached patch work?
i checked the compilation for modules but not tested for builtin
kernel.
Takashi
[-- Attachment #2: Type: text/plain, Size: 3700 bytes --]
--- linux/sound/pci/via82xx.c 8 Mar 2004 16:44:08 -0000 1.102
+++ linux/sound/pci/via82xx.c 1 Apr 2004 09:01:37 -0000
@@ -50,6 +50,7 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
+#include <linux/moduleparam.h>
#include <linux/gameport.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -57,7 +58,6 @@
#include <sound/info.h>
#include <sound/ac97_codec.h>
#include <sound/mpu401.h>
-#define SNDRV_GET_ID
#include <sound/initval.h>
#if 0
@@ -84,31 +84,32 @@
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];
+static int boot_devs __initdata;
-MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(index, int, boot_devs, 0444);
MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
-MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
+module_param_array(id, charp, boot_devs, 0444);
MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(enable, int, boot_devs, 0444);
MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge.");
MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(mpu_port, int, boot_devs, 0444);
MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)");
MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC);
#ifdef SUPPORT_JOYSTICK
-MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(joystick, int, boot_devs, 0444);
MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)");
MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLE_DESC "," SNDRV_BOOLEAN_FALSE_DESC);
#endif
-MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(ac97_clock, int, boot_devs, 0444);
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_param_array(ac97_quirk, int, boot_devs, 0444);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,4}},dialog:list,default:-1");
-MODULE_PARM(dxs_support, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(dxs_support, int, boot_devs, 0444);
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");
@@ -2200,33 +2201,3 @@
module_init(alsa_card_via82xx_init)
module_exit(alsa_card_via82xx_exit)
-
-#ifndef MODULE
-
-/* format is: snd-via82xx=enable,index,id,
- mpu_port,joystick,
- ac97_quirk,ac97_clock,dxs_support */
-
-static int __init alsa_card_via82xx_setup(char *str)
-{
- static unsigned __initdata nr_dev = 0;
-
- if (nr_dev >= SNDRV_CARDS)
- return 0;
- (void)(get_option(&str,&enable[nr_dev]) == 2 &&
- get_option(&str,&index[nr_dev]) == 2 &&
- get_id(&str,&id[nr_dev]) == 2 &&
- get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
-#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++;
- return 1;
-}
-
-__setup("snd-via82xx=", alsa_card_via82xx_setup);
-
-#endif /* ifndef MODULE */
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 8:37 ` Takashi Iwai
2004-04-01 9:04 ` Takashi Iwai
@ 2004-04-01 9:04 ` Pavel Machek
2004-04-01 9:15 ` Takashi Iwai
1 sibling, 1 reply; 12+ messages in thread
From: Pavel Machek @ 2004-04-01 9:04 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, Tjeerd.Mulder, kernel list
Hi!
> > snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax
> > already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with
> > new param handling code.
>
> oh that's good to know.
And here's a patch. It compiles.
--- tmp/linux/sound/pci/via82xx.c 2004-02-20 12:30:04.000000000 +0100
+++ linux/sound/pci/via82xx.c 2004-04-01 10:55:54.000000000 +0200
@@ -51,6 +51,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/gameport.h>
+#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -60,9 +61,7 @@
#define SNDRV_GET_ID
#include <sound/initval.h>
-#if 0
-#define POINTER_DEBUG
-#endif
+#undef POINTER_DEBUG
MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("VIA VT82xx audio");
@@ -82,33 +81,36 @@
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];
+static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
+static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
-MODULE_PARM(index, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+int index_num, mpu_port_num, enable_num, joystick_num, ac97_clock_num, ac97_quirk_num, dxs_support_num;
+
+module_param_array(index, int, index_num, 0666);
MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
MODULE_PARM_SYNTAX(index, SNDRV_INDEX_DESC);
MODULE_PARM(id, "1-" __MODULE_STRING(SNDRV_CARDS) "s");
MODULE_PARM_DESC(id, "ID string for VIA 82xx bridge.");
MODULE_PARM_SYNTAX(id, SNDRV_ID_DESC);
-MODULE_PARM(enable, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(enable, int, enable_num, 0666);
MODULE_PARM_DESC(enable, "Enable audio part of VIA 82xx bridge.");
MODULE_PARM_SYNTAX(enable, SNDRV_ENABLE_DESC);
-MODULE_PARM(mpu_port, "1-" __MODULE_STRING(SNDRV_CARDS) "l");
+module_param_array(mpu_port, long, mpu_port_num, 0666);
MODULE_PARM_DESC(mpu_port, "MPU-401 port. (VT82C686x only)");
MODULE_PARM_SYNTAX(mpu_port, SNDRV_PORT_DESC);
#ifdef SUPPORT_JOYSTICK
+module_param_array(joystick, int, joystick_num, 0666);
MODULE_PARM(joystick, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
MODULE_PARM_DESC(joystick, "Enable joystick. (VT82C686x only)");
MODULE_PARM_SYNTAX(joystick, SNDRV_ENABLE_DESC "," SNDRV_BOOLEAN_FALSE_DESC);
#endif
-MODULE_PARM(ac97_clock, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(ac97_clock, int, ac97_clock_num, 0666);
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_param_array(ac97_quirk, int, ac97_quirk_num, 0666);
MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
MODULE_PARM_SYNTAX(ac97_quirk, SNDRV_ENABLED ",allows:{{-1,3}},dialog:list,default:-1");
-MODULE_PARM(dxs_support, "1-" __MODULE_STRING(SNDRV_CARDS) "i");
+module_param_array(dxs_support, int, dxs_support_num, 0666);
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");
@@ -2169,33 +2171,3 @@
module_init(alsa_card_via82xx_init)
module_exit(alsa_card_via82xx_exit)
-
-#ifndef MODULE
-
-/* format is: snd-via82xx=enable,index,id,
- mpu_port,joystick,
- ac97_quirk,ac97_clock,dxs_support */
-
-static int __init alsa_card_via82xx_setup(char *str)
-{
- static unsigned __initdata nr_dev = 0;
-
- if (nr_dev >= SNDRV_CARDS)
- return 0;
- (void)(get_option(&str,&enable[nr_dev]) == 2 &&
- get_option(&str,&index[nr_dev]) == 2 &&
- get_id(&str,&id[nr_dev]) == 2 &&
- get_option_long(&str,&mpu_port[nr_dev]) == 2 &&
-#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++;
- return 1;
-}
-
-__setup("snd-via82xx=", alsa_card_via82xx_setup);
-
-#endif /* ifndef MODULE */
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 9:04 ` Pavel Machek
@ 2004-04-01 9:15 ` Takashi Iwai
2004-04-01 10:41 ` Pavel Machek
2004-04-01 18:24 ` Pavel Machek
0 siblings, 2 replies; 12+ messages in thread
From: Takashi Iwai @ 2004-04-01 9:15 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
At Thu, 1 Apr 2004 11:04:52 +0200,
Pavel Machek wrote:
>
> Hi!
>
>
> > > snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax
> > > already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with
> > > new param handling code.
> >
> > oh that's good to know.
>
> And here's a patch. It compiles.
heh, we're crossfiring :)
> @@ -82,33 +81,36 @@
> 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];
> +static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
> +static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
i suppose that ac97_quirk=1 and dxs_support=1 work fine with your
machine?
(i don't want to change defaults for all devices yet :)
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 9:15 ` Takashi Iwai
@ 2004-04-01 10:41 ` Pavel Machek
2004-04-01 18:24 ` Pavel Machek
1 sibling, 0 replies; 12+ messages in thread
From: Pavel Machek @ 2004-04-01 10:41 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, Tjeerd.Mulder, kernel list
Hi!
> > > > snd-via82xx=enable:1 syntax is ugly, too, and we have better syntax
> > > > already. via82xx.enable=1 via82xx.ac97_quirk=2 should be possible with
> > > > new param handling code.
> > >
> > > oh that's good to know.
> >
> > And here's a patch. It compiles.
>
> heh, we're crossfiring :)
>
> > @@ -82,33 +81,36 @@
> > 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];
> > +static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
> > +static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
>
> i suppose that ac97_quirk=1 and dxs_support=1 work fine with your
> machine?
> (i don't want to change defaults for all devices yet :)
Oops, sorry, I was not able to test it yet.
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 9:15 ` Takashi Iwai
2004-04-01 10:41 ` Pavel Machek
@ 2004-04-01 18:24 ` Pavel Machek
2004-04-01 18:28 ` Takashi Iwai
1 sibling, 1 reply; 12+ messages in thread
From: Pavel Machek @ 2004-04-01 18:24 UTC (permalink / raw)
To: Takashi Iwai; +Cc: perex, Tjeerd.Mulder, kernel list
Hi!
> > 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];
> > +static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
> > +static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
>
> i suppose that ac97_quirk=1 and dxs_support=1 work fine with your
> machine?
> (i don't want to change defaults for all devices yet :)
ac97_quirk=1 helps (*) here. dxs_support=1 makes it sounds worse than
usual.
Pavel
(*): Vol + PCM now controls output to headphones. Thats certainly better
than output controlled by PCM + PCM2. I *still* can't make it play on
internal speakers...
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]
2004-04-01 18:24 ` Pavel Machek
@ 2004-04-01 18:28 ` Takashi Iwai
0 siblings, 0 replies; 12+ messages in thread
From: Takashi Iwai @ 2004-04-01 18:28 UTC (permalink / raw)
To: Pavel Machek; +Cc: perex, Tjeerd.Mulder, kernel list
At Thu, 1 Apr 2004 20:24:17 +0200,
Pavel Machek wrote:
>
> Hi!
>
> > > 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];
> > > +static int ac97_quirk[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
> > > +static int dxs_support[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 1};
> >
> > i suppose that ac97_quirk=1 and dxs_support=1 work fine with your
> > machine?
> > (i don't want to change defaults for all devices yet :)
>
> ac97_quirk=1 helps (*) here. dxs_support=1 makes it sounds worse than
> usual.
dxs_support=4 might help, then.
in the worst case, you can use dxs_support=2, which disables DXS
channels completely. the multi playback won't work, though.
> (*): Vol + PCM now controls output to headphones. Thats certainly better
> than output controlled by PCM + PCM2. I *still* can't make it play on
> internal speakers...
which ac97 codec? you can see it in
/proc/asound/card0/pcm0p/codec97#0/ac97#0-0.
Takashi
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-04-01 18:28 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-31 14:52 Sound on newer arima notebook Pavel Machek
2004-03-31 15:08 ` Takashi Iwai
2004-04-01 8:09 ` via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...] Pavel Machek
2004-04-01 8:23 ` Takashi Iwai
2004-04-01 8:29 ` Pavel Machek
2004-04-01 8:37 ` Takashi Iwai
2004-04-01 9:04 ` Takashi Iwai
2004-04-01 9:04 ` Pavel Machek
2004-04-01 9:15 ` Takashi Iwai
2004-04-01 10:41 ` Pavel Machek
2004-04-01 18:24 ` Pavel Machek
2004-04-01 18:28 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox