maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Porting rockbox to n900 (https://talk.maemo.org/showthread.php?t=66896)

thomasjfox 2010-12-11 19:11

Porting rockbox to n900
 
1 Attachment(s)
Hello,

I'm currently porting rockbox to the n900 as I wanted a decent player which can browse the music by filenames -or- id3 tag.

Also it supports gapless playback and crossfades and is very configurable to one's liking.

Rockbox can be compiled as an application using SDL. Out of the box it's horrible slow/unusable.
(There was a previous effort on the forum in 2009).

Here's what's already working/improved:
- Proper blitting for the lcd framebuffer
- Use libosso to suspend the screen update if the display is off (saves 30% CPU time)
- ARM assembler optimizations for decoding
- Fix up/down keys for German keyboard layout
- Ignore /dev, /proc and /sys in database scan
so we don't run into an endless loop

Open issues:
- Proper packaging (I'm a .rpm guy... hmm)
- Figure out all touchscreen "gestures" in rockbox
- Theme for 800x480
- Create a dedicated n900 / maemo target in rockbox
and get rid of all the dirty configure/Makefile hacks.

Besides that it's pretty usable already.

Anyone wants to help with packaging?

Wiki page (including download instructions):
http://wiki.maemo.org/Rockbox

Cheers,
Thomas

thomasjfox 2010-12-17 23:30

Re: Porting rockbox to n900
 
Status update:
- Implemented gstreamer audio backend. Reduced CPU time by 25%
- Detect external volume changes f.e. via the buttons and adapt rockbox's internal volume to it
- Switch off display updates if rockbox loses input focus (-> run in background)

Next on the list:
- Audio output if phone is in silent mode
- Battery monitoring

Thanks to Tim-Philipp Müller for helping me with the gstreamer backend.

cincibluer6 2010-12-17 23:54

Re: Porting rockbox to n900
 
Can't wait for this. Wish I was more up on developing so I could help.
Keep up the good work though.

darklegion 2010-12-23 12:23

Re: Porting rockbox to n900
 
Quote:

Originally Posted by cincibluer6 (Post 899100)
Can't wait for this. Wish I was more up on developing so I could help.
Keep up the good work though.

+1

Rockbox is up there amongst the best players on ANY platform, let alone the portable devices it runs on.

petur 2010-12-23 13:13

Re: Porting rockbox to n900
 
Thomas,

I am a rockbox developer (although not active at the moment), and I would like to see your work merged into the rockbox repository.

Please feel free to join us at #rockbox on freenode and submit patches to our tracker.

We already have an initiative going for converting Rockbox to an app, better known as RaaA, and this is working on Android already.

Thanks for your work so far! I will try it out as soon as I find time.

thomasjfox 2010-12-23 14:26

Re: Porting rockbox to n900
 
Quote:

Originally Posted by petur (Post 902802)
We already have an initiative going for converting Rockbox to an app, better known as RaaA, and this is working on Android already.

Thanks for your work so far! I will try it out as soon as I find time.

Hehe, I talked to kugel from #rockbox yesterday. The code is "finished" including battery monitoring and playback handling on incoming calls. I already use it daily :)

I am now going to polish the "final" code and will
split it up for the tracker. My plan was to write a port announcement to the mailinglist the next days.

Just give me some more days and it will all be upstream.

Cheers,
Thomas

petur 2010-12-23 14:27

Re: Porting rockbox to n900
 
Goodie!
Just shows how active I am these days, didn't even spot your activity there.....

I look forward to also use it every day :)

thomasjfox 2010-12-25 17:07

Re: Porting rockbox to n900
 
Hi,

Just a quick note: The maemo port now has a git repository:

http://repo.or.cz/w/maemo-rb.git/

This also brings a dedicated "maemo" application target and cleaner code as before.

I even think we can get this up and running for maemo v4 devices... at least I prepared the code for this target, too :)

Enjoy,
Thomas

Drekkie 2010-12-30 19:47

Re: Porting rockbox to n900
 
+1. The shelving of Instictiv really killed my hopes of getting gapless playback on the n900. Having installed rockbox on an old sansa, I can't wait to see how this port goes. Thanks for doing it.

thomasjfox 2010-12-31 13:35

Re: Porting rockbox to n900
 
Hi,

here's a "technical preview" of rockbox on the n900:
http://maemo.org/packages/view/rockbox/

There's also a n8xx package, it works on my n900
though I have no idea how good it runs on the real hardware.

Complete source code is in the git repository.
(I'm waiting on my garage account at the moment, I'll replace
the links once garage built packages are available)

Release notes:
- The application runs fullscreen. To exit, press CTRL+BACKSPACE
on the n900 to activate the task switcher and then close it.

- No volume bars in the cabbie theme yet. Volume is controlled
by the up/down buttons and does not affect the global volume.

- CPU usage goes down if the app is not in focus (=in the background)
or the display is switched off.

- The audio backend on the n8xx still uses SDL.


Welcome to gapless playback, EQ, crossfade and many other cool features on maemo!

Have a good New Year,
Thomas

GuitarGuru 2010-12-31 14:06

Re: Porting rockbox to n900
 
Great work!
Tried the attached .deb file, and this player has potential.
I would like it to be a little more finger friendly though.
Also the ability to show album art, would be much welcome.
Is there a chance you could get it to search a specific folder/folders when setting up the database, because now it crashed after searching entire memory, including every game folder for supported files...
Will follow this port gladly!

thomasjfox 2010-12-31 14:15

Re: Porting rockbox to n900
 
Quote:

Originally Posted by GuitarGuru (Post 908365)
I would like it to be a little more finger friendly though.
Also the ability to show album art, would be much
welcome.

Definately :)
Quote:

Originally Posted by GuitarGuru (Post 908365)
Is there a chance you could get it to search a specific folder/folders when setting up the database, because now it crashed after searching entire memory, including every game folder for supported files...

Well, it's not supposed to crash on database updates. I didn't upload the -dbg package yet, need to wait for my garage account.

You can set the start folder for the "Files" entry in "/home/user/.config/rockbox.org/config.cnf" by adjusting this: "start directory: /home/user/music/".

If it repeatly crashes on the database stuff, you can delete the broken database files in ""/home/user/.config/rockbox.org/" too.

thomasjfox 2010-12-31 14:22

Re: Porting rockbox to n900
 
Quote:

Originally Posted by GuitarGuru (Post 908365)
Is there a chance you could get it to search a specific folder/folders when setting up the database, because now it crashed after searching entire memory

Ok, I just tried rebuilding my database from scratch. The crash is related to this build, it was working before...

Thomas

jstokes 2010-12-31 14:38

Re: Porting rockbox to n900
 
Hi,

Quote:

Originally Posted by thomasjfox (Post 908344)
There's also a n8xx package, it works on my n900
though I have no idea how good it runs on the real hardware:
http://simonv.com/rockbox/n8xx-rockb...emo0_armel.deb

Playing a song and messing with the bass works brilliantly on the N800. However, trying to use the database feature crashes Rockbox with: "*PANIC*[\n]Stkov: tagcache". Thanks for your hard work!

Happy new year to you, too

fpp 2010-12-31 14:38

Re: Porting rockbox to n900
 
Great, this could revive my N8x0 tablets ! Will give the preview a spin when I get home...

thomasjfox 2010-12-31 15:06

Re: Porting rockbox to n900
 
Quote:

Originally Posted by jstokes (Post 908385)
Playing a song and messing with the bass works brilliantly on the N800. However, trying to use the database feature crashes Rockbox with: "*PANIC*[\n]Stkov: tagcache". Thanks for your hard work!

Happy new year to you, too

Ok, I've uploaded a new build which doesn't crash on database initialization anymore. It will run about 10% slower as it doesn't use native ARM threads (which run out of stack and then crash).

Download:
http://maemo.org/packages/view/rockbox/

hellnick 2010-12-31 15:47

Re: Porting rockbox to n900
 
So where should I send my firstborn? Thank you so much for this.

Rockbox on my N900!

Happy New Year!

CasTTeLLo 2010-12-31 15:54

Re: Porting rockbox to n900
 
thanks...working great so far...

Drekkie 2010-12-31 16:49

Re: Porting rockbox to n900
 
GAPLESS IS HERE!!!

I can't thank you enough for this. I can finally listen to mixes as they are meant to be heard.

