sound-reload: Remove modules in reverse dependency order.

This commit is contained in:
Ole Tange 2020-05-10 11:43:56 +02:00
parent fd15ed865f
commit 6902fe306a

View file

@ -55,17 +55,23 @@ echo autospawn=no >> ~/.pulse/client.conf
pulseaudio -k pulseaudio -k
fuser -kv /dev/snd/* fuser -kv /dev/snd/*
modules=" modules="
thinkpad_acpi snd_hda_codec_analog
snd_hda_codec_conexant
snd_hda_intel snd_hda_intel
snd_hda_codec_conexant
snd_seq_midi
snd_hda_codec_hdmi snd_hda_codec_hdmi
snd_usb_audio
snd_hda_codec_realtek
thinkpad_acpi
snd_hda_codec_analog snd_hda_codec_analog
snd_hda_codec_generic snd_hda_codec_generic
snd_hda_codec snd_hda_codec
snd_hda_core snd_hda_core
snd_hwdep snd_hwdep
snd_pcm snd_pcm
snd_seq_midi
snd_seq_midi_event snd_seq_midi_event
snd_rawmidi snd_rawmidi
snd_seq snd_seq
@ -74,7 +80,7 @@ modules="
snd snd
soundcore soundcore
" "
sudo parallel --retries=100 -N0 modprobe -r $modules ::: 1 sudo parallel -j1 -n1 modprobe -r ::: $modules
lsmod|grep snd lsmod|grep snd
lspci | grep Audio || echo "!!! No audio hardware found in lspci" lspci | grep Audio || echo "!!! No audio hardware found in lspci"
sudo parallel -j1 modprobe ::: $modules sudo parallel -j1 modprobe ::: $modules