# Audio driver problem with nForce 430 (AD1986A)

## Ka-Ka

I have a Asus A8N-VM CSM board (with Nvidia nForce 430). According to the specs it have a "High Definition Audio, ADI AD1986A 5.1channel CODEC" device. 

I have tried several ALSA drivers and the OSS driver supplied by Nvidia (media-sound/nforce-audio  v1.0.0310) and havn't got it working   :Crying or Very sad: 

My question, have anyone else got it to work? What driver have you used?

----------

## piranha2001

I am using the hda_intel-Module from the kernel and I get a f**king beep on the one channel and sound on the other.   :Rolling Eyes: 

After some seconds or after adjusting the mixer this "mono"-sound stops.   :Mad: 

I found a patch here:

http://www.ubuntu-forum.de/artikel/4610/Sound-mit-Amilo-Pro-2040--Intel-915GM.html

and applied it. Didn't help...   :Evil or Very Mad: 

Anyone here who got sound on Asus A8N-VM CSM running?   :Sad: 

----------

## piranha2001

Hopefully they will find a fix soon:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1458

 :Crying or Very sad: 

I read that there were people who got it running under different Linuxes, noone with Gentoo???

 :Rolling Eyes: 

Thanks in advance,

Sebastian

----------

## piranha2001

*bump*

No one with a helping idea???   :Surprised: 

----------

## piranha2001

Hey Ka-Ka, do you still have the sound-problem?

For me it works now. I used a patch I found in the Nvidia-Linux-forum and reinstalled ALSA again. 

http://www.nvnews.net/vbulletin/showthread.php?t=57791&page=8&highlight=asus+a8n-vm

Look at KenWoodland's posting for the patch.

I compiled Kernel just with Soundsupport, no Alsa, no OSS and emerged alsa-utils without alsa-driver-package. (Or unmerge alsa-driver, if you have it on your syste.)

```
<*> Sound card support 

 Advanced Linux Sound Architecture  ---> 

             < > Advanced Linux Sound Architecture

Open Sound System  --->       

             < > Open Sound System (DEPRECATED)
```

I downloaded alsa-driver-1.0.10 directly from ALSA project-page, patched it and installed it with

```
 ./configure && make && make install && ./snddevices
```

Then I found out, that the crackling in the sound can be eliminated by inserting a position-fix option into 

```
/etc/modules.d/alsa
```

Looks like this:

```
# --- BEGIN: Generated by ALSACONF, do not edit. ---

# --- ALSACONF version 1.0.10 ---

alias snd-card-0 snd-hda-intel

alias sound-slot-0 snd-hda-intel

options snd-hda-intel position_fix=1

# --- END: Generated by ALSACONF, do not edit. ---
```

After that it worked.

If you still have problems: Post and ask. I'll do my very best!   :Very Happy: 

----------

## Ka-Ka

Thanks piranha2001! I will try out your solution soon.   :Very Happy: 

Happy new year!

----------

## Ka-Ka

The sound works for me too with the workaround.

Thanks again piranha2001!

----------

## piranha2001

You're welcome.

 :Very Happy: 

----------

## ions

 *piranha2001 wrote:*   

> Hey Ka-Ka, do you still have the sound-problem?
> 
> For me it works now. I used a patch I found in the Nvidia-Linux-forum and reinstalled ALSA again. 
> 
> http://www.nvnews.net/vbulletin/showthread.php?t=57791&page=8&highlight=asus+a8n-vm
> ...

 

I got to this point and got stuck.  Not sure what to do next.  

Load a module?

Which?

