From 888a0a3bd29118e02de8c1d1caf2d98eec5b1d2f Mon Sep 17 00:00:00 2001 From: Aroy-Art Date: Fri, 20 Sep 2024 21:35:45 +0200 Subject: [PATCH] Add: enable sound cards on start --- .../etc/systemd/system/livecd-alsa-unmuter.service | 13 +++++++++++++ .../sound.target.wants/livecd-alsa-unmuter.service | 1 + .../usr/local/share/livecd-sound/asound.conf.in | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 archlive/airootfs/etc/systemd/system/livecd-alsa-unmuter.service create mode 120000 archlive/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service create mode 100644 archlive/airootfs/usr/local/share/livecd-sound/asound.conf.in diff --git a/archlive/airootfs/etc/systemd/system/livecd-alsa-unmuter.service b/archlive/airootfs/etc/systemd/system/livecd-alsa-unmuter.service new file mode 100644 index 0000000..03db4b9 --- /dev/null +++ b/archlive/airootfs/etc/systemd/system/livecd-alsa-unmuter.service @@ -0,0 +1,13 @@ +[Unit] +Description=Unmute All Sound Card Controls For Use With The Live Arch Environment +# This needs to run after the audio device becomes available. +Wants=systemd-udev-settle.service +After=systemd-udev-settle.service sound.target +ConditionKernelCommandLine=accessibility=on + +[Service] +Type=oneshot +ExecStart=/usr/local/bin/livecd-sound -u + +[Install] +WantedBy=sound.target diff --git a/archlive/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service b/archlive/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service new file mode 120000 index 0000000..98c0fc8 --- /dev/null +++ b/archlive/airootfs/etc/systemd/system/sound.target.wants/livecd-alsa-unmuter.service @@ -0,0 +1 @@ +../livecd-alsa-unmuter.service \ No newline at end of file diff --git a/archlive/airootfs/usr/local/share/livecd-sound/asound.conf.in b/archlive/airootfs/usr/local/share/livecd-sound/asound.conf.in new file mode 100644 index 0000000..3f9c7aa --- /dev/null +++ b/archlive/airootfs/usr/local/share/livecd-sound/asound.conf.in @@ -0,0 +1,3 @@ +Defaults node +defaults.ctl.card %card%; +defaults.pcm.card %card%;