# problem with alsa sequencer; via82xx

## kc8tbe

I was using gentoo-dev-source-2.6.8; I've just upgraded to 2.6.9. Since the upgrade, alsa doesn't always work. Sometimes it works, sometimes it doesn't; I can't find a pattern to it. It also doesn't matter whether or not I revert back to 2.6.8; alsa will sporadically work either way.

Basically, when I /etc/init.d/alsasound start, there is a long (several second) pause after " * Loading: snd-seq-oss" during which the following output appears in dmesg:

```

PCI: Found IRQ 10 for device 0000:00:11.5

PCI: Sharing IRQ 10 with 0000:00:10.2

codec_ready: codec 0 is not ready [0x1000000]

codec_read: codec 0 is not valid [0x1800000]

PCI: Setting latency timer of device 0000:00:11.5 to 64

codec_ready: codec 0 is not ready [0x1000000]

codec_ready: codec 0 is not ready [0x1000000]

codec_read: codec 0 is not valid [0x1fc0000]

codec_read: codec 0 is not valid [0x1fe0000]

AC'97 0 access is not valid [0xffffffff], removing mixer.

VIA 82xx Audio: probe of 0000:00:11.5 failed with error -5

```

After which alsa doesn't work. If I then /etc/init.d/alsasound stop:

```

 * Unloading ALSA...

 * Storing ALSA Mixer Levels

/usr/sbin/alsactl: save_state:1061: No soundcards found...

 * Unloading modules 

```

Sometimes things work again after a reboot. Sometimes they don't. Prior to playing with 2.6.9, my alsa worked perfectly.

I am running an amd64 system. All my alsa tools, libraries, etc. are 1.0.6 or 1.0.6a. I have not tried turning off OSS emulation yet. Naturally, my alsa drivers are part of the kernel and not compiled via "emerge alsa-driver". Here is my /etc/modules.d/alsa:

```

# Alsa 0.9.X kernel modules' configuration file.

# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.2 2004/07/18 03:40:55 dragonheart Exp $

# ALSA portion

alias char-major-116 snd

# OSS/Free portion

alias char-major-14 soundcore

##

## IMPORTANT:

## You need to customise this section for your specific sound card(s)

## and then run `update-modules' command.

## Read alsa-driver's INSTALL file in /usr/share/doc for more info.

##

##  ALSA portion

alias snd-card-0 snd-via82xx

##  OSS/Free portion

alias sound-slot-0 snd-card-0

## alias sound-slot-1 snd-card-1

##

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.

options snd cards_limit=1

```

I'm probably just missing something obvious *sighs*... anyone know what I've done wrong? Thanks in advance.

----------

## transienteagle

Kc8tbe,

Are you absolutely sure that the system is picking up the right driver?

I use Debian for all my professional work but recently decided to move back to Gentoo for home use and testing.

Like yourself I am an advocate of having everything compiled "in kernel", so intially I had compiled alsa support in. The sound was terrible (totally nasty) and intermittant, sometimes on a reboot it did not work at all.

I decided to re-compile my kernel  (2.6.7 - R11) with alsa as modules to trackdown why the sound was so bad.

Being a total numty when it comes down to sound (and media in general) I followed the Gentoo alsa guide to the letter.

These is the relevant line from my lspci;

0000:00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMedia audio [Via VT82C686B] (rev a2)

So i emerged the appropriate Via driver. Everything loaded OK, my configuration was OK but I now had no sound whatsoever.

After a couple of days of arse titting around I loaded a stock debian system into a seperate partition just to see what it thought the alsa modules should be (the sound coming from the debian install was perfect).

The debian install was picking up snd-intel8x0 as the driver. I emerged the  

 snd-intel8x0 driver into my Gentoo install changed the config file and I now have perfect sound from my Gentoo system.

As I have said I am ignorant of Alsa and sound apps in general and have not tracked down or investigated what I see as an inconsistancy between what lspci tells me and the driver that I use except that in my case compiling alsa into the kernel does not work.

It may be worth investigating this on your system.

regards

TE

----------

## kc8tbe

 *Quote:*   

> Like yourself I am an advocate of having everything compiled "in kernel", so intially I had compiled alsa support in. The sound was terrible (totally nasty) and intermittant, sometimes on a reboot it did not work at all. 

 

Sorry about the ambiguity! By "in kernel" I mean compiled with the kernel as opposed to seperately via "emerge alsa-driver". But the alsa stuff is still compiled "in the kernel" as modules, not literally compiled into the kernel.

 *Quote:*   

> So i emerged the appropriate Via driver. Everything loaded OK, my configuration was OK but I now had no sound whatsoever. 

 

I, on the other hand, have had pure, high quality (well, at least as good as it gets on a laptop) sound from the beginning. It is only in the past few days that things have gone sporadically wrong. When I booted up this morning, alsa decided to work for a change. Of course, tomorrow it will probably go back to not working. Here is some dmesg output:

```

PCI: Found IRQ 10 for device 0000:00:11.5

PCI: Sharing IRQ 10 with 0000:00:10.2

PCI: Sharing IRQ 10 with 0000:00:11.6

PCI: Setting latency timer of device 0000:00:11.5 to 64

```

 *Quote:*   

> 
> 
> These is the relevant line from my lspci; 
> 
> 0000:00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMedia audio [Via VT82C686B] (rev a2) 
> ...

 

And from mine:

```

0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233 AC97 Audio Controller (rev 50)

