summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/dma.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-11-18 22:31:11 +0100
committerMark Brown <broonie@kernel.org>2015-11-21 14:27:22 +0100
commit9bdca822cbd6b66124f2298504b6c4526599dc8f (patch)
tree86e387bb60f551945f0a59c8ed2da28fc81fcc5d /sound/soc/samsung/dma.h
parentASoC: s3c24xx-i2s: pass DMA channels as platform data (diff)
downloadlinux-9bdca822cbd6b66124f2298504b6c4526599dc8f.tar.xz
linux-9bdca822cbd6b66124f2298504b6c4526599dc8f.zip
ASoC: samsung: pass filter function as pointer
As we are now passing the filter data as pointers to the drivers, we can take the final step and also pass the filter function the same way. I'm keeping this change separate, as there it's less obvious that this is a net win. Upsides of this are: - The ASoC drivers are completely independent from the DMA engine implementation, which simplifies the Kconfig logic and in theory allows the same sound drivers to be built in a kernel that supports different kinds of dmaengine drivers. - Consistency with other subsystems and drivers On the other hand, we have a few downsides: - The s3c24xx-dma driver now needs to be built-in for the ac97 platform device to be instantiated on s3c2440. - samsung_dmaengine_pcm_config cannot be marked 'const' any more because the filter function pointer needs to be set at runtime. This is safe as long we don't have multiple different DMA engines in thet same system at runtime, but is nonetheless ugly. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/samsung/dma.h')
-rw-r--r--sound/soc/samsung/dma.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/soc/samsung/dma.h b/sound/soc/samsung/dma.h
index 085ef30f5ca2..a7616cc9b39e 100644
--- a/sound/soc/samsung/dma.h
+++ b/sound/soc/samsung/dma.h
@@ -13,6 +13,7 @@
#define _S3C_AUDIO_H
#include <sound/dmaengine_pcm.h>
+#include <linux/dmaengine.h>
struct s3c_dma_params {
void *slave; /* Channel ID */
@@ -25,6 +26,7 @@ struct s3c_dma_params {
void samsung_asoc_init_dma_data(struct snd_soc_dai *dai,
struct s3c_dma_params *playback,
struct s3c_dma_params *capture);
-int samsung_asoc_dma_platform_register(struct device *dev);
+int samsung_asoc_dma_platform_register(struct device *dev,
+ dma_filter_fn fn);
#endif