Rockbox Development > Feature Ideas

Passive Last.FM tracking in USB-MS mode

(1/1)

Vchat20:
To give an idea of where I am coming from: There are some devices out there capable of using the player as a mass storage device and play music off it directly through that device. But not many of these can do Last.FM tracking. One particular device in question, and it piqued this idea, is the Sync system in current Ford vehicles.

The idea I had was to have the player do some sort of passive tracking while in usb/mass storage mode. I'm pretty sure many targets (at least those that allow rockbox to control the usb controller) are set up where rockbox is running and processing while in 'usb connected' mode. So with that said, IF there was some possible way to ID the host in rockbox (Any kind of noted USB data to do this?) to track what is being played on the host device probably via the state of how much of the file has been transferred to the host. With the limited resources on embedded devices I'm fairly sure they do a sort of streaming method where small chunks of the file are read as the file plays. So once the usb transfer thread gets about halfway through the file it would trigger the last.fm tracking to mark it as a listen. So in theory this would allow non-last.fm tracking host devices to still be tracked properly through rockbox in its client mode.

Thoughts?

gevaerts:

--- Quote from: Vchat20 on October 26, 2009, 01:12:59 PM ---So with that said, IF there was some possible way to ID the host in rockbox (Any kind of noted USB data to do this?) to track what is being played on the host device probably via the state of how much of the file has been transferred to the host.

--- End quote ---

Neither of those are possible. You can't know which host is connected, and you have no idea which file is being played. MSC exposes a device at the block device level, not at the filesystem level.

Vchat20:
Bummer. That's what I was afraid of. I'm gonna take a stab in the dark and guess that if, by some chance, someone introduced MTP support into rockbox it would be more capable of doing something like this?

In the existing MSC setup would it be possible to have code on the player monitor which particular sector/block of the storage device is being read and use the filesystem driver to correlate that to a file? Although this would not cover the issue of ID'ing what host is connected and would probably be messy at best unless there was like an extra menu option to enable/disable the feature or maybe an extra HID mode where a button could toggle the feature off and on while it is connected (theory is that devices you want to use this tracking feature on won't be supporting any HID functions so you could drop that mode for the time being and allow a toggle button to enable/disable tracking).

Navigation

[0] Message Index

Go to full version