Discussion:
[pulseaudio-discuss] Porting pulseaudio to Android
Vikram Gupta
2011-07-06 11:09:25 UTC
Permalink
Hi,

I have been using pulse audio on Ubuntu to remote my sound to a network
Windows-7 machine. Now I am trying to port pulse audio to Android. Looking
at the dependencies, I think, I will have to port a lot of libraries before
I can start compiling pulse audio code. Also the default configure option
brings in a lot of things which are not available on android by default. I
have used a few options (like --disable-x11 etc) to remove the optional
support, but still a lot of libs are required on android. Has anybody tried
porting pulseaudio to Android, or can help (with a web link maybe) getting
me started.

Thanks,
Vikram
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110706/51db586e/attachment.htm>
Colin Guthrie
2011-07-06 12:16:11 UTC
Permalink
Post by Vikram Gupta
Hi,
I have been using pulse audio on Ubuntu to remote my sound to a network
Windows-7 machine. Now I am trying to port pulse audio to Android.
Looking at the dependencies, I think, I will have to port a lot of
libraries before I can start compiling pulse audio code. Also the
default configure option brings in a lot of things which are not
available on android by default. I have used a few options (like
--disable-x11 etc) to remove the optional support, but still a lot of
libs are required on android. Has anybody tried porting pulseaudio to
Android, or can help (with a web link maybe) getting me started.
I'm not sure how many people have tried this before.

A lot of the various bits and bobs are indeed optional, although highly
desirable. e.g. dbus is needed for bluetooth support, but then I really
don't know how the bluetooth stack on android works - it could be a far
cry from the bluez stuff used on desktops.

But certainly initally, I'd disable dbus, bluez, consolekit etc. and
really cut things down to a bare minimum, so you can check to make sure
the basics work well enough before going crazy on the optional stuff.

If there is anything in particular lib wise that you think is a problem?
If so just shout and we can maybe advise as to how really useful it is!

Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
Vikram Gupta
2011-07-06 14:04:20 UTC
Permalink
Thanks Colin for the quick reply.

After referring to your instructions from
HERE<http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/>(Thanks
for the nice explanation :) ), and giving the below mentioned args
to configure, I have compiled the source code and its working fine with the
compiled "paplay".

*../configure --prefix=$(pwd) --disable-x11 --disable-samplerate
--disable-oss-output --disable-oss-wrapper --disable-coreaudio-output
--disable-solaris --disable-jack --disable-openssl --disable-nls
--disable-waveout --disable-glib2 --disable-gtk2 --disable-gconf
--disable-avahi --disable-asyncns --disable-tcpwrap --disable-lirc
--disable-hal --disable-udev --disable-bluez --disable-dbus
--disable-hal-compat --disable-ipv6 --disable-manpages
--disable-default-build-tests

export PULSE_SERVER=<ip>
*
however, when I am playing some thing using default "aplay", the sound is
played locally and not on the remote machine. I think that should be because
of some configuration issue and I am looking in to it.
My question is, do we have some doc which can give a list of files that are
essential for pulse audio to work (without any optional components), which I
can directly use in my Android Makefile or will I have to look for the
compilation logs to figure that out?

