#include <linux/module.h>
#include <linux/init.h>
#include <linux/dmaengine.h>
#include <linux/slab.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <linux/dma-mapping.h>
#include <linux/of.h>
#include <sound/dmaengine_pcm.h>
static unsigned int prealloc_buffer_size_kbytes = …;
module_param(prealloc_buffer_size_kbytes, uint, 0444);
MODULE_PARM_DESC(…) …;
#define SND_DMAENGINE_PCM_FLAG_NO_RESIDUE …
static struct device *dmaengine_dma_dev(struct dmaengine_pcm *pcm,
struct snd_pcm_substream *substream)
{ … }
int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params, struct dma_slave_config *slave_config)
{ … }
EXPORT_SYMBOL_GPL(…);
static int dmaengine_pcm_hw_params(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *params)
{ … }
static int
dmaengine_pcm_set_runtime_hwparams(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int dmaengine_pcm_open(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int dmaengine_pcm_close(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int dmaengine_pcm_trigger(struct snd_soc_component *component,
struct snd_pcm_substream *substream, int cmd)
{ … }
static struct dma_chan *dmaengine_pcm_compat_request_channel(
struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_substream *substream)
{ … }
static bool dmaengine_pcm_can_report_residue(struct device *dev,
struct dma_chan *chan)
{ … }
static int dmaengine_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd)
{ … }
static snd_pcm_uframes_t dmaengine_pcm_pointer(
struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static int dmaengine_copy(struct snd_soc_component *component,
struct snd_pcm_substream *substream,
int channel, unsigned long hwoff,
struct iov_iter *iter, unsigned long bytes)
{ … }
static int dmaengine_pcm_sync_stop(struct snd_soc_component *component,
struct snd_pcm_substream *substream)
{ … }
static const struct snd_soc_component_driver dmaengine_pcm_component = …;
static const struct snd_soc_component_driver dmaengine_pcm_component_process = …;
static const char * const dmaengine_pcm_dma_channel_names[] = …;
static int dmaengine_pcm_request_chan_of(struct dmaengine_pcm *pcm,
struct device *dev, const struct snd_dmaengine_pcm_config *config)
{ … }
static void dmaengine_pcm_release_chan(struct dmaengine_pcm *pcm)
{ … }
static const struct snd_dmaengine_pcm_config snd_dmaengine_pcm_default_config = …;
int snd_dmaengine_pcm_register(struct device *dev,
const struct snd_dmaengine_pcm_config *config, unsigned int flags)
{ … }
EXPORT_SYMBOL_GPL(…);
void snd_dmaengine_pcm_unregister(struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;