Skip to contentSkip to conversation

Sound on newer arima notebook...

DISCUSSION Pavel Machek 2 participants 12 messages Mar 31, 2004 – Apr 1, 2004 Sound

lore
Share & tools
lore
#0 lore raw

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

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#1 lore raw

Hi Pavel,

At Wed, 31 Mar 2004 16:52:06 +0200,

Quoted 6 lines · Pavel Machek

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)

Quoted 12 lines

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.

Quoted 5 lines

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 <[email protected]> ALSA Developer - www.alsa-project.org

#2 lore raw

via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

Hi!

Quoted 6 lines
Quoted 3 lines

...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;
}
Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#3 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

At Thu, 1 Apr 2004 10:09:54 +0200,

Quoted 7 lines · Pavel Machek

Hi!

Quoted 4 lines
Quoted 3 lines

...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.

Quoted 6 lines
Quoted 2 lines

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...

Quoted 2 lines

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

Quoted 40 lines

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;
}
Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#4 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

Hi!

Quoted 16 lines
Quoted 3 lines

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...

Quoted 2 lines

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

Quoted 7 lines
	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

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#5 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

At Thu, 1 Apr 2004 10:29:05 +0200,

Quoted 27 lines · Pavel Machek

Hi!

Quoted 16 lines
Quoted 3 lines

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...

Quoted 2 lines

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

Quoted 7 lines
	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.

Quoted 7 lines

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.

Quoted 9 lines

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.");

Quoted 4 lines

...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

#6 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

Hi Pavel,

does the attached patch work?
i checked the compilation for modules but not tested for builtin kernel.

Takashi

sound/pci/via82xx.c +10 -39
@@ -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 */
#7 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

In reply to Takashi Iwai

Hi!

Quoted 5 lines
Quoted 3 lines

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.

sound/pci/via82xx.c renamed from linux/sound/pci/via82xx.c +13 -41
@@ -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 <[email protected]>");
 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 */
Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#8 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

At Thu, 1 Apr 2004 11:04:52 +0200,

Quoted 11 lines · Pavel Machek

Hi!

Quoted 5 lines
Quoted 3 lines

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 :)

sound/pci/via82xx.c line 85

Quoted 8 lines
sound/pci/via82xx.c renamed from linux/sound/pci/via82xx.c +2 -2
@@ -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

#9 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

Hi!

Quoted 10 lines
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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 :)

Quoted 12 lines

sound/pci/via82xx.c line 85

Quoted 8 lines
sound/pci/via82xx.c renamed from linux/sound/pci/via82xx.c +2 -2
@@ -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

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#10 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

In reply to Takashi Iwai

Hi!

Quoted 11 lines

sound/pci/via82xx.c line 85

Quoted 7 lines

static int joystick[SNDRV_CARDS];
#endif
static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};

sound/pci/via82xx.c renamed from linux/sound/pci/via82xx.c +2 -2
-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...

Signature · 2 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
#11 lore raw

Re: via82xx cmd line parsing is evil [was Re: Sound on newer arima notebook...]

At Thu, 1 Apr 2004 20:24:17 +0200,

Quoted 15 lines · Pavel Machek

Hi!

Quoted 11 lines

sound/pci/via82xx.c line 85

Quoted 7 lines

static int joystick[SNDRV_CARDS];
#endif
static int ac97_clock[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 48000};

sound/pci/via82xx.c renamed from linux/sound/pci/via82xx.c +2 -2
-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 :)

Quoted 2 lines

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.

Quoted 3 lines

(*): 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