-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathsof_insert.sh
More file actions
executable file
·130 lines (105 loc) · 3.66 KB
/
sof_insert.sh
File metadata and controls
executable file
·130 lines (105 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#!/bin/bash -e
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Intel Corporation. All rights reserved.
insert_module() {
local MODULE="$1"; shift
if modinfo "$MODULE" &> /dev/null ; then
printf 'MODPROBE\t%s\t\t' "$MODULE"
printf '%s ' "$@"
printf '\n'
# If sudo is slow, it's probably because the 'account' service
# of the pam_unix.so module. Its version 1.5.1-7.fc34 tries to
# close() all file descriptors from 65535 to 0.
sudo modprobe "$MODULE" "$@"
else
printf 'SKIP \t%s \t(not in tree)\n' "$MODULE"
fi
}
# Test sudo first, not after dozens of SKIP
sudo true
# Modules parameters can be passed here as a quick and purely local
# hack. Be conscious of unexpected interactions with "official"
# parameters located in /etc/modprobe.d/*.conf
#
# This is not required unless you want to change the default flags.
# For the list of flags search: git -C linux grep SOF_DBG_
# Warning: the DMA trace can be forced ON in Kconfig and
# the SOF_DBG_ENABLE_TRACE bit ignored here.
# insert_module snd_sof sof_debug=1
# Insert codec drivers first, they are required to register ASoC components
insert_module snd_soc_da7213
insert_module snd_soc_da7219
insert_module snd_soc_pcm512x_i2c
insert_module snd_soc_wm8804_i2c
insert_module snd_soc_rt274
insert_module snd_soc_rt286
insert_module snd_soc_rt298
insert_module snd_soc_rt700
insert_module snd_soc_rt711
insert_module snd_soc_rt711_sdca
insert_module snd_soc_rt712_sdca
insert_module snd_soc_rt712_sdca_dmic
insert_module snd_soc_rt715
insert_module snd_soc_rt715_sdca
insert_module snd_soc_rt722_sdca
insert_module snd_soc_rt1308
insert_module snd_soc_rt1308_sdw
insert_module snd_soc_rt1316_sdw
insert_module snd_soc_rt1318_sdw
insert_module snd_soc_rt1320_sdw
insert_module snd_soc_sdw_mockup
insert_module snd_soc_rt1011
insert_module snd_soc_rt5640
insert_module snd_soc_rt5645
insert_module snd_soc_rt5651
insert_module snd_soc_rt5660
insert_module snd_soc_rt5670
insert_module snd_soc_rt5677
insert_module snd_soc_rt5677_spi
insert_module snd_soc_rt5682_i2c
insert_module snd_soc_rt5682_sdw
insert_module snd_soc_max98090
insert_module snd_soc_ts3a227e
insert_module snd_soc_max98357a
insert_module snd_soc_max98363
insert_module snd_soc_max98373_sdw
insert_module snd_soc_max98373_i2c
insert_module snd_soc_max98390
insert_module snd_soc_es8316
insert_module snd_soc_es8326
insert_module snd_soc_wm8960
insert_module snd_soc_simple_card
# core SOF driver
insert_module snd_sof
insert_module snd_sof_utils
# insert top-level ACPI/PCI SOF drivers. They will register SOF components and
# load machine drivers as needed. Do not insert any other sort of audio module,
# code dependencies will be used to load the relevant modules.
insert_module snd_sof_acpi
insert_module snd_sof_acpi_intel_byt
insert_module snd_sof_acpi_intel_bdw
# Module parameters can be passed here as a quick and purely local hack.
# Be conscious of unexpected interactions with "official" parameters
# located in /etc/modprobe.d/*.conf
insert_module snd_sof_pci # ipc_type=1 # sof_pci_debug=1 ...
insert_module snd_sof_pci_intel_tng
insert_module snd_sof_pci_intel_skl
insert_module snd_sof_pci_intel_apl
insert_module snd_sof_pci_intel_cnl
insert_module snd_sof_pci_intel_icl
insert_module snd_sof_pci_intel_tgl
insert_module snd_sof_pci_intel_mtl
insert_module snd_sof_pci_intel_lnl
insert_module snd_sof_pci_intel_ptl
# OF driver
insert_module snd_sof_of
# helper drivers
insert_module imx_common
insert_module snd_sof_xtensa_dsp
# i.MX specific drivers
insert_module snd_sof_imx8
insert_module snd_sof_imx8m
# USB
insert_module snd_usb_audio
# without the status check force quit
builtin exit 0