Dominique Dumont domi.dumont@free.fr writes:
Dominique Dumont domi.dumont@free.fr writes:
The parm of the last verb (0x200) is 0x11. When looking at Realtek;'s doc (p44), this means a PCM stream.
And I know that my amp does not like ac3 in audio stream. It won't decode unless the stream is flagged as non-audio. (should be parm 0x8011 , ie. bit 15 set)
Err, scratch that. The non-audio bit is set by verb 70D.
Both mythtv and mplayer seem to disable the audio flag correctly. AC3/DTS passthrough works beautifully, as long as the S/PDIF is not "locked up" :-/
If you wanted to play back AC3/DTS from software which is not aware of the audio flag, I suppose you could try the following:
iecset audio off
So it looks like the MSB of the parm where clobbered somewhere.
BTW, the Sample base rate (which controls whether the stream is 44khz or 48khz) is bit 14. So this may be a lead for your problem.
Probably not.
Sorry for the noise.
No noise as far as I'm concerned, I hope I'm not too noisy myself :-)
In any case I cannot find any obvious error in the HDA code. The debug log from attempting to play a 44.1kHz stereo audio file through aplay -Dhw:0,1 is shown below:
[aplay open] Mar 23 00:20:36 localhost kernel: ALSA sound/pci/hda/hda_codec.c:620: hda_codec_setup_stream: NID=0x6, stream=0x0, channel=0, format=0x0 Mar 23 00:21:13 localhost kernel: ALSA sound/pci/hda/hda_intel.c:1158: azx_pcm_prepare: bufsize=0x10000, fragsize=0x4000, format=0x4011 Mar 23 00:21:13 localhost kernel: ALSA sound/pci/hda/hda_codec.c:620: hda_codec_setup_stream: NID=0x6, stream=0x5, channel=0, format=0x4011
[aplay close] Mar 23 00:22:12 localhost kernel: ALSA sound/pci/hda/hda_codec.c:620: hda_codec_setup_stream: NID=0x6, stream=0x0, channel=0, format=0x0
As far as I can tell the format value 0x4011 translates to PCM, 44.1kHz, rate multiplier 1, rate divisor 1, 16 bits, 2 channels - all by the book. And NID 0x6 corresponds to S/PDIF out according to the Realtek documentation.
Does anybody achieve 44.1kHz over S/PDIF with any other brand codec?
If so, there is probably some quirk that must be used for the Realtek chips to control the S/PDIF frame rate. Someone at Realtek should have an idea on what is going on here...
As it stands, S/PDIF works at 48kHz if you're lucky (intermittent audio screeches and unability to detect AC3/DTS if you're not so lucky). It's impossible to set the frame rate to 44.1kHz (or 96khz or 192kHz, for that matter). There is no error reported, but the S/PDIF link stays at 48kHz, no matter what I do.