From a395bdd6b24b692adbce0df6510ec9f2af57573e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 11 Jul 2016 10:39:11 +0200 Subject: ASoC: intel: Fix sst-dsp dependency on dw stuff The recent commit [a92ea59b74e2: ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in] introduced more strict kconfig dependency (depends on DW_DMAC_CORE=y) for avoiding the build failures due to dependency messes in intel-sst. This makes, however, it impossible to use this driver with the modularized systems, i.e. typically on Linux distros. The problem addressed in the commit above is that sst_dsp_new() and sst_dsp_free() includes the firmware init / finish that call dw_*() functions. Thus building it as built-in with DW_DMAC_CORE module results in the missing symbols. However, these sst_dsp functions are basically called only from the drivers that depend on DW_DMAC_CORE already. That is, once when these functions are split out, the rest can be independent from dw stuff. This patch attempts to solve the issue by the following: - Split sst-dsp stuff into two modules: snd-soc-sst-dsp and snd-soc-sst-firmware. - Move sst_dsp_new() and sst_dsp_free() to the latter module so that the former module can be independent from DW_DMAC_CORE. - Add a new kconfig SND_SOC_INTEL_SST_FIRMWARE to select the latter module by machine drivers. One only remaining pitfall is that each machine driver has to select SND_SOC_INTEL_SST_FIRMWARE carefully depending on DW_DMAC_CORE. This can't be done cleanly due to the restriction of the current kbuild. Bugzilla: https://bugzilla.opensuse.org/show_bug.cgi?id=988117 Fixes: a92ea59b74e2 ('ASoC: Intel: sst: only select sst-firmware when DW DMAC is built-in') Signed-off-by: Takashi Iwai Signed-off-by: Mark Brown --- sound/soc/intel/common/sst-dsp-priv.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sound/soc/intel/common/sst-dsp-priv.h') diff --git a/sound/soc/intel/common/sst-dsp-priv.h b/sound/soc/intel/common/sst-dsp-priv.h index 97dc1ae05e69..d13c84364c3c 100644 --- a/sound/soc/intel/common/sst-dsp-priv.h +++ b/sound/soc/intel/common/sst-dsp-priv.h @@ -383,10 +383,6 @@ struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, u32 index, void *private); void sst_mem_block_unregister_all(struct sst_dsp *dsp); -/* Create/Free DMA resources */ -int sst_dma_new(struct sst_dsp *sst); -void sst_dma_free(struct sst_dma *dma); - u32 sst_dsp_get_offset(struct sst_dsp *dsp, u32 offset, enum sst_mem_type type); #endif -- cgit v1.2.1