add mpd with pipewire
This commit is contained in:
83
sound/mpd_pipewire.md
Normal file
83
sound/mpd_pipewire.md
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
---
|
||||||
|
title: "mpd"
|
||||||
|
tags: [ "sound", "pipewire" ]
|
||||||
|
requirements: [ "pipewire" ]
|
||||||
|
---
|
||||||
|
# Setup
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
This is a minimum configuration file for /etc/mpd.conf
|
||||||
|
|
||||||
|
> music_directory "/var/lib/mpd/music"
|
||||||
|
>
|
||||||
|
> playlist_directory "/var/lib/mpd/playlists"
|
||||||
|
>
|
||||||
|
> db_file "/var/lib/mpd/mpd.db"
|
||||||
|
>
|
||||||
|
>
|
||||||
|
> pid_file "/run/mpd/mpd.pid"
|
||||||
|
>
|
||||||
|
> state_file "/var/lib/mpd/mpdstate"
|
||||||
|
>
|
||||||
|
>
|
||||||
|
> user "mpd"
|
||||||
|
>
|
||||||
|
> audio_output {
|
||||||
|
> type "pulse"
|
||||||
|
> name "My Pulse Output"
|
||||||
|
> }
|
||||||
|
>
|
||||||
|
|
||||||
|
## Set Pulseaudio to Run System-Wide
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo mkdir -p /etc/pipewire/pipewire-pulse.conf.d
|
||||||
|
|
||||||
|
cat > /etc/pipewire/pipewire-pulse.conf.d/pulse-server.conf << "EOF"
|
||||||
|
pulse.properties = {
|
||||||
|
server.address = [
|
||||||
|
"unix:native"
|
||||||
|
"tcp:4713" # IPv4 and IPv6 on all addresses
|
||||||
|
]
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
Give `mpd` access to pulse:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
grep pulse /etc/group | cut -d: -f1
|
||||||
|
|
||||||
|
grep pulse /etc/group | cut -d: -f1 | while read g; do
|
||||||
|
sudo usermod -aG $g mpd
|
||||||
|
done
|
||||||
|
```
|
||||||
|
|
||||||
|
Working with mpd will be easier if you have access to its files, so maybe:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo usermod -aG mpd $USER
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember to reboot.
|
||||||
|
|
||||||
|
# Troubleshooting
|
||||||
|
|
||||||
|
Check pulse is working.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
ss | grep 4713
|
||||||
|
```
|
||||||
|
|
||||||
|
# Notifications (AUR)
|
||||||
|
|
||||||
|
Install `mpd-notification` and then start the service:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
systemctl --user enable mpd-notification
|
||||||
|
```
|
||||||
|
|
||||||
12
sound/pipewire.md
Normal file
12
sound/pipewire.md
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: "pipewire"
|
||||||
|
tags: [ "sound" ]
|
||||||
|
---
|
||||||
|
|
||||||
|
Install `wireplumber` and `pipewire`, then add your user to any `pipewire` group.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo ln -s /usr/share/examples/pipewire/20-pipewire-pulse.conf /etc/pipewire/pipewire.conf.d/20-pipewire-pulse.conf
|
||||||
|
|
||||||
|
sudo ln -s /usr/share/examples/wireplumber/10-wireplumber.conf /etc/pipewire/pipewire.conf.d/10-wireplumber.conf
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user