Commit c9afc183 authored by Jose Abreu's avatar Jose Abreu Committed by Mark Brown

ASoC: dwc: Disallow building designware_pcm as a module

Designware PCM is an extension to Designware I2S and they are dependent
on each other. For this reason, make Designware PCM a boolean which will
compile with Desigwnare I2S module. The name of the module is not changed
but the name of the files need to be changed.

Also, without this commit we get errors when probbing designware_i2s module
because of unspecified license:

designware_pcm: module license 'unspecified' taints kernel.
Disabling lock debugging due to kernel taint
designware_pcm: Unknown symbol __rcu_read_lock (err 0)
designware_pcm: Unknown symbol devm_snd_soc_register_platform (err 0)
designware_pcm: Unknown symbol synchronize_rcu (err 0)
designware_pcm: Unknown symbol __rcu_read_unlock (err 0)
designware_pcm: Unknown symbol snd_soc_set_runtime_hwparams (err 0)

So, this is really needed as a fix.

Fixes: 79361b2b ("ASoC: dwc: Add PIO PCM extension")
Signed-off-by: default avatarLubomir Rintel <lkundrak@v3.sk>
Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c1ae3cfa
...@@ -8,10 +8,10 @@ config SND_DESIGNWARE_I2S ...@@ -8,10 +8,10 @@ config SND_DESIGNWARE_I2S
maximum of 8 channels each for play and record. maximum of 8 channels each for play and record.
config SND_DESIGNWARE_PCM config SND_DESIGNWARE_PCM
tristate "PCM PIO extension for I2S driver" bool "PCM PIO extension for I2S driver"
depends on SND_DESIGNWARE_I2S depends on SND_DESIGNWARE_I2S
help help
Say Y, M or N if you want to add a custom ALSA extension that registers Say Y or N if you want to add a custom ALSA extension that registers
a PCM and uses PIO to transfer data. a PCM and uses PIO to transfer data.
This functionality is specially suited for I2S devices that don't have This functionality is specially suited for I2S devices that don't have
......
# SYNOPSYS Platform Support # SYNOPSYS Platform Support
obj-$(CONFIG_SND_DESIGNWARE_I2S) += designware_i2s.o obj-$(CONFIG_SND_DESIGNWARE_I2S) += designware_i2s.o
ifdef CONFIG_SND_DESIGNWARE_PCM
obj-$(CONFIG_SND_DESIGNWARE_I2S) += designware_pcm.o designware_i2s-y := dwc-i2s.o
endif designware_i2s-$(CONFIG_SND_DESIGNWARE_PCM) += dwc-pcm.o
...@@ -129,13 +129,11 @@ void dw_pcm_push_tx(struct dw_i2s_dev *dev) ...@@ -129,13 +129,11 @@ void dw_pcm_push_tx(struct dw_i2s_dev *dev)
{ {
dw_pcm_transfer(dev, true); dw_pcm_transfer(dev, true);
} }
EXPORT_SYMBOL_GPL(dw_pcm_push_tx);
void dw_pcm_pop_rx(struct dw_i2s_dev *dev) void dw_pcm_pop_rx(struct dw_i2s_dev *dev)
{ {
dw_pcm_transfer(dev, false); dw_pcm_transfer(dev, false);
} }
EXPORT_SYMBOL_GPL(dw_pcm_pop_rx);
static int dw_pcm_open(struct snd_pcm_substream *substream) static int dw_pcm_open(struct snd_pcm_substream *substream)
{ {
...@@ -281,4 +279,3 @@ int dw_pcm_register(struct platform_device *pdev) ...@@ -281,4 +279,3 @@ int dw_pcm_register(struct platform_device *pdev)
{ {
return devm_snd_soc_register_platform(&pdev->dev, &dw_pcm_platform); return devm_snd_soc_register_platform(&pdev->dev, &dw_pcm_platform);
} }
EXPORT_SYMBOL_GPL(dw_pcm_register);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment