Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc3e1ce2 authored by Garlic Tseng's avatar Garlic Tseng Committed by Mark Brown
Browse files

ASoC: mediatek: add power-domain get/put ctrl for mt2701



add power-domain ctrl for audio driver

Signed-off-by: default avatarGarlic Tseng <garlic.tseng@mediatek.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b1b9e0d3
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1578,6 +1578,7 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev)
	pm_runtime_enable(&pdev->dev);
	pm_runtime_enable(&pdev->dev);
	if (!pm_runtime_enabled(&pdev->dev))
	if (!pm_runtime_enabled(&pdev->dev))
		goto err_pm_disable;
		goto err_pm_disable;
	pm_runtime_get_sync(&pdev->dev);


	ret = snd_soc_register_platform(&pdev->dev, &mtk_afe_pcm_platform);
	ret = snd_soc_register_platform(&pdev->dev, &mtk_afe_pcm_platform);
	if (ret) {
	if (ret) {
@@ -1617,6 +1618,7 @@ static int mt2701_afe_pcm_dev_remove(struct platform_device *pdev)
	pm_runtime_disable(&pdev->dev);
	pm_runtime_disable(&pdev->dev);
	if (!pm_runtime_status_suspended(&pdev->dev))
	if (!pm_runtime_status_suspended(&pdev->dev))
		mt2701_afe_runtime_suspend(&pdev->dev);
		mt2701_afe_runtime_suspend(&pdev->dev);
	pm_runtime_put_sync(&pdev->dev);


	snd_soc_unregister_component(&pdev->dev);
	snd_soc_unregister_component(&pdev->dev);
	snd_soc_unregister_platform(&pdev->dev);
	snd_soc_unregister_platform(&pdev->dev);