Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: Spoonman on March 06, 2009, 08:00:59 AM

Title: apple style sleep mode
Post by: Spoonman on March 06, 2009, 08:00:59 AM
ok, now we have the new usb stack up and working well, so maybe its time to implement something like the apple style sleep mode,  i mean the apple firmware does never fully power off the player unless the battery is empty or you reset the player, so the device does not have to boot every time. so when i plug my nano to the usb port of my car stereo in apple mode it remembers the position where it was with playback, when i am in rockbox every time the player shuts down the car stereo starts playback from track 1...
Title: Re: apple style sleep mode
Post by: linuxstb on March 06, 2009, 08:58:19 AM
How are you restarting playback in Rockbox? 

When you shut down Rockbox, it should remember the current playlist and your position in that playlist, and on next boot you can resume playback from where you left off.

The only thing a sleep mode could give you is a faster resume - the resume feature already exists.
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 09:04:53 AM
sorry, but it seems you missunderstood me wrong ;-)
rockbox itself works great, but i (and maybe some other people too) use my ipod nano also as usb disc in my car (my car stereo has a usb connector) and there the problem comes up, when rockbox is powered when the car stereo is turned on it is newly initialized and playback starts with track 1 on the disc. when the player is in ipod mode it does not really power off and so the car stereo resumes playback.
Title: Re: apple style sleep mode
Post by: Llorean on March 06, 2009, 09:54:25 AM
Yes, we got that. And he said that's not what's supposed to happen, it's supposed to remember where you are and resume where you left off, rather than at track 1. What revision of Rockbox are you using?
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 10:06:27 AM
i used r20192-090303, but did a update today wich i did not test yet.
Title: Re: apple style sleep mode
Post by: woyciesjes on March 06, 2009, 11:33:08 AM
    If I'm reading this right, the behaviour you're experiencing is normal and not a bug, I think...

     Your car stereo has it's own mp3 player, and it's just using your iPod as a removable disk, right? So, it should behave the same as when you plug the iPod in to a computer to sync, right?

    Or am I missing something?
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 12:58:18 PM
thats correct, but when i use the apple firmware resume works, and when i´m in rockbox it does not. so i assume that since the apple firmware does not totally power off the device and rockbox does this might be the cause of this behavior.
Title: Re: apple style sleep mode
Post by: woyciesjes on March 06, 2009, 01:46:14 PM
   Well, seem as if yours is operating opposite of mine, (iPod video 30GB 5.5G).
I'm running v 20102-090225 of Rockbox. I just tested... while playing a song in Rockbox, I connect it to my Mac PC, it kicks in to drive mode. Disconnected, Rockbox restarts, and I choose Resume Playback. Voila, the track I was listening to before I connected.
    But the iPod firmware doesn't do that. Would be nice if it did, though....
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 03:24:06 PM
seems like you got me wrong again, this is not really a pure rockbox issue, if i talk about resume i mean resume on my car stereos internal mp3 player. the only thing wrong is that rockbox powers off the ipod completely after a given time, where the ipod firmware goes to sleep mode.

when rockbox is active:
when turning on the car stereo the ipod starts into rockbox from cold state and resets the car stereo when it initalizes.

when apple os is active:
when the car stereo is turned on ipod awakes from sleep mode and the car stereo continues playback from where it ended when i left the car.
Title: Re: apple style sleep mode
Post by: Chronon on March 06, 2009, 03:28:28 PM
Does your car stereo have a separate mode for iPods? 
Title: Re: apple style sleep mode
Post by: woyciesjes on March 06, 2009, 03:43:53 PM
   Okay, I think I got it now. You want the _stereo's_ mp3 player to remember where it left off, right? The stereo is treating Rockbox like it's only a USB drive, right?

   I think Chronon might be on to something. You car stereo may automatically switch to a special control mode for iPods, vs Rockbox appearing as a regular USB disk....
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 03:59:11 PM
i dont think so, this would be mentioned somewhere at the stereo´s specs, so i am pretty sure it is just treated as a usb discdrive or thumbdrive. and if i power off the ipod when it is in apple firmware the same thing happens. it starts from the first track.
i think best solution for this would be having rockbox just powering off the display after a while when not in use instead of shutting down the device.
Title: Re: apple style sleep mode
Post by: Febs on March 06, 2009, 04:07:12 PM
What is the make and model of your car stereo?  My gut feeling is that Chronon is right, but I'm curious to see if the documentation for your stereo is available to get a better sense of how it works.
Title: Re: apple style sleep mode
Post by: bluebrother on March 06, 2009, 04:36:15 PM
Well, is this case that hard? The car stereo doesn't resume properly. Rockbox itself does resume properly. Thus, the issue is with the car stereo. If there's a difference between running Rockbox and the OF then the stereo does something when it detects an Ipod -- when running Rockbox it will detect a UMS device like any other USB drive. Especially Rockbox UMS mode does not support the special SCSI commands the OF does so there is a good chance the car stereo is using that command to recognize an Ipod.

Anyway, as Rockbox behaves as expected but the car stereo not this is not a Rockbox issue and has nothing to do with sleep mode.
Title: Re: apple style sleep mode
Post by: Spoonman on March 06, 2009, 05:56:40 PM
actually it is a cheap tevion car3000 with bluetooth, mp3 sd-mmc and usb, i did not find anything about this on the web, but the manual does not loose a word about ipods...

i guess that like linuxstb said the faster resume of the device could make the difference on this.
Title: Re: apple style sleep mode
Post by: Febs on March 06, 2009, 07:27:43 PM
linuxstb said no such thing.  Bluebrother's explanation is almost certainly correct.
Title: Re: apple style sleep mode
Post by: soap on March 06, 2009, 08:08:28 PM
Test with another USB device. 
Put some music on a thumb drive and see if the resume issue persists.
This will (almost) tell you if your head unit is treating generic UMS devices different than it is treating iPods.
Title: Re: apple style sleep mode
Post by: Llorean on March 06, 2009, 08:17:33 PM
Just disable the idle poweroff. If your car charges it while you're driving, as long as you don't leave the player in the car overnight idle you shouldn't have to worry about the battery running out.
Title: Re: apple style sleep mode
Post by: Spoonman on March 08, 2009, 12:22:59 PM
sorry about the bad quote, what i meant was "the faster resume that linuxstb mentioned"...

i will give this a try with a usb thumbdrive tomorrow and report the results.

thanx by the while
Title: Re: apple style sleep mode
Post by: Yotto on March 08, 2009, 12:52:20 PM
Another test that I thought of, actually power down your iPod when it's in the original firmware, and then power it back on into the original firmware, and see if your car resumes play as if the iPod was never turned off.

If this happens, then your theory is shot and your car has a special iPod feature.
If this does not happen, then your theory is more likely correct.