public inbox for linux-mediatek@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: mediatek: preallocate pages use platform device
@ 2018-04-27  2:11 KaiChieh Chuang
  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>
  0 siblings, 2 replies; 5+ messages in thread
From: KaiChieh Chuang @ 2018-04-27  2:11 UTC (permalink / raw)
  To: broonie
  Cc: alsa-devel, ryder.lee, wsd_upstream, chipeng.chang, garlic.tseng,
	Hidalgo.Huang, linux-mediatek, PC.Liao, kaichieh.chuang

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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree
  2018-04-27  2:11 [PATCH] ASoC: mediatek: preallocate pages use platform device KaiChieh Chuang
@ 2018-04-27 10:59 ` Mark Brown
       [not found] ` <20180427021135.16002-1-kaichieh.chuang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2018-04-27 10:59 UTC (permalink / raw)
  Cc: KaiChieh Chuang, Mark Brown, stable

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 5845e6155d8f4a4a9bae2d4c1d1bb4a4d9a925c2 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>
Cc: stable@vger.kernel.org
---
 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.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree
       [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
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Brown @ 2018-04-27 10:59 UTC (permalink / raw)
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	ryder.lee-NuS5LvNUpcJWk0Htik3J/w,
	wsd_upstream-NuS5LvNUpcJWk0Htik3J/w,
	chipeng.chang-NuS5LvNUpcJWk0Htik3J/w,
	garlic.tseng-NuS5LvNUpcJWk0Htik3J/w,
	Hidalgo.Huang-NuS5LvNUpcJWk0Htik3J/w,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	PC.Liao-NuS5LvNUpcJWk0Htik3J/w,
	kaichieh.chuang-NuS5LvNUpcJWk0Htik3J/w

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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 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 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)
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree
  2018-04-27 10:59   ` Mark Brown
@ 2018-04-30 19:44     ` Krzysztof Kozlowski
  2018-05-01  0:41       ` KaiChieh Chuang
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2018-04-30 19:44 UTC (permalink / raw)
  To: Mark Brown
  Cc: alsa-devel, ryder.lee, wsd_upstream, chipeng.chang, garlic.tseng,
	Hidalgo.Huang, linux-mediatek, PC.Liao, Kai Chieh Chuang

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)
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Applied "ASoC: mediatek: preallocate pages use platform device" to the asoc tree
  2018-04-30 19:44     ` Krzysztof Kozlowski
@ 2018-05-01  0:41       ` KaiChieh Chuang
  0 siblings, 0 replies; 5+ messages in thread
From: KaiChieh Chuang @ 2018-05-01  0:41 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: alsa-devel, ryder.lee, wsd_upstream, chipeng.chang, garlic.tseng,
	Hidalgo.Huang, Mark Brown, linux-mediatek, PC.Liao

i have submitted a patch to fix this in 4-18,
http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/135316.html
thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-01  0:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-27  2:11 [PATCH] ASoC: mediatek: preallocate pages use platform device KaiChieh Chuang
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox