RFC: snd_hda(4) -- Intel High Definition Audio driver

Karl-Petter Åkesson freebsd at yelloworb.com
Sat Sep 9 07:05:28 PDT 2006


Hi,

great that someone is wokring on this driver! I have an Asus M2NPV-VM 
and I get no sound at all, tried all obvious sound plugs but silence. I 
have got sound from the system with the OSS driver so I know the 
hardware is working. Below is the info requested,

best regards,

Kalle

kldload snd_hda generates on the console:

pci0: driver added
found-> vendor=0x10de, dev=0x02f0, revid=0xa2
        bus=0, slot=0, func=0
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0006, statreg=0x00b0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:0: reprobing on driver added
found-> vendor=0x10de, dev=0x02fa, revid=0xa2
        bus=0, slot=0, func=1
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0100, statreg=0x4020, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:1: reprobing on driver added
found-> vendor=0x10de, dev=0x02fe, revid=0xa2
        bus=0, slot=0, func=2
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x0020, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:2: reprobing on driver added
found-> vendor=0x10de, dev=0x02f8, revid=0xa2
        bus=0, slot=0, func=3
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x00a0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:3: reprobing on driver added
found-> vendor=0x10de, dev=0x02f9, revid=0xa2
        bus=0, slot=0, func=4
        class=05-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0006, statreg=0x00a0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:4: reprobing on driver added
found-> vendor=0x10de, dev=0x02ff, revid=0xa2
        bus=0, slot=0, func=5
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0006, statreg=0x00b0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:5: reprobing on driver added
found-> vendor=0x10de, dev=0x027f, revid=0xa2
        bus=0, slot=0, func=6
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0102, statreg=0x0020, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:6: reprobing on driver added
found-> vendor=0x10de, dev=0x027e, revid=0xa2
        bus=0, slot=0, func=7
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0000, statreg=0x0020, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:0:7: reprobing on driver added
found-> vendor=0x10de, dev=0x0270, revid=0xa2
        bus=0, slot=9, func=0
        class=05-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0006, statreg=0x00b0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:9:0: reprobing on driver added
found-> vendor=0x10de, dev=0x0264, revid=0xa3
        bus=0, slot=10, func=1
        class=0c-05-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0001, statreg=0x00b0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=a, irq=255
        powerspec 2  supports D0 D3  current D0
pci0:10:1: reprobing on driver added
found-> vendor=0x10de, dev=0x0272, revid=0xa3
        bus=0, slot=10, func=2
        class=05-00-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0400, statreg=0x00a0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
pci0:10:2: reprobing on driver added
pci1: driver added
pci2: driver added
found-> vendor=0x11c1, dev=0xed00, revid=0x02
        bus=2, slot=0, func=0
        class=02-00-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0006, statreg=0x0010, cachelnsz=8 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns)
        intpin=a, irq=16
        powerspec 2  supports D0 D1 D3  current D0
        MSI supports 1 message, 64 bit
pci2:0:0: reprobing on driver added
pci3: driver added
pci4: driver added

dmesg | grep ^pcm generates:

