From patchwork Thu Apr 8 08:32:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Yu X-Patchwork-Id: 417481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC280C43460 for ; Thu, 8 Apr 2021 08:34:06 +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 E2B9561159 for ; Thu, 8 Apr 2021 08:34:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2B9561159 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-devel-bounces@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 BEB04166B; Thu, 8 Apr 2021 10:33:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BEB04166B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1617870842; bh=rEK/nqTnJG7bi8k5TfiajQVzJ24+HHsHzbY594I9EO8=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=LFLSHM4Bl6Hsm43uAiEeISKmYq38VEmLJEkgu/KbrV4NmBht8nw7NIDRP7BQQ1IuS uvC1pb2z2smb8nd1F0W+Rnmn02uZgo6U10T2lblyP/5qowu+BArO7WiGFRRLIG+vXi 3qRNWXICR1gvM0OP9CX0j9UCvxDqVtZ45u/zZnHI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 33019F80169; Thu, 8 Apr 2021 10:33:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7567FF8020B; Thu, 8 Apr 2021 10:33:10 +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 90CBBF800BD for ; Thu, 8 Apr 2021 10:32:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 90CBBF800BD Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.73 with qID 1388Wg4lA003536, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36502.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.71/5.88) with ESMTPS id 1388Wg4lA003536 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 8 Apr 2021 16:32:42 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36502.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.2106.2; Thu, 8 Apr 2021 16:32:42 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 8 Apr 2021 16:32:40 +0800 Received: from RTEXMBS01.realtek.com.tw ([fe80::f83d:39e1:3ee0:5403]) by RTEXMBS01.realtek.com.tw ([fe80::f83d:39e1:3ee0:5403%13]) with mapi id 15.01.2106.013; Thu, 8 Apr 2021 16:32:40 +0800 From: Jack Yu To: "broonie@kernel.org" , "lgirdwood@gmail.com" Subject: [PATCH] ASoC: rt1011: remove pack_id check in rt1011 Thread-Topic: [PATCH] ASoC: rt1011: remove pack_id check in rt1011 Thread-Index: AdcsUbxmWKvH/BghQSydUs0NHFILsQ== Date: Thu, 8 Apr 2021 08:32:40 +0000 Message-ID: <4cbe1cd3b8664140889132464c7dee7b@realtek.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: <4cbe1cd3b8664140889132464c7dee7b@realtek.com> x-originating-ip: [172.22.102.167] x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?big5?b?Q2xlYW4sIGJhc2VzOiAyMDIxLzQvOCCkV6TIIDA2?= =?big5?b?OjAwOjAw?= x-kse-attachment-filter-triggered-rules: Clean x-kse-attachment-filter-triggered-filters: Clean x-kse-bulkmessagesfiltering-scan-result: protection disabled MIME-Version: 1.0 X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 04/08/2021 08:12:16 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 162974 [Apr 07 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: jack.yu@realtek.com X-KSE-AntiSpam-Info: LuaCore: 442 442 b985cb57763b61d2a20abb585d5d4cc10c315b09 X-KSE-AntiSpam-Info: {tnef_exp} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {Track_Chinese_Simplified, headers_charset} X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 04/08/2021 08:15:00 X-KSE-ServerInfo: RTEXH36502.realtek.com.tw, 9 X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: protection disabled X-KSE-AntiSpam-Outbound-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 5.9.20, Database issued on: 04/08/2021 08:12:16 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 0 X-KSE-AntiSpam-Info: Lua profiles 162974 [Apr 07 2021] X-KSE-AntiSpam-Info: Version: 5.9.20.0 X-KSE-AntiSpam-Info: Envelope from: jack.yu@realtek.com X-KSE-AntiSpam-Info: LuaCore: 442 442 b985cb57763b61d2a20abb585d5d4cc10c315b09 X-KSE-AntiSpam-Info: {tnef_exp} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {Track_Chinese_Simplified, headers_charset} X-KSE-AntiSpam-Info: Rate: 0 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 04/08/2021 08:15:00 Cc: Oder Chiou , "alsa-devel@alsa-project.org" , "lars@metafoo.de" , =?big5?b?a2VudF9jaGVuQHJlYWx0?= =?big5?b?ZWsuY29tIFuzr6vYp7td?= , =?big5?b?s6/O66fT?= , =?big5?b?RGVyZWsgW6TovHe4cV0=?= , =?big5?b?U2h1bWluZyBbrVOu0bvKXQ==?= , "Flove\(HsinFu\)" 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" For latest design, different package could use the same setting, therefore the check of pack_id will no longer be used. Signed-off-by: Jack Yu --- sound/soc/codecs/rt1011.c | 16 ++-------------- sound/soc/codecs/rt1011.h | 1 - 2 files changed, 2 insertions(+), 15 deletions(-) -- 2.29.0 diff --git a/sound/soc/codecs/rt1011.c b/sound/soc/codecs/rt1011.c index 238cb66f4c6a..faff2b558687 100644 --- a/sound/soc/codecs/rt1011.c +++ b/sound/soc/codecs/rt1011.c @@ -2236,18 +2236,9 @@ static int rt1011_calibrate(struct rt1011_priv *rt1011, unsigned char cali_flag) dc_offset |= (value & 0xffff); dev_info(dev, "Gain1 offset=0x%x\n", dc_offset); - /* check the package info. */ - regmap_read(rt1011->regmap, RT1011_EFUSE_MATCH_DONE, &value); - if (value & 0x4) - rt1011->pack_id = 1; - if (cali_flag) { - if (rt1011->pack_id) - regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x292c); - else - regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x2925); - + regmap_write(rt1011->regmap, RT1011_ADC_SET_1, 0x2925); /* Class D on */ regmap_write(rt1011->regmap, RT1011_CLASS_D_POS, 0x010e); regmap_write(rt1011->regmap, @@ -2373,10 +2364,7 @@ static void rt1011_calibration_work(struct work_struct *work) rt1011_r0_load(rt1011); } - if (rt1011->pack_id) - snd_soc_component_write(component, RT1011_ADC_SET_1, 0x292c); - else - snd_soc_component_write(component, RT1011_ADC_SET_1, 0x2925); + snd_soc_component_write(component, RT1011_ADC_SET_1, 0x2925); } static int rt1011_parse_dp(struct rt1011_priv *rt1011, struct device *dev) diff --git a/sound/soc/codecs/rt1011.h b/sound/soc/codecs/rt1011.h index f3a9a96640f1..68fadc15fa8c 100644 --- a/sound/soc/codecs/rt1011.h +++ b/sound/soc/codecs/rt1011.h @@ -692,7 +692,6 @@ struct rt1011_priv { unsigned int r0_reg, cali_done; unsigned int r0_calib, temperature_calib; int recv_spk_mode; - unsigned int pack_id; /* 0: WLCSP; 1: QFN */ }; #endif /* end of _RT1011_H_ */