Rockbox

Tasklist

FS#9933 - Sansa Fuze & e200v2: Unify drivers

Attached to Project: Rockbox
Opened by Thomas Martitz (kugel.) - Friday, 20 February 2009, 18:14 GMT
Last edited by Rafaël Carré (funman) - Friday, 05 March 2010, 23:55 GMT
Task Type Patches
Category Operating System/Drivers
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch unifies much of the now duplicated code for e200v2 and fuze in several new files (dbop-e200v2-fuze.c, lcd-e200v2-fuze.c, button-e200v2-fuze.c).

As far as my experience goes, this two targets have too much in common to have the code split and duplicated.

Needs testing on the e200v2. Also, I'm wondering if this good at all, since the other ams sansas are still split, and most functions cannot be static anymore.
This task depends upon

Closed by  Rafaël Carré (funman)
Friday, 05 March 2010, 23:55 GMT
Reason for closing:  Out of Date
Comment by Thomas Martitz (kugel.) - Friday, 20 February 2009, 19:06 GMT
Ok, this one is properly diff'd against r20067
Comment by Jack Halpin (FlynDice) - Saturday, 21 February 2009, 05:58 GMT
Well it functions on my e280 but not well. The buttons work fine. The scrolling action is a step backward but we've had this discussion before. Scrolling does work as long as you turn the wheel rather slowly. If you turn the wheel quickly it starts to skip and even goes backwards at times. It also "wraps" the menus instead of stopping at the top and bottom. I understand that it works well on the fuze but I really think the e200v1 scroll code works better for the e200v2, especially after using it for the past week.... I couldn't get music playing no matter how hard I tried. Radio was not a problem though and plugins with the scrollwheel were similar to the menu action.
Comment by Thomas Martitz (kugel.) - Saturday, 21 February 2009, 13:18 GMT
Can you please try if changing "QUEUE_SKIP_COUNTER" in firmware/target/arm/as3525/sansa-e200v2/button-target.h to other values helps?
Comment by Jack Halpin (FlynDice) - Saturday, 21 February 2009, 23:41 GMT
I tried 0,1,2,4,6 and they all displayed pretty much the same behavior just the smaller numbers moved things quicker which I thought was to be expected. Playing music was not a problem but keeping it playing is not as consistent. The music not playing part of my previous comment was not related to this patch it seems, something else was wrong. The hold button behavior is back to normal with this patch also.
Comment by Thomas Martitz (kugel.) - Friday, 27 February 2009, 02:21 GMT
Ok, another approach. I base this on this one on the e200v2 scrollwheel driver. It doesn't contain much changes. I just implemented the repeat from the Fuze (repeat is particulary needed, so that it doesn't wrap on the end at lists, the fuze has it and it works there). I also implemented a preliminary acceleration, as to turn on wheel fast mode, if repeat is high enough.

I really want to unify the driver, and I hope going from the e200v2 side, it could work.
Comment by Jack Halpin (FlynDice) - Friday, 27 February 2009, 04:03 GMT
The menus still wrap but aside from that I would call the scroll action acceptable. No reversal or stall at high spin rates, not really jumpy. The wrap is a bit annoying though once you get used to no wrap. I tried to relate another patch to this one with the dbop delay removed and the gpio delay reduced to 2 from 50 but I couldn't figure out how. I think this patch you're working on would be the real target for that though.
Comment by Thomas Martitz (kugel.) - Friday, 27 February 2009, 14:34 GMT
I don't understand how the wrapping is not working for you. It should only wrap, if you slightly touch the wheel, when you are already at the end of the list.

You probably understood the code: If you repeatedly turn the wheel, say every tick task, then BUTTON_REPEAT is generated. And when BUTTON_REPEAT is true, then you don't wrap, else you wrap.

But in my code, it is just *highly unlikely to not have BUTTON_REPEAT*, since already two tick tasks in a row with scroll action will have the repeat.

So I ask you again, just to make sure: Does it always wrap or only if you're turning it slowly towards end of the list?
Comment by Jack Halpin (FlynDice) - Friday, 27 February 2009, 20:02 GMT
It wraps most of the time. It occasionally hesitates.
Comment by Thomas Martitz (kugel.) - Saturday, 28 February 2009, 17:57 GMT
It throws me off that this is working so differently on the e200v2 and fuze. My approach of generating BUTTON_REPEAT should be very generic (it generates it if there was wheel action in two consecutive tick tasks).

Another question, am I correct that the current e200v2 driver (in svn) does *never* wrap? If yes, that would certainly wrong, as other targets don't do that.
Comment by Jack Halpin (FlynDice) - Saturday, 28 February 2009, 21:43 GMT
That is correct as far as my e280v2 goes. With the current svn driver there is no way I can make the menu wrap. I've tried scrolling fast and slow. I've tried stopping at the end and then starting again, quickly, slowly and any other way I possibly could. I cannot get it to wrap at all. Remember, there is some kind of difference with the wheels on the e200's and fuze as you had good scrollwheel action on the fuze even before the red pixel workaround.
Comment by Thomas Martitz (kugel.) - Sunday, 01 March 2009, 14:54 GMT
That'd be super annoying if you ask me.
Comment by Shredded Wheat (Cougar4free) - Sunday, 17 January 2010, 22:53 GMT
I have an unusal problem that you may be able to help me with. Maybe not, but its worth a try. I have a Sansa Fuze 4GB that is perfectly normal, except for some bizarre reason the screen doesn't work. Everything else is factory-standard. And my music is already on it of course. I remember all the interfaces to the point that I can find any song myself, but I am planning on giving it to a friend and would like to install voice commands, which Rockbox is said to have. Pretend she's blind. The normal install can't find the device, and for some reason the zip file for manual installation doesn't appear on the list (http://www.rockbox.org/download/byhand.cgi). If there is a solution, please email me at cashjohnsen@hotmail.com, and thank you.

Loading...