summaryrefslogtreecommitdiffstats
path: root/sound/soc/mediatek
diff options
context:
space:
mode:
authorKai Chieh Chuang <kaichieh.chuang@mediatek.com>2018-04-27 04:11:35 +0200
committerMark Brown <broonie@kernel.org>2018-04-27 12:58:23 +0200
commit58edf3255ca3025444c016241611453585453089 (patch)
tree1384d6bf85f63e3921d11c66de75b5d710d23d1b /sound/soc/mediatek
parentASoC: omap: Remove OMAP_MUX dependency from Nokia N810 audio support (diff)
downloadlinux-58edf3255ca3025444c016241611453585453089.tar.xz
linux-58edf3255ca3025444c016241611453585453089.zip
ASoC: mediatek: preallocate pages use platform device
preallocate pages should use platform device, since we set dma mask for platform device. Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r--sound/soc/mediatek/common/mtk-afe-platform-driver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/mediatek/common/mtk-afe-platform-driver.c b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
index 404fbe19e1a3..d046ea8e543b 100644
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c
+++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
@@ -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)