This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10623 - Improved accessory support and detection for Ipod
Attached to Project:
Rockbox
Opened by Laurent Gautier (Creposucre) - Monday, 28 September 2009, 19:00 GMT+2
Last edited by Laurent Gautier (Creposucre) - Wednesday, 13 January 2010, 22:31 GMT+2
Opened by Laurent Gautier (Creposucre) - Monday, 28 September 2009, 19:00 GMT+2
Last edited by Laurent Gautier (Creposucre) - Wednesday, 13 January 2010, 22:31 GMT+2
|
DetailsHi,
this patch, that takes some of the FS10494, improves dock detection and initialization. It should correct the erratic behaviour on some hardware, and it also adds support for some remote buttons: menu, select, up_arrow and down_arrow. The buttons arrow are not usable by now, even if they are defined. I tried severals things but i couldn't get it to work. Any idea of which context I should use to use the button arrow to scroll through the main menu? |
This task depends upon
- Reworked all current remote key maps
- Added missing remote key maps
- Fix handling CONTEXT_MAINMENU (did not fallback through CONTEXT_CUSTOM|CONTEXT_TREE
- Added comments for clarity
- Fixed typos in comments
- Remove redundant return statement after switch with 'default' case
But up and down_arrow still don't work :(
- Changed remote_button_context_standard to use BUTTON_RC_UP and BUTTON_RC_DOWN
- get_context_mapping_remote() now handles CONTEXT_STD in switch case
- Renamed BUTTON_RC_UP_ARROW to BUTTON_RC_UP, and BUTTON_RC_DOWN_ARROW to BUTTON_RC_DOWN
-renamed BUTTON_RC_UP_ARROW to BUTTON_RC_UP, and BUTTON_RC_DOWN_ARROW to BUTTON_RC_DOWN in iap.c and two others remaining in button-target.
I attached a log of several hardwares that I tested in a hardware shop.
The buttons work on every accessory that supports it. I forgot to mention that it features a power-off command, tested with success on one target.
Note: Most of the docks put the ipod in sleep mode sending a 2 second "play" command. Rockbox needs a 5~6 second play command.
to resume again, this patch:
- improves accessory detection and passes the authentication
- improves buttons detection
- features a remote power-off
- fetures a remote menu, select
As seen with Tomers, remote up and down are implemented but non funtionnal yet; keymap to refine?
Are we looking for verification that this patch does not interfere with non-accessory performance?
Are we looking for verification that this patch does not break existing accessory compatibility?
Or are we looking for verification that this patch improves compatibility? If so is there a list of accessories which should be tested?
Regardless - if this needs broad testing shall I cook up some "Official Test Builds" for the forum and put out a call for testers?
This patch need testing so we can see if:
* the added remote buttons are working correctly
* the shutdown thing initiated by a remote shutdown button works correctly
* the accessories don't get stuck anymore
All the accessories should be retested with it, excepted the apple fm remote which is fully supported.
Actually, all the accessories could already be retested with the current SVN since the patch for the fm remote that I submitted features the improvement of the accessory detection.
I don't own myself anything else that the ipod fm remote, that's why it's difficult for me to do the debug for the other accessories.
So, an official test build with testers would be really helpful :)
http://forums.rockbox.org/index.php?topic=23666
for some reason the dock and remote buttons dont work unless the ipod is off when plugging into the dock. If I plug the ipod in while its in rockbox already it will automatically shut down. and yeah, scroll remote buttons don't work.
and turning off the ipod isnt very reliable. When it doesnt work it stops the music on rockbox (and the dock turns off) but then the dock turns back on (should accessory power be off?).
I've tried the build on a JVC microcomponent (UX-GP5): it works quite ok except the up and down buttons that I can't make work.
The problem seems to be the keymap, but if I put another function on theses buttons, it works nicely...
Could you try to apply your patch in FS9951 to log your iap packets please? I'll look at that as soon as possible.
I have made some tests and if you tie together pin 20 and ground, you can see that GPIOs change (I could give you the results later on)
So, pin 20 to ground => you know there is an accessory plugged in
Then you "read the value" of the resistor on pin 10 => you know what kind of accessory
(by the way, I guess in the aim to read the value of this resistor, we need a voltage divider; the input voltage is not here, thought. A GPIO should certainly activate it)
I wanted to add theses findings in this patch, but I lack some time and I am stuck with another problem with key codes, so anybody should feel free to implement it in another patch.
GPIO A and F states:
69 and 06 (no accessories)
39 and 42, then 79 and 46 (pin 20 tied with gnd)
* separate the IAP auto-bauding from the serial driver. Currently the IAP auto-bauding is entwined with the serial driver (containing both knowledge about the IAP protocol as well about the specific hardware), this makes it impossible to do IAP auto-bauding on anything other than portalplayer ipods (like the nano 2g for example)
* split up the iap_handlepkt function up a bit, with a function per mode, it's now a gigantic function, nested too deep IMO
* generate the mode 4 cmd ok packet in a function instead of constructing it each time in a slightly different way
* maybe use #defines for all of the magic command number?
I don't know why the thread from January of this year is still on the forums, it slipped past me, I'm in the process of killing it.
Regardless, the offer stands to host and parse. I'd offer to build but I've been spend much of my time way out of town where internet access is spotty and I don't want to commit to what I can't promise.
but I think theses are great ideas! I can test some with my radio remote, just need to check if I still can build.
Just noticed that you posted in fs11266, I will try to test this patch too
Where should i start? Is the rev 24224+patch working or at least partially?
How do I debug rockbox? If I can write to a log file, which functions can I use to debug from inside iap.c to see what I am receiving in the remote control port?
Thanks,
Caco