Re: Hard crash with new snd_hda.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Tue, 30 Sep 2008 20:37:02 +0300
Frank Mayhar wrote:
> pcm0: <HDA codec #0 Realtek ALC269 PCM #0> on hdac0
> pcm0: +--------------------------------------+
> pcm0: | DUMPING PCM Playback/Record Channels |
> pcm0: +--------------------------------------+
> pcm0:
> pcm0: Playback:
> pcm0:
> pcm0:      Stream cap: 0x00000001
> pcm0:                  PCM
> pcm0:         PCM cap: 0x000e0560
> pcm0:                  16 20 24 bits, 44 48 96 192 KHz
> pcm0:             DAC: 2
> pcm0:
> pcm0: Record:
> pcm0:

Everything looks good until this point. As soon as we have "Record" 
printed, the record channel is assigned for this device (pdevinfo->rec 
 >= 0).

> pcm0:             ADC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1065922443 37421056 0 0 1 1 -980163680 2 512 114 2417 -981896736 9 6 4 2 0

But it looks like this number is incorrect or the channel memory is 
erased. List of DACs should be -1 terminated, but it is not there.

> pcm0: 
> pcm0: +--------------------------------+
> pcm0: | DUMPING Playback/Record Pathes |
> pcm0: +--------------------------------+
> pcm0: 
> pcm0: Playback:
> pcm0: 
> pcm0:     nid=20 [pin: Speaker (Fixed)]
> pcm0:       |
> pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
> pcm0:              |
> pcm0:              + <- nid=2 [audio output] [src: pcm]
> pcm0:              + <- nid=11 [audio mixer] [src: mix]
> pcm0: 
> pcm0:     nid=26 [pin: Headphones (Jack)]
> pcm0:       |
> pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
> pcm0:              |
> pcm0:              + <- nid=2 [audio output] [src: pcm]
> pcm0:              + <- nid=11 [audio mixer] [src: mix]
> pcm0: 
> pcm0: Input Mix:
> pcm0: 
> pcm0:     nid=11 [audio mixer]
> pcm0:       |
> pcm0:       + <- nid=24 [pin: Mic (Jack)] [src: mic]
> pcm0:       + <- nid=25 [pin: Mic (Fixed)] [src: monitor]
> pcm0:       + <- nid=27 [pin: Mic (Jack)] [src: line1]
> pcm0:       + <- nid=29 [pin: AUX (Fixed)] [src: line]

There is also no record channel, but it must be there according to the 
codec parsing stage.

> pcm0: Mixer "line":
> pcm0: Mixer "mix":
> pcm0: Mixer "ogain":
> pcm0: clone manager: deadline=750ms flags=0x8000001e
> pcm0: sndbuf_setmap 1f800000, 4000; 0xea0fd000 -> 1f800000
> 
> 
> Fatal trap 12: page fault while in kernel mode
> cpuid = 1; apic id = 01
> fault virtual address   = 0x14
> fault code              = supervisor read, page not present
> instruction pointer     = 0x20:0xc617e0f1
> stack pointer           = 0x28:0xe80697fc
> frame pointer           = 0x28:0xe8069828
> code segment            = base 0x0, limit 0xfffff, type 0x1b
>                         = DPL 0, pres 1, def32 1, gran 1
> processor eflags        = interrupt enabled, resume, IOPL = 0
> current process         = 1184 (kldload)
> trap number             = 12
> panic: page fault
> cpuid = 1
> Uptime: 54s
> Physical memory: 2003 MB
> Dumping 95 MB:

This is probably the late consequence. I think debugging at this point 
won't give much. At least it will require deep data structures digging.

You can enable some more debugging with setting hw.snd.verbose=4. May be 
it will give some clues. If not, probably we should try to add some 
debug printing near channel-to-device assignment loop near line 7170. We 
should try to find is the channel number was incorrectly set initially 
or it was erased later or channel memory itself was erased.

The only idea I have now about the problem is that it may be related to 
the two audio codecs that you have on the same HDA bus. You are the 
first person who reported about such setup, so it wasn't ever tested.

-- 
Alexander Motin
Received on Tue Sep 30 2008 - 15:37:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:35 UTC