Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Swap Left/Right Channels
« previous next »
  • Print
Pages: [1]

Author Topic: Swap Left/Right Channels  (Read 1476 times)

Offline tertiorari

  • Member
  • *
  • Posts: 5
Swap Left/Right Channels
« on: November 08, 2010, 05:01:35 PM »
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 */

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: [Select]
"mov r2 , r12, lsl #16\n\t" /* put left sample at the top bits */

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

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Swap Left/Right Channels
« Reply #1 on: November 08, 2010, 05:16:52 PM »
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.

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.
« Last Edit: November 08, 2010, 05:28:18 PM by saratoga »
Logged

Offline tertiorari

  • Member
  • *
  • Posts: 5
Re: Swap Left/Right Channels
« Reply #2 on: November 08, 2010, 06:28:39 PM »
Should I be looking in
Code: [Select]
/firmware/target/arm/as3525/
or is that completely the wrong place?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Swap Left/Right Channels
« Reply #3 on: November 08, 2010, 06:30:17 PM »
Quote from: tertiorari on November 08, 2010, 06:28:39 PM
Should I be looking in
Code: [Select]
/firmware/target/arm/as3525/
or is that completely the wrong place?

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 . . .
Logged

Offline tertiorari

  • Member
  • *
  • Posts: 5
Re: Swap Left/Right Channels
« Reply #4 on: November 08, 2010, 08:24:52 PM »
Ah, I understand. Good idea, thanks.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Audio Playback, Database and Playlists
| | |-+  Swap Left/Right Channels
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.064 seconds with 15 queries.