snd_hda and 8.2-RC*

Hi

I have recently installed new version of FreeBSD 8.2-RC2. On the new version i'm having trouble with sound.
When I load hda_snd.ko driver I get an error msg
Code:
hdac0: <ATI SB600 High Definition Audio Controller> irq 16 at device 20.2 on pci0
hdac0: HDA Driver Revision: 20100226_0142
hdac0: [ITHREAD]
hdac0: hdac_get_capabilities: Invalid corb size (2)
device_attach: hdac0 attach returned 6

and /dev/sndstat
Code:
FreeBSD Audio Driver (newpcm: 64bit 2009061500/amd64)
Installed devices:

Does anybody have any ideas how to fix this?

Thank you in advance
Urban Žan
 
This won't fix it, but if you have another audio interface card installed in addition to your graphics card's one (e.g. an on-the-mainboard one) you can work around this by setting your system to use that one instead, i.e. setting hw.snd.default_unit to the handle number of your additional audio adapter (detected e.g. by running "sysctl dev.pcm" and looking for it's name in dev.pcm.handle_number.%desc) and reconnecting your audio output devices to the other audio interface card.
 
Try please this patch:
Code:
--- hdac.c.prev 2011-02-06 19:14:00.000000000 +0200
+++ hdac.c      2011-02-11 10:47:30.000000000 +0200
@@ -1608,6 +1608,10 @@ hdac_get_capabilities(struct hdac_softc 
        sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK);
 
        corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE);
+       if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_MASK) == 0) {
+               corbsize |= (HDAC_CORBSIZE_CORBSZCAP_2 <<
+                   HDAC_CORBSIZE_CORBSIZE(corbsize));
+       }
        if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_256) ==
            HDAC_CORBSIZE_CORBSZCAP_256)
                sc->corb_size = 256;
 
Hi,

I have no luck today :)
Code:
patch < hdac_mav.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- hdac.c.prev 2011-02-06 19:14:00.000000000 +0200
|+++ hdac.c      2011-02-11 10:47:30.000000000 +0200
--------------------------
Patching file hdac.c using Plan A...
Hunk #1 failed at 1608.
1 out of 1 hunks failed--saving rejects to hdac.c.rej
done

and hdac.c.rej says
Code:
***************
*** 1608,1613 ****
         sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK);
                                                                                    
         corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE);                           
         if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_256) ==                            
             HDAC_CORBSIZE_CORBSZCAP_256)                                           
                 sc->corb_size = 256;                                               
--- 1608,1617 ----                                                                  
         sc->support_64bit = HDA_FLAG_MATCH(gcap, HDAC_GCAP_64OK);
  
         corbsize = HDAC_READ_1(&sc->mem, HDAC_CORBSIZE);
+        if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_MASK) == 0) {
+                corbsize |= (HDAC_CORBSIZE_CORBSZCAP_2 <<
+                    HDAC_CORBSIZE_CORBSIZE(corbsize));
+        }
         if ((corbsize & HDAC_CORBSIZE_CORBSZCAP_256) ==
             HDAC_CORBSIZE_CORBSZCAP_256)
                 sc->corb_size = 256;

In my opinion the problem is not in the code, but in hardware, because I have changed RAM from slot 1 to slot 2 and sound started to work again. :/
 
I have this problem with CURRENT, before (1-2 months ago) all was OK.

Code:
hdac0: <ATI SB600 High Definition Audio Controller> mem 0xb7fb0000-0xb7fb3fff irq 16 at device 20.2 on pci0
hdac0: hdac_get_capabilities: Invalid corb size (0)
device_attach: hdac0 attach returned 6
Code:
FreeBSD HP.lissyara.su 9.0-CURRENT FreeBSD 9.0-CURRENT #0 r223260M: Sat Jun 18 20:30:25 MSD 2011  
   root@HP.lissyara.su:/usr/obj/usr/src/sys/GENERIC  amd64
Code:
hdac0@pci0:0:20:2:      class=0x040300 card=0x30c2103c chip=0x43831002 rev=0x00 hdr=0x00
    vendor     = 'ATI Technologies Inc. / Advanced Micro Devices, Inc.'
    device     = 'IXP SB600 High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA
    bar   [10] = type Memory, range 64, base 0xb7fb0000, size 16384, enabled
    cap 01[50] = powerspec 2  supports D0 D3  current D0

mav@'s patch does not help.
 
Back
Top