return snd_dmaengine_pcm_open(substream, chan);
}
-static void dmaengine_pcm_free(struct snd_pcm *pcm)
-{
- snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
static struct dma_chan *dmaengine_pcm_compat_request_channel(
struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_substream *substream)
if (!pcm->chan[i]) {
dev_err(rtd->platform->dev,
"Missing dma channel for stream: %d\n", i);
- ret = -EINVAL;
- goto err_free;
+ return -EINVAL;
}
ret = snd_pcm_lib_preallocate_pages(substream,
prealloc_buffer_size,
max_buffer_size);
if (ret)
- goto err_free;
+ return ret;
/*
* This will only return false if we know for sure that at least
}
return 0;
-
-err_free:
- dmaengine_pcm_free(rtd->pcm);
- return ret;
}
static snd_pcm_uframes_t dmaengine_pcm_pointer(
},
.ops = &dmaengine_pcm_ops,
.pcm_new = dmaengine_pcm_new,
- .pcm_free = dmaengine_pcm_free,
};
static const char * const dmaengine_pcm_dma_channel_names[] = {