You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error when using OMX audio_render for ddp/dts passtrough on HDMI #564
I'm also working on audio pass trough scenarios but by using OpenMax in GStreamer [1].
I've already got a working sink for PCM raw audio with the information at [2] but with the the audio passtrough scenario I get an error in the attempt to allocate the buffers in the input port of audio_render.
To deploy into an SD card with two partitions boot (fat32) and rootfs (ext4):
$ cp output/images/rpi-firmware/* /media//boot/
$ cp output/images/zImage /media/boot/
$ sudo tar xvf output/images/rootfs.tar -C /media/rootfs/
Download and copy some media with a dolby digital audio track, for example [3]
Once booted the rpi to reproduce the issue run the following GStreamer pipeline:
@AD-N770 Could you add a link to the code that actually hits this error?
My first guess would be that you allocate too many or too few buffers on one of the involved ports. OMX can be really picky there.
Are you submitting IEC 61937 formatted frames as OMX_AUDIO_CodingPCM data to audio_render?
Or are you submitting DTS/AC3 encoded frames as OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP?
@popcornmix I'm not yet at the point of submitting frames but I will be able to submit whatever it's needed.
Te actual plan was submit DTS/AC3 frames as OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP
but if it doesn't work I can payload to IEC 61937 (GStreamer already has infrastructure in place to achieve this in an easy manner) and submit as OMX_AUDIO_CodingPCM.
The issue is that I can't allocate buffers at input port when I configure it for OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP.
Submitting IEC 61937 to audio_render is in use by the Pi Sink in xbmc so is known to work.
Submitting DTS/AC3 frames to audio_decode tunnelled to audio_render is used by omxplayer and is known to work.
audio_decode does parse the headers of DTS/AC3 and fills in some out of band data used by audio_render.
Trying to pass DTS/AC3 straight to audio_render may or may not have issues, but AFAIK it's never been tried.
Sending IEC 61937 as PCM data to audio_render would be my suggestion.
You want exactly the same settings as you use for 2 channel 16-bit PCM.
Some receivers require the number of channels in AV Infoframe to be set to 0.
Use "vcgencmd hdmi_stream_channels 1" before starting passthrough playback and "vcgencmd hdmi_stream_channels 0" before starting non-passthrough playback. (most receivers don't seem to care)
If audio_render is connected to a clock, then make sure audio is the clock master (i.e. don't set OMX_IndexConfigBrcmClockReferenceSource to false) as that allows audio to be resampled which is bad for passthrough.
Activity
julianscheel commentedon Apr 16, 2014
@AD-N770 Could you add a link to the code that actually hits this error?
My first guess would be that you allocate too many or too few buffers on one of the involved ports. OMX can be really picky there.
adn770 commentedon Apr 16, 2014
@julianscheel sure, here it is http://cgit.freedesktop.org/~adn770/gst-omx/tree/omx/gstomxaudiosink.c?h=audiosink#n716
btw: are you around on IRC? me at #gstreamer
popcornmix commentedon Apr 16, 2014
Are you submitting IEC 61937 formatted frames as OMX_AUDIO_CodingPCM data to audio_render?
Or are you submitting DTS/AC3 encoded frames as OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP?
adn770 commentedon Apr 17, 2014
@popcornmix I'm not yet at the point of submitting frames but I will be able to submit whatever it's needed.
Te actual plan was submit DTS/AC3 frames as OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP
but if it doesn't work I can payload to IEC 61937 (GStreamer already has infrastructure in place to achieve this in an easy manner) and submit as OMX_AUDIO_CodingPCM.
The issue is that I can't allocate buffers at input port when I configure it for OMX_AUDIO_CodingDTS/OMX_AUDIO_CodingDDP.
popcornmix commentedon Apr 17, 2014
Submitting IEC 61937 to audio_render is in use by the Pi Sink in xbmc so is known to work.
Submitting DTS/AC3 frames to audio_decode tunnelled to audio_render is used by omxplayer and is known to work.
audio_decode does parse the headers of DTS/AC3 and fills in some out of band data used by audio_render.
Trying to pass DTS/AC3 straight to audio_render may or may not have issues, but AFAIK it's never been tried.
Sending IEC 61937 as PCM data to audio_render would be my suggestion.
adn770 commentedon Apr 17, 2014
Ok, I'll give a try on passing IEC 61937 as PCM data.
Please to avoid more issues could you describe what's the expected OMX_AUDIO_CodingPCM format [1] to pass IEC 61837 data ?
[1] http://cgit.freedesktop.org/~adn770/gst-omx/tree/omx/gstomxaudiosink.c?h=audiosink#n592
popcornmix commentedon Apr 18, 2014
You want exactly the same settings as you use for 2 channel 16-bit PCM.
Some receivers require the number of channels in AV Infoframe to be set to 0.
Use "vcgencmd hdmi_stream_channels 1" before starting passthrough playback and "vcgencmd hdmi_stream_channels 0" before starting non-passthrough playback. (most receivers don't seem to care)
If audio_render is connected to a clock, then make sure audio is the clock master (i.e. don't set OMX_IndexConfigBrcmClockReferenceSource to false) as that allows audio to be resampled which is bad for passthrough.
Use this as a reference:
https://github.com/xbmc/xbmc/blob/master/xbmc/cores/AudioEngine/Sinks/AESinkPi.cpp
adn770 commentedon Apr 28, 2014
I've got DD/DTS working with IEC61837 approach.
Thanks
mfd: ab3100-core: Correct code sytle problems
btrfs: do not WARN_ON() if we have PageError set
btrfs: do not WARN_ON() if we have PageError set
btrfs: do not WARN_ON() if we have PageError set
cachefiles: fix slab-use-after-free in cachefiles_ondemand_daemon_read()
cachefiles: fix slab-use-after-free in cachefiles_ondemand_daemon_read()
cachefiles: fix slab-use-after-free in cachefiles_ondemand_daemon_read()
ring-buffer: Do not trigger WARN_ON() due to a commit_overrun
ring-buffer: Do not trigger WARN_ON() due to a commit_overrun
ring-buffer: Do not trigger WARN_ON() due to a commit_overrun