diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2018-05-07 10:49:54 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-05-09 11:22:00 +0200 |
commit | dde637f2daf19daf7e0d551ef47bec6819504910 (patch) | |
tree | fdacb451264a11f16ef83b359c35bd7ea1a4b01b /sound/soc/omap/sdma-pcm.h | |
parent | ASoC: uniphier: evea: use DAPM to change source of line-in (diff) | |
download | linux-dde637f2daf19daf7e0d551ef47bec6819504910.tar.xz linux-dde637f2daf19daf7e0d551ef47bec6819504910.zip |
ASoC: omap: Introduce the generic_dmaengine_pcm based sdma-pcm
With the generic dmaengine_pcm support the omap-cpm can be replaced with a
much smaller wrapper.
CPU DAI drivers can use the:
int sdma_pcm_platform_register(struct device *dev,
char *txdmachan, char *rxdmachan);
To register the platform driver, txdmachan/rxdmachan is only needed to be
provided if the DMA channel names are not standard tx/rx, like in case of
McPDM, or the DAI is only capable of one audio direction (DMIC, HDMI).
This patch only introduces the source file and changes to the
Kconfig/Makefile, but does not change any of the DAI drivers to use it.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/omap/sdma-pcm.h')
-rw-r--r-- | sound/soc/omap/sdma-pcm.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sound/soc/omap/sdma-pcm.h b/sound/soc/omap/sdma-pcm.h new file mode 100644 index 000000000000..34a7f90b2587 --- /dev/null +++ b/sound/soc/omap/sdma-pcm.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com + * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> + */ + +#ifndef __SDMA_PCM_H__ +#define __SDMA_PCM_H__ + +#if IS_ENABLED(CONFIG_SND_SDMA_SOC) +int sdma_pcm_platform_register(struct device *dev, + char *txdmachan, char *rxdmachan); +#else +static inline int sdma_pcm_platform_register(struct device *dev, + char *txdmachan, char *rxdmachan) +{ + return -ENODEV; +} +#endif /* CONFIG_SND_SDMA_SOC */ + +#endif /* __SDMA_PCM_H__ */ |