Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Switch between headphone / speaker settings
#5
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
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply


Messages In This Thread
RE: Switch between headphone / speaker settings - by Tim Curtis - 07-22-2018, 08:20 PM

Forum Jump: