You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-24Lines changed: 15 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# mpd-alsa-docker
2
2
3
-
A Docker image for mpd with support for both Alsa (`alsa`) and PulseAudio (`pulse`).
3
+
A Docker image for mpd with support for both Alsa and PulseAudio.
4
4
It also includes `mpdscribble`. In alternative, you can use [mpd-scrobbler-docker](https://github.com/GioF71/mpd-scrobbler-docker) as the scrobbler for this image.
5
5
User mode is now possible when using `alsa` outputs, and of course it is mandatory (enforced) when using `pulse` outputs.
6
6
Upsampling (even in integer mode) is now available via a patched version of MPD (upstream version available as well).
@@ -54,14 +54,18 @@ Getting the image from DockerHub is as simple as typing:
54
54
55
55
## Usage
56
56
57
+
### Important changes
58
+
59
+
Starting with release `2023-02-04`, you will not be able to use the deprecated `PULSE` as `OUTPUT_MODE`. Refer to the next chapter for more information about how to change the configuration.
60
+
In case of difficulties, you can fall back to any image before `2023-02-04`, as those will still work with this deprecated configuration.
61
+
57
62
### What is about to change
58
63
59
64
If you have been using this container image for a while, you might have seen that the output might contain some warnings, telling you that you are using a `deprecated` configuration. The message usually tries to suggest how to switch to a `recommended` configuration.
60
65
This is happening because this whole project started with the idea of supporting ALSA only (hence the name `mpd-alsa-docker`). Down the road, I added PulseAudio support, and eventually HTTPD outputs, SHOUTCAST outputs, also in multiple instances.
61
66
So now a few variables have a misleading name: the most misleading being `ALSA_DEVICE_NAME` which, despite the name, refers to the output name, and not to the device name.
62
67
So currently, `OUTPUT_MODE` still defaults to `ALSA` for compatibility and will yield the creation of a ALSA *main* player, but the default for this variable will eventually become `NONE` (no *main* player). At the end of the process, the variable `OUTPUT_MODE` will completely disappear.
63
-
You can still use `OUTPUT_MODE` set to `PULSE`, which creates a PulseAudio *main* output.
64
-
In both cases, I suggest you change the configuration as suggested, and use the variables from the appropriate sections below for [Alsa](https://github.com/GioF71/mpd-alsa-docker#alsa-additional-outputs) and [PulseAudio](https://github.com/GioF71/mpd-alsa-docker#pulseaudio-additional-outputs), otherwise, in time, your configurations will not be functional anymore.
68
+
In any case, I suggest you change the configuration as suggested, and use the variables from the appropriate sections below for [Alsa](https://github.com/GioF71/mpd-alsa-docker#alsa-additional-outputs) and [PulseAudio](https://github.com/GioF71/mpd-alsa-docker#pulseaudio-additional-outputs), otherwise, in time, your configurations will not be functional anymore.
65
69
Feel free to contact me with an issue if you need support. I cannot guarantee a timing, but I will try to help if I can.
66
70
67
71
### User mode
@@ -105,13 +109,13 @@ DATABASE_MODE|Can be `simple` (default) or `proxy`
105
109
DATABASE_PROXY_HOST|MPD server hostname, only used when `DATABASE_MODE` is set to `proxy`
106
110
DATABASE_PROXY_PORT|MPD server port, only used when `DATABASE_MODE` is set to `proxy`
107
111
MUSIC_DIRECTORY|Location of music files, defaults to `/music`
108
-
OUTPUT_MODE|Output mode, can be `alsa` (still default but **deprecated**, you should use `ALSA_OUTPUT_CREATE` set to `yes`), `pulse` (**deprecated**, you should use `PULSE_AUDIO_OUTPUT_CREATE` set to `yes`), `null` or `none`. For `pulse` mode, running in `user` mode is required. Note that `none` does not create any output, leaving the task to the variables dedicated to additional outputs
112
+
OUTPUT_MODE|Output mode, can be `alsa` (still default but **deprecated**, you should use `ALSA_OUTPUT_CREATE` set to `yes`), `null` or `none`.
109
113
MPD_BIND_ADDRESS|The MPD listen address, defaults to `0.0.0.0`
110
114
MPD_PORT|The MPD port, defaults to `6600`
111
-
USER_MODE|Set to `Y` or `YES` for user mode. Case insensitive. See [User mode](#user-mode). Enforced when `OUTPUT_MODE` is set to `pulse` (**deprecated** value) or when `PULSE_AUDIO_OUTPUT_CREATE` is set to `yes`
112
-
PUID|User id. Defaults to `1000`. The user/group will be created for `pulse` mode regardless of the `USER_MODE` variable.
113
-
PGID|Group id. Defaults to `1000`. The user/group will be created for `pulse` mode regardless of the `USER_MODE` variable.
114
-
AUDIO_GID|`audio` group id from the host machine. Mandatory for `alsa` output in user mode. See [User mode](#user-mode).
115
+
USER_MODE|Set to `Y` or `YES` for user mode. Case insensitive. See [User mode](#user-mode). Required when using any PulseAudio outputs (so when `PULSE_AUDIO_OUTPUT_CREATE` is set to `yes`)
116
+
PUID|User id. Defaults to `1000`. The user/group will be created when a PulseAudio output is created regardless of the `USER_MODE` variable.
117
+
PGID|Group id. Defaults to `1000`. The user/group will be created when a PulseAudio output is created regardless of the `USER_MODE` variable.
118
+
AUDIO_GID|`audio` group id from the host machine. Mandatory for `alsa` output in user mode. See [User mode](https://github.com/GioF71/mpd-alsa-docker/blob/main/doc/user-mode.md).
115
119
INPUT_CACHE_SIZE|Sets the input cache size. Example value: `1 GB`
116
120
NULL_OUTPUT_NAME|Name of the `null` output
117
121
NULL_OUTPUT_SYNC|Sync mode for the `null` output, can be `yes` (default) or `no`
@@ -120,7 +124,7 @@ MPD_ENABLE_LOGGING|Defaults to `yes`, set to `no` to disable
120
124
MPD_LOG_LEVEL|Can be `default` or `verbose`
121
125
ZEROCONF_ENABLED|Set to `yes` to enable. Disabled by default.
122
126
ZEROCONF_NAME|Set zeroconf name, used only if `ZEROCONF_ENABLED` is set to `yes`
123
-
HYBRID_DSD_ENABLED|Hybrid dsd is enabled by default, set to `no` to disable. Disabled when using Pulse mode.
127
+
HYBRID_DSD_ENABLED|Hybrid dsd is enabled by default, set to `no` to disable. Disabled when at least one PulseAudio output is created.
124
128
MAX_OUTPUT_BUFFER_SIZE|The maximum size of the output buffer to a client (maximum response size). Default is 8192 (8 MiB). Value in KBytes.
125
129
AUDIO_BUFFER_SIZE|Adjust the size of the internal audio buffer. Default is `4 MB` (4 MiB).
126
130
MAX_ADDITIONAL_OUTPUTS_BY_TYPE|The maximum number of outputs by type, defaults to `20`
@@ -151,21 +155,7 @@ THESYCON_DSD_WORKAROUND|If enabled, enables a workaround for a bug in Thesycon U
151
155
ALSA_ALLOWED_FORMATS_PRESET|Alternative to `ALSA_ALLOWED_FORMATS`. Possible values: `8x`, `4x`, `2x`, `8x-nodsd`, `4x-nodsd`, `2x-nodsd`
152
156
INTEGER_UPSAMPLING|If one or more `ALSA_ALLOWED_FORMATS` are set and `INTEGER_UPSAMPLING` is set to `yes`, the formats which are evenly divided by the source sample rate are preferred. The `ALSA_ALLOWED_FORMATS` list is processed in order as provided to the container. So if you want to upsample, put higher sampling rates first. Using this feature causes a patched version of mpd to be run. Use at your own risk.
153
157
154
-
Avoid deprecated configurations and refer to [this](#alsa-additional-outputs) section.
155
-
156
-
#### Main output as PULSE (**Deprecated**)
157
-
158
-
Please find here the relevant (but *deprecated*) variables when OUTPUT_MODE is set to `PULSE`
159
-
160
-
VARIABLE|DESCRIPTION
161
-
:---|:---
162
-
PULSEAUDIO_OUTPUT_NAME|PulseAudio output name, defaults to `PulseAudio`
163
-
PULSEAUDIO_OUTPUT_ENABLED|Sets the output as enabled if set to `yes`, otherwise mpd's default behavior applies
164
-
PULSEAUDIO_OUTPUT_SINK|Specifies the name of the PulseAudio sink MPD should play on
165
-
PULSEAUDIO_OUTPUT_MEDIA_ROLE|Specifies a custom media role that MPD reports to PulseAudio, defaults to `music`
166
-
PULSEAUDIO_OUTPUT_SCALE_FACTOR|Specifies a linear scaling coefficient (ranging from `0.5` to `5.0`) to apply when adjusting volume through MPD. For example, chosing a factor equal to `0.7` means that setting the volume to 100 in MPD will set the PulseAudio volume to 70%, and a factor equal to `3.5` means that volume 100 in MPD corresponds to a 350% PulseAudio volume.
167
-
168
-
Avoid deprecated configurations and refer to [this](#pulseaudio-additional-outputs) section.
158
+
Avoid deprecated configurations and refer to [this](https://github.com/GioF71/mpd-alsa-docker/blob/main/README.md#alsa-additional-outputs) section.
169
159
170
160
#### SOXR Plugin
171
161
@@ -258,6 +248,7 @@ Note that you can add up to 20 (or what is specified for the variable `MAX_ADDIT
258
248
259
249
#### PulseAudio additional outputs
260
250
251
+
Remember to setup [user mode](https://github.com/GioF71/mpd-alsa-docker/blob/main/doc/user-mode.md) when using PulseAudio outputs, otherwise they won't work.
261
252
Additional PulseAudio outputs can be configured using the following variables:
Copy file name to clipboardExpand all lines: doc/example-configurations.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,7 @@ services:
101
101
102
102
This configuration uses a custom soxr resampling configuration, inspired from this article: [Archimago - MUSINGS: More fun with digital filters!](https://archimago.blogspot.com/2018/01/musings-more-fun-with-digital-filters.html).
103
103
This particular configuration will upsample 44.1kHz, 88.2kHz, 176.4kHz streams to 352.8kHz and 48kHz, 96kHz, 192kHz to 384kHz, leaving dsd streams as they are.
104
-
AUDIO_GID here is 29, but you will need to find the gid of the `audio` group on your specific installation as described in [user mode](user-mode.md).
104
+
AUDIO_GID here is 29, but you will need to find the gid of the `audio` group on your specific installation as described in [user mode](https://github.com/GioF71/mpd-alsa-docker/blob/main/doc/user-mode.md).
0 commit comments