After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 653541 - Aiff @ 16bit/44.1kHz keeps swapping channels during playback
Aiff @ 16bit/44.1kHz keeps swapping channels during playback
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
0.10.20
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-06-28 05:09 UTC by Stuart Gray
Modified: 2011-07-20 23:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stuart Gray 2011-06-28 05:09:40 UTC
This bug is evident running openembedded Linux on an arm core.

The file was tested, on the same system using wget and piping it into sox where it was decoded and playback was perfect.

My system has the following gstreamer revisions:

gstreamer-0.10.32
gst-plugins-base-0.10.32
gst-plugins-good-0.10.26
gst-plugins-bad-0.10.20
gst-plugins-ugly-0.10.16

Using the following pipeline:

{{{
gst-launch -v souphttpsrc location=http://192.168.0.144/testAudio/Travis/The%20Man%20Who/01%20Writing%20To%20Reach%20You.aif ! queue2 max-size-buffers=0 max-size-time=0 max-size-bytes=500000 ! decodebin2 ! audioconvert ! audio/x-raw-int,endianness=1234,channels=2 ! audioresample ! alsasink sync=false async=false
}}}

As playback begins a channel swap always seems to occur approximately 10 seconds into the track, then this is repeated at random times during track playback.

Looking at debug from gstreamer, I tried setting this to various levels including 5 shows nothing that looks relevant or an error.

The pipeline produces the following:
{{{
Setting pipeline to PAUSED ...
davinci-pcm: davinci_pcm_open: sram buffer size = 0x2000
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Not running within active session)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Not running within active session)
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Not running within active session)
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstTypeFindElement:typefind.GstPad:src: caps = audio/x-aiff
Pipeline is PREROLLED ...
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstAiffParse:aiffparse0.GstPad:sink: caps = audio/x-aiff
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstDecodePad:src0: caps = audio/x-raw-int, width=(int)16, depth=(int)16, channels=(int)2, endianness=(int)4321, rate=(int)44100, signed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20/GstAiffParse:aiffparse0.GstPad:src: caps = audio/x-raw-int, width=(int)16, depth=(int)16, channels=(int)2, endianness=(int)4321, rate=(int)44100, signed=(boolean)true
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstAudioConvert:audioconvert0.GstPad:sink: caps = audio/x-raw-int, width=(int)16, depth=(int)16, channels=(int)2, endianness=(int)4321, rate=(int)44100, signed=(boolean)true
/GstPipeline:pipeline0/GstDecodeBin2:decodebin20.GstDecodePad:src0.GstProxyPad:proxypad2: caps = audio/x-raw-int, width=(int)16, depth=(int)16, channels=(int)2, endianness=(int)4321, rate=(int)44100, signed=(boolean)true
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstAudioResample:resample0.GstPad:src: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
/GstPipeline:pipeline0/GstAudioResample:audioresample0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100,channels=(int)2
/GstPipeline:pipeline0/GstAlsaSink:alsasink0.GstPad:sink: caps = audio/x-raw-int, endianness=(int)1234, signed=(boolean)true, width=(int)32, depth=(int)32, rate=(int)44100, channels=(int)2
}}}

This happens with any aiff file that can be produced using iTunes and setting the import settings to aiff.

If the caps are altered to include width=16, depth=16 and rate=44100 then there is less channel swapping, but it still happens.

Directing the output of the audioresample to a file and then copying this onto my Linux PC, I can playback the audio, but only when I set aplay to use a rate of 88.2kHz:

aplay -c 2 -f S16_LE -r 88200 aifFile.raw

If I use 44100 it plays back slow.

When I test using the same file on a Linux running Ubuntu 10.04, the issue does not appear, it is only on the embedded system.

I must stress that you can use any aiff file.
Comment 1 Stuart Gray 2011-06-28 12:14:27 UTC
During testing I tried to play the same file on the openembedded system using mPlayer, it failed in exactly the same way by swapping the channels.
Comment 2 David Schleef 2011-06-30 05:17:46 UTC
If it also happens in mplayer, it's likely to be a driver bug.

Is this reproducible with something other than an AIFF file?
Comment 3 Stuart Gray 2011-06-30 09:09:17 UTC
It is only aiff that this happens with.
Comment 4 Stuart Gray 2011-07-07 10:48:24 UTC
Who should this be re-assigned to?
Comment 5 David Schleef 2011-07-07 18:45:29 UTC
Does this happen when you play the file/stream with playbin2?
Comment 6 Stuart Gray 2011-07-08 01:15:48 UTC
Yes it does
Comment 7 Stuart Gray 2011-07-20 23:19:02 UTC
Please close.

I now believe that this issue is within our kernel and related to the hardware/kernel combination.