Raspberry Pi: Difference between revisions
No edit summary |
|||
| Line 1: | Line 1: | ||
__FORCETOC__ | |||
= Sound = | = Sound = | ||
| Line 7: | Line 7: | ||
List sound devices: <pre>cat /proc/asound/cards</pre> | List sound devices: <pre>cat /proc/asound/cards</pre> | ||
Change volume | Change volume, select USB sound card with F6, caution: the sound blaster can be very loud on your headphones. <pre>alsamixer</pre> | ||
Save volume: <pre>sudo alsactl store</pre> | Save volume: <pre>sudo alsactl store</pre> | ||
| Line 26: | Line 26: | ||
export DISPLAY=:0 | export DISPLAY=:0 | ||
export `dbus-launch | grep ADDRESS` | export `dbus-launch | grep ADDRESS` | ||
jackd -P70 -t3000 -dalsa -dhw:U0x41e0x30d3 -r44100 -p1024 -n3 -s | |||
</pre> | </pre> | ||
==Send Audio to the Raspberry Pi over LAN== | |||
This assumes that you are running jackd (check section above). | |||
<pre> | |||
sudo apt-get update | |||
sudo apt-get install jacktrip | |||
</pre> | |||
Check out the [https://ccrma.stanford.edu/groups/soundwire/software/jacktrip/ jacktrip] documentation. | |||
Make sure, jackd on your computer has the same settings as defined on the raspberry (ie the settings you just put in the above bash script). | |||
On your computer, start jacktrip as server (don't forget to start jackd first, if it's not running already.):<pre>jacktrip -s</pre> | |||
Start jacktrip on the raspberry pi (exchange YOUR_SERVER_IP_HERE with your IP, doh!):<pre>jacktrip -c YOUR_SERVER_IP_HERE</pre> | |||
Revision as of 19:49, 26 July 2014
Sound
Get a cheap USB soundcard: "Creative Sound Blaster"
List sound devices:
cat /proc/asound/cards
Change volume, select USB sound card with F6, caution: the sound blaster can be very loud on your headphones.
alsamixer
Save volume:
sudo alsactl store
Play wav file on external device:
aplay -D plughw:1,0 test.wav
JACK Audio Connection Kit
"Who is Jack, and what is it that Jack does?"
On a headless raspberry pi (assuming raspian distro), we need a trick to start jack WITHOUT an X session like so.
Make sure to replace U0x41e0x30d3 with your device name, that you get via the above mentioned command to list devices.
Also you might want to change the other parameters (sample rate, frames, ...)
#!/bin/bash export DISPLAY=:0 export `dbus-launch | grep ADDRESS` jackd -P70 -t3000 -dalsa -dhw:U0x41e0x30d3 -r44100 -p1024 -n3 -s
Send Audio to the Raspberry Pi over LAN
This assumes that you are running jackd (check section above).
sudo apt-get update sudo apt-get install jacktrip
Check out the jacktrip documentation.
Make sure, jackd on your computer has the same settings as defined on the raspberry (ie the settings you just put in the above bash script).
On your computer, start jacktrip as server (don't forget to start jackd first, if it's not running already.):
jacktrip -s
Start jacktrip on the raspberry pi (exchange YOUR_SERVER_IP_HERE with your IP, doh!):
jacktrip -c YOUR_SERVER_IP_HERE