[alsa-devel] [PATCH] AD1986A 6-channel bugs

zhejiang zhe.jiang at intel.com
Thu Oct 25 09:05:40 CEST 2007


I have a ICH8M + AD1986A machine.

In 6 channel modes, if adjust the volumes when playing 2-channel or
4-channel music, codec will be muted and all widget's Amp-Out vals will
be reset. If you play 2-channel files in 6 channel modes,there is noise
in the jacks.

By doing experiments, I found that the 6-channel bug was caused by
sharing channels.

If play 2-channel audio file,the rest channels will share channels with
the first 2-channel. 

The HDA spec doesn’t define the exact behavior under such circumstances.

Majority of the codec chips support sharing channel, but seem that
AD1986A doesn’t support.

I wrote a patch and tested it in my hardware,now it works well.

diff -Nur a/alsa-driver-1.0.15/alsa-kernel/pci/hda/hda_codec.c
--- a/alsa-driver-1.0.15/alsa-kernel/pci/hda/hda_codec.c	2007-10-25
10:03:29.000000000 -0400
+++ b/alsa-driver-1.0.15/alsa-kernel/pci/hda/hda_codec.c	2007-10-25
10:02:46.000000000 -0400
@@ -2506,7 +2506,8 @@
 		if (chs >= (i + 1) * 2) /* independent out */
 			snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
 						   i * 2, format);
-		else /* copy front */
+		else if (codec->vendor_id != 0x11d41986)
+			/* copy front if it is NOT AD1986A*/
 			snd_hda_codec_setup_stream(codec, nids[i], stream_tag,
 						   0, format);

In alsa bugzilla and maillist, I found a lot of issues about AD1986A
6-channel .Anybody know the detail about AD1986A codec chip and give any

Here is a old description of the issue.

> Hi,
> I have a ICH8M + AD1986A machine and run alsa-driver-1.0.15rc.
> I found that :
> In 6 channel mode,if adjust the front or pcm volume when playing
> all channel will be muted,but if adjust the volume alone(don't play
> music at the same time),every thing is ok.
> I use printk to display the verb in the azx_send_cmd(),
> when adjusting the volume in either case, there are just two verb
> (0x300) sent to the nid(0x1b) [correct action].
> But in the first case, the dac widget amp-out vals are all affected.
> Some other interesting thing,
> If i adjust the Sur or CLFE volume when playing music, the printk show
> that correct verb is sent, but the codec status don't change.
> If I adjust them alone,every thing is ok.

More information about the Alsa-devel mailing list