Fix set-audio to use proper routing when not using a hardware device, fix ATARI VCS ES audio playback.

This commit is contained in:
fewtarius 2022-12-20 07:03:05 -05:00
parent 242d6ea657
commit 7ff1accb43
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 27 additions and 2 deletions

View file

@ -158,7 +158,9 @@ function set_audio_device() {
fi
done
fi
cat <<EOF >/storage/.config/asound.conf
if [[ "${HWDEV}" =~ ^hw: ]]
then
cat <<EOF >/storage/.config/asound.conf
ctl.!default {
type hw
card ${CARD}
@ -184,6 +186,29 @@ pcm.dmixer {
1 1
}
}
EOF
else
cat <<EOF >/storage/.config/asound.conf
pcm.!default {
type plug
slave.pcm "dmixer"
}
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "${HWDEV}"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
bindings {
0 0
1 1
}
}
EOF
}

View file

@ -11,6 +11,6 @@ fi
if [ ! -e "/storage/.config/modprobe.d/alsa-base.conf" ]
then
touch /storage/.config/modprobe.d/alsa-base.conf
set-audio set "DEFAULT HDMI"
set-audio set "HDMI (0:3)"
reboot
fi