-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d4828c
commit 3d37434
Showing
1 changed file
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
//////////////////////////////////////////////////////////// | ||
|
||
GENERIC CONFIGURATION AND TEST | ||
|
||
//////////////////////////////////////////////////////////// | ||
|
||
# Compile TRX | ||
|
||
sudo apt-get -y install libopus-dev | ||
|
||
wget https://github.com/moode-player/moode/tree/develop/other/trx/trx-0.4.tar.gz | ||
sudo tar xfz ./trx-0.4.tar.gz | ||
cd trx-0.4 | ||
sudo make | ||
sudo make install | ||
cd .. | ||
sudo rm -rf trx-0.4* | ||
|
||
//////////////////////////////////////////////////////////// | ||
|
||
# /etc/alsa/conf.d/multiroom.conf | ||
|
||
pcm.multiroom { | ||
type plug | ||
slave.pcm { | ||
type dmix | ||
ipc_key 2867 | ||
slave { | ||
pcm "hw:Loopback,0,0" | ||
rate 48000 | ||
format S16_LE | ||
channels 2 | ||
#period_size 1024 | ||
#buffer_size 8192 | ||
} | ||
} | ||
} | ||
pcm.loop_cap { | ||
type plug | ||
slave { | ||
pcm "hw:Loopback,1,0" | ||
} | ||
} | ||
pcm.loop_play { | ||
type plug | ||
slave { | ||
pcm "hw:Loopback,0,0" | ||
} | ||
} | ||
|
||
//////////////////////////////////////////////////////////// | ||
|
||
# Start alsaloop on the sending host | ||
|
||
sudo modprobe snd-aloop | ||
sudo alsaloop -t 50000 -C loop_cap -P hw:0 & | ||
|
||
# Terminate alsaloop | ||
|
||
sudo killall alsaloop | ||
sudo modprobe -r snd-aloop | ||
|
||
//////////////////////////////////////////////////////////// | ||
|
||
# Start playback into pcm.multiroom | ||
|
||
speaker-test -D multiroom -F S16_LE -r 48000 -c 2 > /dev/null 2>&1 & | ||
|
||
//////////////////////////////////////////////////////////// | ||
|
||
# Sending host (rp3) | ||
|
||
sudo tx -v 2 -d loop_play -h rp4 | ||
|
||
# Receiving host (rp4) | ||
|
||
sudo rx -v 2 -d hw:0 | ||
|
||
//////////////////////////////////////////////////////////// |