Support and General Use > Audio Playback, Database and Playlists

Swap Left/Right Channels

(1/1)

tertiorari:
Hi all,

I am trying to compile a custom build (Sansa Clip+) which has the left/right channels swapped, i.e. sound that should come out of the left earphone comes out the right, and vice versa.

I searched the forum and the clearest instructions I found were here:
http://forums.rockbox.org/index.php?topic=9939.0

Specifically,

--- Quote ---But basically it is only one assembler line to change (for Sansa):

/firmware/target/arm/pcm_pp.c:
  change required in #ifdef HAVE_AS3514
    "mov r10, r10, ror #2\n\t" /* put left sample at the top bits */
  to
    "mov r10, r10, ror #18\n\t" /* put right sample at the top bits */

--- End quote ---

But this was posted three years ago, and in the current build, pcm_pp.c doesn't have that line. The closest I found was:

--- Code: ---"mov r2 , r12, lsl #16\n\t" /* put left sample at the top bits */

--- End code ---

What should I edit in the current build to effect this change?

saratoga:

--- Quote from: tertiorari on November 08, 2010, 05:01:35 PM ---
But this was posted three years ago, and in the current build, pcm_pp.c doesn't have that line.

--- End quote ---

The Clip+ doesn't have a PP cpu, so it doesn't use the code in pcm_pp.c.  Check the as3525 folder instead.

Edit:  its probably easier to just flip the samples somewhere in the DSP code rather then in a driver.

tertiorari:
Should I be looking in
--- Code: ---/firmware/target/arm/as3525/
--- End code ---
or is that completely the wrong place?

saratoga:

--- Quote from: tertiorari on November 08, 2010, 06:28:39 PM ---Should I be looking in
--- Code: ---/firmware/target/arm/as3525/
--- End code ---
or is that completely the wrong place?

--- End quote ---

Thats where the driver is, but as I said above its probably easier to just pick some random DSP feature and have it flip the samples when enabled.  Maybe make 100% stereo width flip the channels.  Or something else thats implemented in c code rather then assembly . . .

tertiorari:
Ah, I understand. Good idea, thanks.

Navigation

[0] Message Index

Go to full version