Some audio script bugfixes

This commit is contained in:
sydarn
2026-01-16 21:00:03 +01:00
parent c404f3cc17
commit 2f8fd88194
4 changed files with 10 additions and 16 deletions

View File

@@ -3,6 +3,7 @@
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/002-audio_path
ALSA_PRIMARY_CARD=1
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
DEVICE_PLAYBACK_PATH="Playback Mux"

View File

@@ -1,8 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
. /storage/.config/profile.d/001-device_config
# RK3566 devices have a master volume attached to card 0 that needs to be set to 100% on startup.
amixer -c 1 set "Master" "100%"

View File

@@ -58,4 +58,5 @@ export OS_VERSION \
WLR_DRM_DEVICES \
WLR_BACKENDS \
WLR_CON \
MALI_WAYLAND_AFBC
MALI_WAYLAND_AFBC \
ALSA_PRIMARY_CARD

View File

@@ -7,7 +7,7 @@
tocon "Configuring Audio..."
STATE=$(systemctl isactive pipewire-pulse)
STATE=$(systemctl is-active pipewire-pulse)
if [ "${STATE}" = "inactive" ]
then
systemctl start pipewire-pulse
@@ -40,12 +40,12 @@ fi
### Set the primary card volume to 100%
### to eliminate low audio on some devices.
amixer -c 0 -q sset "Master" 100%
if [ -n "${ALSA_PRIMARY_CARD}" ]
then
amixer -c ${ALSA_PRIMARY_CARD} -q sset "Master" 100%
else
amixer -c 0 -q sset "Master" 100%
fi
### Now set the pipewire mixer volume
/usr/bin/volume ${VOLUME}
### Run quantum audio hack if exists
if [ -n "/usr/sbin/quantum" ]; then
/usr/sbin/quantum
fi