mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
Meta: Make audio hardware configurable through environment variable
The new environment variable `SERENITY_AUDIO_HARDWARE` accepts the values `ac97` and `intelhda` (default).
This commit is contained in:
parent
dd0a25de4d
commit
e18c87c60c
Notes:
sideshowbarker
2024-07-17 05:03:11 +09:00
Author: https://github.com/gmta Commit: https://github.com/SerenityOS/serenity/commit/e18c87c60c Pull-request: https://github.com/SerenityOS/serenity/pull/17798 Reviewed-by: https://github.com/kleinesfilmroellchen Reviewed-by: https://github.com/supercomputer7 ✅
1 changed files with 12 additions and 1 deletions
13
Meta/run.sh
13
Meta/run.sh
|
@ -171,6 +171,17 @@ else
|
|||
SERENITY_AUDIO_BACKEND="-audiodev pa,timer-period=2000,id=snd0"
|
||||
fi
|
||||
|
||||
SERENITY_AUDIO_HARDWARE="${SERENITY_AUDIO_HARDWARE:-intelhda}"
|
||||
if [ "${SERENITY_AUDIO_HARDWARE}" = 'ac97' ]; then
|
||||
SERENITY_AUDIO_DEVICE='-device ac97,audiodev=snd0'
|
||||
elif [ "${SERENITY_AUDIO_HARDWARE}" = 'intelhda' ]; then
|
||||
SERENITY_AUDIO_DEVICE='-device ich9-intel-hda -device hda-output,audiodev=snd0'
|
||||
else
|
||||
echo "Unknown audio hardware: ${SERENITY_AUDIO_HARDWARE}"
|
||||
echo 'Supported values: ac97, intelhda'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$installed_major_version" -eq 5 ] && [ "$installed_minor_version" -eq 0 ]; then
|
||||
SERENITY_AUDIO_PC_SPEAKER="-soundhw pcspk"
|
||||
else
|
||||
|
@ -296,7 +307,7 @@ if [ -z "$SERENITY_MACHINE" ]; then
|
|||
-device virtio-rng-pci
|
||||
$SERENITY_AUDIO_BACKEND
|
||||
$SERENITY_AUDIO_PC_SPEAKER
|
||||
-device ac97,audiodev=snd0
|
||||
$SERENITY_AUDIO_DEVICE
|
||||
-device pci-bridge,chassis_nr=1,id=bridge1 -device $SERENITY_ETHERNET_DEVICE_TYPE,bus=bridge1
|
||||
-device i82801b11-bridge,bus=bridge1,id=bridge2 -device sdhci-pci,bus=bridge2
|
||||
-device i82801b11-bridge,id=bridge3 -device sdhci-pci,bus=bridge3
|
||||
|
|
Loading…
Add table
Reference in a new issue