pcm0: <Generic High Definition Audio Controller> mem 
0xfe024000-0xfe027fff irq 2
2 at device 16.1 on pci0
pcm0: Output Streams: 4, Input Streams: 4, Bidirectional Streams: 0
pcm0: CORB Size: 256, RIRB Size: 256
pcm0: Vendor info: 11d41986 11d4 1986 5 0 1
pcm0: <audio> at device 0:1 (no driver attached)
pcm0: PW 0
pcm0: start: 2 endnode: 44
pcm0: node 2 type 0 cap 30311
pcm0: Config 2f1c00
pcm0: Cap 30311 sf 20060 st 5
pcm0: Set 0:2 10
pcm0: sorbo_conf_output: codec: 0 node: 2
pcm0: node 3 type 0 cap 44d
pcm0: Config 3f1c00
pcm0: Cap 44d sf e007f st 1
pcm0: Set 0:3 10
pcm0: sorbo_conf_output: codec: 0 node: 3
pcm0: node 4 type 0 cap 40d
pcm0: Config 4f1c00
pcm0: Cap 40d sf e007f st 1
pcm0: Set 0:4 10
pcm0: sorbo_conf_output: codec: 0 node: 4
pcm0: node 5 type 0 cap 40d
pcm0: Config 5f1c00
pcm0: Cap 40d sf e007f st 1
pcm0: Set 0:5 10
pcm0: sorbo_conf_output: codec: 0 node: 5
pcm0: node 6 type 1 cap 100511
pcm0: node 7 type 2 cap 200101
pcm0: node 8 type 2 cap 200100
pcm0: node 9 type 2 cap 20010e
pcm0: node 10 type 3 cap 300101
pcm0: node 11 type 3 cap 300101
pcm0: node 12 type 3 cap 300101
pcm0: node 13 type 3 cap 300101
pcm0: node 14 type 3 cap 300100
pcm0: node 15 type 3 cap 30010d
pcm0: node 16 type 3 cap 300101
pcm0: node 17 type 3 cap 300941
pcm0: node 18 type 3 cap 30010d
pcm0: node 19 type 3 cap 30010d
pcm0: node 20 type 3 cap 30010c
pcm0: node 21 type 3 cap 30010d
pcm0: node 22 type 3 cap 30010d
pcm0: node 23 type 3 cap 30010d
pcm0: node 24 type 3 cap 30010c
pcm0: node 25 type 7 cap 700000
pcm0: node 26 type 4 cap 400185
pcm0: nid 26 entries 1 list a cur 0 ctr c5 cap 1f s 7fe0
pcm0: AMP ni 26 rc b
pcm0: node 27 type 4 cap 400185
pcm0: nid 27 entries 1 list b cur 0 ctr 45 cap 1001f s 800016a8
pcm0: AMP ni 27 rc b
pcm0: node 28 type 4 cap 400185
pcm0: nid 28 entries 1 list c cur 0 ctr 45 cap 37 s 83c0
pcm0: AMP ni 28 rc b
pcm0: node 29 type 4 cap 400985
pcm0: nid 29 entries 1 list d cur 0 ctr 45 cap 1737 s af0
pcm0: AMP ni 29 rc b
pcm0: node 30 type 4 cap 400104
pcm0: nid 30 entries 1 list e cur 0 ctr 45 cap 10 s 0
pcm0: AMP ni 30 rc b
pcm0: node 31 type 4 cap 400081
pcm0: nid 31 entries 0 list 0 cur 0 ctr 65 cap 1727 s 46
pcm0: AMP ni 31 rc 3
pcm0: node 32 type 4 cap 400081
pcm0: nid 32 entries 0 list 0 cur 0 ctr 65 cap 1727 s f420
pcm0: AMP ni 32 rc b
pcm0: node 33 type 4 cap 400081
pcm0: nid 33 entries 0 list 0 cur 0 ctr 65 cap 27 s f420
pcm0: AMP ni 33 rc 0
pcm0: node 34 type 4 cap 400001
pcm0: nid 34 entries 0 list 0 cur 0 ctr 65 cap 20 s 0
pcm0: AMP ni 34 rc 0
pcm0: node 35 type 4 cap 400000
pcm0: nid 35 entries 0 list 0 cur 0 ctr 65 cap 20 s 0
pcm0: AMP ni 35 rc 0
pcm0: node 36 type 4 cap 400000
pcm0: nid 36 entries 0 list 0 cur 0 ctr 65 cap 20 s 0
pcm0: AMP ni 36 rc 0
pcm0: node 37 type 4 cap 400301
pcm0: nid 37 entries 1 list 2 cur 0 ctr 45 cap 10 s 0
pcm0: AMP ni 37 rc b
pcm0: node 38 type 5 cap 500500
pcm0: node 39 type 2 cap 200101
pcm0: node 40 type 2 cap 200101
pcm0: node 41 type 2 cap 200101
pcm0: node 42 type 2 cap 200101
pcm0: node 43 type 2 cap 200100

uname -a
FreeBSD server.priv.yelloworb.com 6.1-RELEASE FreeBSD 6.1-RELEASE #2: 
Thu Aug 17 22:03:58 CEST 2006     
kalle at server.priv.yelloworb.com:/usr/obj/usr/src/sys/Servern6.1  i386

pciconf -lv | grep -B 4 audio
returns nothing but I think this is the line you want:
pcm0 at pci0:16:1: class=0x040300 card=0x81cb1043 chip=0x026c10de rev=0xa2 
hdr=0x00

    vendor   = 'NVIDIA Corporation'
    class    = multimedia

sysctl hw.snd.verbose=2 ; cat /dev/sndstat
hw.snd.verbose: 1 -> 2
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <Generic High Definition Audio Controller>  (1p/0r/0v channels 
default)
        [pcm0:play:0:dsp0.0]: spd 44100/48000, fmt 0x10000010, flags 
0x00000000,
 0x00000010
        interrupts 0, underruns 0, ready 0 [b:4096/2048/2|bs:131072/4096/32]
        {userland} -> feeder_root(0x10000010) -> feeder_rate(44100 -> 
48000) ->
{hardware}

sysctl hw.snd
hw.snd.report_soft_formats: 1
hw.snd.targetirqrate: 32
hw.snd.verbose: 2
hw.snd.maxautovchans: 0
hw.snd.unit: 0
hw.snd.pcm0.buffersize: 0
hw.snd.pcm0.vchans: 0

/usr/sbin/mixer
Mixer vol      is currently set to 100:100
Recording source:

Joel Dahl wrote:
> Hi all,
>
> Ariff Abdullah (ariff@) has been working on snd_hda(4) for a while now,
> which is a High Definition Audio driver and should enable basic audio
> capabilities on a lot of new machines on the market.  He's been busy
> with improving the driver lately, so he asked me to send out an
> announcement and a call for testers -- yes, the driver is ready for a
> wider audience now.  :-)
>
> This driver is based on Stephane E. Potvin's HDA driver, although big
> parts have been rewritten since then.  The driver is still in an early
> form and many parts needs refinements, but basic audio capabilities such
> as playback/recording should work and we would like to get this into
> CURRENT soon, if everything goes according to the plan.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% So, how do I test it? %%
> %%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> Well, grab all files from:
>
> http://people.freebsd.org/~ariff/HDA/
>
> # cd <hdasourcecode>
> # make
> # kldload ./snd_hda.ko
>
> Test your sound...
>
> If the above works and you would like to enable audio at startup, do
> this:
>
> # cp snd_hda.ko /boot/modules/
> # kldxref /boot/modules/
> Add snd_hda_load="YES" to /boot/loader.conf
> # reboot
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% It doesn't work!  What should I do? %%
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> If you can kldload the driver, do this:
>
> # sysctl debug.bootverbose=1
> # kldunload snd_hda
> # kldload snd_hda
> # dmesg | grep ^pcm
>
> ...and send us the output along with a description of your problem.
> Also, include the output of:
>
> # uname -a
> # pciconf -lv | grep -B 4 audio
> # sysctl hw.snd.verbose=2 ; cat /dev/sndstat
> # sysctl hw.snd
> # /usr/sbin/mixer
>
> If you cannot get any sound, it is important that you test to plug
> in speakers/headset into any jacks available.  BIOS bugs, vendor
> issues etc can cause screwed up audio routing.
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %% Anything else I need to know? %%
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> You can visit us on #freebsd-azalia @ freenode.
>
>   




More information about the freebsd-multimedia mailing list