Skip to content

Commit

Permalink
Merge pull request #35 from tomodachi/roc-streaming
Browse files Browse the repository at this point in the history
A role for the roc sink module for pulseaudio.
  • Loading branch information
tomodachi authored Sep 10, 2023
2 parents ef0f2a3 + 1634a6d commit 275519a
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ by default in anonymous mode allowing anyone on your network to stream to your d

__optional variables:__
extsoundcard=true # route audio to external soundcard

## roc-streaming
Installs the roc sink modules for pulseaudio allowing streaming audio from
any pulseaudio/pipewire sound server giving a apple air-share like streaming experience
for Linux users (only better) see /roles/roc-streaming/README.MD for more details.
Currently limited to raspberrypi OS 11 (debian old stable) as the roc modules are compiled
towards that target

## steamlink-pi
Installs steamlink along with PS3 controller (wireless) support
Expand Down
21 changes: 21 additions & 0 deletions roles/roc-streaming/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
configuring the sender to stream to the roc-sink

on your workstation (sender)
~/.config/pipewire/pipewire.conf.d/pipewire.conf

context.modules = [
{ name = libpipewire-module-roc-sink
args = {
fec.code = rs8m
remote.ip = ip-of-device-with-roc-sink
remote.source.port = 10001
remote.repair.port = 10002
sink.name = "Roc Sink livingroom"
sink.props = {
node.name = "roc-sink-livingroom"
}
}
}
]

and restart pipewire and you should see a new output ready to receive audio
Binary file not shown.
Binary file added roles/roc-streaming/files/module-roc-sink.so
Binary file not shown.
42 changes: 42 additions & 0 deletions roles/roc-streaming/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# Todo: don't hard code pipewire version the modules
# are compiled for ARM64 debian oldstable (deb 11)

- name: Enable auto login on tty for media user (required for pulseaudio to work)
ansible.builtin.include_role:
name: autottylogin

- name: Copy pipewire ROC modules
ansible.builtin.copy:
src: files/{{ item }}
dest: /usr/lib/pulse-14.2/modules/
owner: root
group: root
mode: '0644'
loop:
- module-roc-sink-input.so
- module-roc-sink.so

- name: Install pulseaudio
ansible.builtin.apt:
name: pulseaudio
state: present
install_recommends: false

- name: Load pipewire ROC module
ansible.builtin.lineinfile:
path: /etc/pulse/default.pa
line: "load-module module-roc-sink-input sink_input_properties=media.name=roc-receiver"
state: present
owner: root
group: root
mode: '0644'

- name: Load play ROC audio on HDMI
ansible.builtin.lineinfile:
path: /etc/pulse/default.pa
line: "move-sink-input 0 1"
state: present
owner: root
group: root
mode: '0644'

0 comments on commit 275519a

Please sign in to comment.