```

 *Quote:*   

> The debian install was picking up snd-intel8x0 as the driver. I emerged the 
> 
>  snd-intel8x0 driver into my Gentoo install changed the config file and I now have perfect sound from my Gentoo system. 

 

Thanks for the tip, I'll try this as soon as I have a chance.

----------

## mesman00

hey transienteagle i was having the same problem with the via82xx driver, i tried your solution, but to no avail.  this is what i have for my sound card:

```
lspci | grep -i audio

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

kc8tbe, let me know if you come up with a solution.  thanks.

----------

## kc8tbe

I've now tried using the snd-i8x0  instead of snd-via82xx. No success. No output from dmesg.

----------

## mesman00

damn, let me know if you comp w/ a solution.  this is really annoying not having sound.

----------

## Matteo Azzali

The use of intel drivers is for alsa 1.04 as for the drivers released

by realtek (who produces the windows ans linux drivers for the via built-in

soundboards) .Sadly, inside the drivers realtek provides for my vt8235

southbridge, isn't specified for what kernel the kernel patch is, and the 

1.04 alsa support instead of 1.06 is pushin me away from the idea of

experiment that.

P.S.: my alsa works but not perfect, have you checked u didn't have installed

the alsa-driver? Do a

#emerge -p alsa-driver    

and if is marked with a R (and not a N) unmerge alsa- driver, oss,utils, and lib

then re-emerge alsa-utils, -oss and -lib to check if u get at least partial sound

(all but oss emu, I don't know if for oss emu u need to emerge alsa-oss first,

u can try....)

----------

## kc8tbe

As I tried to explain, I should *NOT* "emerge alsa-driver" because I am running a 2.6 kernel and thus my drivers are built as modules in the kernel tree, as they should be,

----------

## kc8tbe

Though I haven't been able to solve the problem yet, I did uncover some useful information:

1. When booting up cold, the probability of alsa not working is about one in ten.

2. It is impossible to solve the problem without rebooting (I wrote a script to restart alsa 100 times and check to see if the problem had gone away after each restart).

3. The problem is MUCH more likely to go away on a cold reboot (e.g. turn computer off, count to ten, turn computer back on) than a warm reboot (e.g. "shutdown -r now").

Hope this helps.

----------

## [loki]

I have pretty much the same problem.

I have a VIA chipset with lspci output :

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

For example, when I try to play a mp3 in XMMS, it sometimes decode (but no sound!) some seconds but it stops and dmesg spits out : 

```
codec_read: codec 0 is not valid [0x1ac0000]

codec_read: codec 0 is not valid [0x1ba0000]

codec_ready: codec 0 is not ready [0x12a05f0]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_read: codec 0 is not valid [0x1ac0000]

codec_read: codec 0 is not valid [0x1ba0000]

codec_ready: codec 0 is not ready [0x12a05f0]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

codec_ready: codec 0 is not ready [0x12a05f4]

```

I have a 2.6.9-gentoo-r1 kernel with soundcore and via82xx compiled as modules, but it did the same thing with 2.6.7 kernels...

My /etc/modules.d/alsa is :

```
# Alsa 0.9.X kernel modules' configuration file.

# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.2 2004/07/18 03:40:55 dragonheart Exp $

# ALSA portion

alias char-major-116 snd

# OSS/Free portion

alias char-major-14 soundcore

##

## IMPORTANT:

## You need to customise this section for your specific sound card(s)

## and then run `update-modules' command.

## Read alsa-driver's INSTALL file in /usr/share/doc for more info.

##

##  ALSA portion

alias snd-card-0 snd-via82xx

## alias snd-card-1 snd-ens1371

##  OSS/Free portion

## alias sound-slot-0 snd-card-0

## alias sound-slot-1 snd-card-1

##

# OSS/Free portion - card #1

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

##  OSS/Free portion - card #2

## alias sound-service-1-0 snd-mixer-oss

## alias sound-service-1-3 snd-pcm-oss

## alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss

alias /dev/dsp snd-pcm-oss

alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.

options snd cards_limit=1

```

And it's really annoying dealing with no sound...

----------

## [loki]

A bug is opened at the ALSA project on this issue  Bug #0000535

----------

## [loki]

I'd like to know, is everybody that has this bug is on AMD64?

----------

## 2crazy

I'm having the same problem, and I'm also on AMD64

----------

## newky2000

Hi,

I been having trouble with alsa since installing gentoo two days ago.  Everything seemed to work but no sound.  I loaded up kmixer to see if everything was umuted and the volumes were up.  Everything seemed fine, except when i clicked on the switches tab PCM wasn't on(yellow led) and IEC958 Playback was.  Selected PCM and the sound worked straight away.  Don't know if this is permanant though.

----------

## MdaG

I've got a similar problem *sigh*

https://forums.gentoo.org/viewtopic.php?t=256974

----------

## snapper73

I was having a similar problem....

amd64 (x86_64 kernel 2.6.9-r6),  emachines m6805, via82xx sound.

I could see no problems.  During boot, no errors, driver loaded etc. etc., no errors in dmesg.  I was stumped!!!

I read another post here that referenced "VIA DXS" settings in that could be accessed in the alsaguimixer.  I emerged alsaguimixer, turned VIA DXS 1 all the way up, and....

 :Shocked:  lo and behold, the Master and PCM controls functioned as they should.  Sound is now as good as ever (loud and clear after tweaking).

Hope this helps.

----------

