Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A role for the roc sink module for pulseaudio. #35

Merged
merged 1 commit into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'