maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Why is pulseaudio crippled on the n900? (https://talk.maemo.org/showthread.php?t=36936)

qole 2010-02-06 19:19

Re: Why is pulseaudio crippled on the n900?
 
Interesting.

I tried the interactive method suggested by javispedro:
- gain root
Code:

stop pulseaudio
pulseaudio --system --high-priority -C
load-module module-native-protocol-tcp auth-anonymous=1 port=6000 listen=127.0.0.1

and now I can see the error messages when my chroot client tries to connect:

Code:

E: client-ext.c: client-ext.c: Can't obtain command line
E: protocol-native.c: protocol error, kicking client

So what's the protocol error? Something incompatible between Maemo version of PA and the one I have installed in my chroot (purposely installed only 0.9.10 from lenny, should I try 0.9.21 from squeeze)?

EDIT: can confirm that it happens with 0.9.21 as well.

javispedro 2010-02-06 23:29

Re: Why is pulseaudio crippled on the n900?
 
Quote:

Originally Posted by qole (Post 513375)
- 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 get a load of warnings too -- I wouldn't exactly call the pulseaudio daemon "quiet". It generates loads of warnings on my desktop too.
Quote:

Originally Posted by qole (Post 513375)
- 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...

Can't you get to the CLI? Just boot it with "pulseaudio -C" and press intro a few times (so that it echoes the prompt). It may help you see why connections are being rejected. Also see if all parameters (including auth_anonymous=1) were parsed.


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

qole 2010-02-07 22:20

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
(I stole the syntax from my Ubuntu box) and then I ran "paman".

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
works as expected! Volume levels are correct and everything!

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)...

aechelon 2010-02-12 06:45

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!

opax 2010-10-30 17:05

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!

fuminori 2011-01-03 18:40

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.

mr id 2011-01-03 18:56

Re: Why is pulseaudio crippled on the n900?
 
Quote:

Originally Posted by fuminori (Post 910807)
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.

Apologies if this is just noise but is this link of any interest to you - alsa / mpd volume related?
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 :(

rajil.s 2011-01-03 19:47

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.

Bananusm 2011-03-13 00:50

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.

leetnoob 2011-03-13 05:15

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'


All times are GMT. The time now is 06:49.

vBulletin® Version 3.8.8