```
 # ls modules/

snd-ac97-bus.ko       snd-au8830.ko         snd-es1938.ko          snd-maestro3.ko     snd-rme32.ko           snd-sonicvibes.ko

snd-ac97-codec.ko     snd-azt3328.ko        snd-es1968.ko          snd-mixart.ko       snd-rme96.ko           snd-timer.ko

snd-ad1889.ko         snd-bt87x.ko          snd-fm801.ko           snd-mixer-oss.ko    snd-rme9652.ko         snd-trident-synth.ko

snd-ainstr-fm.ko      snd-ca0106.ko         snd-hda-codec.ko       snd-mpu401-uart.ko  snd-sb-common.ko       snd-trident.ko

snd-ainstr-simple.ko  snd-cmipci.ko         snd-hda-intel.ko       snd-mpu401.ko       snd-seq-device.ko      snd-usb-audio.ko

snd-ak4114.ko         snd-cs4281.ko         snd-hdsp.ko            snd-mtpav.ko        snd-seq-dummy.ko       snd-usb-lib.ko

snd-ak4531-codec.ko   snd-cs46xx.ko         snd-hdspm.ko           snd-nm256.ko        snd-seq-instr.ko       snd-usb-usx2y.ko

snd-ak4xxx-adda.ko    snd-cs8427.ko         snd-hwdep.ko           snd-opl3-lib.ko     snd-seq-midi-emul.ko   snd-util-mem.ko

snd-ali5451.ko        snd-dummy.ko          snd-i2c.ko             snd-opl3-synth.ko   snd-seq-midi-event.ko  snd-via82xx-modem.ko

snd-aloop.ko          snd-emu10k1-synth.ko  snd-ice1712.ko         snd-page-alloc.ko   snd-seq-midi.ko        snd-via82xx.ko

snd-als4000.ko        snd-emu10k1.ko        snd-ice1724.ko         snd-pcm-oss.ko      snd-seq-oss.ko         snd-virmidi.ko

snd-atiixp-modem.ko   snd-emu10k1x.ko       snd-ice17xx-ak4xxx.ko  snd-pcm.ko          snd-seq-virmidi.ko     snd-vx-lib.ko

snd-atiixp.ko         snd-emux-synth.ko     snd-intel8x0.ko        snd-pcxhr.ko        snd-seq.ko             snd-vx222.ko

snd-au8810.ko         snd-ens1370.ko        snd-intel8x0m.ko       snd-pdplus.ko       snd-serial-u16550.ko   snd-ymfpci.ko

snd-au8820.ko         snd-ens1371.ko        snd-korg1212.ko        snd-rawmidi.ko      snd-serialmidi.ko      snd.ko

```

That is what I need to do next correct?

----------

## Ka-Ka

I don't really remember as it was a while ago since I installed it, but is'nt you suppose to run alsaconf to detect your card automatically?

Anyway the modules that you are intrested in if you have a A8N-VM CSM are snd-hda-codec.ko and snd-hda-intel.ko

----------

## ions

Yeah, after I posted that I had tried running alsaconf.  I went through the menu and it listed the nvidia driver and it finished with this:

```

Running modules-update...

 * Updating /etc/modules.conf ...                                         [ ok ] * Updating /etc/modprobe.conf ...                                        [ ok ]Loading driver...

 * Loading ALSA modules ...

 *   Loading: snd-card-0 ...                                              [ ok ] *   Loading: snd-seq-oss ...                                             [ ok ] *   Loading: snd-pcm-oss ...                                             [ ok ] * Restoring Mixer Levels ...

 * No mixer config in /etc/asound.state, you have to unmute your card!    [ ok ]Setting default volumes...

amixer: Mixer attach default error: No such device

Saving the mixer setup used for this in /etc/asound.state.

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

===============================================================================

 Now ALSA is ready to use.

 For adjustment of volumes, use your favorite mixer.

 Have a lot of fun!

```

So I run alsamixer to unmute this beast:

```
# alsamixer

alsamixer: function snd_ctl_open failed for default: No such device

```

----------

## Ka-Ka

I saw that there are new version of the alsa-driver. Have anyone tested it? Do it solve our problem. It would be good to get a less hacky fix for the problem.

media-sound/alsa-headers-1.0.11_rc2

media-sound/alsa-driver-1.0.11_rc2

The releasenotes for the changes between 1.0.10 and 1.0.11_rc2 can be found here:

http://www.alsa-project.org/changes/v1-0-10--v1-0-11rc1.txt

http://www.alsa-project.org/changes/v1-0-11rc1--v1-0-11rc2.txt

I found at least one line in the releasenotes that might indicate that our bug is fixed.

    - Summary: hda-codec - Fix surrounds on 3stack mode of AD1988

      Fixed the swapped surround/CLFE on 3stack mode of AD1988.

Have anyone tested the alsa-driver-1.0.11_rc2?

----------

## ions

Oops forgot to mention my board: Gigabyte K8N51GMF-9.  Same chipset so it would be the same module correct?

----------

## ions

I'm trying it now Ka-Ka.

----------

## ions

Not good for me:

```
Running modules-update...

Loading driver...

 * Loading ALSA modules ...

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

FATAL: Error inserting snd_seq_oss (/lib/modules/2.6.14-gentoo-r5/kernel/sound/acore/seq/oss/snd-seq-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                        [ !! ] *   Loading: snd-pcm-oss ...

WARNING: Error inserting snd_mixer_oss (/lib/modules/2.6.14-gentoo-r5/kernel/sound/acore/oss/snd-mixer-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)

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

FATAL: Error inserting snd_mixer_oss (/lib/modules/2.6.14-gentoo-r5/kernel/sound/acore/oss/snd-mixer-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)                                                                        [ ok ] * Restoring Mixer Levels ...

 * No mixer config in /etc/asound.state, you have to unmute your card!                                               [ ok ]Setting default volumes...

amixer: Mixer attach default error: No such device

Saving the mixer setup used for this in /etc/asound.state.

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


===============================================================================

 Now ALSA is ready to use.

 For adjustment of volumes, use your favorite mixer.

 Have a lot of fun!

```

----------

## ions

```
# cat /proc/asound/cards

 0 [NVidia         ]: HDA-Intel - HDA NVidia

                      HDA NVidia at 0xf5100000 irq 201

```

```
# alsamixer

alsamixer: function snd_ctl_open failed for default: No such device

```

----------

## piranha2001

Hello ions!

 *Quote:*   

> Oops forgot to mention my board: Gigabyte K8N51GMF-9. Same chipset so it would be the same module correct?

 

Sorry, but I think you did all the efforts for nothing!  :Shocked:  The special thing about sound with the Asus-Board is, that Asus plugged a non Nvidia-Soundchip on it! I think your board uses the standard Nvidia-Chip, so you also need the drivers from Nvidia. They should work...

I can't help you with the normal Nvidia-Nforce-drivers but if they install as easy as the graphics driver it shouldn't be such a huge problem.  :Rolling Eyes: 

Greets,

Sebastian

----------

## ions

Apparently I am not alone: http://www.nvnews.net/vbulletin/showthread.php?p=788831#post788831

Appears Udev is involved.

----------

## anz

thanks alot for your postings!

My system crashed after updating to alsa-driver-1.0.10 during booting with an error message about:

module snd_mpu401 not found  segmentation fault

pump - the system freezes ...

I removed alsasound from the rc-update (rc-update -d alsasound deault) - system freezes.

I removed coldplug (which I reemerged) from the rc-update (rc-update -d coldplug default) - the system boots correctly. After that, a

/etc/init.d/alsasound start

works without problems.

I think, coldplug recognizes a "mpu device" and tries to start the mpu-401 module - and than it bangs.

I downgraded to alsa-driver-1.0.10-rc3 - and everything works well again (with coldplug AND alsasound in the rc.update as default).

I use kernel: 2.6.14-gentoo-r5

The mainboard is a ASUS A7N8X (nvidia nforce2 chipset)

----------

## bus.dch

Note that I am using the amd64 platform, so some of these requires ACCEPT_KEYWORDS="~amd64".

Also, s/pink/orange/. Can't tell in this light.  :Razz: 

