FS#12030 - Rockbox have the channel "left-side-right" when playing back

Attached to Project: Rockbox
Opened by PurlingNayuki (yzflcyq) - Sunday, 27 March 2011, 04:12 GMT
Last edited by MichaelGiacomelli (saratoga) - Tuesday, 26 June 2012, 03:03 GMT
Task Type Bugs
Category Drivers
Status Closed
Assigned To No-one
Operating System iPod 3G
Severity Low
Priority Normal
Reported Version Release 3.8
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


I'm using iPod Classic 3rd, 160G and my Rockbox is r29613 compiled by myself.
When I try to play music with it, I found that the sound come from the left of the headphone is actually the right channel, and likely the sound come from the right headphone is actually the left channel.
How could it happend?
I've tested some wav, ape, mp3, wv files and all of them appear the problem above.

Edit: Changed category to drivers.
This task depends upon

Closed by  MichaelGiacomelli (saratoga)
Tuesday, 26 June 2012, 03:03 GMT
Reason for closing:  Fixed
Additional comments about closing:  Likely fixed in  FS#12519 .
Comment by Michael Sevakis (MikeS) - Tuesday, 17 May 2011, 22:13 GMT
Depending on the audio codec setup, the i2s setup and whether or not it was addressed in the driver, channel swapping can happen. Sometimes one has to fight hard with the hardware to avoid or minimize it and seems to be more likely with the codecs in master mode and SoC in slave mode combined with not sending (or not being able to send) samples as single 32-bit words (L16+R16).

I'm not talking as an expert on the Classic 3G or saying this is definitively the reason, just experience I've had with others.
Comment by PurlingNayuki (yzflcyq) - Monday, 03 October 2011, 10:15 GMT
I tested OndaVX747 and it has the same problem.
Comment by Sebastian (sebber) - Friday, 14 October 2011, 14:50 GMT
Hi, I've got the iPod nano 2nd generation with 3.9 and can confirm this. Playing a file often starts with channels reversed. Unfortunately this is a show stopper since I need to know right from the start what channel the sound is coming from (I'm a musician and wanted to use RockBox on stage.)
Comment by Michael Sevakis (MikeS) - Friday, 14 October 2011, 20:12 GMT
I'll stand by my earlier assessment that someone needs to fix the PCM drivers on whatever players have the problems to use packed samples (PP502x, Coldfire) or, if not possible, to somehow avoid any swapping issues (Gigabeat F/S). Nothing in the DSP path is at fault given that players that have PCM drivers crafted to avoid swapping (i.MX31) don't have the problem or at least they minimize the liklihood if that hardware if very stubborn (s3c2440).

Sometimes it takes a number of hours of messing around to find the right thing to do. Codec as master tends to produce the bug because the i2s interfaces sort of suck at knowing which channel is which in a FIFO.
Comment by Sebastian (sebber) - Friday, 14 October 2011, 20:51 GMT
I have no idea what it means that you're saying. Please excuse me asking: Can I do something about it? Or does this mean it should happen when I use the iPod OS as well?