snd_hda(4) pin routing issues

Alexey Dokuchaev danfe at
Mon May 16 03:18:57 UTC 2011

On Sun, May 15, 2011 at 11:36:19PM +0700, Alexey Dokuchaev wrote:
> I've downloaded latest alsa-driver-1.0.24 sources, and apparently, they
> do quite some magic in alsa-kernel/pci/hda/patch_sigmatel.c:
> 1) my sound card (8384:7690) is reported as STAC9220 on FreeBSD, but
> ALSA code lists it as STAC9200; -- can that be a problem?
> 2) my codec seems reference one, and ALSA applies the following pin
> configuration (in addition to other things):
> static unsigned int ref9200_pin_configs[8] = {
> 	0x01c47010, 0x01447010, 0x0221401f, 0x01114010,
> 	0x02a19020, 0x01a19021, 0x90100140, 0x01813122,
> };
> These values vaguely match what I see from our snd_hda(4), but I am
> not sure how to properly apply them via device hints.

Perhaps I was a bit too fast with reading the ALSA sources before
carefully comparing HDA information dumps.  This is what our snd_hda(4)
reports about pins (only pin config, association, and sequence numbers
quoted for better readability):

    nid 8  0x01c5e030 as  3 seq  0
    nid 9  0x01451012 as  1 seq  2
    nid 13 0x02214011 as  1 seq  1
    nid 14 0x01014010 as  1 seq  0
    nid 15 0x01813021 as  2 seq  1
    nid 16 0x02a19020 as  2 seq  0
    nid 17 0x50170013 as  1 seq  3
    nid 18 0x90330022 as  2 seq  2

And this is excerpt from /proc/asound/card0/codec#0 for the same pins
(again, concised by hand for better readability):

    Node 0x08 pincap 0x00010024 pin default 0x01c5e030 defas 0x3 seq 0x0
    Node 0x09 pincap 0x00000010 pin default 0x00000010 defas 0x1 seq 0x2
    Node 0x0d pincap 0x0000003f pin default 0x02214011 defas 0x1 seq 0x1
    Node 0x0e pincap 0x0000003f pin default 0x01014010 defas 0x1 seq 0x0
    Node 0x0f pincap 0x00000037 pin default 0x01813021 defas 0x2 seq 0x1
    Node 0x10 pincap 0x00001737 pin default 0x02a19020 defas 0x2 seq 0x0
    Node 0x11 pincap 0x00000010 pin default 0x50170013 defas 0x1 seq 0x3
    Node 0x12 pincap 0x00000020 pin default 0x90330022 defas 0x2 seq 0x2

As you can see, all values match for both FreeBSD and ALSA.  However,
snd_hda(4) for some reason is unable to establish correct routing:

    hdac0: 3 associations found:
    hdac0: Association 0 (1) out:
    hdac0:  Pin nid=14 seq=0
    hdac0:  Pin nid=13 seq=1
    hdac0:  Pin nid=9 seq=2
    hdac0: Association 1 (2) in:
    hdac0:  Pin nid=16 seq=0
    hdac0:  Pin nid=15 seq=1
    hdac0:  Pin nid=18 seq=2
    hdac0: Association 2 (3) in:
    hdac0:  Pin nid=8 seq=0
    hdac0: Tracing association 0 (1)
    hdac0:  Pin 14 traced to DAC 2
    hdac0:  Unable to trace pin 13 seq 1 with min nid 0		<--- WHY?
    hdac0:  Unable to trace pin 14 seq 0 with min nid 3		<--- WHY?
    hdac0: Association 0 (1) trace failed

Correctly established associations (per ALSA) can be seen here:

Any ideas?


More information about the freebsd-multimedia mailing list