linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
@ 2022-09-22 10:35 AngeloGioacchino Del Regno
  2022-09-22 11:26 ` Tzung-Bi Shih
  2022-09-23 17:06 ` Mark Brown
  0 siblings, 2 replies; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22 10:35 UTC (permalink / raw)
  To: broonie
  Cc: lgirdwood, perex, tiwai, matthias.bgg, trevor.wu, tzungbi,
	angelogioacchino.delregno, alsa-devel, linux-arm-kernel,
	linux-mediatek, linux-kernel

It is possible to use the standard snd_soc_pm_ops for this card:
remove the custom mt8195_mt6359_pm_ops.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 sound/soc/mediatek/mt8195/mt8195-mt6359.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
index 961e769602d6..23bdde6acd1c 100644
--- a/sound/soc/mediatek/mt8195/mt8195-mt6359.c
+++ b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
@@ -1532,16 +1532,11 @@ static const struct of_device_id mt8195_mt6359_dt_match[] = {
 	{},
 };
 
-static const struct dev_pm_ops mt8195_mt6359_pm_ops = {
-	.poweroff = snd_soc_poweroff,
-	.restore = snd_soc_resume,
-};
-
 static struct platform_driver mt8195_mt6359_driver = {
 	.driver = {
 		.name = "mt8195_mt6359",
 		.of_match_table = mt8195_mt6359_dt_match,
-		.pm = &mt8195_mt6359_pm_ops,
+		.pm = &snd_soc_pm_ops,
 	},
 	.probe = mt8195_mt6359_dev_probe,
 };
