diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig index 8db9ce50a29018..d7440208261685 100644 --- a/sound/soc/sof/Kconfig +++ b/sound/soc/sof/Kconfig @@ -10,13 +10,21 @@ config SND_SOC_SOF_SPI config SND_SOC_SOF tristate "Sound Open Firmware Support" select SND_SOC_TOPOLOGY - select SND_SOC_COMPRESS help This adds support for Sound Open Firmware (SOF). SOF is a free and generic open source audio DSP firmware for multiple devices. Say Y if you have such a device that is supported by SOF. If unsure select "N". +config SND_SOC_SOF_COMPRESS + tristate "SOF ALSA Compressed API support" + depends on SND_SOC_SOF + select SND_SOC_COMPRESS + help + This adds support for the ALSA compressed API in SOF + Say Y if you need this option + If unsure select "N". + config SND_SOC_SOF_NOCODEC tristate "SOF nocodec mode Support" depends on SND_SOC_SOF diff --git a/sound/soc/sof/Makefile b/sound/soc/sof/Makefile index b8f6c67fbb7b70..65c150ee3baab3 100644 --- a/sound/soc/sof/Makefile +++ b/sound/soc/sof/Makefile @@ -3,15 +3,17 @@ ccflags-y += -DDEBUG snd-sof-objs := core.o ops.o loader.o ipc.o pcm.o pm.o debug.o topology.o\ - control.o trace.o compressed.o utils.o + control.o trace.o utils.o snd-sof-spi-objs := hw-spi.o snd-sof-pci-objs := sof-pci-dev.o snd-sof-acpi-objs := sof-acpi-dev.o snd-sof-nocodec-objs := nocodec.o +snd-sof-compress-objs := compressed.o obj-$(CONFIG_SND_SOC_SOF) += snd-sof.o obj-$(CONFIG_SND_SOC_SOF_NOCODEC) += snd-sof-nocodec.o +obj-$(CONFIG_SND_SOC_SOF_COMPRESS) += snd-sof-compress.o obj-$(CONFIG_SND_SOC_SOF_ACPI) += sof-acpi-dev.o obj-$(CONFIG_SND_SOC_SOF_PCI) += sof-pci-dev.o diff --git a/sound/soc/sof/compressed.c b/sound/soc/sof/compressed.c index 3de2fab3075088..affa8ac55b357e 100644 --- a/sound/soc/sof/compressed.c +++ b/sound/soc/sof/compressed.c @@ -185,3 +185,4 @@ struct snd_compr_ops sof_compressed_ops = { .get_caps = sof_compressed_get_caps, .get_codec_caps = sof_compressed_get_codec_caps, }; +EXPORT_SYMBOL(sof_compressed_ops); diff --git a/sound/soc/sof/pcm.c b/sound/soc/sof/pcm.c index 49b1c40ed038a7..a5bf79d8dd8f5d 100644 --- a/sound/soc/sof/pcm.c +++ b/sound/soc/sof/pcm.c @@ -752,7 +752,9 @@ void snd_sof_new_platform_drv(struct snd_sof_dev *sdev) pd->probe = sof_pcm_probe; pd->remove = sof_pcm_remove; pd->ops = &sof_pcm_ops; +#if IS_ENABLED(CONFIG_SND_SOC_SOF_COMPRESS) pd->compr_ops = &sof_compressed_ops; +#endif pd->pcm_new = sof_pcm_new; pd->pcm_free = sof_pcm_free; pd->ignore_machine = drv_name;