/reverb

Android PulseAudio remote using libpulse

Primary LanguageJavaGNU General Public License v2.0GPL-2.0

Reverb aims to be a fully functional remote control for remote Pulseaudio servers (hint: think pavucontrol, on your phone!) using libpulse itself.

Please note: I am simply sharing this, I had nothing to do with the development of this application and I cannot help you debug it

Steps to control audio on Linux desktop from Android:

Note: This works for me on Android 8.1.0 but I have not personally tested on newer versions

  1. Download the reverb.apk from the Releases page here: https://github.com/andyforceno/reverb/releases/download/v0.5-alpha/Reverb.apk, install it on your Android phone, and run it. In the app, set the default server to the IP address of your pulseaudio server (probably your desktop PC) using the settings toggle in the upper right

  2. On your Pulseaudio server, open /etc/pulse/default.pa in a text editor and add the following: load-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=127.0.0.1;<Put your Android phone's IP address here>

  3. Restart pulseaudio via systemctl or service

  4. Optional: To confirm module is loaded: execute pacmd on command line and then enter list-modules at the pulseaudio command prompt OR install/run command paman for a graphical interface

  5. Start Reverb on your phone again, it should connect to the default server you set previously.

  6. You should see volume controls in Reverb now! Check syslog for errors from pulseaudio if you do not

This worked perfectly for me. Technically, it is not secure. You will see warnings in syslog about this. I am not overly concerned about this on my local network, but a more secure solution would be ideal, eventually. This would require that the Android application sends an authorization cookie file to the Pulseaudio server, which it currently does not do.

The rest of the original Readme file follows below:

A Screenshot

Build Requirements

  • Jake Wharton's ActionBarSherlock libraries, v4.1.0
  • libpulse-android (head of master)
  • Possibly android support libraries, v4

Building

You should just be able to add an android project from existing source, with directory this directory. If this doesn't work, please contact me and we can work on fleshing out these build directions. Be sure that the necessary projects are mentioned as libraries in Eclipse's project properties.

If you've built the project without Eclipse (i.e., using maven), and would like to provide build instructions, get in contact with me!

Running

You'll need a few things. First and foremost this involves a computer presently rocking the Pulseaudio sound server. If you're using a modern Linux distribution, this probably means you! If not, and you don't know, you don't. So, you're missing out on a lot of cool functionality! You should look into it.

Now's the critical step: You need to have your Pulseaudio server set up to allow connections from remote computers. I think it's possible to do this with a program called "paman," or by at some point calling

  load-module module-native-protocol-tcp

with pacmd or in a Pulseaudio commands file (e.g. default.pa). There's presently no way to manage authentication with a cookie file, so you'll probably want to add IP-based authorization, or add the

  auth-anonymous=1

option to the tail end of that load-module command. There's a page in the user documentation on this, called "network setup" or similar.

For a more robust set of instructions, visit the PulseAudio Network Documentation, specifically the section "Direct Connection."