Using 1.0.10_rc3 I get sound with "clicks" at around 30Hz. (Sounds like the interrupt handler is broken. Is this the "crackling" that needs modprobe snd_hda_intel position_fix=1 ??) Also, running alsamixer while aplay is playing messes up the mixer settings, everything gets muted (though alsamixer doesn't think this is so). The way to fix it is:

```
# modprobe -r snd_hda_intel; modprobe -r snd_seq

(then an lsmod shows all modules down to soundcore have been removed)

# modprobe snd_seq; modprobe snd_hda_intel

# alsamixer
```

Since that didn't save any of the mixer settings, you'll have to restore them all however you care to do that.

It seems (I haven't been thorough here) the only two channels that break the mixer settings are PCM and Front. I played with some others and it was OK.

```
# equery l alsa*

[ Searching for package 'alsa*' in all categories among: ]

 * installed packages

[I--] [  ] media-libs/alsa-lib-1.0.10 (0)

[I--] [  ] media-sound/alsa-utils-1.0.10 (0.9)

[I--] [M ] media-sound/alsa-driver-1.0.10_rc3 (0)

[I--] [M ] media-sound/alsa-headers-1.0.10_rc3 (0)

# cat /proc/asound/cards

0 [NVidia         ]: HDA-Intel - HDA NVidia

                     HDA NVidia at 0xfebd8000 irq 233

# cat /proc/asound/devices

 17: [0- 1]: digital audio playback

 16: [0- 0]: digital audio playback

 24: [0- 0]: digital audio capture

  0: [0- 0]: ctl

  1:       : sequencer

 33:       : timer
```

Okay, now I know that I'm configured as 4.0, not 5.1. Don't know yet how to change that.

```
# man speaker-test

# (from the man page) speaker-test -Dplug:surround51 -c6

speaker-test 0.0.8

Playback device is plug:surround51

Stream parameters are 48000Hz, S16_LE, 6 channels

Using 16 octaves of pink noise

Rate set to 48000Hz (requested 48000Hz)

Buffer size range from 22 to 5461

Period size range from 11 to 2730

Periods = 4

Buffer time size 24000

To choose buffer_size = 5460

To choose period_size = 1365

was set period_size = 1365

was set buffer_size = 5460

 0 - Front Left

Write error: -5,Input/output error

xrun_recovery failed: -5,Input/output error

Transfer failed: Operation not permitted

# speaker-test -Dplug:surround40 -c4
```

Front Left comes out as Front Right, Front Right comes out as Front Left (Front: blue plug). Same output (same reversed channels) for the sub+center plug (pink) with less volume (about 50% of front) and low frequencies are gone - it thinks these are the front channel. Rear Right comes out as Rear Left, Rear Left comes out as Rear Right (Rear: green plug). Rear volume is only about 50% of Front. Rear signal also doesn't have low frequencies. I imagine there are alsa config options to fix the speaker arrangement that I don't know about.

When I play a mono or stereo wav, it comes out all 6 channels (Front/blue, Rear/green, and Center+sub/pink). Well, actually only 4, since Front Left does not come out blue right, and Rear Left does not come out green right. So I checked cat /proc/asound/devices during playback (and plugged into pink) and it's the same as above. Don't know what's going on here; though unmuting "Stereo Downmix" in alsamixer makes sound come out the blue right channel. Don't know what audio channel that is from the input. Even more strange is that sometimes (about 10% of the time) the blue right channel has a really high tone on it, up around 15KHz, whether "Stereo Downmix" is on or not... really annoying... but pink (with the same audio except the low frequency end) doesn't have the tone. Don't have a mic, but recording what should be silence (with arecord) records crackling noise.

Okay, now:

```
# emerge -p =alsa-driver-1.0.10

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] media-sound/alsa-headers-1.0.10 [1.0.10_rc3]

[ebuild     U ] media-sound/alsa-driver-1.0.10 [1.0.10_rc3]

# emerge =alsa-driver-1.0.10

...

# reboot

...

# equery l alsa*

[ Searching for package 'alsa*' in all categories among: ]

 * installed packages

[I--] [  ] media-libs/alsa-lib-1.0.10 (0)

[I--] [  ] media-sound/alsa-utils-1.0.10 (0.9)

[I--] [  ] media-sound/alsa-headers-1.0.10 (0)

[I--] [  ] media-sound/alsa-driver-1.0.10 (0)
```

alsamixer during aplay has the same problem as above.

cat /proc/asound/cards /proc/asound/devices has same stuff, devices in different order.

Running speaker-test insists it's a 4.0 setup, with the same results as above.

When I play a mono or stereo wav, again, there's the clicking sound, and same results as above.

Okay, now:

```
# ACCEPT_KEYWORDS="~amd64" emerge -p =alsa-driver-1.0.10-r1

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] media-sound/alsa-driver-1.0.10-r1 [1.0.10]

# ACCEPT_KEYWORDS="~amd64" emerge =alsa-driver-1.0.10-r1

...

# reboot

...

# equery l alsa*

[ Searching for package 'alsa*' in all categories among: ]

 * installed packages

[I--] [  ] media-libs/alsa-lib-1.0.10 (0)

[I--] [  ] media-sound/alsa-utils-1.0.10 (0.9)

[I--] [  ] media-sound/alsa-headers-1.0.10 (0)

[I--] [M ] media-sound/alsa-driver-1.0.10-r1 (0)
```

alsamixer during aplay has the same problem as above.

cat /proc/asound/cards /proc/asound/devices has same stuff, devices in different order.

Running speaker-test insists it's a 4.0 setup, with the same results as above.

When I play a mono or stereo wav, again, there's the clicking sound, and same results as above.

Okay, one more time...

```
# ACCEPT_KEYWORDS="~amd64" \

emerge -p =alsa-lib-1.0.11_rc2 =alsa-driver-1.0.11_rc2 =alsa-utils-1.0.11_rc2

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild     U ] media-sound/alsa-headers-1.0.11_rc2 [1.0.10]

[ebuild     U ] media-libs/alsa-lib-1.0.11_rc2 [1.0.10]

[ebuild     U ] media-sound/alsa-driver-1.0.11_rc2 [1.0.10-r1]

[ebuild     U ] media-sound/alsa-utils-1.0.11_rc2 [1.0.10]

# ACCEPT_KEYWORDS="~amd64" \

emerge =alsa-lib-1.0.11_rc2 =alsa-driver-1.0.11_rc2 =alsa-utils-1.0.11_rc2

...

# reboot

...

# equery l alsa*

[ Searching for package 'alsa*' in all categories among: ]

 * installed packages

[I--] [M ] media-libs/alsa-lib-1.0.11_rc2 (0)

[I--] [M ] media-sound/alsa-driver-1.0.11_rc2 (0)

[I--] [M ] media-sound/alsa-utils-1.0.11_rc2 (0.9)

[I--] [M ] media-sound/alsa-headers-1.0.11_rc2 (0)
```

cat /proc/asound/cards /proc/asound/devices has same stuff, devices in different order.

alsamixer during aplay slightly different: now fiddling with Headphone also ends up nuking all mixer settings, along with PCM and Front.

```
# speaker-test -Dplug:surround51 -c6

speaker-test 1.0.11rc2

Playback device is plug:surround51

Stream parameters are 48000Hz, S16_LE, 6 channels

Using 16 octaves of pink noise

Rate set to 48000Hz (requested 48000Hz)

Buffer size range from 22 to 5461

Period size range from 11 to 2730

Periods = 4

Buffer time size 24000

To choose buffer_size = 5460

To choose period_size = 1365

was set period_size = 1365

was set buffer_size = 5460

 0 - Front Left

Write error: -32,Broken pipe

Write error: -5,Input/output error

xrun_recovery failed: -5,Input/output error

Transfer failed: Operation not permitted

# speaker-test -Dplug:surround40 -c4
```

Same exact results as above: L/R are backward, Front output on blue, Front w/o low frequency

(and less volume) on pink, Rear w/o low frequency and less volume on green.

I'm getting the high-pitched tone on the Rear Right speaker this time. Same results as before everywhere else. Maybe that high-pitched sound is an alsa bug.

But the 30Hz clicking aka "crackling" that might be a position_fix=1 thing is now fixed. Great!

So I recommend you go with 1.0.11_rc2. I might even figure out how to get alsa to output the right stuff... 4.0 channel is better than nothing.

----------

## bus.dch

 *piranha2001 wrote:*   

> Hopefully they will find a fix soon:
> 
> https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1458

 

And there are some related bugs:

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1678

https://bugtrack.alsa-project.org/alsa-bug/view.php?id=1415

----------

## gerick

This is supposed to be fixed with ALSA 1.0.11rc4, but I am not having much luck.  

Is anybody using Alsa 1.0.11rc4 and SPDIF to a AV Receiver that has 5.1 (or 6 channel) audio working?

----------

## OlegVekhov

Installed lastest ALSA drivers 1.0.12rc1 and have the same annoying clicks on playback.

I have Amilo Pro v2045.

There are an article in WiKi, but it's very old... The annoying high freq sound was eleminated after upgrading to 2.6.17.6 kernel, but clicking continues with both kernel and latest alsa drivers.

 position_fix option has no effect for me  :Sad: 

----------

## dch24

I've read through the bugs on bugtrack.alsa-project.org. tiwai (I think he's a moderator there) refers the three bugs to #1596, but correctly detecting the model is not the problem, and so the bug is not resolved. I have an Asus A8N-VM-CSM, and although the high-pitched noise sometimes disappears, it's definitely still there (sometimes).

The problem right now is that although snd_hda_intel correctly detects nForce 430 chips (on the motherboard) as a model=3stack (turn on CONFIG_SND_DEBUG and CONFIG_SND_DEBUG_DETECT, then the dmesg log has "ALSA sound/pci/hda/hda_codec.c:1827: hda_codec: model '3stack' is selected for config 10de:cb84 (ASUS A8N-VM)") but it doesn't work as a 3stack. It doesn't work in 6-channel mode.

That's why some users have reported success by adding 'options snd-hda-intel model=laptop' to /etc/modules.d/alsa (or modprobe.conf). It forces the AD1986A (inside the nForce 430) to operate in 2 channel mode.

Allowing it to correctly detect model=3stack results in the right mixer channels showing up in alsamixer: front, surround, lfe, and center. And I can even set the values as long as no sound is playing. But when I play something (I'm using mplayer) if I touch the mixer, everything gets muted, and I have to do a /etc/init.d/alsasound restart (which unloads and reloads the modules). While playing sound files, I often get the high pitched tone.

The channels are not mapped correctly, either. I may not have set up alsa correctly, but of the three audio outputs on the 3stack, I think the microphone is still configured as a microphone. I know that the other two are configured for output, because when I connect speakers to them, I get sound out of front right, surround left, and surround right. (Note that front left is either a high pitched tone or mute).

I suspect the problem is that the snd_hda_intel module is making incorrect configuration choices for the AD1986A. I'm going to poke around a bit, and see if I can figure out what's wrong.

As bug #2889 suggests, be sure to update your BIOS to at least version 1007. But that doesn't resolve the problem.

----------

## dch24

It's apparently also possible to freeze the system while unloading snd_hda_intel. (That is, it deadlocks while unloading. The system continues to run.)

----------

## dch24

I think I may have a fix. The following mplayer command line maps the audio to 4 channels in software. It's a workaround for the bug, which appears to be that the snd_hda_intel driver doesn't configure the AD1986A (nForce 430) chip to correctly upmix the sound. So if two channels are being played when there are four speakers connected, you get three channels out (with front left either silent or a high pitch tone). This forces mplayer's alsa output code to output 4 channels:

```
mplayer -af channels=4:4:0:0:1:1:0:2:1:3 file.mp3
```

You can tell the difference here:

```
$ cat /proc/asound/card0/pcm0p/sub0/hw_params

access: RW_INTERLEAVED

format: S16_LE

subformat: STD

channels: 4

rate: 44100 (44100/1)

period_size: 1024

buffer_size: 8192

tick_time: 4000
```

This fixes the related problem where if you touch a mixer channel any time during sound playback, it mutes all sound (puts the chip in an error condition) until you unload the modules (use /etc/init.d/alsasound restart). So, when playing 4 channels and not using the chip to upmix them, you can use the mixer during playback  :Smile: .

And I just checked the same thing for 6 channels: center and LFE mixer settings work correctly during playback.  :Laughing: 

```
mplayer -af channels=6:6:0:0:1:1:0:2:1:3:0:4:1:5 file.mp3
```

```
$ cat /proc/asound/card0/pcm0p/sub0/hw_params

access: RW_INTERLEAVED

format: S16_LE

subformat: STD

channels: 6

rate: 44100 (44100/1)

period_size: 1024

buffer_size: 5120

tick_time: 4000
```

I tested 48 kHz playback too (add -af resample=48000 to the mplayer command line, and the rate reported in /proc/asound/card0/pcm0p/sub0/hw_params correctly shows 48000), so that's good  :Smile: .

So what does this all mean (especially if you're not using the mplayer command line)? I think there's a way to configure ALSA in software to upmix everything so it's always in 4-channel or 6-channel format, using the dmix plugin. If you can configure ALSA to match what you set "Channel Mode" (in alsamixer) to, then you've worked around the bug.

On an unrelated note, now that I'm actually getting multichannel output, I notice that the surround channel DAC has a higher internal resistance. (I think it's actually a chip setting the driver should fix.) What this means is that iPod headphones are very quiet (-18dB for what should be the same) on the surround channels, comparing it to the front channels -- but if you feed either channel to an amplifier, they sound the same.

----------

## dch24

So this howto gave me a reasonable start for /etc/asound.conf:

```
pcm.upmix_4ch {

   type plug

   slave.pcm surround40

   slave.channels 4

   route_policy duplicate

}

pcm.default upmix_4ch
```

It tests OK with mplayer and aplay. And I tested alsamixer while playing. I've submitted the config file (just as a workaround) on ALSA bug #2889.

If you want to go back to a 2-channel config in alsamixer, you'll need to comment out (use #) the single line pcm.default upmix_4ch, since it redefines the default PCM to make 2-channel output unavailable. But you can play 2-channel audio all day long with no problems.  :Smile: 

----------

## dch24

Apparently the /etc/asound.conf doesn't support multiple audio programs running at once, like the standard ALSA driver does (at least, >=alsa-driver-1.0.11)

----------

## gaebb3r

I do still have problems with my onboard AD1986A sound chip on my Asus M2NBP-VM CSM mainboard (using 0801 BIOS version).

When I start playback of .mp3 or .mpeg I can neither open a 2nd instance of vlc - or the program I started the media file with - nor force another program to play media.

The 2nd instance or program is then playing no sound at all, when I try to close the program it won't - so I need to kill the process.

After doing this I can't even play sound files in the 1st instance... The sound is some kind of "mutilated" then (do the forum users before in this thread use "clickering" to describe the same problem?), only doing /etc/init.d/alsasound restart lets me play media files again, but only in the 1st instance.

Might this be due to a missing package or some misconfigured configuration files?

I have emerged the following ebuilds:

alsa-driver-1.0.15 (have already tried 1.0.14 without success...)

alsa-headers-1.0.14

alsa-lib-1.0.14a-r1

alsa-oss-1.0.14

alsa-plugins-1.0.14

alsa-tools-1.0.14

alsa-utils-1.0.14

I use kernel 2.6.22-gentoo-r8 x86_64 but have had the same problems before with 2.6.22-gentoo-r2, also tried the ...-gentoo-r5.

What I also tried is the in-kernel alsa driver but also with the same result.

Here is my /etc/modules.d/alsa:

```
alias char-major-116 snd

alias char-major-14 soundcore

alias snd-card-0 snd-hda-intel

alias sound-slot-0 snd-hda-intel

options snd-hda-intel position_fix=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
```

I've tried serveral hints, just like this for example.

Might this oss-4.0.1008 ebuild help me in solving the problem: http://gentoo-wiki.com/HOWTO_Compile_Kernel_with_ALSA#Alternatives

???

It's still masked but if you recommend to install it I can unmask it for the try...

Thank you for your help as I am just a Linux beginner, dealing with this issue since a few days now...   :Rolling Eyes: 

----------

## gaebb3r

Just to mark this thread as *solved*...

I recompiled my 2.6.22-gentoo-r8 kernel with in-built ALSA hda-intel drivers and did an emerge alsa-utils alsa-oss.

Then replaced the content of my /etc/asound.conf with this:

```
pcm.card0 {

    type hw

    card 0

}

ctl.card0 {

    type hw

    card 0

}
```

Now multiple instances of vlc and other media players at the same time work as they should, and all without "mutilated" sound.   :Very Happy: 

----------

## dch24

The tip at nvnews.net is to pass "model=6stack-dig" to the module as a parameter so that AC3 passthrough (digital out) will work. I don't have an AC3 decoder, so I can't verify that it works, but it sounds like a nice tip.

I don't think we can mark this thread as solved though. The ALSA bug #2889 is still open. The snd_hda_intel driver still can't properly configure an AD1986A chipset to upmix a 2-channel audio stream to 4- or 6-channel output without killing one channel, sometimes with a high frequency tone on the dead channel.

The config file I posted should not be necessary. It's just something to trick the driver into working around the bug.

----------

## gaebb3r

 *dch24 wrote:*   

> I don't think we can mark this thread as solved though. The ALSA bug #2889 is still open. The snd_hda_intel driver still can't properly configure an AD1986A chipset to upmix a 2-channel audio stream to 4- or 6-channel output without killing one channel, sometimes with a high frequency tone on the dead channel.
> 
> The config file I posted should not be necessary. It's just something to trick the driver into working around the bug.

 

I agree with that - due to the workaround I use to get more multimedia "compatibility" I can't get my quake3 running with any sound.

I hope the ALSA team will implement a bugfree driver for the AD1986A in the upcoming releases, v1.0.15 is also not working.

Did anybody have a try with the 2.6.23 ALSA modules?

EDIT:

 *dch24 wrote:*   

> So this howto gave me a reasonable start for /etc/asound.conf:[code]pcm.upmix_4ch {
> 
> 	type plug
> 
> 	slave.pcm surround40
> ...

 

With your proposal I can run multiple audio programs at the same time, each with correct sound..?

----------

## dch24

 *gaebb3r wrote:*   

> With your proposal I can run multiple audio programs at the same time, each with correct sound..?

 I actually mentioned in the ALSA bug #2889 that adding a dmix slave in the default ALSA output would allow multiple programs to play back at the same time.

So it sounds like you don't need that. This is the test I used to verify that I can't open audio output more than once:

```
$ aplay long_wav_file.wav

(sound starts playing back. In a different terminal:)

$ aplay long_wav_file.wav

aplay: main:546: audio open error: Device or resource busy

```

Can you try that, and post what happens?

Edit: I'm using Linux 2.6.23-gentoo. You said you were also? I'm using the in-built kernel modules, and I'll need to match your config to figure out the differences.

----------

## gaebb3r

 *dch24 wrote:*   

> [...]
> 
> Can you try that, and post what happens?
> 
> Edit: I'm using Linux 2.6.23-gentoo. You said you were also? I'm using the in-built kernel modules, and I'll need to match your config to figure out the differences.

 

Sorry for the late response... I am also getting this "audio open error: Device or resource busy" error, but I am using a 2.6.22-gentoo-r9 kernel. When I start a 2nd KDE session with another user account arts is reporting in a popup window that it's not possible to open the sound device because it's already in use and busy.

I have also tried kernel 2.6.23 but without any changes. With both kernels I use the in-built ALSA kernel module hda-intel.

What I gave a try was the alsa-driver-1.0.14 and -1.0.15 but it didn't improve anything.

Right now my system is working with a SB Live! Value as a temporary solution which is not having problems with multiple instances of any sound progs - using the AD1986A as 2nd sound card.

As soon as the ALSA guys fix this known issue I will use the onboard sound as my only sound chip "again".   :Wink: 

Do you know if there's a patch in work? I can't see anything in the bugtrack history...

----------

## dch24

I understand now. Yeah, the AD1986A hardware doesn't support playing an infinite number of sound streams at the same time. But it's like most sound chips in this, and so it's not surprising that the support isn't there.

If you're using my workaround to enable more than 2-channel audio, then because it's a quick-n-dirty hack I haven't added the proper support for multiple sound streams. Look at adding a dmix slave to your asound.conf.

As to when the alsa dev team will get around to fixing the bug, I have no idea. It was assigned to tiwai nine months ago.

----------

## dch24

The bug still is open on the ALSA bug tracking system. I'm bumping the thread so it doesn't get eaten by the gentoo forums.

----------

## gaebb3r

Did somebody also give the ALSA drivers v1.0.16 a try?

----------

## dch24

alsa-drivers 1.0.16 is part of linux-2.6.25. I built 2.6.25-rc5 and will test it out, when I can take the system down.

Edit: it works without the hack in asound.conf. I tried 2 channel and 6 channel playback and there were no "dead channels." That's great!

linux-2.6.25-rc5 has a build error when building nvidia-drivers, but the next version of nvidia-drivers should fix that. So I'll continue testing but I believe the bug is fixed.

----------

