diff mbox

Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree

Message ID E1fC164-0003ui-Ea@debutante (mailing list archive)
State New, archived
Headers show

Commit Message

Mark Brown April 27, 2018, 10:59 a.m. UTC
The patch

   ASoC: mediatek: preallocate pages use platform device

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 58edf3255ca3025444c016241611453585453089 Mon Sep 17 00:00:00 2001
From: Kai Chieh Chuang <kaichieh.chuang@mediatek.com>
Date: Fri, 27 Apr 2018 10:11:35 +0800
Subject: [PATCH] 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>
---
 sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Krzysztof Kozlowski April 30, 2018, 7:44 p.m. UTC | #1
On Fri, Apr 27, 2018 at 11:59:24AM +0100, Mark Brown wrote:
> The patch
> 
>    ASoC: mediatek: preallocate pages use platform device
> 
> has been applied to the asoc tree at
> 
>    https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 
> 
> All being well this means that it will be integrated into the linux-next
> tree (usually sometime in the next 24 hours) and sent to Linus during
> the next merge window (or sooner if it is a bug fix), however if
> problems are discovered then the patch may be dropped or reverted.  
> 
> You may get further e-mails resulting from automated or manual testing
> and review of the tree, please engage with people reporting problems and
> send followup patches addressing any issues that are reported if needed.
> 
> If any updates are required or you are submitting further changes they
> should be sent as incremental updates against current git, existing
> patches will not be replaced.
> 
> Please add any relevant lists and maintainers to the CCs when replying
> to this mail.
> 
> Thanks,
> Mark
> 
> >From 58edf3255ca3025444c016241611453585453089 Mon Sep 17 00:00:00 2001
> From: Kai Chieh Chuang <kaichieh.chuang@mediatek.com>
> Date: Fri, 27 Apr 2018 10:11:35 +0800
> Subject: [PATCH] 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>
> ---
>  sound/soc/mediatek/common/mtk-afe-platform-driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Hi,

It looks like this patch breaks compilation of allyesconfig on ARM
next-20180430:

      CC      sound/soc/mediatek/common/mtk-afe-platform-driver.o
    ../sound/soc/mediatek/common/mtk-afe-platform-driver.c: In function ‘mtk_afe_pcm_new’:
    ../sound/soc/mediatek/common/mtk-afe-platform-driver.c:65:15: error: ‘struct snd_soc_pcm_runtime’ has no member named ‘platform’
                rtd->platform->dev,
                   ^
    ../sound/soc/mediatek/common/mtk-afe-platform-driver.c:67:1: warning: control reaches end of non-void function [-Wreturn-type]
     }
     ^
    ../scripts/Makefile.build:312: recipe for target 'sound/soc/mediatek/common/mtk-afe-platform-driver.o' failed
    make[5]: *** [sound/soc/mediatek/common/mtk-afe-platform-driver.o] Error 1

Reverting it helps.

Best regards,
Krzysztof

> 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)
KaiChieh Chuang May 1, 2018, 12:41 a.m. UTC | #2
i have submitted a patch to fix this in 4-18,
http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/135316.html
thanks.
diff mbox

Patch

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)