From patchwork Tue Oct 8 08:57:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Yu X-Patchwork-Id: 834002 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3AFB2CED27F for ; Tue, 8 Oct 2024 08:58:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4D8BA7F1; Tue, 8 Oct 2024 10:58:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4D8BA7F1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728377905; bh=tl6SsbzirXQQTueWLTGhe39C9wg5QT3+ctJZ7TTbevk=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=V0g78icEmbq26EpmLyw+9iOdITQzXeIYqa+ob21K6LtjZ0gG+qD5Je7Wl2akwGYIr irqID7MZh/yztxT36ZSzD4o1fzaYPkCZo3D1ooCL3OsnKF4Poir6gu+PfpYjj2c7hU rjV7Ph0rV5n3PLW1CNlCOcrldutl5Nf9TBjyrQVc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20778F805B3; Tue, 8 Oct 2024 10:57:55 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2D271F805B6; Tue, 8 Oct 2024 10:57:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EA730F80536; Tue, 8 Oct 2024 10:57:45 +0200 (CEST) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 794F5F800ED for ; Tue, 8 Oct 2024 10:57:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 794F5F800ED Authentication-Results: alsa1.perex.cz; dkim=temperror header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=fvwExus7 X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4988vUQr93103133, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1728377850; bh=tl6SsbzirXQQTueWLTGhe39C9wg5QT3+ctJZ7TTbevk=; h=Content-Type:From:To:CC:Subject:Date:Message-ID:MIME-Version; b=fvwExus7l8qRnPYRxDODyyq3N9R1YqOkMKLanRO9AiJ0nTWxm0EwpqSXHUJhVmFAD ED5qNGykbSl+50fjJlMPOxz1k9nHYVNovIadHjDwB628q630pYVWFSAZgW/NobJz8D SGHc0ypyy9a8Xd3DUc+Aj5RIHXiiLcx/QYf5MSVUNhbGA2loyPs9R78UKnzQRVFlts Rhbwy8i4cVZpvtS4QsYPMNaXfCTKDP2pk16f1cLPeAyynNU4PO7MwIbg7eWUPKXzyF fSZKeeGnlmh5bejCtYdCQAEhQmnXe4BgYlPYL7Va23EUnkSTdfxixgO6UT3InPcdT6 b65tQoPQ+CiMw== Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 4988vUQr93103133 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Oct 2024 16:57:30 +0800 Received: from RTEXDAG01.realtek.com.tw (172.21.6.100) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 8 Oct 2024 16:57:31 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXDAG01.realtek.com.tw (172.21.6.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 8 Oct 2024 16:57:30 +0800 Received: from RTEXMBS01.realtek.com.tw ([fe80::147b:e1e8:e867:41c2]) by RTEXMBS01.realtek.com.tw ([fe80::147b:e1e8:e867:41c2%7]) with mapi id 15.01.2507.035; Tue, 8 Oct 2024 16:57:30 +0800 From: Jack Yu To: "broonie@kernel.org" , "lgirdwood@gmail.com" CC: "alsa-devel@alsa-project.org" , "lars@metafoo.de" , "bard.liao@intel.com" , "naveen.m@intel.com" , "Flove(HsinFu)" , Oder Chiou , =?big5_tw?b?U2h1bWluZyBbrVOu0bvKXQ==?= , =?big5_tw?b?RGVyZWsgW6TovHe4cV0=?= , Jack Yu Subject: [PATCH 1/2] ASoC: Intel: Add rt721-sdca support for PTL platform Thread-Topic: [PATCH 1/2] ASoC: Intel: Add rt721-sdca support for PTL platform Thread-Index: AdsZYBrTuHsKOMPIQSuYZeRXhOTjxw== Date: Tue, 8 Oct 2024 08:57:30 +0000 Message-ID: Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-TNEF-Correlator: x-originating-ip: [172.21.6.42] MIME-Version: 1.0 Message-ID-Hash: WLV3N2RAQ7TP6ZRLZLA7HM3M54XSUC34 X-Message-ID-Hash: WLV3N2RAQ7TP6ZRLZLA7HM3M54XSUC34 X-MailFrom: jack.yu@realtek.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add rt721-sdca support for PTL platform. Signed-off-by: Jack Yu --- sound/soc/intel/boards/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig index cc10ae58b0c7..9b80b19bb8d0 100644 --- a/sound/soc/intel/boards/Kconfig +++ b/sound/soc/intel/boards/Kconfig @@ -519,6 +519,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select SND_SOC_RT712_SDCA_DMIC_SDW select SND_SOC_RT715_SDW select SND_SOC_RT715_SDCA_SDW + select SND_SOC_RT721_SDCA_SDW select SND_SOC_RT722_SDCA_SDW select SND_SOC_RT1308_SDW select SND_SOC_RT1308 From patchwork Tue Oct 8 08:57:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Yu X-Patchwork-Id: 833631 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 6EC6ECF8863 for ; Tue, 8 Oct 2024 08:58:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 3722C86F; Tue, 8 Oct 2024 10:58:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3722C86F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1728377927; bh=swKULQrE+YLS6/i3Nv/hVVQoqmwcDy+ZHSZ5ye/0InY=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=Go/TiOKcIquNcpKKI/SZYzGklhZqKUKvo/spCCy9XNSdZZ5tAvxvaPYuD0tlA8omY by5IIpjpG29ninIeGZHS6/fgG+PGpfbHdSmtKhiuK5wffOvzmAhVbcTDqcjZ5UTEdp c7MRVAnR2a6NXeL7M8/kuyZ0NbRkRVpdr4BABGmU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8693AF805EB; Tue, 8 Oct 2024 10:57:59 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E7EF9F805D3; Tue, 8 Oct 2024 10:57:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BD571F80528; Tue, 8 Oct 2024 10:57:48 +0200 (CEST) Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8E387F80527 for ; Tue, 8 Oct 2024 10:57:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8E387F80527 Authentication-Results: alsa1.perex.cz; dkim=temperror header.d=realtek.com header.i=@realtek.com header.a=rsa-sha256 header.s=dkim header.b=fR+LByy2 X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4988vboJ73103585, This message is accepted by code: ctloc85258 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=realtek.com; s=dkim; t=1728377857; bh=swKULQrE+YLS6/i3Nv/hVVQoqmwcDy+ZHSZ5ye/0InY=; h=Content-Type:From:To:CC:Subject:Date:Message-ID:MIME-Version; b=fR+LByy24wz8/inc8Fvdf+uggn0njWMo7DqgeXH34l6L23bPsMg70oLMGipA6BEhg 1S5P0R6wnJrdKLiI+EzXt9wM95Bzo/TePNPF4nxm6KWIotDkRgW9/puM2JXteK4ptu 6fShD0J6Ujnz+GX+4BsJJOsJjJ85Nvpq+1vpc7ZUGQ67WPt1LQRrRHS+KFX/YNiA1y zrNHvVtywLWrR4KE3gIv+cjrD0K9IltWnMC+GFX6OUhV93FeWyErelrlKMsC0v9d2V +Qgk3fbGay6YPQsB8nPv7p9GoSUs0p/48ZIS38gIhNHTD5iOINyXzRfPCLfSTPlSVr deHDTtzcL/p+A== Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/3.06/5.92) with ESMTPS id 4988vboJ73103585 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 8 Oct 2024 16:57:37 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 8 Oct 2024 16:57:37 +0800 Received: from RTEXMBS01.realtek.com.tw (172.21.6.94) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 8 Oct 2024 16:57:36 +0800 Received: from RTEXMBS01.realtek.com.tw ([fe80::147b:e1e8:e867:41c2]) by RTEXMBS01.realtek.com.tw ([fe80::147b:e1e8:e867:41c2%7]) with mapi id 15.01.2507.035; Tue, 8 Oct 2024 16:57:36 +0800 From: Jack Yu To: "broonie@kernel.org" , "lgirdwood@gmail.com" CC: "alsa-devel@alsa-project.org" , "lars@metafoo.de" , "bard.liao@intel.com" , "naveen.m@intel.com" , "Flove(HsinFu)" , Oder Chiou , =?big5_tw?b?U2h1bWluZyBbrVOu0bvKXQ==?= , =?big5_tw?b?RGVyZWsgW6TovHe4cV0=?= , Jack Yu Subject: [PATCH 2/2] ASoC: rt721-sdca: Fix issue of warning message Thread-Topic: [PATCH 2/2] ASoC: rt721-sdca: Fix issue of warning message Thread-Index: AdsZYB5twYpxAqYfT+6Yl9jzt54Bxg== Date: Tue, 8 Oct 2024 08:57:36 +0000 Message-ID: <065c0b7d84cf47d3a9186235447521c5@realtek.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-TNEF-Correlator: <065c0b7d84cf47d3a9186235447521c5@realtek.com> x-originating-ip: [172.21.6.42] MIME-Version: 1.0 Message-ID-Hash: MSWO6FGSRGJHTHD6B3W4F2MQ3H7GQO7C X-Message-ID-Hash: MSWO6FGSRGJHTHD6B3W4F2MQ3H7GQO7C X-MailFrom: jack.yu@realtek.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fix issue of warning messages caused by some variables. Signed-off-by: Jack Yu --- sound/soc/codecs/rt-sdw-common.c | 2 +- sound/soc/codecs/rt721-sdca.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rt-sdw-common.c b/sound/soc/codecs/rt-sdw-common.c index 9ed0e9855699..a422da6cf702 100644 --- a/sound/soc/codecs/rt-sdw-common.c +++ b/sound/soc/codecs/rt-sdw-common.c @@ -108,7 +108,7 @@ EXPORT_SYMBOL_GPL(rt_sdca_index_update_bits); int rt_sdca_btn_type(unsigned char *buffer) { u8 btn_type = 0; - int ret; + int ret = 0; btn_type |= buffer[0] & 0xf; btn_type |= (buffer[0] >> 4) & 0xf; diff --git a/sound/soc/codecs/rt721-sdca.c b/sound/soc/codecs/rt721-sdca.c index 36056cb7a3ca..201cb667c8c1 100644 --- a/sound/soc/codecs/rt721-sdca.c +++ b/sound/soc/codecs/rt721-sdca.c @@ -30,7 +30,7 @@ static void rt721_sdca_jack_detect_handler(struct work_struct *work) { struct rt721_sdca_priv *rt721 = container_of(work, struct rt721_sdca_priv, jack_detect_work.work); - int btn_type = 0, ret; + int btn_type = 0; if (!rt721->hs_jack) return; @@ -42,7 +42,7 @@ static void rt721_sdca_jack_detect_handler(struct work_struct *work) if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_6) { rt721->jack_type = rt_sdca_headset_detect(rt721->regmap, RT721_SDCA_ENT_GE49); - if (ret < 0) + if (rt721->jack_type < 0) return; }