From patchwork Thu Dec 20 15:36:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Katsuhiro Suzuki X-Patchwork-Id: 10739077 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A73D13B5 for ; Thu, 20 Dec 2018 15:37:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBDBC2909B for ; Thu, 20 Dec 2018 15:37:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFE18290B0; Thu, 20 Dec 2018 15:37:12 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 621A02909B for ; Thu, 20 Dec 2018 15:37:12 +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=bXRe/ZnWpKhS9mid7tWgDeXZexgYpMPBCL4Wka54ZPE=; b=DKLiMHQXSf90gl sO/lGg+OrAB51OmxdwUDJt3xlxMtO3+43oRMlbAaLZsNhprOQlC3xFoSOUrMJzVTVudeLyw2mV5jS C6BW5Yzq5KbD6gBnoza7UQhGureWZoeq65j3oFBjhBGXfRMsWDTyZo1VeSQdb5Z/1purT5nt5ZQyW 1Ri1LqR5saZV1ppHEr4aBm3bszJrka7LzCZyiOvLc/mbecFTRcas0xc/3k0HnRbfS6LYChKbC/IU4 aT0jLlAhQrWDwSkdqi/PT5pSooQASnsfy2UQWrUlEOllh+1bUELtMN9GN8r27/lEmx7/s4TonBSMm LC/H7cWkHNSQ77U/WSpA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1ga0Nm-0008Dr-Ls; Thu, 20 Dec 2018 15:37:06 +0000 Received: from www1102.sakura.ne.jp ([219.94.129.142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1ga0Nj-0008Cq-QR for linux-arm-kernel@lists.infradead.org; Thu, 20 Dec 2018 15:37:05 +0000 Received: from fsav404.sakura.ne.jp (fsav404.sakura.ne.jp [133.242.250.103]) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id wBKFafjM040744; Fri, 21 Dec 2018 00:36:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) Received: from www1102.sakura.ne.jp (219.94.129.142) by fsav404.sakura.ne.jp (F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp); Fri, 21 Dec 2018 00:36:41 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/530/fsav404.sakura.ne.jp) Received: from localhost.localdomain (183.38.232.153.ap.dti.ne.jp [153.232.38.183]) (authenticated bits=0) by www1102.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id wBKFabSF040730 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Dec 2018 00:36:41 +0900 (JST) (envelope-from katsuhiro@katsuster.net) From: Katsuhiro Suzuki To: Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH 2/2] ASoC: rockchip: add workaround for silence of rk3288 ACODEC Date: Fri, 21 Dec 2018 00:36:36 +0900 Message-Id: <20181220153636.5213-2-katsuhiro@katsuster.net> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181220153636.5213-1-katsuhiro@katsuster.net> References: <20181220153636.5213-1-katsuhiro@katsuster.net> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181220_073704_073072_81647DE9 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Katsuhiro Suzuki , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds reset and precharge in shutdown of PCM device. ACODEC goes to silence if we change Fs to 44.1kHz from 48kHz. This workaround seems to work but I don't know this workaround is correct sequence or not for ACODEC. Signed-off-by: Katsuhiro Suzuki --- sound/soc/codecs/rk3328_codec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/rk3328_codec.c b/sound/soc/codecs/rk3328_codec.c index 71f3fc2d970c..f3442a2283ea 100644 --- a/sound/soc/codecs/rk3328_codec.c +++ b/sound/soc/codecs/rk3328_codec.c @@ -261,9 +261,12 @@ static int rk3328_codec_close_playback(struct rk3328_codec_priv *rk3328) mdelay(1); } + /* Workaround for silence when changed Fs 48 -> 44.1kHz */ + rk3328_codec_reset(rk3328); + regmap_update_bits(rk3328->regmap, DAC_PRECHARGE_CTRL, DAC_CHARGE_CURRENT_ALL_MASK, - DAC_CHARGE_CURRENT_I); + DAC_CHARGE_CURRENT_ALL_ON); return 0; }