Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Questions about the Rockbox Simulator USB insertion simulation

Re: Questions about the Rockbox Simulator USB insertion simulation

From: pouly amaury <amaury.pouly_at_gmail.com>
Date: Sat, 6 Feb 2010 14:11:03 +0100

Hello,
I'm been working on a usb driver for the simulator and as fair as I can
tell, USB is not implemented at all on the simulator. Which means that on
usb insertion (simulated by 'u'), some things happens, but not really on the
one that would happen on a real device.
If you want to test, you can look at my patch (FS#10916). Even if you don't
have the linux driver, perhaps the usb insertion chain is similar enough to
a real device to make your autobookmarking thing work. But there's no
warranty.

In a more general way, I don't recommend you to experiment with simulator
and usb because rockbox what not designed to have usb under simulator. You
should experiment with a real device.

Amaury Pouly


2010/2/4 Alex Bennee <kernel-hacker_at_bennee.com>

> Hi,
>
> One thing I'd like to change about Rockbox is to enable auto
> bookmarking on USB insertion. This is to mitigate the problems
> with resuming playlists that get confused when files get removed (for
> example podcasts being deleted on sync as they have been played, see
> FS#1064).
>
> I experimented with adding the autobookmark function to the USB
> insertion code in the wps display but I wasn't able to trigger this
> properly from within the simulator. The best I could manage was
> triggering the creation of the bookmark on the second "U" keypress, as
> far as the display was concerned the USB being unplugged.
>
> Digging into the code there seems to be a difference in the way the
> simulator simulates USB insertion and what would happen on the real
> event. Whereas the real USB insertion sends a message to all event
> queues and awaits acknowledgement from each thread the simulator just
> sends the event to a single button_queue.
>
> So my questions:
>
> * Should the simulator code attempt to replicate the real HW call sequence?
>
> This could be by sending a message to all threads or send a message
> to the USB thread (if it exists in simulator) to then send message
> on.
>
> * Does the event queue/wake up semantics of Rockbox OS behave the same
> way on the simulator platform?
>
> Cheers,
>
> --
> Alex, homepage: http://www.bennee.com/~alex/<http://www.bennee.com/%7Ealex/>
> http://www.half-llama.co.uk
>
Received on 2010-02-06

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy