maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   WIP: USB audio output - N900 as an "audiophile" portable music player (https://talk.maemo.org/showthread.php?t=83270)

Estel 2012-03-27 19:19

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by joerg_rw (Post 1184780)
It should be simple to make PA use sth different than hw:0,0 for audio card playback, however that's possibly not what you actually want. It would redirect *everything* to the new audiocard

It seems that trying to do so makes device reboot instantly - yet, it wasn't my test (as it don't own external sound card compatible with Linux). Could someone who performed those tests write with details what was done, and how results were looking? I'm quite sure, that - in case of user-error in configuring PA - gurus like joerg_rw could be able to help.

for beginning, even redirecting *whole* sound to another card would be good (doing it and going back to default could be automated by scripts). Unfortunately, AIUI, it was *not* achievable for reasons unknown, up to date.

/Estel

retsaw 2012-03-27 19:51

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by Estel (Post 1184441)
b) kernel related issue (userland things shouldn't be able to crash device like that, right?)

It could be userland if the userland process somehow triggers the lifeguard reset, it might be worth putting the device into R&D mode and disabling the lifegaurd reset to test this. It certainly wouldn't surprise me if the Nokia developers tied the audio system into the lifeguard process.

joerg_rw 2012-03-27 20:08

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
obviously to start pulseaudio you need a valid config.
When your config has a non-existing ALSA audio card, then quite probably PA will quit and get respawned by dsme until dsme thinks it's enough and reboots system.

Have you checked the usual places for reboot reason (/proc/bootreason, var/lib/dsme/stats/ dsme error logs, syslog)?

I still think you don't want to redirect standard PA audio output. Rather you should find a way to run your mediaplayer with a very private unique PA that uses USB ALSA audiocard.
Alas I'm not a PA expert, as I hate this soundsystem and the concept it follows.

/j

fpp 2012-03-27 20:11

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by Estel (Post 1184430)
Thanks for Your incredibly detailed introduction, fpp. My 2 cents, if You don't mind:

Thanks Estel.

About the N900 as a recorder : yes, that would be another great use case for the USB-audio hack. This is exactly what motivated Oblomow's experiments which got the ball rolling...

About not using hardware acceleration (I guess you mean the DSP ?) for decoding : yes, Oblomow also reported high CPU usage in his mplayer test, and I think it was the same in my MOC test. I'm not clear about the reason for that though : is it because we're bypassing pulseaudio ? Or put otherwise, if we could use the standard Maemo media player with the USB output, would it be using the DSP ? Or is some totally different software needed ?

About Easy Debian : I haven't really used this on the N900, so the question may be stupid... but will h-e-n and USB host still work for apps running under Debian ?

fpp 2012-03-27 20:18

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by sulu (Post 1184436)
Some time I played a bit with MOC and afaik the shortcut keys can be assigned freely. I read somewhere that the N900's volume keys produce some Fx keycodes. If that's true binding them to MOC shouldn't be a problem.

Yes, the keys are like F6/F7 or similar.
The problem might be that MOC runs in the console, and xterm itself handles the volume keys as zoom in/zoom out, so I don't know if if a console app would actually "see" them as keystrokes ?

fpp 2012-03-27 20:22

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by Estel (Post 1184441)
That's why I suggested trying with Easy Debian's pulseaudio. Would do it myself, yet, unfortunately, I don't have USB DAC (I suppose that Creative Audigy 2ZS Video Editor = external USB 24 bit sound card/TV card combo with plentora of inputs and outputs doesn't count, as it, supposedly, lacks proper linux kernel modules...).

Have you given it a quick try ? If it behaves like an USB sound card then it *is* an USB DAC and should work for plain sound output, even if it lacks drivers for the other functions (like video and TV)...

fpp 2012-03-27 20:24

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by joerg_rw (Post 1184780)
some details you might find useful:

Thanks for dropping by joerg, and many thanks for all the pointers, huge time-saver !

joerg_rw 2012-03-27 21:12

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by fpp (Post 1184821)
...
I'm not clear about the reason for that though : is it because we're bypassing pulseaudio ? Or put otherwise, if we could use the standard Maemo media player with the USB output, would it be using the DSP ? Or is some totally different software needed ?

AIUI there's a PA /gstreamer plugin that does the mp3 decoding in DSP for mafw. madiaplayer just delegates the whole mp3 file to mafw to play it.
I dunno if this special plugin directly routes to DA-converter aka soundcard, or this is done the standard way of gstreamer plugin chains where this DSP plugin would stream the plain PCM (aka "wav") audio data to next plugin. IF the latter, then you of course could change the properties of (or the whole) sink plugin.

Quote:

Originally Posted by fpp (Post 1184821)
...
About Easy Debian : I haven't really used this on the N900, so the question may be stupid... but will h-e-n and USB host still work for apps running under Debian ?

Should, as long as you map /proc and /sys and /dev into the changeroot

/j

kirillkk 2012-03-28 15:41

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by fpp (Post 1184826)
Yes, the keys are like F6/F7 or similar.
The problem might be that MOC runs in the console, and xterm itself handles the volume keys as zoom in/zoom out, so I don't know if if a console app would actually "see" them as keystrokes ?

Yes, the normal way to handle HW keys in MOC would be to modify xterm. Terminal apps rely on terminal to deliver keypresses. We may try other terminal emulators and see how do they handle volume keys. I'll take a look into osso-xterm source to see if we can configure HW key interpretation.

EDIT: Volume keys are directly bound to term resize, they are not configurable.

sulu 2012-03-28 15:54

Re: WIP: USB audio output - N900 as an "audiophile" portable music player
 
Quote:

Originally Posted by fpp (Post 1184821)
About Easy Debian : I haven't really used this on the N900, so the question may be stupid... but will h-e-n and USB host still work for apps running under Debian ?

Yes, they do.


All times are GMT. The time now is 12:17.

vBulletin® Version 3.8.8