Only reload snd_usb_audio if 1824c not initialised
This commit is contained in:
parent
2b8f9c4ae7
commit
352db47931
@ -36,8 +36,11 @@ in {
|
||||
kmod
|
||||
];
|
||||
script = ''
|
||||
rmmod snd_usb_audio
|
||||
insmod /run/booted-system/kernel-modules/lib/modules/$(uname -r)/extra/snd-usb-audio.ko.xz
|
||||
# Only reload if device hasn't been initialised
|
||||
if ! cat /proc/asound/card*/usbmixer | grep -q "Mute Main Out Switch"; then
|
||||
rmmod snd_usb_audio
|
||||
insmod /run/booted-system/kernel-modules/lib/modules/$(uname -r)/extra/snd-usb-audio.ko.xz
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user