# alsa && udev

## pelacables

Hi,

first, I belive it's a kernel problem so I post my doubt here, if Administrator belives it's no posted in correct forum, fell free to move it, and sorry.

Well, I moved to udev and 2.6 last week. I'm having some problems with alsa-driver. Following http://www.gentoo.org/doc/en/migration-to-2.6.xml I  did next:

```

emerge -a alsa-lib alsa-utils alsa-tools alsa-headers alsa-oss

```

```

(the following are required for ALSA):

Device Drivers  --->

 Sound  --->

  <*> Sound card support

  Advanced Linux Sound Architecture  --->

   <M> Advanced Linux Sound Architecture

   <M> Sequencer support

   <M> OSS Mixer API

   [*] OSS Sequencer API

   (and dont forget to select your soundcard from the submenus!)

```

And 

```

emerge alsa-driver 

```

having ALSA_CARDS="via82xx" in my make.conf.

I did not select a soundcard from ALSA's kernel submenu, cause in http://www.gentoo.org/doc/en/alsa-guide.xml

```

Warning: If you use a 2.6 kernel, you may use the drivers provided in the kernel, but we still recommend that you use media-sound/alsa-driver as they are more up to date than what is provided in the kernel tree. If you still wish to use the drivers provided with your kernel, you can skip the rest of this section and continue with Installing the ALSA Utils.

```

So, I start alsaound:

```

root # /etc/init.d/alsasound start

 * Loading ALSA modules...

 *   Loading: snd-card-0...

WARNING: Error inserting snd_rawmidi (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/snd-rawmidi.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_mpu401_uart (/lib/modules/2.6.9-gentoo-r6/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_pcm (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_ac97_codec (/lib/modules/2.6.9-gentoo-r6/kernel/sound/pci/ac97/snd-ac97-codec.ko): Unknown symbol in module, orunknown parameter (see dmesg)

FATAL: Error inserting snd_via82xx (/lib/modules/2.6.9-gentoo-r6/kernel/sound/pci/snd-via82xx.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                                                                       [ !! ]

 *   Loading: snd-mixer-oss...                                                                                                         [ ok ]

 *   Loading: snd-seq-oss...                                                                                                           [ ok ]

 *   Loading: snd-pcm-oss...

WARNING: Error inserting snd_pcm (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

FATAL: Error inserting snd_pcm_oss (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/oss/snd-pcm-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                                                                 [ !! ]

 * ERROR: Failed to load necessary drivers                                                                                             [ ok ]

```

and dmesg shows:

```

snd_rawmidi: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_receive

snd_mpu401_uart: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_ack

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_peek

snd_mpu401_uart: Unknown symbol snd_rawmidi_new

snd_mpu401_uart: Unknown symbol snd_rawmidi_set_ops

snd_pcm: Unknown symbol snd_verbose_printk

snd_ac97_codec: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_resume

snd_via82xx: Unknown symbol snd_pcm_new

snd_via82xx: Unknown symbol snd_pcm_limit_hw_rates

snd_via82xx: Unknown symbol snd_pcm_lib_preallocate_pages_for_all

snd_via82xx: Unknown symbol snd_ac97_set_rate

snd_via82xx: Unknown symbol snd_pcm_format_physical_width

snd_via82xx: Unknown symbol snd_ac97_update_bits

snd_via82xx: Unknown symbol snd_ac97_mixer

snd_via82xx: Unknown symbol snd_ac97_bus

snd_via82xx: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_suspend

snd_via82xx: Unknown symbol snd_pcm_lib_malloc_pages

snd_via82xx: Unknown symbol snd_pcm_lib_ioctl

snd_via82xx: Unknown symbol snd_pcm_lib_free_pages

snd_via82xx: Unknown symbol snd_pcm_set_ops

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_list

snd_via82xx: Unknown symbol snd_pcm_sgbuf_ops_page

snd_via82xx: Unknown symbol snd_mpu401_uart_interrupt

snd_via82xx: Unknown symbol snd_pcm_suspend_all

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_integer

snd_via82xx: Unknown symbol snd_mpu401_uart_new

snd_via82xx: Unknown symbol snd_pcm_period_elapsed

snd_via82xx: Unknown symbol snd_ac97_tune_hardware

snd_rawmidi: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_receive

snd_mpu401_uart: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_ack

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_peek

snd_mpu401_uart: Unknown symbol snd_rawmidi_new

snd_mpu401_uart: Unknown symbol snd_rawmidi_set_ops

snd_pcm: Unknown symbol snd_verbose_printk

snd_ac97_codec: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_resume

snd_via82xx: Unknown symbol snd_pcm_new

snd_via82xx: Unknown symbol snd_pcm_limit_hw_rates

snd_via82xx: Unknown symbol snd_pcm_lib_preallocate_pages_for_all

snd_via82xx: Unknown symbol snd_ac97_set_rate

snd_via82xx: Unknown symbol snd_pcm_format_physical_width

snd_via82xx: Unknown symbol snd_ac97_update_bits

snd_via82xx: Unknown symbol snd_ac97_mixer

snd_via82xx: Unknown symbol snd_ac97_bus

snd_via82xx: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_suspend

snd_via82xx: Unknown symbol snd_pcm_lib_malloc_pages

snd_via82xx: Unknown symbol snd_pcm_lib_ioctl

snd_via82xx: Unknown symbol snd_pcm_lib_free_pages

snd_via82xx: Unknown symbol snd_pcm_set_ops

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_list

snd_via82xx: Unknown symbol snd_pcm_sgbuf_ops_page

snd_via82xx: Unknown symbol snd_mpu401_uart_interrupt

snd_via82xx: Unknown symbol snd_pcm_suspend_all

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_integer

snd_via82xx: Unknown symbol snd_mpu401_uart_new

snd_via82xx: Unknown symbol snd_pcm_period_elapsed

snd_via82xx: Unknown symbol snd_ac97_tune_hardware

snd_rawmidi: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_receive

snd_mpu401_uart: Unknown symbol snd_verbose_printk

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_ack

snd_mpu401_uart: Unknown symbol snd_rawmidi_transmit_peek

snd_mpu401_uart: Unknown symbol snd_rawmidi_new

snd_mpu401_uart: Unknown symbol snd_rawmidi_set_ops

snd_pcm: Unknown symbol snd_verbose_printk

snd_ac97_codec: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_resume

snd_via82xx: Unknown symbol snd_pcm_new

snd_via82xx: Unknown symbol snd_pcm_limit_hw_rates

snd_via82xx: Unknown symbol snd_pcm_lib_preallocate_pages_for_all

snd_via82xx: Unknown symbol snd_ac97_set_rate

snd_via82xx: Unknown symbol snd_pcm_format_physical_width

snd_via82xx: Unknown symbol snd_ac97_update_bits

snd_via82xx: Unknown symbol snd_ac97_mixer

snd_via82xx: Unknown symbol snd_ac97_bus

snd_via82xx: Unknown symbol snd_verbose_printk

snd_via82xx: Unknown symbol snd_ac97_suspend

snd_via82xx: Unknown symbol snd_pcm_lib_malloc_pages

snd_via82xx: Unknown symbol snd_pcm_lib_ioctl

snd_via82xx: Unknown symbol snd_pcm_lib_free_pages

snd_via82xx: Unknown symbol snd_pcm_set_ops

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_list

snd_via82xx: Unknown symbol snd_pcm_sgbuf_ops_page

snd_via82xx: Unknown symbol snd_mpu401_uart_interrupt

snd_via82xx: Unknown symbol snd_pcm_suspend_all

snd_via82xx: Unknown symbol snd_pcm_hw_constraint_integer

snd_via82xx: Unknown symbol snd_mpu401_uart_new

snd_via82xx: Unknown symbol snd_pcm_period_elapsed

snd_via82xx: Unknown symbol snd_ac97_tune_hardware

snd_pcm: Unknown symbol snd_verbose_printk

snd_pcm_oss: Unknown symbol snd_pcm_lib_read

snd_pcm_oss: Unknown symbol snd_pcm_hw_constraints_init

snd_pcm_oss: Unknown symbol snd_pcm_hw_param_near

snd_pcm_oss: Unknown symbol _snd_pcm_hw_param_setinteger

snd_pcm_oss: Unknown symbol snd_pcm_kernel_ioctl

snd_pcm_oss: Unknown symbol snd_pcm_stop

snd_pcm_oss: Unknown symbol snd_pcm_format_unsigned

snd_pcm_oss: Unknown symbol _snd_pcm_hw_params_any

snd_pcm_oss: Unknown symbol snd_pcm_format_physical_width

snd_pcm_oss: Unknown symbol snd_pcm_hw_param_value_max

snd_pcm_oss: Unknown symbol snd_pcm_hw_param_set

snd_pcm_oss: Unknown symbol snd_pcm_format_silence_64

snd_pcm_oss: Unknown symbol snd_verbose_printk

snd_pcm_oss: Unknown symbol snd_pcm_open_substream

snd_pcm_oss: Unknown symbol snd_pcm_lib_readv

snd_pcm_oss: Unknown symbol _snd_pcm_hw_param_set

snd_pcm_oss: Unknown symbol snd_pcm_kernel_capture_ioctl

snd_pcm_oss: Unknown symbol snd_pcm_lib_writev

snd_pcm_oss: Unknown symbol _snd_pcm_hw_param_min

snd_pcm_oss: Unknown symbol snd_pcm_format_linear

snd_pcm_oss: Unknown symbol snd_pcm_mmap_data

snd_pcm_oss: Unknown symbol snd_pcm_devices

snd_pcm_oss: Unknown symbol snd_pcm_hw_param_value_min

snd_pcm_oss: Unknown symbol snd_pcm_build_linear_format

snd_pcm_oss: Unknown symbol snd_pcm_hw_param_mask

snd_pcm_oss: Unknown symbol snd_pcm_format_signed

snd_pcm_oss: Unknown symbol snd_pcm_hw_constraints_complete

snd_pcm_oss: Unknown symbol snd_pcm_hw_refine

snd_pcm_oss: Unknown symbol snd_pcm_kernel_playback_ioctl

snd_pcm_oss: Unknown symbol snd_pcm_format_big_endian

snd_pcm_oss: Unknown symbol snd_pcm_notify

snd_pcm_oss: Unknown symbol snd_pcm_release_substream

snd_pcm_oss: Unknown symbol snd_pcm_lib_write

snd_pcm_oss: Unknown symbol snd_pcm_format_set_silence

snd_pcm_oss: Unknown symbol snd_pcm_format_width

spurious 8259A interrupt: IRQ7.

```

So, as you can see, I can't continue configuring alsa cause the kernel is not recognizing my hardware...

Where is my fault? is udev causing any trouble?

Any suggestion will be preciated  :Wink: 

aditional info:

```

mazingerZ root # uname -a

Linux mazingerZ 2.6.9-gentoo-r6 #3 Fri Dec 10 11:56:23 CET 2004 i686 AMD Athlon(tm)  AuthenticAMD GNU/Linux

mazingerZ root # lspci | grep -i audio

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 40)

```

Cheers!

Arnau

----------

## robet

Try loading the name of the driver, rather than an alias for that (if that is what you were doing). I've gotten that card working before, what's your /etc/modules.autoload.d/kernel-2.6? Also, you might try 'automatic kernel module loading', see if that takes care of the problem.

----------

## pelacables

Uou...

thanks for that quick annswer!!

well, the info you requets:

```

root # cat /etc/modules.autoload.d/kernel-2.6

nvidia

```

loading the module by name: ( I think it's snd-via82xx)

```

mazingerZ root # modprobe snd-via82xx

WARNING: Error inserting snd_rawmidi (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/snd-rawmidi.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_mpu401_uart (/lib/modules/2.6.9-gentoo-r6/kernel/sound/drivers/mpu401/snd-mpu401-uart.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_pcm (/lib/modules/2.6.9-gentoo-r6/kernel/sound/acore/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg)

WARNING: Error inserting snd_ac97_codec (/lib/modules/2.6.9-gentoo-r6/kernel/sound/pci/ac97/snd-ac97-codec.ko): Unknown symbol in module, or unknown parameter (see dmesg)

FATAL: Error inserting snd_via82xx (/lib/modules/2.6.9-gentoo-r6/kernel/sound/pci/snd-via82xx.ko): Unknown symbol in module, or unknown parameter (see dmesg)

```

You say to set snd-via82xx into /etc/modules.autoload.d/kernel-2.6, am I right?

and what about /etc/modules.d/alsa? coment out  next:

##  ALSA portion

alias snd-card-0 snd-via82xx

?¿?

I'm newbie, please be patient with me...

Cheers,

Arnau

----------

## Chaosite

Looks like the module isn't compiled for the running kernel.

Check your /usr/src/linux symlink and remerge alsa-driver.

----------

## deathdruid

Also run:

```

# depmod -ea

```

as root.

----------

## lytenyn

if you have a 2.6 kernel, you don't need alsa-driver anymore. Just unmerge it, recompile your kernel to be sure that the modules are reinstalled and all should be well.

----------

## dsd

yep, the problem is (probably) that you chose to mix and match two pieces of advice - my 2.6 migration guide suggests that you use the drivers in the kernel - so you included everything except the device-specific driver, whereas you then chose to use the external ALSA stuff (alsa-driver) which requires that you _dont_ have all of that stuff selected. (i'm not too sure on this though..)

for simplicitys sake i would just use the drivers included in the kernel unless you have a problem...

----------

## pelacables

Hi everybody,

first, thanks to all for your answer.

Well, I checked what you suggest:

```

mazingerZ root # ls -lsa /usr/src/linux

0 lrwxrwxrwx  1 root root 21 Dec  1 16:45 /usr/src/linux -> linux-2.6.9-gentoo-r6

mazingerZ root # uname -a

Linux mazingerZ 2.6.9-gentoo-r6 #3 Fri Dec 10 11:56:23 CET 2004 i686 AMD Athlon(tm)  AuthenticAMD GNU/Linux

mazingerZ root # depmod -ea

mazingerZ root #

```

I have same kernel as the one I use for compilation.

I also ran depmod -ea, and it didn't show any output... do I have to do anything else or before swpmod?

I know I can use kernel drivers for alsa, but as I said in my original post, it's recommended to use alsa drivers from media-sound/alsa-driver cause they're up to time...

I'm looking for this problem in google and found no much people with same problem...is people using alsa drivers from kernel? I can recompile, but I'd prefer to use the external module.. 

cheers!

Arnau

----------

## deathdruid

 *pelacables wrote:*   

> 
> 
> I also ran depmod -ea, and it didn't show any output... do I have to do anything else or before swpmod?
> 
> 

 

No, just modprobe at that point.

----------

## Chaosite

 *pelacables wrote:*   

> I know I can use kernel drivers for alsa, but as I said in my original post, it's recommended to use alsa drivers from media-sound/alsa-driver cause they're up to time...

 

The alsa kernel drivers in recent kernels are new enough.

But if you insist on using the alsa-driver package, just remove all of alsa from you kernel.

----------

## pelacables

Hi,

do I have to remove ALL of alsa from my kernle? in alsa guide is said to keep next:

```

(the following are required for ALSA):

Device Drivers  --->

 Sound  --->

  <*> Sound card support

  Advanced Linux Sound Architecture  --->

   <M> Advanced Linux Sound Architecture

   <M> Sequencer support

   <M> OSS Mixer API

   [*] OSS Sequencer API

   (and dont forget to select your soundcard from the submenus!) 

```

If I let the kernel's driver, do I have to keep it as module? supported direct by the kernel? do I have to change /etc/modukles.d/alsa? ... I have never done it, is there any paper where I can find information?

cheers,

Arnau

----------

## dsd

 *pelacables wrote:*   

> do I have to remove ALL of alsa from my kernle? in alsa guide is said to keep next:
> 
> ```
> 
> (the following are required for ALSA):
> ...

 

no, the 2.6 migration guide said that. the 2.6 migration guide recommends that you build your ALSA drivers from the kernel. note the

 *Quote:*   

> (and dont forget to select your soundcard from the submenus!)

  message.

----------

## pelacables

Hi,

I don't agree, look at this note:

```

Warning: If you use a 2.6 kernel, you may use the drivers provided in the kernel, but we still recommend that you use media-sound/alsa-driver as they are more up to date than what is provided in the kernel tree. If you still wish to use the drivers provided with your kernel, you can skip the rest of this section and continue with Installing the ALSA Utils.

```

Anyway, I decide to try kernel's driver. Do I have to put the support as module? which  parts as module and which not?

thanks in advance to all of you.

regards,

Arnau

----------

## pelacables

Hi,

it's me again!

Well, I got my card supported directlly by the kernel. Now I have some kind of sound:

I belive it's udev problem, so I'll continue this post in the correct forum.

Thanks to all who helped me.

Regards,

Arnau

----------

## apberzerk

I have the same sound card as you (via82xx).  Whether I use OSS or ALSA, the sound just works automagically (using udev and hotplug/coldplug).  However, I can't change the volume!  I have tried every combination of using the kernel's ALSA module for my specific card, using alsa-driver, not starting alsasound (the sound works regardless of whether I start alsasound).

----------

## Admiral LSD

The kernel is typically one or two releases behind ALSA but whether that's a problem for you depends on your sound hardware. If your hardware is supported by what's in the kernel then it's far, far easier to use the drivers in the kernel than to go messing around with the external ALSA drivers. The via82xx has been around for a while so support is fairly mature making this the best option. Newer sound hardware (such as the Audigy LS a while back) typically needs drivers only found in versions of ALSA ahead of what's in the kernel making a compelling case for the use of the external drivers. The rule of thumb though should always be kernel first, external second.

As for udev, there is an ongoing problem with udev and ALSA with regard to the speed at which udev creates device nodes. Being user space there's a lag between udev recieving the event from the kernel and the device nodes being created. This used to cause problems with the Gentoo ALSA init script trying to access devices before they'd been created by udev. However, this has been fixed at least partially (by adding a sleep command to the appropriate point in the init script to make it slow down and wait for udev to create the nodes) in the init scripts and hasn't been a major problem in ages.

If you're still getting problems with unknown symbols/mismatched symbols/etc that is most certainly not a problem with udev since udev has nothing to do with the handling of modules within the kernel. It relies on events from the kernel to do its magic but these are dependent on the kernel loading the modules. If anything's happening with the modules your problem lies squarely within the kernel.

----------

## apberzerk

Hmmm... well that definitely helps me understand how everything works... still not sure what's up with this problem of not being able to change the volume.  I've ready similar threads in which people have had the same problem with this particular module, but still no solutions.  Also, it doesn't seem to be documented anywhere (such as on ALSA's site).

----------

## pelacables

Thanks for the explanation.

Cheers!

----------

## apberzerk

It turns out that there is a way to control the volume for my card.  In alsamixer, if you go all the way to the right, there are four channels called VIA DXS 1 through VIA DXS 4 that control the sound (the relationship between each channel and each application seems arbitrary).  Now running alsamixer seems the only way to change the volume of these channels, but what I want to do is bind a keyboard button to a change in volume.  However, any of the command line mixers (that you can just send command line arguments to change the volume) don't recognize the VIA DSX channels....

----------

