Rockbox

Tasklist

FS#12074 - Add setting to enable/disable lineout on Sansa Fuze V2

Attached to Project: Rockbox
Opened by Rob Walker (tenfoot) - Tuesday, 19 April 2011, 20:02 GMT
Task Type Patches
Category Settings
Status Unconfirmed
Assigned To No-one
Operating System Another
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

This patch allows the line out on the Sansa Fuze V2 to be enable/disabled by means of the existing Lineout poweroff setting (previously used on some iPods).

By assigning this setting to the quickscreen I can switch between headphones and lineout after plugging into the dock. Still no luck in finding out how to autodetect the dock.

I'm not 100% sure that re-using the "Lineout Poweroff" setting is the right thing to do here as it's not powering on/off the line-out - just switching between headphones and line out
This task depends upon

Comment by Andree Buschmann (Buschel) - Tuesday, 19 April 2011, 20:10 GMT
The lineout poweroff settings should be used to physically switch off the lineout. This can be useful on devices which consume power even though the lineout is not used (e.g. happening on the iPod Video). The setting should not be used to switch between variable and fixed output level.
Comment by Rob Walker (tenfoot) - Tuesday, 19 April 2011, 20:37 GMT
On the Fuze V2 it's a choice between line out or headphones - you can either have headphones at whatever level you want or lineout at 0dB.

If this isn't an appropriate use of the lineout power off setting, then I guess I can add a new lineout setting for the Fuze - would be just duplicating the existing setting though.
Comment by Ted Twain (ted209) - Tuesday, 16 August 2011, 21:32 GMT
Just wanted to say that I've been using this on my Fuze V2 with Griffin PowerBlock and it works great.

It's not much hassle activating it using the quickmenu, but if autodetection could be added, that would be perfect. Ideally the autodetection could also disable crossfeed (great on headphones, not needed with speakers)... but I'm probably just dreaming now!
Comment by Solomon Peachy (pizza) - Tuesday, 01 November 2011, 15:33 GMT
I picked up a "line out" dongle thingey on ebay, and I can confirm it works with the stock firmware.

It works by pulling pin 7 high, and it uses pin 22 to supply the juice.

I have no idea where those pins are wired -- if someone has a bare board they may be able to trace those pins to the appropriate places on the AMS chip and figure out which GPIOs they correspond to. I couldn't find any high-res scans on the rockbox wiki.

in button_fuzev2.c, I tried forcing the "unknown" GPIO[ABCD]_DIR lines high, but I didn't see any change with/without the dock attached (using the debug/IO menu)

Before: (GPIO_DIR for A/B/C/D)

21 3F 00 00

After:

21 3F C1 7F

Comment by Tony DeFusco (ToneDeF) - Sunday, 04 November 2012, 15:52 GMT
This patch works great. When the line out system setting is assigned to the quick menu it is very handy and easy to use indeed. The question that is being begged here is why is this code not part of the official Rockbox build for the Sansa Fuze V2 (at least until the time comes when it is discovered how to implement dock auto-detection by more traditional means)???
Comment by Solomon Peachy (pizza) - Sunday, 04 November 2012, 16:46 GMT
I've updated my build for those interested:

http://www.shaftnet.org/users/pizza/rockbox-sansa_fuze_v2-99f20b-lineout.zip

I'd love to see this patch integrated too -- or better yet, auto-detection, but I have no idea how those pins are hooked up to the AMS chip, and I don't want to sacrifice my Fuze for this..

(Hmmm, maybe I can find a broken one on ebay..)
Comment by MichaelGiacomelli (saratoga) - Monday, 03 December 2012, 01:39 GMT
Solomon: if you want to post builds, the forums are probably a better place then the patch tracker. Theres a section for patched rockbox builds for instance. The patch tracker is generally for development discussion.
Comment by Rawl Gelinas (rawl747) - Monday, 03 December 2012, 15:45 GMT
I want to thank Solomon as well for posting his patch and also echo his sentiment that this feature should be integrated into the build.

Then there would be no need for him to post patches here or on the forum anymore.

I expect that there are plenty of Rockbox users out there with Fuzes and Griffin docks (as these were blown out through retail overstock places like Ollie's) that need this functionality. Please make It part of the base build code.
Comment by MichaelGiacomelli (saratoga) - Monday, 03 December 2012, 15:49 GMT
Hi Rawl,

We won't be including this in the main build until someone reverse engineers the mechanism for detecting if a line out dock is connected.
Comment by Solomon Peachy (pizza) - Monday, 03 December 2012, 16:08 GMT
First, It's not my patch, but rather Rob Walker's. I just built it a couple of times as an interested party. I posted the link here because people were emailing me directly for the build.

As far as dock detection is concerned -- We know the dock works by shorting pin 22 to pin 7. Pin22 is already set high, but I don't know where pin 7 goes, and I can't find that out without destroying my FuseV2 in the process.

Somewhere there are the bare FuseV2 PCBs that were used in the original port, and that would be quite handy with a multimeter. Or a broken one. Or one slated for sacrifice..

- Solomon
Comment by Solomon Peachy (pizza) - Monday, 03 December 2012, 16:44 GMT
Found a busted one on ebay for cheap. I'll have it in a week, and hopefully I'll be able to figure out what's what.
Comment by MichaelGiacomelli (saratoga) - Monday, 03 December 2012, 22:01 GMT
Solomon,

I think a broken player may not tell you much, since you will only be able to trace pins as far as the SOC package, and all the interesting things are inside the packaging. Although maybe we'll get luck and its a pin shared with the display or USB that you can infer the routing of. On some of the older AMS chips, the display peripheral ('DBOP') was used as a backup GPIO so that is a possibility.

Looking at the firmware disassembly may be more fruitful though.
Comment by Solomon Peachy (pizza) - Monday, 03 December 2012, 22:29 GMT
I'm hoping that knowing which SoC pin is used will at least narrow down the search. (I'm already 95% certain it's not hooked up via a regular GPIO line, so the DBOP is probably it)

I have enough experience with disassembly to know that it's an arduous task even when one is familiar with the hardware. Granted, I know the register that controls the line out, which at least gives me something meaningful to start my search on.


Comment by Solomon Peachy (pizza) - Wednesday, 12 December 2012, 13:01 GMT
Is there a datasheet for the AS3525v2? I can't seem to find anything on AMS's site. What information source was used to determine the differences between the v1 and v2?

(I'm trying to enable the DBOP reading for the Fuzev2)
Comment by MichaelGiacomelli (saratoga) - Wednesday, 12 December 2012, 14:02 GMT
There's no data sheet. The v2 port was done entirely by reverse engineering the Sandisk firmware to infer what was changed. There is some documentation in the source code for the v2 devices.
Comment by Solomon Peachy (pizza) - Tuesday, 16 April 2013, 01:07 GMT
I've attached a rebased version of the original patch for those still interested.

A correspondingly updated build is here:

http://www.shaftnet.org/users/pizza/rockbox-sansa_fuze_v2-540e5d1-lineout.zip

(I finally have a working fuzeV2 again -- and four dead ones on my desk. joy...)
Comment by Tony DeFusco (ToneDeF) - Sunday, 05 May 2013, 19:54 GMT
Thank you Solomon -- you rock!!!

Loading...