Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes 1
  • Private
Attached to Project: Rockbox
Opened by sdoyon - 2007-10-17
Last edited by BigBambi - 2010-06-06

FS#7979 - Shutdown with hold button

This patch causes the player to shutdown when the hold switch is
engaged. Implemented for e200 and x5.

Includes a setting to activate this behavior.

I personally don’t use the hold button when using the player, and I
usually set it to hold whenever I turn my player off.

Being blind, I like that the button clicks and I’m sure what position
it’s in. I know that it has clicked off and then I can forget about my
player and expect it to shutdown.

The long press on POWER involves some guesswork if you don’t have your
earphones on (say you’ve been interrupted and had to remove them in a
hurry), or if you’re feeding the audio through some other system that got
shut off. If you have it setup to resume playback on startup, it’s even
more guess work.

As a bonus, engaging the hold button is instantaneous, rather than
waiting for the extra long POWER press to register, the bookmark to be
saved and finally getting the voice shutdown message. Really useful when
you didn’t notice that the bus was arriving at the station and you have
to move in a hurry. Or your in a waiting room and they just called your
name…

Anyway I figured, if they have a backlight mode for the hold switch,
maybe I can do something useful with it for myself.

I’d like comments on the idea: is this just a gadget, or does someone
else think this might be useful to them?

Closed by  BigBambi
2010-06-06 08:37
Reason for closing:  Rejected

Holy shit what an idea. I’m not blind I’m just lazy so I dig this idea. I NEVER use the hold switch so using it for on/off is awesome.

Can you set it so flipping it back turns the player on? That functionality would get my vote… F it I’m voting for it anyway but still turning it on via the hold switch would be super, great nifty.

Ah jeez, does this thing work for the Gigabeat F? It says All Players but you said you implemented it for only two players.

Stephane another great idea!
Could you please make this work on the h300? I can’t understand how to get it working on it.
I don’t understand about the #defines and what they equal.
You seemed to have assigned them with a random number and letters.
Not sure what this means though.
If you could make it support the h300 I would appreciate it.
Thanks.

Thanks for the enthusiasm! Didn’t think it would be so appreciated.

Holy shit what an idea. I’m not blind I’m just lazy so I dig this idea. I
>NEVER use the hold switch so using it for on/off is awesome.
>Can you set it so flipping it back turns the player on? That functionality

I wish. I don’t believe the hardware will be designed for this to
be programmable.

Oh well let’s ask… … No, jhMikeS says the hardware won’t do it.

Ah jeez, does this thing work for the Gigabeat F? It says All Players but
>you said you implemented it for only two players.

Yeah I had two so I couldn’t just select one in the menu :-).

OK here’s an additional patch, to be applied in addition to the
earlier one, with untested support for Gigabeat F and H300. Please do
let me know if it works! And whether you actually find this convenient,
or whether it’s just a toy idea.

ddalton:
>You seemed to have assigned them with a random number and letters.

Random letters?
Those are hexadecimal constants. One bit per button, so they can be
combined. Just had to find a free bit.

Thanks for the update. Works great on h300.

HI YYYYYOOOOOOO! She works on GigabeatF!
Notes:
- By default the option is turned off. This threw me at first cause I thought it didn’t work.
- The option is spelled really incorrectly, “Poweroff on ohld”. You’re blind so I’ll let it slide this time but next time I won’t be so lenient.
- Is it possible to turn the Gigabeat ON with the hold switch? It would be cool cause that would make the hold switch the complete on/off button.

Somewhat unreleated when trying to patch my build I came upon this annoying problem. Everytime it had to patch a different file I had to specify what file to patch because it couldn’t find the proper file because it would put the “trunk” folder in the begining of every path. I’m using Cygwin.
Is my patch statement wrong? I can patch fine with another file but these two cause these problems. Below is a sample of what was printed. Thank you.

$ patch –binary < hold-poweroff.diff (–my input–)
can’t find file to patch at input line 5
Perhaps you should have used the -p or –strip option?
The text leading up to this was:


————————– File to patch: firmware\target\arm\sandisk\sansa-e200\button-e200.c (–my input–)
patching file ‘firmware\target\arm\sandisk\sansa-e200\button-e200.c’

Notes:
>- By default the option is turned off. This threw me at first cause I thought it didn’t work.

Yes. But if people don’t want it it will behave as normal. So I think it should be off by default.
I use this feature, but I am sure there are people that don’t.

Most options are off by default. Like voice dir names.

- The option is spelled really incorrectly, “Poweroff on ohld”. You’re blind so I’ll let it >slide this time but next time I won’t be so lenient.

Ah yes your right… A typing error in english.lang. The voice string is fine though. I won’t update it because I think Stephane would prefer if I left it for him. :-)

- Is it possible to turn the Gigabeat ON with the hold switch? It would be cool cause that >would make the hold switch the complete on/off button.

Why do you ask the same question twice? You should read the comments. Because Stephane told you it isn’t possible with the hardware. Yes I would like that but it isn’t possible.

Somewhat unreleated when trying to patch my build I came upon this annoying problem. >Everytime it had to patch a different file I had to specify what file
>to patch because it couldn’t find the proper file because it would put the “trunk” folder in >the begining of every path. I’m using Cygwin.
>Is my patch statement wrong? I can patch fine with another file but these two cause these >problems. Below is a sample of what was printed. Thank you.
$ patch –binary < hold-poweroff.diff (–my input–)

Read the wiki. You need to strip one directory level from the left. (p1 not p0)
It depends what patch you are applying though. If it was made from the trunk or somewhere else…

Fixed a typing error in english.lang.

Just wondering does this new “shutdown-hold.patch” replace the “hold-poweroff.diff” or both files or do I have to patch all three individually? Thanks.

If someone will add ipod support, I will test it.

Hi any chance this patch could be made to work with the h140 please?

I got another request for this so here’s a new patch.

I was frustrated with the complexity and difficulty of adding support for
new models. So this is a simplified patch for ease of maintenance: no
fancy feature define and button definitions in a bunch of target-specific
files… I just hooked into the backlight function. The upside is it
should now support any player that’s able to use the hold switch to
control the backlight.

If this is ever considered for inclusion, then the hold button event
should be made to go through a function with a more generic name than
backlight_hold_changed(). But I won’t push to commit this unless another
dev shares my enthusiasm for this feature, or unless some happy users
speak up. I stil use it every day and love it.

Hi Stephane,

i’m a blind user and i tested this patch. It is a good idea so i decided to have it on my e200. It is very usefull when i travel by train/ bus or wait for doctor because in this situations i must shutdown quickly the player .
However i think that this patch can be accepted if study mode function is accepted, it is in fs#6188. in fact if it is not accepted you can not lock the keyboard while playing to avoid an accidental transition to the next track or the beginning of current one: you need to disable “power off on hold” function for this result.

greetings.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing