@@ -174,8 +174,23 @@ struct dmaengine_pcm {
unsigned int flags;
};
+struct dmaengine_pcm_runtime_data {
+ struct dma_chan *dma_chan;
+ dma_cookie_t cookie;
+
+ unsigned int pos;
+};
+
+static inline struct dmaengine_pcm_runtime_data *substream_to_prtd(
+ const struct snd_pcm_substream *substream)
+{
+ return substream->runtime->private_data;
+}
+
static inline struct dmaengine_pcm *soc_component_to_pcm(struct snd_soc_component *p)
{
return container_of(p, struct dmaengine_pcm, component);
}
+
+void dmaengine_pcm_dma_complete(void *arg);
#endif
@@ -19,19 +19,6 @@
#include <sound/dmaengine_pcm.h>
-struct dmaengine_pcm_runtime_data {
- struct dma_chan *dma_chan;
- dma_cookie_t cookie;
-
- unsigned int pos;
-};
-
-static inline struct dmaengine_pcm_runtime_data *substream_to_prtd(
- const struct snd_pcm_substream *substream)
-{
- return substream->runtime->private_data;
-}
-
struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)
{
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
@@ -128,7 +115,7 @@ void snd_dmaengine_pcm_set_config_from_dai_data(
}
EXPORT_SYMBOL_GPL(snd_dmaengine_pcm_set_config_from_dai_data);
-static void dmaengine_pcm_dma_complete(void *arg)
+void dmaengine_pcm_dma_complete(void *arg)
{
struct snd_pcm_substream *substream = arg;
struct dmaengine_pcm_runtime_data *prtd = substream_to_prtd(substream);
@@ -139,6 +126,7 @@ static void dmaengine_pcm_dma_complete(void *arg)
snd_pcm_period_elapsed(substream);
}
+EXPORT_SYMBOL_GPL(dmaengine_pcm_dma_complete);
static int dmaengine_pcm_prepare_and_submit(struct snd_pcm_substream *substream)
{