From 7ff1accb43e9eaa9776c9a59b7b737f87d72c7bc Mon Sep 17 00:00:00 2001 From: fewtarius Date: Tue, 20 Dec 2022 07:03:05 -0500 Subject: [PATCH] Fix set-audio to use proper routing when not using a hardware device, fix ATARI VCS ES audio playback. --- packages/jelos/sources/scripts/set-audio | 27 ++++++++++++++++++- .../quirks/ATARI VCS 800 Onyx/001-audio | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/jelos/sources/scripts/set-audio b/packages/jelos/sources/scripts/set-audio index f5462a838..be0a523ed 100755 --- a/packages/jelos/sources/scripts/set-audio +++ b/packages/jelos/sources/scripts/set-audio @@ -158,7 +158,9 @@ function set_audio_device() { fi done fi - cat </storage/.config/asound.conf + if [[ "${HWDEV}" =~ ^hw: ]] + then + cat </storage/.config/asound.conf ctl.!default { type hw card ${CARD} @@ -184,6 +186,29 @@ pcm.dmixer { 1 1 } } +EOF + else + cat </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 } diff --git a/packages/sysutils/autostart/sources/quirks/ATARI VCS 800 Onyx/001-audio b/packages/sysutils/autostart/sources/quirks/ATARI VCS 800 Onyx/001-audio index 27b6d01d2..6cccb68cd 100644 --- a/packages/sysutils/autostart/sources/quirks/ATARI VCS 800 Onyx/001-audio +++ b/packages/sysutils/autostart/sources/quirks/ATARI VCS 800 Onyx/001-audio @@ -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