未验证 提交 58edf325 编写于 作者: K Kai Chieh Chuang 提交者: Mark Brown

ASoC: mediatek: preallocate pages use platform device

preallocate pages should use platform device,
since we set dma mask for platform device.
Signed-off-by: NKaiChieh Chuang <kaichieh.chuang@mediatek.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 6534e3ab
......@@ -56,14 +56,14 @@ static const struct snd_pcm_ops mtk_afe_pcm_ops = {
static int mtk_afe_pcm_new(struct snd_soc_pcm_runtime *rtd)
{
size_t size;
struct snd_card *card = rtd->card->snd_card;
struct snd_pcm *pcm = rtd->pcm;
struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, AFE_PCM_NAME);
struct mtk_base_afe *afe = snd_soc_component_get_drvdata(component);
size = afe->mtk_afe_hardware->buffer_bytes_max;
return snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
card->dev, size, size);
rtd->platform->dev,
size, size);
}
static void mtk_afe_pcm_free(struct snd_pcm *pcm)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册