Bug 132511

Summary: [sound] [snd_hda] Probing ALC888 codec on ASRock K10N78-1394 fails
Product: Base System Reporter: Ilari Laitinen <ilari.laitinen>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: christos
Priority: Normal    
Version: 7.1-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description Ilari Laitinen 2009-03-10 17:10:04 UTC
The snd_hda driver fails to probe the ALC888 codec of the ASRock K10N78-1394 motherboard.

The output after kld_load is not consistent. Sometimes it just prints two timeout messages, like this:

hdac0: <NVidia MCP78 High Definition Audio Controller> mem 0xfce78000-0xfce7bfff irq 22 at device 7.0 on pci0
hdac0: HDA Driver Revision: 20090226_0129
hdac0: [ITHREAD]
hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac0: Codec #0 is not responding! Probing aborted.

Sometimes it detects a NULL Codec and goes on. This results in more timeouts and totally unresponsive system for about two minutes. (See the attached verbose boot message.)

I tried to increase timeout lengths in the driver. That didn't help. I have tried the original 7.1-RELEASE driver, the current 7.1-STABLE driver and even the most recent -HEAD driver. They all seem to produce "identical" results.

Fix: Patch attached with submission follows:
How-To-Repeat: kldload snd_hda
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-03-10 20:31:17 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-multimedia

Over to maintainer(s).
Comment 2 Alexander Motin freebsd_committer freebsd_triage 2009-03-17 08:38:12 UTC
There is several reports about problems with enabling MSI interrupts on
NVidia chipsets. It is not enabled now for 7-STABLE by default, but
looks like you have latest driver from 8-CURRENT where it is enabled.

Try to add hint.hdac.0.msi=0 into loader.conf to disable it and report
result.

-- 
Alexander Motin
Comment 3 Ilari Laitinen 2009-03-18 14:09:12 UTC
Alexander Motin <mav@FreeBSD.org> 2009-03-17 10:38:12 +0200:
> There is several reports about problems with enabling MSI interrupts on
> NVidia chipsets. It is not enabled now for 7-STABLE by default, but
> looks like you have latest driver from 8-CURRENT where it is enabled.
> 
> Try to add hint.hdac.0.msi=0 into loader.conf to disable it and report
> result.

That didn't help, which makes sense because probing failed in a similar
manner with the 7.1-STABLE driver. (I suppose it didn't report anything
MSI related back then.) Should I try the 7.1-STABLE driver again to
report its output? Or send the full dmesg or something?

snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=5 feeder_buffersize=16384 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25
pci0: driver added
found-> vendor=0x10de, dev=0x0754, revid=0xa2
        domain=0, bus=0, slot=0, 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:0:0:0: reprobing on driver added
found-> vendor=0x10de, dev=0x0752, revid=0xa1
        domain=0, bus=0, slot=1, 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=20
        powerspec 2  supports D0 D3  current D0
pci0:0:1:1: reprobing on driver added
found-> vendor=0x10de, dev=0x0751, revid=0xa1
        domain=0, bus=0, slot=1, 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:0:1:2: reprobing on driver added
found-> vendor=0x10de, dev=0x0753, revid=0xa2
        domain=0, bus=0, slot=1, func=3
        class=0b-40-00, hdrtype=0x00, mfdev=1
        cmdreg=0x0006, statreg=0x00a0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x03 (750 ns), maxlat=0x01 (250 ns)
        intpin=b, irq=21
pci0:0:1:3: reprobing on driver added
found-> vendor=0x10de, dev=0x0568, revid=0xa1
        domain=0, bus=0, slot=1, func=4
        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:0:1:4: reprobing on driver added
found-> vendor=0x10de, dev=0x0774, revid=0xa1
        domain=0, bus=0, slot=7, func=0
        class=04-03-00, hdrtype=0x00, mfdev=0
        cmdreg=0x0006, statreg=0x00b0, cachelnsz=0 (dwords)
        lattimer=0x00 (0 ns), mingnt=0x02 (500 ns), maxlat=0x05 (1250 ns)
        intpin=a, irq=22
        powerspec 2  supports D0 D3  current D0
        MSI supports 1 message, 64 bit, vector masks
pci0:0:7:0: reprobing on driver added
hdac0: <NVidia MCP78 High Definition Audio Controller> mem 0xfce78000-0xfce7bfff irq 22 at device 7.0 on pci0
hdac0: HDA Driver Revision: 20090131_0127
hdac0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0xfce78000
hdac0: [MPSAFE]
hdac0: [ITHREAD]
hdac0: Probing codec #0...
hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac0: HDA Codec #0: Unknown Codec
hdac0:  HDA Codec ID: 0xffffffff
hdac0:        Vendor: 0xffff
hdac0:        Device: 0xffff
hdac0:      Revision: 0x00
hdac0:      Stepping: 0x00
hdac0: PCI Subvendor: 0x08881849
hdac0: Probing codec #3...
hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac0: Codec #3 is not responding! Probing aborted.
hdac0: 
pci1: driver added
pci2: driver added
pci3: driver added
pci4: driver added
pci5: driver added
pci6: driver added

