noise due to synchronization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


This bug has been root caused in gstreamer level. I want to document
this in case another guys come across this bug.

When video sink get clock time of pipeline, audiosink will query the
latency of ALSA driver, ie, check how much data has been written to
ALSA API but has not been fetched by DMA. This query causes ALSA
consume pcm data faster than normal, noise appears too.

This bug only appears when audio is stereo and sampling rate is
directly supported by hardware.

This bug can be reproduced with aplay. To reproduce it with aplay, you
just need to add a thread and query the ALSA latency 20~30times every
second.

My platform is: PXA300/zylonite, linux 2.6.25, codec: wm9713.


2008/8/4 Nie Jun <niej0001 at gmail.com>:
> Dear All,
>    I am in trouble when we upgrade Linux kernel from 2.6.24 to
> 2.6.25. It seems that synchronization causes noise when using ALSA as
> sink. Moreover, only 44.1K and 48K audio sampling rate has this issue,
> 22K, 24K, 32K is trouble free. I test osssink, it has not this
> problem.
>    I'm using XSCALE platform with CPU fixed in 624MHz, so resource
> should not be the root cause. The following are my experiment:
>
> gst-launch filesrc location=$STR  ! qtdemux name=t ! queue ! aacdec ! alsasink
> No noise, duration is OK.
>
>
> gst-launch filesrc location=$STR  ! qtdemux name=t ! queue ! aacdec !
> alsasink  t. ! queue ! h264dec ! overlay2sink
> With this command, noise is on, duration is shorter than it should be,
> video is 35fps while it should be 30fps. I dump the PCM data to file
> when ALSA write API is called, all the data is same with decoder
> output.
>
>
> gst-launch filesrc location=$STR  ! qtdemux name=t ! queue ! aacdec !
> alsasink  t. ! queue ! fakesink sync=1
> Noise is on, even video part is dropped.
>
>
> gst-launch filesrc location=$STR  ! qtdemux name=t ! queue ! aacdec !
> alsasink  t. ! queue ! fakesink sync=0
> No noise, duration is OK.
>
>
> Any idea is welcome, Thanks!
>




[Index of Archives]     [Linux Embedded]     [Linux ARM Kernel]     [Linux for ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux Media]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux