Skip to content

Commit 7e978fa

Browse files
lrgirdwobroonie
authored andcommitted
ASoC: SOF: Add Build support for SOF core and Intel drivers
Build SOF core and Intel-specific drivers. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e6b140e commit 7e978fa

6 files changed

Lines changed: 410 additions & 0 deletions

File tree

‎sound/soc/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ source "sound/soc/rockchip/Kconfig"
6363
source "sound/soc/samsung/Kconfig"
6464
source "sound/soc/sh/Kconfig"
6565
source "sound/soc/sirf/Kconfig"
66+
source "sound/soc/sof/Kconfig"
6667
source "sound/soc/spear/Kconfig"
6768
source "sound/soc/sprd/Kconfig"
6869
source "sound/soc/sti/Kconfig"

‎sound/soc/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ obj-$(CONFIG_SND_SOC) += rockchip/
4747
obj-$(CONFIG_SND_SOC) += samsung/
4848
obj-$(CONFIG_SND_SOC) += sh/
4949
obj-$(CONFIG_SND_SOC) += sirf/
50+
obj-$(CONFIG_SND_SOC) += sof/
5051
obj-$(CONFIG_SND_SOC) += spear/
5152
obj-$(CONFIG_SND_SOC) += sprd/
5253
obj-$(CONFIG_SND_SOC) += sti/

‎sound/soc/sof/Kconfig‎

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
config SND_SOC_SOF_TOPLEVEL
2+
bool "Sound Open Firmware Support"
3+
help
4+
This adds support for Sound Open Firmware (SOF). SOF is a free and
5+
generic open source audio DSP firmware for multiple devices.
6+
Say Y if you have such a device that is supported by SOF.
7+
If unsure select "N".
8+
9+
if SND_SOC_SOF_TOPLEVEL
10+
11+
config SND_SOC_SOF_PCI
12+
tristate "SOF PCI enumeration support"
13+
depends on PCI
14+
select SND_SOC_SOF
15+
select SND_SOC_ACPI if ACPI
16+
select SND_SOC_SOF_OPTIONS
17+
select SND_SOC_SOF_INTEL_PCI if SND_SOC_SOF_INTEL_TOPLEVEL
18+
help
19+
This adds support for PCI enumeration. This option is
20+
required to enable Intel Skylake+ devices
21+
Say Y if you need this option
22+
If unsure select "N".
23+
24+
config SND_SOC_SOF_ACPI
25+
tristate "SOF ACPI enumeration support"
26+
depends on ACPI || COMPILE_TEST
27+
select SND_SOC_SOF
28+
select SND_SOC_ACPI if ACPI
29+
select SND_SOC_SOF_OPTIONS
30+
select SND_SOC_SOF_INTEL_ACPI if SND_SOC_SOF_INTEL_TOPLEVEL
31+
select IOSF_MBI if X86
32+
help
33+
This adds support for ACPI enumeration. This option is required
34+
to enable Intel Haswell/Broadwell/Baytrail/Cherrytrail devices
35+
Say Y if you need this option
36+
If unsure select "N".
37+
38+
config SND_SOC_SOF_OPTIONS
39+
tristate
40+
help
41+
This option is not user-selectable but automagically handled by
42+
'select' statements at a higher level
43+
44+
if SND_SOC_SOF_OPTIONS
45+
46+
config SND_SOC_SOF_NOCODEC
47+
tristate "SOF nocodec mode Support"
48+
help
49+
This adds support for a dummy/nocodec machine driver fallback
50+
option if no known codec is detected. This is typically only
51+
enabled for developers or devices where the sound card is
52+
controlled externally
53+
Say Y if you need this nocodec fallback option
54+
If unsure select "N".
55+
56+
config SND_SOC_SOF_DEBUG
57+
bool "SOF debugging features"
58+
help
59+
This option can be used to enable or disable individual SOF firmware
60+
and driver debugging options.
61+
Say Y if you are debugging SOF FW or drivers.
62+
If unsure select "N".
63+
64+
if SND_SOC_SOF_DEBUG
65+
66+
config SND_SOC_SOF_FORCE_NOCODEC_MODE
67+
bool "SOF force nocodec Mode"
68+
depends on SND_SOC_SOF_NOCODEC
69+
help
70+
This forces SOF to use dummy/nocodec as machine driver, even
71+
though there is a codec detected on the real platform. This is
72+
typically only enabled for developers for debug purposes, before
73+
codec/machine driver is ready, or to exclude the impact of those
74+
drivers
75+
Say Y if you need this force nocodec mode option
76+
If unsure select "N".
77+
78+
config SND_SOC_SOF_DEBUG_XRUN_STOP
79+
bool "SOF stop on XRUN"
80+
help
81+
This option forces PCMs to stop on any XRUN event. This is useful to
82+
preserve any trace data ond pipeline status prior to the XRUN.
83+
Say Y if you are debugging SOF FW pipeline XRUNs.
84+
If unsure select "N".
85+
86+
config SND_SOC_SOF_DEBUG_VERBOSE_IPC
87+
bool "SOF verbose IPC logs"
88+
help
89+
This option enables more verbose IPC logs, with command types in
90+
human-readable form instead of just 32-bit hex dumps. This is useful
91+
if you are trying to debug IPC with the DSP firmware.
92+
If unsure select "N".
93+
94+
config SND_SOC_SOF_DEBUG_FORCE_IPC_POSITION
95+
bool "SOF force to use IPC for position update on SKL+"
96+
help
97+
This option force to handle stream position update IPCs and run pcm
98+
elapse to inform ALSA about that, on platforms (e.g. Intel SKL+) that
99+
with other approach (e.g. HDAC DPIB/posbuf) to elapse PCM.
100+
On platforms (e.g. Intel SKL-) where position update IPC is the only
101+
one choice, this setting won't impact anything.
102+
if you are trying to debug pointer update with position IPCs or where
103+
DPIB/posbuf is not ready, select "Y".
104+
If unsure select "N".
105+
106+
config SND_SOC_SOF_DEBUG_ENABLE_DEBUGFS_CACHE
107+
bool "SOF enable debugfs caching"
108+
help
109+
This option enables caching of debugfs
110+
memory -> DSP resource (memory, register, etc)
111+
before the audio DSP is suspended. This will increase the suspend
112+
latency and therefore should be used for debug purposes only.
113+
Say Y if you want to enable caching the memory windows.
114+
If unsure, select "N".
115+
116+
endif ## SND_SOC_SOF_DEBUG
117+
118+
endif ## SND_SOC_SOF_OPTIONS
119+
120+
config SND_SOC_SOF
121+
tristate
122+
select SND_SOC_TOPOLOGY
123+
help
124+
This option is not user-selectable but automagically handled by
125+
'select' statements at a higher level
126+
The selection is made at the top level and does not exactly follow
127+
module dependencies but since the module or built-in type is decided
128+
at the top level it doesn't matter.
129+
130+
config SND_SOC_SOF_PROBE_WORK_QUEUE
131+
bool
132+
help
133+
This option is not user-selectable but automagically handled by
134+
'select' statements at a higher level
135+
When selected, the probe is handled in two steps, for example to
136+
avoid lockdeps if request_module is used in the probe.
137+
138+
source "sound/soc/sof/intel/Kconfig"
139+
source "sound/soc/sof/xtensa/Kconfig"
140+
141+
endif

‎sound/soc/sof/Makefile‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
2+
3+
snd-sof-objs := core.o ops.o loader.o ipc.o pcm.o pm.o debug.o topology.o\
4+
control.o trace.o utils.o
5+
6+
snd-sof-pci-objs := sof-pci-dev.o
7+
snd-sof-acpi-objs := sof-acpi-dev.o
8+
snd-sof-nocodec-objs := nocodec.o
9+
10+
obj-$(CONFIG_SND_SOC_SOF) += snd-sof.o
11+
obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o
12+
13+
14+
obj-$(CONFIG_SND_SOC_SOF_ACPI) += sof-acpi-dev.o
15+
obj-$(CONFIG_SND_SOC_SOF_PCI) += sof-pci-dev.o
16+
17+
obj-$(CONFIG_SND_SOC_SOF_INTEL_TOPLEVEL) += intel/
18+
obj-$(CONFIG_SND_SOC_SOF_XTENSA) += xtensa/

0 commit comments

Comments
 (0)