I'm using n900 build 3.7.2 and it seems to be running fine so far.

Would also like to second the request for better support for using fingers in menu navigation. I had a hard time selecting menu items with my finger even after recalibrating the app. The stylus works much more precisely but I prefer to never have to use it when out and about (might drop it in a subway track :) ) .

a small price to pay on the first release though. lol

Thanks again and happy new year!

fpp 2010-12-31 17:52

Re: Porting rockbox to n900
 
I'm not very familiar with Rockbox, especially in its recent versions and the new RaaA incarnation, so maybe the question is very stupid... but just in case :

Is it conceivable that RaaA could support some sort of API (through USB, Bluetooth or whatever) for remote control by an external device ? At least for basic functions like next-track and volume up/down ?

The main reason I'm still clinging to my antique iRiver H340 is that it has a (proprietary) remote. For most uses (public transportation, bike riding, skiing etc.) it stays safely tucked away with only the remote sticking out.

I'd love to repurpose my N800 as an MP3 workhorse but I'd be lost without a remote of some sort, just like the modern tactile offerings from Cowon, iRiver et al.

hellnick 2010-12-31 18:37

Re: Porting rockbox to n900
 
You have an iRiver and you haven't Rockboxed it? The two go together beautifully, and your remote will still work.

fpp 2010-12-31 19:24

Re: Porting rockbox to n900
 
Last time I looked (admittedly a good while ago) remote support was not complete... need to check again, thanks for the heads-up !

hellnick 2010-12-31 20:56

Re: Porting rockbox to n900
 
I had an H120 years ago (girlfriend dropped it in the bath - still miss it) and the sound quality of that combined with Rockbox was stunning.

Just checked here - it says that status for the H3X0 remote is Done (h100 remote only so far) so not so sure now. I've got my old H120 remote somewhere - happily stick it in the post if it'll work and you want it.

Drekkie 2010-12-31 22:07

Re: Porting rockbox to n900
 
found an issue with the rockbox database. It's starting to duplicate tracks and play each of the duplicates sequentially. for example, if this is what was in the database originally:

01 track name A
02 track name B

...the next time I opened the player it looked like this:

01 track name A
01 track name A
02 track name B
02 track name B

...and it will keep duplicating (i think) for each time the player is open. I tried initializing the database again but it didn't fix the issue (haven't tried anything else yet).

So it plays gaplessly, just the same tracks repeatedly. ;)

Anyone else experience this behavior?

joppu 2010-12-31 22:23

Re: Porting rockbox to n900
 
I might as well design a skin which is a copy of Fremantle media player. The theme "code" (more like script or style sheet) seemed pretty straight forward.

hellnick 2011-01-01 11:43

Re: Porting rockbox to n900
 
I'm not sure what I've done to it but Rockbox just launches with a Database is not ready message. I've reinstalled but get the same result.

Is there a config file hidden somewhere that I need to delete?

thomasjfox 2011-01-01 12:02

Re: Porting rockbox to n900
 
Quote:

Originally Posted by hellnick (Post 908914)
Is there a config file hidden somewhere that I need to delete?

Try $(HOME)/.config/rockbox.org/database*

I'm currently looking into the database entry duplication issue.

geneven 2011-01-01 12:16

Re: Porting rockbox to n900
 
I mostly only play mp3s from The Economist that come out weekly, and I couldn't even see them from Rockbox. They are in home/user/MyDocs/.documents. How do I go into .documents from Rockbox?

thomasjfox 2011-01-01 13:09

Re: Porting rockbox to n900
 
Quote:

Originally Posted by geneven (Post 908938)
I mostly only play mp3s from The Economist that come out weekly, and I couldn't even see them from Rockbox. They are in home/user/MyDocs/.documents. How do I go into .documents from Rockbox?

Try to create a symlink to the directory, that should work.

n900newb 2011-01-01 15:54

Re: Porting rockbox to n900
 
Any possibility to integrate Last.fm scrobbling?

thomasjfox 2011-01-01 17:00

Re: Porting rockbox to n900
 
Quote:

Originally Posted by n900newb (Post 909078)
Any possibility to integrate Last.fm scrobbling?

Rockbox already supports that:
http://www.rockbox.org/wiki/LastFMLog

