From patchwork Thu Feb 16 05:27:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Garlic Tseng X-Patchwork-Id: 9576477 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1EEF60209 for ; Thu, 16 Feb 2017 05:28:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C692C285AD for ; Thu, 16 Feb 2017 05:28:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB400285B0; Thu, 16 Feb 2017 05:28:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 804A0285AD for ; Thu, 16 Feb 2017 05:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=diskSFGysFoSg6/Ez+TSKOoB2Y/vGYT9nCHualOtwSM=; b=U+M8qUCtGZd7+0 OgXgVSFnFvym+/k7ShaBIjZCt4uKe3Bbwi1BYCQdpLE2BPVBY8nWjVpc+EZn5MNzDAhLFy11qWHy6 H1fAJSTAfAZJ3LzD2hkJuejAnJorhxwN6Lbov11VDomWRMHKBBNrf5hdB8rZCyv83V+r8GfzNU9Q0 ZcZDl9VJJM5RzguE6vVLo4bMWzp6L1PsB07ABU9fyPPhoEB5iP34Yx3vfUO2r28pVuzLPFObwDH7W U179CAxzXm1TyMQlohg3yPD1MDJt1oTHYhN8ZZ+nOHfl+Ab63xyu3SVqHDrxXgBgMBbMH7Jstm7Ff mRqlNRvDG4f7g9vNrfLg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ceEbv-0007TC-TV; Thu, 16 Feb 2017 05:28:07 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ceEbd-0007Em-QF; Thu, 16 Feb 2017 05:27:51 +0000 Received: from mtkhts09.mediatek.inc [(172.21.101.70)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1842823807; Thu, 16 Feb 2017 13:27:20 +0800 Received: from mtkslt206 (10.21.15.99) by mtkhts09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 14.3.266.1; Thu, 16 Feb 2017 13:27:19 +0800 Received: by mtkslt206 (Postfix, from userid 10010076) id 0F55F188C9D; Thu, 16 Feb 2017 13:27:19 +0800 (CST) From: Garlic Tseng To: , Subject: [alsa-devel] [PATCH 1/2] ASoC: mediatek: add power-domain get/put ctrl for mt2701 Date: Thu, 16 Feb 2017 13:27:15 +0800 Message-ID: <1487222836-21174-2-git-send-email-garlic.tseng@mediatek.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1487222836-21174-1-git-send-email-garlic.tseng@mediatek.com> References: <1487222836-21174-1-git-send-email-garlic.tseng@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170215_212750_013688_2C9C8A37 X-CRM114-Status: UNSURE ( 8.86 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, ir.lian@mediatek.com, srv_heupstream@mediatek.com, garlic.tseng@mediatek.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP add power-domain ctrl for audio driver Signed-off-by: Garlic Tseng --- sound/soc/mediatek/mt2701/mt2701-afe-pcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c index 34a6123..c7fa3e6 100644 --- a/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c +++ b/sound/soc/mediatek/mt2701/mt2701-afe-pcm.c @@ -1578,6 +1578,7 @@ static int mt2701_afe_pcm_dev_probe(struct platform_device *pdev) pm_runtime_enable(&pdev->dev); if (!pm_runtime_enabled(&pdev->dev)) goto err_pm_disable; + pm_runtime_get_sync(&pdev->dev); ret = snd_soc_register_platform(&pdev->dev, &mtk_afe_pcm_platform); if (ret) { @@ -1617,6 +1618,7 @@ static int mt2701_afe_pcm_dev_remove(struct platform_device *pdev) pm_runtime_disable(&pdev->dev); if (!pm_runtime_status_suspended(&pdev->dev)) mt2701_afe_runtime_suspend(&pdev->dev); + pm_runtime_put_sync(&pdev->dev); snd_soc_unregister_component(&pdev->dev); snd_soc_unregister_platform(&pdev->dev);