Active Topics

 


Reply
Thread Tools
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#1
Hello,

i've been experimenting with 'heavy' games and emulators - things that need all the speed they can get to run acceptably. Dosbox, psx4all.

The pulseaudio utils provide a program called "pasuspender" which should bypass pulse and give the called application access to the RX51 alsa pcm device, but I never got sound with it.

By killing and removing /usr/bin/pulseaudio, and specifying proper device (alsa.conf, .asoundrc or command-line), programs (aplay, mplayer) can output to RX51 alsa device (any frequency), causing almost no cpu load --- However the sound is burbly and messy from any SDL app that outputs to alsa.

If anyone else wants to experiment with this stuff, here's a test case with instructions (README.MAEMO5). It appears that the maemo5 libsdl / libsdlmixer has some problem with the alsa backend, and i'm stuck now.

This thread is for development discussion and experimentation on the issue. Please keep discussion on-topic, download the attachment, and help me out.


EDIT3: To whomever updated pulseaudio-utils today...

THANK YOU!!!!!!!!!!!!!!!!!!

Code:
pasuspender -- mplayer -ao alsa:device=hw=0.0  MyDocs/48k.wav

Last edited by ArnimS; 2009-12-20 at 21:55. Reason: never good enough the first time
 

The Following 8 Users Say Thank You to ArnimS For This Useful Post:
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#2
Nice!

Of special interest is also "pulseaudio-module-extra" package which contains the Pulseaudio CLI and TCP modules.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#3
I would like to use pulseaudio in my Debian chroot, or maybe, if I can't get that working, use the pasuspender to use alsa instead.

Is there any way to let my audio clients in the chroot know about the pulseaudio server in Maemo? The chroot pulseaudio tools don't "see" the Maemo server, and so I'd like to know where the config files for pulseaudio are. Is the Maemo pulseaudio server crippled in some way? Or is it started in an odd way to keep non-Maemo apps from seeing the server and using it?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 31 | Thanked: 11 times | Joined on Sep 2009
#4
Originally Posted by qole View Post
Is there any way to let my audio clients in the chroot know about the pulseaudio server in Maemo? The chroot pulseaudio tools don't "see" the Maemo server, and so I'd like to know where the config files for pulseaudio are. Is the Maemo pulseaudio server crippled in some way? Or is it started in an odd way to keep non-Maemo apps from seeing the server and using it?
I've started to do some experiments with this and haven't gotten it to work yet. I was able to enable TCP mode on the maemo side, but apps on the debian side got "connection terminated" and I haven't figured out why yet. I think it is some other policy thing.

Check out the files in /etc/pulse/ especially xpolicy for some hints. I'll of course let you know if I figure it out.
 

The Following User Says Thank You to awwaiid For This Useful Post:
Posts: 237 | Thanked: 157 times | Joined on Dec 2009 @ San Diego, CA
#5
Originally Posted by awwaiid View Post
I've started to do some experiments with this and haven't gotten it to work yet. I was able to enable TCP mode on the maemo side, but apps on the debian side got "connection terminated" and I haven't figured out why yet. I think it is some other policy thing.

Check out the files in /etc/pulse/ especially xpolicy for some hints. I'll of course let you know if I figure it out.
I banged my head against this for hours a few days back and had the same result, the port doesn't seem to open at all as far as I can tell. I'd also like to get this working for the same reasons as qole (audio from chroot), but being able to stream audio to/from my other desktops would also be very nice. I have another thread open here that may be a better place to continue to the pulseaudio/tcp discussion: http://talk.maemo.org/showthread.php...ght=pulseaudio

Thanks to ArnimS again for the pasuspender tip, I can at least get some sound out of my chroot now.
 

The Following User Says Thank You to go1dfish For This Useful Post:
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#6
well im bummed

sdl audio just refuses to play nice with raw device

aplay 48k works fine though

[EDIT]

Tried to stop other things that might be interrupting...
killall -SIGSTOP pulseaudio
killall -SIGSTOP tonegend
killall -SIGSTOP that maemo-x-input-sounds
killall -SIGSTOP browserd
killall -SIGSTOP mediaplayer
(didn't seem to help, but hey fun times - resume with -SIGCONT)

Some interesting alsa things

cat /usr/share/policy/etc/current/alsaped.conf

cat /proc/asound/RX51/pcm0p/sub0/hw_params

-------- (while playing dosbox SDL at 48k)
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 512
buffer_size: 1024

-------- (while playing mplayer output at 48k)
access: RW_INTERLEAVED
format: S16_LE
subformat: STD
channels: 2
rate: 48000 (48000/1)
period_size: 500
buffer_size: 24000

hmmm! hmmmmm!

[edit]
what sdl calls 'buffer' size, alsa sees as 'period' size. setting sdl_buffer/alsa_period to 511 results in alsa buffer of 1022. setting to 513 results in 512/1024...

and this seems to be a subject of some activity (!)
http://lists.libsdl.org/pipermail/sv...er/002120.html
http://lists.libsdl.org/pipermail/sv...er/002121.html


EDIT
----
if you just want mplayer output without pulseaudio, use
Code:
pasuspender -- mplayer -ao alsa:device=hw=0.0

Last edited by ArnimS; 2010-01-28 at 21:20.
 
ArnimS's Avatar
Posts: 1,107 | Thanked: 720 times | Joined on Mar 2007 @ Germany
#7
Sorry to bring up a 'dead' thread but i just resurrected my n900 system board with alcohol and oven-baking.

Looking at making an mp3 player that doesn't need pulseaudio for speaker protection. Goal is filter out low frequences before decoding.

I performed some experiments to determine lowest usable musical frequencies

sox -r 22050 -n output.wav synth 30 sine 150-300

This gave a 30 second sinewave sweep from 150hz to 300hz. Played straight to speakers (no speaker protection), the output becomes audible around 200hz.

I leave this here for those may want to test and confirm this on their own. Drop me a note if you think the cutoff for a mp3 player should be something besides 200hz.
__________________
find . -name \*.mp3 -exec mplayer -quiet -shuffle "{}" +
das ist your media player, and yuu vill like it
 

The Following User Says Thank You to ArnimS For This Useful Post:
Reply

Tags
alsa, pulseaudio, rx51, tlv320dac33


 
Forum Jump


All times are GMT. The time now is 07:30.