-- 
2.37.2


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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-22 10:35 [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops AngeloGioacchino Del Regno
@ 2022-09-22 11:26 ` Tzung-Bi Shih
  2022-09-22 13:30   ` Mark Brown
  2022-09-23 17:06 ` Mark Brown
  1 sibling, 1 reply; 7+ messages in thread
From: Tzung-Bi Shih @ 2022-09-22 11:26 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: broonie, alsa-devel, linux-kernel, tiwai, lgirdwood,
	linux-mediatek, trevor.wu, matthias.bgg, linux-arm-kernel

On Thu, Sep 22, 2022 at 12:35:02PM +0200, AngeloGioacchino Del Regno wrote:
> -static const struct dev_pm_ops mt8195_mt6359_pm_ops = {
> -	.poweroff = snd_soc_poweroff,
> -	.restore = snd_soc_resume,
> -};
> -
>  static struct platform_driver mt8195_mt6359_driver = {
>  	.driver = {
>  		.name = "mt8195_mt6359",
>  		.of_match_table = mt8195_mt6359_dt_match,
> -		.pm = &mt8195_mt6359_pm_ops,
> +		.pm = &snd_soc_pm_ops,

snd_soc_pm_ops[1] sets some more fields.  I'm not quite sure whether
it would introduce any side effect or not.  Perhaps Trevor could
provide some suggestions.

[1]: https://elixir.bootlin.com/linux/v5.19.10/source/sound/soc/soc-core.c#L2150

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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-22 11:26 ` Tzung-Bi Shih
@ 2022-09-22 13:30   ` Mark Brown
  2022-09-22 14:10     ` AngeloGioacchino Del Regno
  0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2022-09-22 13:30 UTC (permalink / raw)
  To: Tzung-Bi Shih
  Cc: AngeloGioacchino Del Regno, alsa-devel, linux-kernel, tiwai,
	lgirdwood, linux-mediatek, trevor.wu, matthias.bgg,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

On Thu, Sep 22, 2022 at 07:26:21PM +0800, Tzung-Bi Shih wrote:

> snd_soc_pm_ops[1] sets some more fields.  I'm not quite sure whether
> it would introduce any side effect or not.  Perhaps Trevor could
> provide some suggestions.

If it does it should be to fix isues rather than introduce new
problems - I suspect the other operations just don't work
currently.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-22 13:30   ` Mark Brown
@ 2022-09-22 14:10     ` AngeloGioacchino Del Regno
  2022-09-23  4:39       ` Trevor Wu
  0 siblings, 1 reply; 7+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-09-22 14:10 UTC (permalink / raw)
  To: Mark Brown, Tzung-Bi Shih
  Cc: alsa-devel, linux-kernel, tiwai, lgirdwood, linux-mediatek,
	trevor.wu, matthias.bgg, linux-arm-kernel

Il 22/09/22 15:30, Mark Brown ha scritto:
> On Thu, Sep 22, 2022 at 07:26:21PM +0800, Tzung-Bi Shih wrote:
> 
>> snd_soc_pm_ops[1] sets some more fields.  I'm not quite sure whether
>> it would introduce any side effect or not.  Perhaps Trevor could
>> provide some suggestions.
> 
> If it does it should be to fix isues rather than introduce new
> problems - I suspect the other operations just don't work
> currently.

 From my upstream tests, this didn't introduce any issues, that's why I've
sent this patch.

In any case, let's check with Trevor, just as to be extremely sure, but please
use an upstream kernel for eventual tests, as there are quite a bit of changes
between 5.10 and current upstream.

Cheers,
Angelo

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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-22 14:10     ` AngeloGioacchino Del Regno
@ 2022-09-23  4:39       ` Trevor Wu
  2022-09-23  5:03         ` Tzung-Bi Shih
  0 siblings, 1 reply; 7+ messages in thread
From: Trevor Wu @ 2022-09-23  4:39 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Mark Brown, Tzung-Bi Shih
  Cc: alsa-devel, linux-kernel, tiwai, lgirdwood, linux-mediatek,
	matthias.bgg, linux-arm-kernel

On Thu, 2022-09-22 at 16:10 +0200, AngeloGioacchino Del Regno wrote:
> Il 22/09/22 15:30, Mark Brown ha scritto:
> > On Thu, Sep 22, 2022 at 07:26:21PM +0800, Tzung-Bi Shih wrote:
> > 
> > > snd_soc_pm_ops[1] sets some more fields.  I'm not quite sure
> > > whether
> > > it would introduce any side effect or not.  Perhaps Trevor could
> > > provide some suggestions.
> > 
> > If it does it should be to fix isues rather than introduce new
> > problems - I suspect the other operations just don't work
> > currently.
> 
>  From my upstream tests, this didn't introduce any issues, that's why
> I've
> sent this patch.
> 
> In any case, let's check with Trevor, just as to be extremely sure,
> but please
> use an upstream kernel for eventual tests, as there are quite a bit
> of changes
> between 5.10 and current upstream.
> 
> Cheers,
> Angelo

I think it's not a big risk if Angelo already did the test and
snd_soc_pm_ops is also used in MT8186.
I can help do more tests on 5.10 when the patch is back to chromium in
the future.
MTK also have a plan to support complete suspend/resume functionality
in MT8195. If Tzung-bi has concerns about the patch, I can help submit
the patch at the time.

Thanks,
Trevor


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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-23  4:39       ` Trevor Wu
@ 2022-09-23  5:03         ` Tzung-Bi Shih
  0 siblings, 0 replies; 7+ messages in thread
From: Tzung-Bi Shih @ 2022-09-23  5:03 UTC (permalink / raw)
  To: Trevor Wu
  Cc: AngeloGioacchino Del Regno, Mark Brown, alsa-devel, linux-kernel,
	tiwai, lgirdwood, linux-mediatek, matthias.bgg, linux-arm-kernel

On Fri, Sep 23, 2022 at 12:39:54PM +0800, Trevor Wu wrote:
> On Thu, 2022-09-22 at 16:10 +0200, AngeloGioacchino Del Regno wrote:
> > Il 22/09/22 15:30, Mark Brown ha scritto:
> > > On Thu, Sep 22, 2022 at 07:26:21PM +0800, Tzung-Bi Shih wrote:
> > > 
> > > > snd_soc_pm_ops[1] sets some more fields.  I'm not quite sure
> > > > whether
> > > > it would introduce any side effect or not.  Perhaps Trevor could
> > > > provide some suggestions.
> > > 
> > > If it does it should be to fix isues rather than introduce new
> > > problems - I suspect the other operations just don't work
> > > currently.
> > 
> >  From my upstream tests, this didn't introduce any issues, that's why
> > I've
> > sent this patch.
> > 
> > In any case, let's check with Trevor, just as to be extremely sure,
> > but please
> > use an upstream kernel for eventual tests, as there are quite a bit
> > of changes
> > between 5.10 and current upstream.
> > 
> > Cheers,
> > Angelo
> 
> I think it's not a big risk if Angelo already did the test and
> snd_soc_pm_ops is also used in MT8186.
> I can help do more tests on 5.10 when the patch is back to chromium in
> the future.
> MTK also have a plan to support complete suspend/resume functionality
> in MT8195. If Tzung-bi has concerns about the patch, I can help submit
> the patch at the time.

I have no further concern as long as you guys are also aware of the change.

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

* Re: [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
  2022-09-22 10:35 [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops AngeloGioacchino Del Regno
  2022-09-22 11:26 ` Tzung-Bi Shih
@ 2022-09-23 17:06 ` Mark Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Brown @ 2022-09-23 17:06 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: tzungbi, alsa-devel, linux-kernel, linux-mediatek, perex, tiwai,
	trevor.wu, linux-arm-kernel, lgirdwood, matthias.bgg

On Thu, 22 Sep 2022 12:35:02 +0200, AngeloGioacchino Del Regno wrote:
> It is possible to use the standard snd_soc_pm_ops for this card:
> remove the custom mt8195_mt6359_pm_ops.
> 
> 

Applied to

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

Thanks!

[1/1] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
      commit: 14ed837b9740cc6ec25910980d67c22894b4ff56

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

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

end of thread, other threads:[~2022-09-23 17:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-22 10:35 [PATCH] ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops AngeloGioacchino Del Regno
2022-09-22 11:26 ` Tzung-Bi Shih
2022-09-22 13:30   ` Mark Brown
2022-09-22 14:10     ` AngeloGioacchino Del Regno
2022-09-23  4:39       ` Trevor Wu
2022-09-23  5:03         ` Tzung-Bi Shih
2022-09-23 17:06 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).