diff mbox series

ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops

Message ID 20220922103502.49981-1-angelogioacchino.delregno@collabora.com
State Accepted
Commit 14ed837b9740cc6ec25910980d67c22894b4ff56
Headers show
Series ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops | expand

Commit Message

AngeloGioacchino Del Regno Sept. 22, 2022, 10:35 a.m. UTC
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(-)

Comments

Trevor Wu Sept. 23, 2022, 4:39 a.m. UTC | #1
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
diff mbox series

Patch

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,
 };