Thanks,
Vikram
Post by Colin Guthrie
Post by Vikram Gupta
Hi,
I have been using pulse audio on Ubuntu to remote my sound to a network
Windows-7 machine. Now I am trying to port pulse audio to Android.
Looking at the dependencies, I think, I will have to port a lot of
libraries before I can start compiling pulse audio code. Also the
default configure option brings in a lot of things which are not
available on android by default. I have used a few options (like
--disable-x11 etc) to remove the optional support, but still a lot of
libs are required on android. Has anybody tried porting pulseaudio to
Android, or can help (with a web link maybe) getting me started.
I'm not sure how many people have tried this before.
A lot of the various bits and bobs are indeed optional, although highly
desirable. e.g. dbus is needed for bluetooth support, but then I really
don't know how the bluetooth stack on android works - it could be a far
cry from the bluez stuff used on desktops.
But certainly initally, I'd disable dbus, bluez, consolekit etc. and
really cut things down to a bare minimum, so you can check to make sure
the basics work well enough before going crazy on the optional stuff.
If there is anything in particular lib wise that you think is a problem?
If so just shout and we can maybe advise as to how really useful it is!
Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/
Tribalogic Limited [http://www.tribalogic.net/]
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110706/f4653c65/attachment.html>
Colin Guthrie
2011-07-06 14:29:51 UTC
Permalink
Post by Vikram Gupta
Thanks Colin for the quick reply.
No problem. As a small request, if possible can you post in plain text
and try not to top post. It's generally easier for people to follow
threads when replies are contextually interwoven into the appropriate
bits of messages and keeping a consistent style (plain!) is much nicer
for those of use who have to read 100s of mails from multiple projects
every day! Some mail clients can be a pain to configure this way, but if
you can, we'd appreciate it :)

Anyway, on with the reply...
Post by Vikram Gupta
After referring to your instructions from HERE
<http://colin.guthr.ie/2010/09/compiling-and-running-pulseaudio-from-git/>
(Thanks for the nice explanation :) ), and giving the below mentioned
args to configure, I have compiled the source code and its working fine
with the compiled "paplay".
/../configure --prefix=$(pwd) --disable-x11 --disable-samplerate
--disable-oss-output --disable-oss-wrapper --disable-coreaudio-output
--disable-solaris --disable-jack --disable-openssl --disable-nls
--disable-waveout --disable-glib2 --disable-gtk2 --disable-gconf
--disable-avahi --disable-asyncns --disable-tcpwrap --disable-lirc
--disable-hal --disable-udev --disable-bluez --disable-dbus
--disable-hal-compat --disable-ipv6 --disable-manpages
--disable-default-build-tests
export PULSE_SERVER=<ip>
Nice work :) Glad the instructions were useful. I'll port them across to
a good Wiki at some point when we clear the decks and get a release out....
Post by Vikram Gupta
however, when I am playing some thing using default "aplay", the sound
is played locally and not on the remote machine. I think that should be
because of some configuration issue and I am looking in to it.
OK so aplay is an alsa utility. For native alsa applications to work
with pulseaudio we provide a plugin for alsa that allows it to talk to
PA. This plugin is shipped in the alsa-plugins package from
http://www.alsa-project.org/

You have to configure your alsa plugin as the "default" PCM and Control
devices for things to work.

The PerfectSetup page on the wiki outlines how to do this manually (most
distros will do this for you but you're obviously working at a low level!)

http://pulseaudio.org/wiki/PerfectSetup
Post by Vikram Gupta
My question is, do we have some doc which can give a list of files that
are essential for pulse audio to work (without any optional components),
which I can directly use in my Android Makefile or will I have to look
for the compilation logs to figure that out?
I'm afraid I do not know of such a document (other than the PerfectSetup
link above), but if you care to write about it and blog about it, I'll
happily add any PA-related tag on your blog to a new "Pulseaudio Planet"
RSS aggregator I'm working on.

Also, feel free to create a Wiki page instead that details the steps
you've taken.

All user contributions are most welcome, whether it's in code, testing,
promotion/support or documentation in it's many forms!

As most native Android apps do not use libasound (from what I'm told by
those who actually know about Android!) this config will likely not work
for the vast majority of android apps.

Some sort of audioflinger integration would be needed to make it work
seamlessly for all 'droid apps I guess.


Cheers

Col
--
Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
Mageia Contributor [http://www.mageia.org/]
PulseAudio Hacker [http://www.pulseaudio.org/]
Trac Hacker [http://trac.edgewall.org/]
Spidey / Claudio
2011-07-07 04:39:56 UTC
Permalink
May I ask what you wish to accomplish with PA on Android? I've worked
with Android, and I can only think of an Android PA configured as an
output sink, receiving data from other processes or over the network.
Or is it possible to reconfigure the Android Sound Stack to use PA as
the audio backend?
Vikram Gupta
2011-07-08 08:28:12 UTC
Permalink
Post by Spidey / Claudio
May I ask what you wish to accomplish with PA on Android? I've worked
with Android, and I can only think of an Android PA configured as an
output sink, receiving data from other processes or over the network.
Or is it possible to reconfigure the Android Sound Stack to use PA as
the audio backend?
I am trying to run Android on windows using some thing like Colinux (
www.colinux.org).
There is no support for Audio in it, but people are using pulse-audio to
remote sound stream to a network machine.
Once I have the required libraries, I will modify the Android sound stack
to use PA. I don't know of any direct
interface to plug PA in to Android sound stack, but I can fiddle with the
Android code to get it done.

Thanks,
Vikram
Post by Spidey / Claudio
_______________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20110708/a3710bb3/attachment.html>
Loading...