Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit 446e415

Browse files
committed
kmod_scripts: clean-up and add pcm512x support
Update module names, only unload what is loaded and add pcm512x support for Up^2 board. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
1 parent 2abbfc0 commit 446e415

2 files changed

Lines changed: 37 additions & 23 deletions

File tree

kmod_scripts/sof_insert.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ modprobe snd_soc_rt5645
55
modprobe snd_soc_rt5651
66
modprobe snd_soc_rt5640
77
modprobe snd_soc_da7213
8+
modprobe snd_soc_pcm512x_i2c
89

910
modprobe sof_acpi_dev
1011
modprobe sof_pci_dev

kmod_scripts/sof_remove.sh

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,41 @@
11
#!/bin/bash
22

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() {
134

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"
206

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+
}
2714

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

Comments
 (0)