1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>struct snd_dmaengine_pcm_config</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="The ALSA Driver API"><link rel="up" href="ch02s04.html" title="PCM DMA Engine API"><link rel="prev" href="API-struct-snd-dmaengine-dai-dma-data.html" title="struct snd_dmaengine_dai_dma_data"><link rel="next" href="ch03.html" title="Chapter&#160;3.&#160;Control/Mixer API"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct snd_dmaengine_pcm_config</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-snd-dmaengine-dai-dma-data.html">Prev</a>&#160;</td><th width="60%" align="center">PCM DMA Engine API</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch03.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-snd-dmaengine-pcm-config"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct snd_dmaengine_pcm_config &#8212; 
2     Configuration data for dmaengine based PCM
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct snd_dmaengine_pcm_config {
5  int (* prepare_slave_config) (struct snd_pcm_substream *substream,struct snd_pcm_hw_params *params,struct dma_slave_config *slave_config);
6  struct dma_chan *(* compat_request_channel) (struct snd_soc_pcm_runtime *rtd,struct snd_pcm_substream *substream);
7  dma_filter_fn compat_filter_fn;
8  struct device * dma_dev;
9  const char * chan_names[SNDRV_PCM_STREAM_LAST + 1];
10  const struct snd_pcm_hardware * pcm_hardware;
11  unsigned int prealloc_buffer_size;
12};  </pre></div><div class="refsect1"><a name="idp1094465188"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">prepare_slave_config</span></dt><dd><p>
13   Callback used to fill in the DMA slave_config for a
14   PCM substream. Will be called from the PCM drivers hwparams callback.
15      </p></dd><dt><span class="term">compat_request_channel</span></dt><dd><p>
16   Callback to request a DMA channel for platforms
17   which do not use devicetree.
18      </p></dd><dt><span class="term">compat_filter_fn</span></dt><dd><p>
19   Will be used as the filter function when requesting a
20   channel for platforms which do not use devicetree. The filter parameter
21   will be the DAI's DMA data.
22      </p></dd><dt><span class="term">dma_dev</span></dt><dd><p>
23   If set, request DMA channel on this device rather than the DAI
24   device.
25      </p></dd><dt><span class="term">chan_names[SNDRV_PCM_STREAM_LAST + 1]</span></dt><dd><p>
26   If set, these custom DMA channel names will be requested at
27   registration time.
28      </p></dd><dt><span class="term">pcm_hardware</span></dt><dd><p>
29   snd_pcm_hardware struct to be used for the PCM.
30      </p></dd><dt><span class="term">prealloc_buffer_size</span></dt><dd><p>
31   Size of the preallocated audio buffer.
32      </p></dd></dl></div></div><div class="refsect1"><a name="idp1094471156"></a><h2>Note</h2><p>
33   If both compat_request_channel and compat_filter_fn are set
34   compat_request_channel will be used to request the channel and
35   compat_filter_fn will be ignored. Otherwise the channel will be requested
36   using dma_request_channel with compat_filter_fn as the filter function.
37</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-snd-dmaengine-dai-dma-data.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch02s04.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct snd_dmaengine_dai_dma_data</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;3.&#160;Control/Mixer API</td></tr></table></div></body></html>
38