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
+30-30Lines changed: 30 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,38 +65,11 @@ Getting the image from DockerHub is as simple as typing:
65
65
66
66
`docker pull giof71/mpd-alsa`
67
67
68
-
You might want to pull the `stable` image as opposed to the default `latest`.
69
-
70
68
## Usage
71
69
72
70
### User mode
73
71
74
-
You can enable user-mode by specifying `USER_MODE` to `Y` or `YES`.
75
-
For `alsa` mode, it is important that the container knows the group id of the host `audio` group. On my system it's `995`, however it is possible to verify using the following command:
76
-
77
-
```code
78
-
getent group audio
79
-
```
80
-
81
-
On my system, this commands outputs:
82
-
83
-
```text
84
-
audio:x:995:brltty,mpd,squeezelite
85
-
```
86
-
87
-
In any case, make sure to set the variable `AUDIO_GID` accordingly. The variable is mandatory for user mode with alsa output.
88
-
Also, if your user/group id are not both `1000`, set `PUID` and `PGID` accordingly.
89
-
It is possible to verify the uid and gid of the currently logged user using the following command:
@@ -142,12 +115,12 @@ ALSA_ALLOWED_FORMATS||Sets the `alsa` output allowed formats
142
115
AUTO_RESAMPLE||If set to no, then libasound will not attempt to resample. In this case, the user is responsible for ensuring that the requested sample rate can be produced natively by the device, otherwise an error will occur.
143
116
THESYCON_DSD_WORKAROUND||If enabled, enables a workaround for a bug in Thesycon USB audio receivers. On these devices, playing DSD512 or PCM causes all subsequent attempts to play other DSD rates to fail, which can be fixed by briefly playing PCM at 44.1 kHz.
144
117
ALSA_ALLOWED_FORMATS_PRESET||Alternative to `ALSA_ALLOWED_FORMATS`. Possible values: `8x`, `4x`, `2x`, `8x-nodsd`, `4x-nodsd`, `2x-nodsd`
118
+
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.
145
119
PULSEAUDIO_OUTPUT_NAME||PulseAudio output name, defaults to `PulseAudio`
146
120
PULSEAUDIO_OUTPUT_ENABLED||Sets the output as enabled if set to `yes`, otherwise mpd's default behavior applies
147
121
PULSEAUDIO_OUTPUT_SINK||Specifies the name of the PulseAudio sink MPD should play on
148
122
PULSEAUDIO_OUTPUT_MEDIA_ROLE||Specifies a custom media role that MPD reports to PulseAudio, defaults to `music`
149
123
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.
150
-
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.
151
124
INPUT_CACHE_SIZE||Sets the input cache size. Example value: `1 GB`
152
125
NULL_OUTPUT_NAME||Name of the `null` output
153
126
NULL_OUTPUT_SYNC||Sync mode for the `null` output, can be `yes` (default) or `no`
@@ -194,6 +167,32 @@ RESTORE_PAUSED||If set to `yes`, then MPD is put into pause mode instead of star
194
167
STATE_FILE_INTERVAL||Auto-save the state file this number of seconds after each state change, defaults to `10` seconds
195
168
STARTUP_DELAY_SEC|0|Delay before starting the application. This can be useful if your container is set up to start automatically, so that you can resolve race conditions with mpd and with squeezelite if all those services run on the same audio device. I experienced issues with my Asus Tinkerboard, while the Raspberry Pi has never really needed this. Your mileage may vary. Feel free to report your personal experience.
196
169
170
+
#### ALSA additional outputs
171
+
172
+
Additional alsa outputs can be configured using the following variables:
173
+
174
+
VARIABLE|OPTIONAL|DESCRIPTION
175
+
:---|:---:|:---
176
+
ALSA_OUTPUT_CREATE|yes|Set to `yes` if you want to create and additional httpd output
177
+
ALSA_OUTPUT_ENABLED|yes|Sets the output as enabled if set to `yes`, otherwise mpd's default behavior applies
178
+
ALSA_OUTPUT_PRESET|yes|Use an Alsa preset for easier configuration
179
+
ALSA_OUTPUT_DEVICE|yes|Sets alsa device
180
+
ALSA_OUTPUT_AUTO_FIND_MIXER|yes|Allows to auto-select the mixer for easy hardware volume configuration
181
+
ALSA_OUTPUT_MIXER_TYPE|yes|Mixer type
182
+
ALSA_OUTPUT_MIXER_DEVICE|yes|Mixer device
183
+
ALSA_OUTPUT_MIXER_CONTROL|yes|Mixer Control
184
+
ALSA_OUTPUT_MIXER_INDEX|yes|Mixer Index
185
+
ALSA_OUTPUT_ALLOWED_FORMATS_PRESET|yes|Sets allowed formats using a preset
ALSA_OUTPUT_DOP|yes|Enables Dsd-Over-Pcm. Possible values: `yes` or `no`. Empty by default: this it lets mpd handle dop setting.
192
+
193
+
For the meaning, refer to the corresponding values in the first list of environment variables.
194
+
Note that you can add up to 5 (or what is specified for the variable `MAX_ADDITIONAL_OUTPUTS_BY_TYPE`) httpd outputs. In order to specify distinct values, you can add `_1`, `_2` to every variable names in this set. The first output does *not* require to specify `_0`, that index is implicit.
195
+
197
196
#### HTTPD additional outputs
198
197
199
198
Additional httpd outputs can be configured using the following variables:
@@ -285,6 +284,7 @@ Just be careful to use the tag you have built.
285
284
286
285
Date|Major Changes
287
286
:---|:---
287
+
2022-12-27|Support for additional `alsa` outputs
288
288
2022-12-24|`MAX_ADDITIONAL_OUTPUTS_BY_TYPE` now defaults to `20`
289
289
2022-12-17|Add `MPD_ENABLE_LOGGING`
290
290
2022-12-16|Preset `fiio-e18` now includes mixer
@@ -295,7 +295,7 @@ Date|Major Changes
295
295
2022-12-12|Support for `state_file_interval`
296
296
2022-12-12|Mount for `shout` has an index-aware default now
297
297
2022-12-12|Do not force `enabled` by default for additional outputs
298
-
2022-12-12|Support for optional`shout` outputs
298
+
2022-12-12|Support for additional`shout` outputs
299
299
2022-12-12|Support for `restore_paused`
300
300
2022-12-10|Support for `mixer_type` in httpd outputs
301
301
2022-12-10|Lookup table for more convenient `samplerate_converter` values
You can enable user-mode by specifying `USER_MODE` to `Y` or `YES`.
4
+
For `alsa` mode, it is important that the container knows the group id of the host `audio` group. On my system it's `995`, however it is possible to verify using the following command:
5
+
6
+
```code
7
+
getent group audio
8
+
```
9
+
10
+
On my system, this commands outputs:
11
+
12
+
```text
13
+
audio:x:995:brltty,mpd,squeezelite
14
+
```
15
+
16
+
In any case, make sure to set the variable `AUDIO_GID` accordingly. The variable is mandatory for user mode with alsa output.
17
+
Also, if your user/group id are not both `1000`, set `PUID` and `PGID` accordingly.
18
+
It is possible to verify the uid and gid of the currently logged user using the following command:
0 commit comments