I have a laptop and a raspberry pi connected to a soundsystem via the jack output. I'd like to have the output of the soundcard of my laptop redirected to the raspberry through my local network. I read things about mplayer daemon or icecast protocol but I don't really know how to make it work.
Asked
Active
Viewed 1,132 times
3
-
How did you manage to make Pi's jack work as input? I thought it is output only: http://raspberrypi.stackexchange.com/questions/1536/how-can-i-record-audio-using-a-microphone – Boris Burkov Jun 22 '13 at 15:35
-
Yes it's output only. In fact I want to stream the sound through my local network (via ethernet) – Elie Génard Jun 22 '13 at 15:50
1 Answers
3
You can try using pulseaudio sound server daemon in the raspberry pi and configuring pulseaudio client with the internal network ip of the server in the configuration.
For example if you are using Debian and raspbian.
In raspbian:
echo "snd_bcm2835" > /etc/modules /* load the sound module \*/
apt-get install pulseaudio pulseaudio-module-zeroconf avahi-daemon /* install pulseaudio and avahi */
in /etc/default/pulseaudio change PULSEAUDIO_SYSTEM_START to 1
Now configure pulseaudio for work over the network, in /etc/pulse/system.pa add these lines. Change to suite your network if needed:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/16
load-module module-zeroconf-publish
Reboot your raspberry pi
In your Linux desktop will appear as an output device.
You can also use pulseaudio client command for send only some application sound or similar like this:
#!/bin/bash
export PULSE_SINK=tunnel.raspberrypi.local.alsa_output.0.analog-stereo
export PULSE_SOURCE=tunnel.raspberrypi.local.alsa_output.0.analog-stereo.monitor
/usr/bin/application