Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#9503 - Sansa v2 audio/PMU communication driver (for the AS3525 SoC)

Attached to Project: Rockbox
Opened by Bertrik Sikken (bertrik) - Wednesday, 22 October 2008, 22:30 GMT+2
Last edited by Bertrik Sikken (bertrik) - Sunday, 26 October 2008, 14:48 GMT+2
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Player Type Another
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

Attached patch adds support for communicating with the "audio/PMU (power management unit)" part inside the AS3525 SoC. This part allows control of the audio configuration, battery charger, analog-digital converter, real-time clock and unique player id. It sits on an internal i2c bus. The register map of the audio/PMU appears very similar to the register map used in the as3514 of the sansa c200v1 and e200v1.

The code in the patch exposes simply an init, a read and a write function, the internal i2c bus is hidden away. Communication is polling-based, which means it blocks the caller for the duration of a transfer, which takes about 75 us. The bootloader is patched to demonstrate communication by displaying the players' unique id which can be verified by looking at the iSerial field of the 'lsusb -v' output of the sansa v2 player.
   as3525_codec.patch (7.1 KiB)
 bootloader/sansa_as3525.c                 |   11 ++
 firmware/SOURCES                          |    1 
 firmware/target/arm/as3525/as3525-codec.h |   27 ++++++
 firmware/target/arm/as3525/as3525-codec.c |  135 ++++++++++++++++++++++++++++++
 4 files changed, 174 insertions(+)

This task depends upon

Closed by  Bertrik Sikken (bertrik)
Sunday, 26 October 2008, 14:48 GMT+2
Reason for closing:  Accepted
Additional comments about closing:  Committed as r18886
Comment by Bertrik Sikken (bertrik) - Wednesday, 22 October 2008, 23:17 GMT+2
Oops, tab alert. Attached version uses spaces instead of tabs.
   as3525_codec_2.patch (7.2 KiB)
 bootloader/sansa_as3525.c                 |   11 ++
 firmware/SOURCES                          |    1 
 firmware/target/arm/as3525/as3525-codec.h |   27 ++++++
 firmware/target/arm/as3525/as3525-codec.c |  135 ++++++++++++++++++++++++++++++
 4 files changed, 174 insertions(+)

Comment by Dominik Wenger (Domonoky) - Thursday, 23 October 2008, 22:14 GMT+2
I can confirm that this also works on a m200v2.
Comment by Bertrik Sikken (bertrik) - Friday, 24 October 2008, 21:38 GMT+2
Minor text fixes and also make it work for m200v2 and e200v2.
   as3525_codec_3.patch (7.6 KiB)
 bootloader/sansa_as3525.c                 |   11 ++
 firmware/SOURCES                          |    3 
 firmware/target/arm/as3525/as3525-codec.h |   27 ++++++
 firmware/target/arm/as3525/as3525-codec.c |  132 ++++++++++++++++++++++++++++++
 4 files changed, 173 insertions(+)

Loading...