07-22-2018, 08:20 PM
(This post was last modified: 07-23-2018, 01:02 AM by Tim Curtis.
Edit Reason: eta
)
I'd have to look back in my notes but I don't think a reboot is needed.
You just leave the I2S config in place and your USB audio device plugged in and then switching between the two is a matter of editing mpd.conf and then restarting MPD.
When both devices either support hardware volume or neither device supports it AND they both use the default ALSA mixer names of Digital (I2S) and PCM (USB) then the edits are straight forward. It gets tricky when non-default ALSA mixer names are used or when One device is configured to use hardware volume and the other software volume, etc etc.
ALSO - watch out for volume when switching outputs.
Example
I2S device
audio_output {
type "alsa"
name "ALSA default"
device "hw:0,0"
mixer_type "hardware"
mixer_control "Digital"
mixer_device "hw:0"
mixer_index "0"
dop "no"
}
USB device
audio_output {
type "alsa"
name "ALSA default"
device "hw:1,0"
mixer_type "hardware"
mixer_control "PCM"
mixer_device "hw:1"
mixer_index "0"
dop "no"
}
-Tim
You just leave the I2S config in place and your USB audio device plugged in and then switching between the two is a matter of editing mpd.conf and then restarting MPD.
When both devices either support hardware volume or neither device supports it AND they both use the default ALSA mixer names of Digital (I2S) and PCM (USB) then the edits are straight forward. It gets tricky when non-default ALSA mixer names are used or when One device is configured to use hardware volume and the other software volume, etc etc.
ALSO - watch out for volume when switching outputs.
Example
I2S device
audio_output {
type "alsa"
name "ALSA default"
device "hw:0,0"
mixer_type "hardware"
mixer_control "Digital"
mixer_device "hw:0"
mixer_index "0"
dop "no"
}
USB device
audio_output {
type "alsa"
name "ALSA default"
device "hw:1,0"
mixer_type "hardware"
mixer_control "PCM"
mixer_device "hw:1"
mixer_index "0"
dop "no"
}
-Tim