snd_hda.7.20080905 with ad1988b

Alexander Motin mav at FreeBSD.org
Tue Sep 9 20:17:30 UTC 2008


Jochen Keil wrote:
> Now my FreeBSD box is making noise over digital (optical) S/PDIF output 
> although there are no devices (at least) i cannot see in /dev.
> Thank you so very much for that.
> 
> Unfortunately i cannot get AC3 passthrough to work.
> 
> If i try with mplayer all i hear is some (real) noise.. like.. the 
> stream doesn't get decoded and played raw. (Had the same issue with 
> Windows XP until they came up with a new driver version).
> I installed audio/oss (another hint from this list ;) and passthrough 
> worked. Only problem now: can't get stereo output.
> The oss driver from the ports seems to be able to change 
> dev.pcm.2.play.vchanformat to ac3 while trying this with snd_hda (sysctl 
> -w dev.pcm.2.play.vchanformat=ac3) didn't work.
> 
> This is what mplayer tells me when i try to force the codec to hwac3:
> ==========================================================================
> Forced audio codec: hwac3
> Opening audio decoder: [hwac3] AC3/DTS pass-through S/PDIF
> No accelerated IMDCT transform found
> hwac3: switched to AC3, 448000 bps, 48000 Hz
> AUDIO: 48000 Hz, 2 ch, ac3, 448.0 kbit/29.17% (ratio: 56000->192000)
> Selected audio codec: [hwac3] afm: hwac3 (AC3 through S/PDIF)
> ==========================================================================
> [AO OSS] Can't set audio device /dev/dsp to ac3 output, trying s16le...
> AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
> [format] Sample format big-endian AC3 not yet supported
> [libaf] Reinitialization did not work, audio filter 'format' returned 
> error code -2
> Couldn't find matching filter/ao format!

To pass-through AC3 stream properly driver needs to know that data is 
not PCM, but AC3, so device must be opened with AC3 format. In presented 
case after first error device was opened as usual PCM. One of possible 
reasons is that you have vchans enabled. You should disable vchans for 
that device with
sysctl dev.pcm.2.play.vchans=0

> At last i wanted to mention that with "I didn't get that whole nid stuff 
> though.." i wanted to express that i didn't (and still don't) really 
> understand what it means/does/is.. classical misunderstanding :)

If you really wish to understand - you can read HDA and Microsoft UAA 
specifications. If not - try to read snd_hda man page updated with a 
patch on my page.

-- 
Alexander Motin


More information about the freebsd-multimedia mailing list