![]() |
Why is pulseaudio crippled on the n900?
PulseAudio is used for the audio system/mixing/routing on the n900.
Compared to other solutions for mixing/routing, PA is quite CPU heavy. The n900 is a beast of a machine, so this isn't as much of an issue, but I have to wonder why for the life of me I cannot get PulseAudio's "killer app" working. I'm speaking of course of network-transparency, the ability to route audio in PulseAudio over a TCP connection. I've spent many hours banging my head against the device trying to find a way to get pulseaudio-native-tcp working, but to no avail. Is this intentional? Is there a reason why I shouldn't be able route audio to the n900 from other hosts on my LAN? The module appears to be included, and the config even appears to attempt to load it, but I can't even connect from 127.0.0.1 Getting TCP PulseAudio streams working would also provide a path to get sound working from inside of chroot's like qole's Without network transparency, what good is PulseAudio? I would be happy to part with a few cpu cycles to gain this added flexibility, but in it's current state the use of PulseAudio on the n900 feels wasteful. Has anyone made any headway on this? |
Re: Why is pulseaudio crippled on the n900?
I don't have a device to try this out on, but I'd like to see this too. Pulseaudio's ability to route audio over the network hasn't felt all that useful on my desktop, but it would be perfect for a mobile phone. Hopefully we can find a way to do this.
|
Re: Why is pulseaudio crippled on the n900?
Did you file a bug report?
|
Re: Why is pulseaudio crippled on the n900?
That's dissapointing, this is one of the things I wanted to try with pulseaudio on the N900. :(
Hopefully a community fix or an official fix will come for this (and I have to choose a distribution that actually implemented pulseaudio correctly.. ie: not Ubuntu). |
Re: Why is pulseaudio crippled on the n900?
The wiki on
http://wiki.maemo.org/Documentation/...ain#PulseAudio advertises PA's network-transparency, so at least it doesn't seem to be a well-known restriction. Either it's intentional and wasn't yet communicated, or it's a bug (which you please must report, describing exactly what you did to get it working) - or it's just something you forgot when you tried. I don't know much about PA other than the few buzzwords floating around. My main computer is a gentoo box and doesn't have PA installed (yet?). My laptop runs Ubuntu with PA, and I did notice how easy it was to switch audio output to a A2DP headset. Now if this works with the N900... and works across devices in my network... what could I do? Like, in theory, could I answer a call on my laptop when the phone rings in the other room? With a command line script I could run via SSH to make the phone part of the N900 answer the call and re-route everything sound related to my Ubuntu laptop. Would that be possible, given PA does really work without restrictions on the N900? Or am I getting too excited here? ;) |
Re: Why is pulseaudio crippled on the n900?
Well you probably couldn't answer the N900 while on the laptop unless you had some SSH or VNC connection setup to the SSH to remote control it. But what PulseAudio's networking lets you do is pipe the audio to whereever you want.
E.g. if you wanted to play whatever sound that was coming from the N900 (music, podcast, and ideally a phone call) you could direct it over to your desktop's speakers or laptop's speakers). Not sure how it works with input sources but I believe it could be the same (if it is you could use say your headset or laptop's microphone instead of the N900's microphone). |
Re: Why is pulseaudio crippled on the n900?
Quote:
Funny idea, actually. Not really useful, I'm afraid, but funny. |
Re: Why is pulseaudio crippled on the n900?
Likewise you can think of it the other way around.
Imagine using the N900 as an additional speaker. You could put your PC speakers to your side and the N900 behind you. =P |
Re: Why is pulseaudio crippled on the n900?
I had to install the package pulseaudio-module-extra in order to have pulseaudio-native-tcp actually loaded.
Alas, I still can't connect from/to other machines as the connection is always terminated prematurely. Local connections to the N900 itself over tcp DO work however (tested with paplay and pactl). Maybe some part is implemented in a non-standard way. Needs some more looking into. |
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
Quote:
Tried copying all the pulseaudio modules to Debian, and even mounting every possible pulse-related directory, without any success whatsoever. The chroot client simply gets unceremoniously disconnected. I wish go1dfish would file the bug, so at least we can get Nokia to tell us if it is WORKSFORME or actually valid. |
Re: Why is pulseaudio crippled on the n900?
I was able to get TCP-streaming to work in the scratchbox, though I've yet to try on the device itself.
It seems that on my computer, pulse audio 0.9.15 is unable to stream to newer versions of itself. On Ubuntu, I have 0.9.19, so I compiled that version inside of scratchbox, set it up, and then everything worked like a charm. Hopefully this helps someone. :-) |
Re: Why is pulseaudio crippled on the n900?
Well, tcp streaming works.
N900: Code:
load-module module-native-protocol-tcp auth-anonymous=1 port=6000 listen=192.168.1.5 Code:
export PULSE_SERVER=192.168.1.5:6000 (incredibly loud* piano) Anything else? :) * EDIT: WARNING This seems to bypass the volume control, so don't use headphones to try. media.role is "x-maemo" so I don't know why it bypasses system volume. mplayer's own volume control (which actually sets PulseAudio's stream properties) works. |
Re: Why is pulseaudio crippled on the n900?
Test it the other way around? Then test what we can do (for example, what happens when someone calls you).
What about the FM Transmitter. Can you do that + use the FM transmitter? |
Re: Why is pulseaudio crippled on the n900?
Quote:
N900: Code:
export PULSE_SERVER=192.168.1.3 EDIT: module-rtp-recv & module-rtp-send work; with them I can hear both the fmradio, media player AND phone calls, but audio is very choppy. |
Re: Why is pulseaudio crippled on the n900?
I am not able to redirect fmradio; a connection is made to my server but all I get is silence and n900-fmrx-enabler using 100% CPU.
Pycage might be able to explain that though. EDIT Ah, I see that FMRadio opens two streams on my server. I guess it's just feed backing whatever is recorded in hw:0 to hw:0 , and thus is just replaying my own sounds back to me. This explains the high CPU+network usage. Actually, if it were to record from hw:1 it would find my desktop's fm tuner there :) |
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
I am trying to use javispedro's technique to connect pulseaudio clients in the chroot to the Maemo pulseaudio server.
Some stuff I'm seeing: - The /usr/bin/pulseaudio binary is marked as executable for root only, yet executing it as root generates all sorts of warnings. How should I be doing this? - I replaced the tcp module line in the /etc/pulse/default.pa file with javispedro's line (using 127.0.0.1 as the IP address, keeping port 6000), rebooted, and then tried the "export PULSE_SERVER=127.0.0.1:6000" line in the chroot. Still getting "connection refused" from the clients... EDIT: I needed to install the extra modules. Now I'm getting a different error in the chroot, "connection terminated". |
Re: Why is pulseaudio crippled on the n900?
off topic but question is there a way to use camera buttons to control audio when phone is locked. Example playing music without headphones and screen goes black. 2 minutes go by and you quickly wanted to turn down the volume for whatever reason. Is this possible? Thanks in advance.
|
Re: Why is pulseaudio crippled on the n900?
Interesting.
I tried the interactive method suggested by javispedro: - gain root Code:
stop pulseaudio Code:
E: client-ext.c: client-ext.c: Can't obtain command line EDIT: can confirm that it happens with 0.9.21 as well. |
Re: Why is pulseaudio crippled on the n900?
Quote:
Quote:
EDIT (sorry, missed a post). So, did you try copying the maemo PA client libraries to the chroot? Though lenny amd64's are working here. :P |
Re: Why is pulseaudio crippled on the n900?
OK, very interesting news. I noticed that I was actually using the squeeze version of pulseaudio in the chroot, version 0.9.21 instead of 0.9.10.
So I started with a fresh image (no pulseaudio installed) and disabled all the squeeze and sid repositories, and then installed the lenny version (0.9.10) of pulseaudio. I then closed the chroot and reopened it (so that /var/run/pulse would get mounted from Maemo correctly) and set the PULSE_SERVER variable like so: Code:
PULSE_SERVER=unix:/var/run/pulse/native Woot! Pulseaudio in the chroot connects to Maemo! I can see all of the devices and server information! A quick test of Code:
mplayer -ao pulse musicfile.mp3 So the secret is to use version 0.9.10 not 0.9.21 because something gets broken in the protocol between 0.9.15 (Maemo version) and 0.9.21 (Debian Squeeze version)... |
Re: Why is pulseaudio crippled on the n900?
Hi qole,
Does the latest image include pulseaudio 0.9.10? If not, will it be included in the next image? If I already have the squeeze version installed, is there an easy way to back out to 0.9.10? Keep up the good work! |
Re: Why is pulseaudio crippled on the n900?
is there a way to change the server of pulseaudio?
In Ubuntu thanks to papref It's really easy:but a i cant find how to do it in command line! If we find this it ll be so easy to stream the desktop to the phone! |
Re: Why is pulseaudio crippled on the n900?
It looks as though pr1.5 is using pulseaudio 0.9.15 which is still unable to communicate with 0.9.21.
0.9.15 is in lenny-backports so I'll see if I can get sound out of the chroot when I have time. I don't know if it is interesting but I tried installing mpd in the chroot and could get sound out by selecting alsa output on hw:0,0 but there was no way for me to control the volume through mpd or maemo. |
Re: Why is pulseaudio crippled on the n900?
Quote:
http://mpd.wikia.com/wiki/Alsa I found it earlier as I was looking for something else alsa volume related. I've been playing with gstreamer and the alsa plugins in maemo and suffering from from very low volume on the hw devices :( |
Re: Why is pulseaudio crippled on the n900?
Please excuse me if the following question doesnt make sense.
Is it possible to setup PA so that mediaplayer/mplayer streams audio via head-phone jack, but the Phone app sends audio out over bluetooth. The usecase is for an N900 connected to a Sat Nav (like TomTom) via bluetooth.With the above scenario all the phone calls will be routed to the SatNav, however all the music will be played through 3.5mm jack connected to the car stereo. |
Re: Why is pulseaudio crippled on the n900?
i've found a better way to get to pulseaudio cli.
First edit /etc/pulse/system.pa add a following line at the end: load-module module-cli-protocol-unix socket=/tmp/pulsecli and restart pulseaudio (or phone). That will create /tmp/pulsecli linux socket you can connect to it using socat: socat stdin /tmp/pulsecli and you have pulseaudio cli. There is another way (less safe) where you can open a port and telnet to it. All you have to do is to uncomment last line in the file mentioned above. That is less safe for obvious reason, that anyone on local network can connect to this port without authentication unless you specify some iptables rules. |
Re: Why is pulseaudio crippled on the n900?
1 Attachment(s)
pulse audio manager works consistently for me on the highest version of the easy debian pulse libraries. i have a very vague memory of it not working the first time i tried it, so i did:
sudo /etc/init.d/pulseaudio start from within easy debian, and it seems to have worked ever since. i ran the mplayer command qole gave above and it worked fine. as i said, this is all with the most recent version of everything in easy debian. edit: also i didnt need to set any environment variables within easy debian edit: also i don't have to run that command everytime, it's like when you run it once it sorts out it's configuration and remembers it. as a result i think i've been living in blissful ignorance that others have been having easy debian audio 'issues' |
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
I wanted to use my second N900 as a mpd streaming client in the kitchen.
Well, I faced the same issues as described before, looks like the native pulseaudio network protocol on maemo 5 and f.e. Fedora 16 is not compatible. Luckily there's another network sound protocol: esd. Here's how it works: On the n900: Code:
- Install the pulseaudio-module-extra package. Code:
audio_output { |
Re: Why is pulseaudio crippled on the n900?
Ok, here's an explanation of the protocol format incompatibility:
http://www.mail-archive.com/pulseaud.../msg09900.html Proposed fix for the N900 -> remote server audio direction: http://lists.freedesktop.org/archive...ne/010256.html Let's see if we can "downgrade" the protocol version on the N900 in the /usr/lib/pulse-0.9.15/modules/module-native-protocol-tcp.so binary without recompilation :D |
Re: Why is pulseaudio crippled on the n900?
Ok, this dirty hack does the trick on the PA "client" side:
Code:
diff -u -r -p pulseaudio-0.9.22/configure.ac pulseaudio.faked/configure.ac |
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
Quote:
|
Re: Why is pulseaudio crippled on the n900?
Here is merge request for cssu pulseaudio: https://gitorious.org/community-ssu/...rge_requests/1
|
All times are GMT. The time now is 06:54. |
vBulletin® Version 3.8.8