public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
From: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
To: broonie@kernel.org
Cc: alsa-devel@alsa-project.org, ryder.lee@mediatek.com,
	wsd_upstream@mediatek.com, chipeng.chang@mediatek.com,
	garlic.tseng@mediatek.com, Hidalgo.Huang@mediatek.com,
	linux-mediatek@lists.infradead.org, PC.Liao@mediatek.com,
	kaichieh.chuang@mediatek.com
Subject: [PATCH] ASoC: mediatek: preallocate pages use platform device
Date: Fri, 27 Apr 2018 10:11:35 +0800	[thread overview]
Message-ID: <20180427021135.16002-1-kaichieh.chuang@mediatek.com> (raw)

preallocate pages should use platform device,
since we set dma mask for platform device.

Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com>
---
 sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 ++--
 1 file 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 53215b52e4f2..f8a06709f76d 100644
--- a/sound/soc/mediatek/common/mtk-afe-platform-driver.c
+++ b/sound/soc/mediatek/common/mtk-afe-platform-driver.c
@@ -64,14 +64,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)
-- 
2.12.5

             reply	other threads:[~2018-04-27  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27  2:11 KaiChieh Chuang [this message]
2018-04-27 10:59 ` Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree Mark Brown
     [not found] ` <20180427021135.16002-1-kaichieh.chuang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2018-04-27 10:59   ` Mark Brown
2018-04-30 19:44     ` Krzysztof Kozlowski
2018-05-01  0:41       ` KaiChieh Chuang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180427021135.16002-1-kaichieh.chuang@mediatek.com \
    --to=kaichieh.chuang@mediatek.com \
    --cc=Hidalgo.Huang@mediatek.com \
    --cc=PC.Liao@mediatek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=chipeng.chang@mediatek.com \
    --cc=garlic.tseng@mediatek.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=ryder.lee@mediatek.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox