Commit graph

11 commits

Author SHA1 Message Date
Kuninori Morimoto
f8af41a3ac
ASoC: dwc: convert not to use asoc_xxx()
ASoC is now unified asoc_xxx() into snd_soc_xxx().
This patch convert asoc_xxx() to snd_soc_xxx().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875y4gs24z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25 14:16:19 +02:00
Maxim Kochetkov
221acc16ae
ASoC: dwc: Add TDM mode support
Depending on hardware implementaion of DWC I2S controller may support
TDM mode if enabled in SoC at design time.
Unfortunately there is no way to detect TDM capability for DWC by
reading registers. Anyway, if such capability enabled, TDM mode
can be enabled and configured by dai-tdm-slot-* DT options.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
Link: https://lore.kernel.org/r/20230622200031.120168-1-fido_max@inbox.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-09 22:51:01 +01:00
Kuninori Morimoto
a7c7ff1a47
ASoC: dwc: use asoc_substream_to_rtd()
Now we can use asoc_substream_to_rtd() macro,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878sff0yt0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:34 +01:00
Kuninori Morimoto
e42b2047cd
ASoC: dwc: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87wo7bir8j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27 14:44:35 +00:00
Takashi Iwai
fcf306efab
ASoC: dwc: Use managed buffer allocation
Clean up the drivers with the new managed buffer allocation API.
The superfluous snd_pcm_lib_malloc_pages() and
snd_pcm_lib_free_pages() calls are dropped, as well as the superfluous
snd_pcm_lib_preallocate_free_for_all() call.  As of the result,
hw_free and pcm_destruct ops became empty and got removed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210142614.19405-4-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-11 16:43:19 +00:00
Takashi Iwai
f6201a314f
ASoC: dwc: Drop superfluous ioctl PCM ops
ASoC PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210145406.21419-6-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-11 15:56:23 +00:00
Takashi Iwai
1a4860325c ASoC: Remove superfluous snd_dma_continuous_data()
The recent change (commit 08422d2c55: "ALSA: memalloc: Allow NULL
device for SNDRV_DMA_TYPE_CONTINOUS type") made the PCM preallocation
helper accepting NULL as the device pointer for the default usage.
Drop the snd_dma_continuous_data() usage that became superfluous from
the callers.

Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20191108094641.20086-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-11-09 18:02:52 +01:00
Kuninori Morimoto
dfd00af5e8
ASoC: dwc: dwc-pcm: remove snd_pcm_ops
snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h84r90dk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-08 13:48:35 +01:00
Takashi Iwai
ad8ba770ca ASoC: dwc: Drop superfluous PCM preallocation error checks
snd_pcm_lib_preallocate_pages() and co always succeed, so the error
check is simply redundant.  Drop it.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Acked-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-02-06 18:28:59 +01:00
Kuninori Morimoto
ddce03ceea
ASoC: dwc-pcm: replace platform to component
Now platform can be replaced to component, let's do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12 11:45:26 +00:00
Jose Abreu
c9afc1834e 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: 79361b2b98 ("ASoC: dwc: Add PIO PCM extension")
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-04-30 20:27:04 +08:00
Renamed from sound/soc/dwc/designware_pcm.c (Browse further)