@@ -176,13 +176,21 @@ static int omap_pcm_open(struct snd_pcm_substream *substream)
{
struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct omap_pcm_dma_data *dma_data;
+ int ret;
snd_soc_set_runtime_hwparams(substream, &omap_pcm_hardware);
dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
- return snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
- &dma_data->dma_req);
+ if (rtd->cpu_dai->dev->of_node)
+ ret = snd_dmaengine_generic_pcm_open(substream,
+ rtd->cpu_dai->dev,
+ dma_data->dma_name);
+ else
+ ret = snd_dmaengine_pcm_open(substream, omap_dma_filter_fn,
+ &dma_data->dma_req);
+
+ return ret;
}
static int omap_pcm_close(struct snd_pcm_substream *substream)
@@ -29,6 +29,7 @@ struct snd_pcm_substream;
struct omap_pcm_dma_data {
char *name; /* stream identifier */
+ char *dma_name; /* DMA request name */
int dma_req; /* DMA request line */
unsigned long port_addr; /* transmit/receive register */
void (*set_threshold)(struct snd_pcm_substream *substream);
Update in order to use OMAP DMA DT binding for OMAP2+. In case of DT boot snd_dmaengine_generic_pcm_open function is used. Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> --- sound/soc/omap/omap-pcm.c | 12 ++++++++++-- sound/soc/omap/omap-pcm.h | 1 + 2 files changed, 11 insertions(+), 2 deletions(-)