From patchwork Wed Sep 29 11:18:20 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?RGVyZWsgW+aWueW+t+e+qV0=?= X-Patchwork-Id: 12525301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C614BC4332F for ; Wed, 29 Sep 2021 11:20:09 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 482FF613CE for ; Wed, 29 Sep 2021 11:20:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 482FF613CE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 30F191696; Wed, 29 Sep 2021 13:19:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 30F191696 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1632914406; bh=GzVazF9ODwWWHmXurVzA9XbZvdpky3mgHwYCiAqSXqg=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Am3Bu/OX6mSCxyJaJC5vOfSV9fgJg9E8lJtDrRwQFD66F7uQisr3Z6+hscVrLsjW9 iWAjS9wAFM77MIPCvf0orv/PmPueEDPOxVcd+5DbpfNO8sAvi4LazgDfVHSjbEcUHJ giqlLkaoYKBv17Ug3NOFWifeDsl40zSmAuRQuglk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B593AF801F7; Wed, 29 Sep 2021 13:19:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9FD9F80227; Wed, 29 Sep 2021 13:19:14 +0200 (CEST) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4BED2F80105 for ; Wed, 29 Sep 2021 13:19:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4BED2F80105 Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 18TBIpP02000338, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36503.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 18TBIpP02000338 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 29 Sep 2021 19:18:51 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXH36503.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.14; Wed, 29 Sep 2021 19:18:51 +0800 Received: from localhost.localdomain (172.22.234.227) by RTEXMBS01.realtek.com.tw (172.21.6.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Wed, 29 Sep 2021 19:18:50 +0800 From: To: , Subject: [PATCH] ASoC: rt5682s Minor modifications to look more sensibly Date: Wed, 29 Sep 2021 19:18:20 +0800 Message-ID: <20210929111820.1022-1-derek.fang@realtek.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [172.22.234.227] X-ClientProxiedBy: RTEXH36503.realtek.com.tw (172.21.6.25) To RTEXMBS01.realtek.com.tw (172.21.6.94) X-KSE-ServerInfo: RTEXMBS01.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: trusted connection X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Deterministic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 09/29/2021 11:02:00 X-KSE-AttachmentFiltering-Interceptor-Info: no applicable attachment filtering rules found X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: =?big5_tw?b?Q2xlYW4sIGJhc2VzOiAyMDIxLzkvMjkgpFekyCAwOTo0?= =?big5_tw?b?NzowMA==?= X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-ServerInfo: RTEXH36503.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback Cc: oder_chiou@realtek.com, jack.yu@realtek.com, alsa-devel@alsa-project.org, lars@metafoo.de, Derek Fang , shumingf@realtek.com, flove@realtek.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Derek Fang These modifications wouldn't affect the driver's behavior, but the code could look more sensibly. 1. Remove the volatile reg (0x0000) in reg_default. 2. Use dev_dbg instead of pr_debug. 3. Revise the macro RT5682S_PLLB_SRC_MASK to 0x1 because the mux is only two-source. Signed-off-by: Derek Fang --- sound/soc/codecs/rt5682s.c | 3 +-- sound/soc/codecs/rt5682s.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c index d3e965b2e707..122adeb7beb1 100644 --- a/sound/soc/codecs/rt5682s.c +++ b/sound/soc/codecs/rt5682s.c @@ -72,7 +72,6 @@ static void rt5682s_apply_patch_list(struct rt5682s_priv *rt5682s, } const struct reg_default rt5682s_reg[] = { - {0x0000, 0x0001}, {0x0002, 0x8080}, {0x0003, 0x0001}, {0x0005, 0x0000}, @@ -769,7 +768,7 @@ static int rt5682s_headset_detect(struct snd_soc_component *component, int jack_ count++; } while (val == 0 && count < 50); - pr_debug("%s, val=%d, count=%d\n", __func__, val, count); + dev_dbg(component->dev, "%s, val=%d, count=%d\n", __func__, val, count); switch (val) { case 0x1: diff --git a/sound/soc/codecs/rt5682s.h b/sound/soc/codecs/rt5682s.h index 7c755e5efb81..55f1febb81e9 100644 --- a/sound/soc/codecs/rt5682s.h +++ b/sound/soc/codecs/rt5682s.h @@ -1094,7 +1094,7 @@ #define RT5682S_PLLA_K_BP_SFT 6 /* PLL M/N/K Code Control 7 (0x009e) */ -#define RT5682S_PLLB_SRC_MASK (0x3 << 0) +#define RT5682S_PLLB_SRC_MASK (0x1) #define RT5682S_PLLB_SRC_DFIN (0x1) #define RT5682S_PLLB_SRC_PLLA (0x0)