Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  1) // SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  2) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  3) // dmaengine.c - Samsung dmaengine wrapper
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  4) //
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  5) // Author: Mark Brown <broonie@linaro.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  6) // Copyright 2013 Linaro
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  8) #include <linux/module.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  9) #include <sound/core.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <sound/pcm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <sound/pcm_params.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <sound/dmaengine_pcm.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <sound/soc.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include "dma.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) int samsung_asoc_dma_platform_register(struct device *dev, dma_filter_fn filter,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) 				       const char *tx, const char *rx,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) 				       struct device *dma_dev)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) 	struct snd_dmaengine_pcm_config *pcm_conf;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) 	pcm_conf = devm_kzalloc(dev, sizeof(*pcm_conf), GFP_KERNEL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) 	if (!pcm_conf)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) 		return -ENOMEM;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) 	pcm_conf->prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) 	pcm_conf->compat_filter_fn = filter;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) 	pcm_conf->dma_dev = dma_dev;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) 	pcm_conf->chan_names[SNDRV_PCM_STREAM_PLAYBACK] = tx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) 	pcm_conf->chan_names[SNDRV_PCM_STREAM_CAPTURE] = rx;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) 	return devm_snd_dmaengine_pcm_register(dev, pcm_conf,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35) 				SND_DMAENGINE_PCM_FLAG_COMPAT);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) EXPORT_SYMBOL_GPL(samsung_asoc_dma_platform_register);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) MODULE_AUTHOR("Mark Brown <broonie@linaro.org>");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) MODULE_DESCRIPTION("Samsung dmaengine ASoC driver");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) MODULE_LICENSE("GPL");