|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -rmmod sof_pci_dev |
4 | | -rmmod sof_acpi_dev |
5 | | -rmmod snd_soc_acpi_intel_match |
6 | | -rmmod snd_sof_intel_byt |
7 | | -rmmod snd_sof_intel_hsw |
8 | | -rmmod snd_sof_intel_bdw |
9 | | -rmmod snd_sof_intel_apl |
10 | | -rmmod snd_sof_intel_cnl |
11 | | -rmmod snd_sof_intel_hda_common |
12 | | -rmmod snd_sof |
| 3 | +remove_module() { |
13 | 4 |
|
14 | | -rmmod snd_soc_sst_bytcr_rt5640 |
15 | | -rmmod snd_soc_sst_bytcr_rt5651 |
16 | | -rmmod snd_soc_sst_cht_bsw_rt5645 |
17 | | -rmmod snd_soc_sst_cht_bsw_rt5670 |
18 | | -rmmod snd_soc_sst_byt_cht_da7213 |
19 | | -rmmod snd_sof_nocodec |
| 5 | + MODULE="$1" |
20 | 6 |
|
21 | | -rmmod snd_soc_rt5670 |
22 | | -rmmod snd_soc_rt5645 |
23 | | -rmmod snd_soc_rt5651 |
24 | | -rmmod snd_soc_rt5640 |
25 | | -rmmod snd_soc_rl6231 |
26 | | -rmmod snd_soc_da7213 |
| 7 | + if lsmod | grep "$MODULE" &> /dev/null ; then |
| 8 | + echo "Removing $MODULE" |
| 9 | + rmmod $MODULE |
| 10 | + else |
| 11 | + echo "skipping $MODULE, not loaded" |
| 12 | + fi |
| 13 | +} |
27 | 14 |
|
28 | | -rmmod snd_soc_acpi |
| 15 | +remove_module sof_pci_dev |
| 16 | +remove_module sof_acpi_dev |
| 17 | +remove_module snd_soc_acpi_intel_match |
| 18 | +remove_module snd_sof_intel_byt |
| 19 | +remove_module snd_sof_intel_hsw |
| 20 | +remove_module snd_sof_intel_bdw |
| 21 | +remove_module snd_sof_intel_hda_common |
| 22 | +remove_module snd_sof_xtensa_dsp |
| 23 | + |
| 24 | +remove_module snd_soc_sst_bytcr_rt5640 |
| 25 | +remove_module snd_soc_sst_bytcr_rt5651 |
| 26 | +remove_module snd_soc_sst_cht_bsw_rt5645 |
| 27 | +remove_module snd_soc_sst_cht_bsw_rt5670 |
| 28 | +remove_module snd_soc_sst_byt_cht_da7213 |
| 29 | +remove_module snd_soc_sst_bxt_pcm512x |
| 30 | +remove_module snd_sof_nocodec |
| 31 | +remove_module snd_sof |
| 32 | + |
| 33 | +remove_module snd_soc_rt5670 |
| 34 | +remove_module snd_soc_rt5645 |
| 35 | +remove_module snd_soc_rt5651 |
| 36 | +remove_module snd_soc_rt5640 |
| 37 | +remove_module snd_soc_rl6231 |
| 38 | +remove_module snd_soc_da7213 |
| 39 | +remove_module snd_soc_pcm512x_i2c |
| 40 | +remove_module snd_soc_pcm512x |
| 41 | +remove_module snd_soc_acpi |
0 commit comments