[alsa-devel] Swapped channels issue on pxa-ssp based platforms
Daniel Mack
zonque at gmail.com
Mon Nov 7 18:40:12 CET 2011
Hi,
we're hunting a weird bug on PXA3xx/ssp based audio devices which causes
the playback channels to be swapped when the capture stream is started
at the same time. Content for the left channel appears on the right and
vice versa, in approximately 50% of all test runs of the following command:
$ arecord -f cd - -D hw:0,0 | aplay -D hw:0,0 -f cd -
When just aplay is used, everything's fine.
It's unrelated to the codec part, as we see this with machines that
feature different models. I guess this is some sort of a race condition
in the stream startup, and suspected sound/soc/pxa/pxa-ssp.c to lack
some locking, so I added a spinlock around all register
read-modify-write cycles. But that doesn't seem to be the reason.
It could also be the DMA engine that writes to the wrong position, but I
fail to see it right now.
Does anyone have an idea where to look for the culprit? Have there been
similar effects in other SoC platforms?
Thanks for sharing your thoughts :)
Daniel
More information about the Alsa-devel
mailing list