I've quickly tested the feature, it's currently broken as the log file is not properly written on shutdown.

I'll start a KNOWN_ISSUES file to track this and fix it in the future.

fpp 2011-01-01 17:08

Re: Porting rockbox to n900
 
Quote:

Originally Posted by hellnick (Post 908607)
I had an H120 years ago (girlfriend dropped it in the bath - still miss it) and the sound quality of that combined with Rockbox was stunning.

All the H-somethings I've tried had really great sound, even with the stock firmware. Note sure if and how Rockbox makes it even better ?

Quote:

Just checked here - it says that status for the H3X0 remote is Done (h100 remote only so far) so not so sure now.
That's cool. I've never even seen an actual H300 remote, don't think they were ever available in Europe. Everybody seemed to use H100 remotes which are perfectly compatible. So it makes sense that Rockbox went for that first, and means I need to give it a try...

Quote:

I've got my old H120 remote somewhere - happily stick it in the post if it'll work and you want it.
That's a pretty generous offer from you there, thanks for that! However, I depend so much on that H340 I spent a small fortune on in 2004, that I since bought two other cheap, used units (an H320 and an H140) as spares, just to be safe. Both came with H100 remotes, so it would take some really extreme circumstances for me to take you up on that :)

cy8aer 2011-01-01 19:51

Re: Porting rockbox to n900
 
just a question: What power button is defined for this emulator? "Return" or "+" do not work. Or: what is the default way to quit rockbox in this emulation?

hellnick 2011-01-01 21:31

Re: Porting rockbox to n900
 
Quote:

Originally Posted by fpp (Post 909129)
All the H-somethings I've tried had really great sound, even with the stock firmware. Note sure if and how Rockbox makes it even better ?

:)

Well FLAC support is pretty good, but I did treat myself to a pair of Shure E4s when I changed the firmware to Rockbox so that's probably a pretty major factor.

thomasjfox 2011-01-01 21:38

Re: Porting rockbox to n900
 
Quote:

Originally Posted by cy8aer (Post 909210)
just a question: What power button is defined for this emulator? "Return" or "+" do not work. Or: what is the default way to quit rockbox in this emulation?

Press CTRL+BACKSPACE to bring up the task switcher and then click on X.

The button mappings need some work, especially for the plugins.

thomasjfox 2011-01-01 22:30

Re: Porting rockbox to n900
 
A new rockbox build is up!

Changelog:
  • Fix duplicate database entries
  • Initial rockbox plugin support
    • Small tools in the context menu
    • mikmod (.mod, .s3m, .xm etc) support
    • Credits screen

You have to delete your existing database in $(HOME)/.config/rockbox.org/database* to clean up the duplicated entries.

Download:
http://maemo.org/packages/view/rockbox/

Drekkie 2011-01-02 01:46

Re: Porting rockbox to n900
 
just wanted to confirm that the duplicate database entry issue is indeed fixed.

any ideas on further minimizing the CPU utilization in the future? I had it paused in the background for a few hours today and noticed in BatteryGraph that it was still using roughly 50% CPU (compared to the CPU normally being < 5% for me when idle), so I wonder if there is anything more that could be tweaked.

man, this app has really completed my n900.

ejasmudar 2011-01-02 02:53

Re: Porting rockbox to n900
 
Can anybody please post some screenshots, for those of us on the fence about installing this?

hellnick 2011-01-02 03:25

Re: Porting rockbox to n900
 
Quote:

Originally Posted by ejasmudar (Post 909476)
Can anybody please post some screenshots, for those of us on the fence about installing this?

Well,looks aren't everything, but here's a couple basic screenshots. Take a look at Rockbox.org for an idea of how skinable it is (very) - while there you can read up on some of the features that make people love it so much.

[IMG]http://i.imgur.com/PQych.png[/IMG]

[IMG]http://i.imgur.com/J3GYs.png[/IMG]

Fresh Prince of Nowhere 2011-01-02 07:17

Re: Porting rockbox to n900
 
This looks very promising. It runs very smooth so far. After Instinctiv was canceled I thought I would be stuck with the default media player. This just brought new life to my N900!


All times are GMT. The time now is 02:55.

vBulletin® Version 3.8.8