-- 
Ilari Laitinen
Comment 4 Alexander Motin freebsd_committer freebsd_triage 2009-03-18 14:20:16 UTC
Ilari Laitinen wrote:
> pci0:0:7:0: reprobing on driver added
> hdac0: <NVidia MCP78 High Definition Audio Controller> mem 0xfce78000-0xfce7bfff irq 22 at device 7.0 on pci0
> hdac0: HDA Driver Revision: 20090131_0127
> hdac0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0xfce78000
> hdac0: [MPSAFE]
> hdac0: [ITHREAD]
> hdac0: Probing codec #0...
> hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> hdac0: HDA Codec #0: Unknown Codec
> hdac0:  HDA Codec ID: 0xffffffff
> hdac0:        Vendor: 0xffff
> hdac0:        Device: 0xffff
> hdac0:      Revision: 0x00
> hdac0:      Stepping: 0x00
> hdac0: PCI Subvendor: 0x08881849
> hdac0: Probing codec #3...
> hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> hdac0: Codec #3 is not responding! Probing aborted.
> hdac0: 

Does this codec works on any other OS? Before MSI was enabled I can
remember such symptoms only once, when codec was broken.

-- 
Alexander Motin
Comment 5 Ilari Laitinen 2009-03-25 20:50:45 UTC
Alexander Motin <mav@FreeBSD.org> 2009-03-18 16:20:16 +0200:
> Ilari Laitinen wrote:
> > pci0:0:7:0: reprobing on driver added
> > hdac0: <NVidia MCP78 High Definition Audio Controller> mem 0xfce78000-0xfce7bfff irq 22 at device 7.0 on pci0
> > hdac0: HDA Driver Revision: 20090131_0127
> > hdac0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0xfce78000
> > hdac0: [MPSAFE]
> > hdac0: [ITHREAD]
> > hdac0: Probing codec #0...
> > hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> > hdac0: HDA Codec #0: Unknown Codec
> > hdac0:  HDA Codec ID: 0xffffffff
> > hdac0:        Vendor: 0xffff
> > hdac0:        Device: 0xffff
> > hdac0:      Revision: 0x00
> > hdac0:      Stepping: 0x00
> > hdac0: PCI Subvendor: 0x08881849
> > hdac0: Probing codec #3...
> > hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> > hdac0: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
> > hdac0: Codec #3 is not responding! Probing aborted.
> > hdac0: 
> 
> Does this codec works on any other OS? Before MSI was enabled I can
> remember such symptoms only once, when codec was broken.

Yes, it works. I tried Knoppix 6.0.1 and the codec was detected correctly
and worked. I found some sort of a debug script for ALSA. Its output is
as follows:


ALSA Audio Debug v0.1.0 - Wed Mar 25 18:02:00 UTC 2009
http://alsa.opensrc.org/aadebug
http://www.gnu.org/licenses/gpl.txt

Kernel ----------------------------------------------------
Linux Microknoppix 2.6.28.4 #8 SMP PREEMPT Mon Feb 9 14:33:28 CET 2009 i686 GNU/Linux

Loaded Modules --------------------------------------------
snd_hda_intel         293112  4 

Modprobe Conf ---------------------------------------------
Warning: module config file does not exist
This means any kernel modules will not be auto loaded
See your linux distro docs on how to create this file

Proc Asound -----------------------------------------------
Advanced Linux Sound Architecture Driver Version 1.0.18rc3.
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfce78000 irq 21
  0: [ 0]   : control
  1:        : sequencer
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 19: [ 0- 3]: digital audio playback
 24: [ 0- 0]: digital audio capture
 26: [ 0- 2]: digital audio capture
 33:        : timer
cat: /proc/asound/hwdep: No such file or directory
00-00: ALC888 Analog : ALC888 Analog : playback 1 : capture 1
00-01: ALC888 Digital : ALC888 Digital : playback 1
00-02: ALC888 Analog : ALC888 Analog : capture 1
00-03: NVIDIA HDMI : NVIDIA HDMI : playback 1
Client info
  cur  clients : 3
  peak clients : 3
  max  clients : 192

Client   0 : "System" [Kernel]
  Port   0 : "Timer" (Rwe-)
  Port   1 : "Announce" (R-e-)
Client  14 : "Midi Through" [Kernel]
  Port   0 : "Midi Through Port-0" (RWe-)

Dev Snd ---------------------------------------------------
controlC0  pcmC0D0c  pcmC0D0p  pcmC0D1p  pcmC0D2c  pcmC0D3p  seq  timer

CPU -------------------------------------------------------
model name      : AMD Athlon(tm) Dual Core Processor 5050e
cpu MHz         : 2599.718
model name      : AMD Athlon(tm) Dual Core Processor 5050e
cpu MHz         : 2599.718

RAM -------------------------------------------------------
MemTotal:        3374252 kB
SwapTotal:             0 kB

Hardware --------------------------------------------------
00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration
00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map
00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller
00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control


-- 
Ilari Laitinen
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:57 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 7 Christos Margiolis freebsd_committer freebsd_triage 2024-10-17 14:15:48 UTC
Is this bug still reproducible with current versions of FreeBSD?