From patchwork Wed Mar 1 11:01:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?VHJldm9yIFd1ICjlkLPmlofoia8p?= X-Patchwork-Id: 62848 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3568401wrd; Wed, 1 Mar 2023 03:10:34 -0800 (PST) X-Google-Smtp-Source: AK7set94+bKoMpnIo2B/ZicsWWRb79/YjUD83bKbAVYHVvwoUSwIkLTe0xCYd86ccLevqJXyDxcs X-Received: by 2002:a17:902:9a47:b0:19a:e453:752b with SMTP id x7-20020a1709029a4700b0019ae453752bmr4782101plv.9.1677669034232; Wed, 01 Mar 2023 03:10:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677669034; cv=none; d=google.com; s=arc-20160816; b=tqj+WpFdAYWmyZTQTLexqKmS0qaPjqv3daPLE9JwAOoH/CH6zMb8zcKgQnpsWgD9yd 3VKA2lnbLiKsmA0+3btSKXQLUe/rcfXGFnaYL7FJ9EVh6AxBVaidtKGprmId/Gm7HU5u 0FBl70nzg1CdNCVBKUPkfBTeI/qmVPG5tt1DzP0rPEgMPV+eyWKHmlGhm/07bNVykcb4 DmxJXqGRtm+0CCnW9tMewuOCgmHbF1Gn89JkXGH0a9FbcV8IBhTpAIY7sJO8yzwtbfEq j53YGtuwKc9sfhtqGm/I9zbGQkmqKGWf0fklzrMq+ivtp9bwqbMFOHvqUMIUq3bJgCEn gX4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EX/FhLHpO7zphWbyD2A6bG1X9xJvIJg8CPj756Q4Cag=; b=AkIhd6Lms98h6WnKuKdGsWVslPt+wd7jjOnZVieXUYH+bPTsQYcSbPTqJWWv6TE2UL B48qqBLTrVDeq0uCiv/E8q3CVihkax274DlAKfLDgDROjWhGhihppTncBoxuLDkuKtQL zf8xLKv6QB5p+IZYaxW2nCOWx2BHBl9qDVbKYwJOBRRag9Y36fbzyZhFq14yNVtLK3FY wZW1YhbJMLuPC6DX4fIQcc9yXagyHSEBgaZHZtDUrH4JhnxDGsGV2hq/gMJPiYtP1eSI 5TSVZsDQaBJnd73Mq9sDASQTaXd8qRswqrLbt6Jy9FgNvDliUXq7VwtRv6/se8gxl0Ey TAzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DBURAp35; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jx16-20020a170903139000b0019cbe4c22f6si10657223plb.516.2023.03.01.03.10.21; Wed, 01 Mar 2023 03:10:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=DBURAp35; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229895AbjCALCR (ORCPT + 99 others); Wed, 1 Mar 2023 06:02:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjCALCQ (ORCPT ); Wed, 1 Mar 2023 06:02:16 -0500 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07903305FD for ; Wed, 1 Mar 2023 03:02:08 -0800 (PST) X-UUID: 7fec8596b82011eda06fc9ecc4dadd91-20230301 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=EX/FhLHpO7zphWbyD2A6bG1X9xJvIJg8CPj756Q4Cag=; b=DBURAp35WcAum1F9ZbR46oMZBhQFiED9f8ABDYeCD0PLrQ9SNreM06EyiDHcW1wyi8vSsrVTiXf3LE3y9dU5Az27tdYARM8xueNUNqGwi9Jrq0lhBY/Qsfz4MO6BRu8XWFNqzcXHujjP69+SsP+qCFSku9y6lp/MhklvhW5caaw=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.20,REQID:4fac1e71-67fa-43c1-9c05-fe2b9ed57154,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:25b5999,CLOUDID:d565fd26-564d-42d9-9875-7c868ee415ec,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0 X-UUID: 7fec8596b82011eda06fc9ecc4dadd91-20230301 Received: from mtkmbs11n1.mediatek.inc [(172.21.101.185)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1458818991; Wed, 01 Mar 2023 19:02:04 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs13n2.mediatek.inc (172.21.101.108) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Wed, 1 Mar 2023 19:02:03 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Wed, 1 Mar 2023 19:02:03 +0800 From: Trevor Wu To: , , , , CC: , , , , , Subject: [PATCH v2 1/2] ASoC: mediatek: mt8188: add missing initialization Date: Wed, 1 Mar 2023 19:01:59 +0800 Message-ID: <20230301110200.26177-2-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230301110200.26177-1-trevor.wu@mediatek.com> References: <20230301110200.26177-1-trevor.wu@mediatek.com> MIME-Version: 1.0 X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, T_SPF_TEMPERROR,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759163485314343199?= X-GMAIL-MSGID: =?utf-8?q?1759163485314343199?= In etdm dai driver, dai_etdm_parse_of() function is used to parse dts properties to get parameters. There are two for-loops which are sepearately for all etdm and etdm input only cases. In etdm in only loop, dai_id is not initialized, so it keeps the value intiliazed in another loop. In the patch, add the missing initialization to fix the unexpected parsing problem. Fixes: 2babb4777489 ("ASoC: mediatek: mt8188: support etdm in platform driver") Signed-off-by: Trevor Wu Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c index 1c53d4cb19bb..7a37752d4244 100644 --- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c +++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c @@ -2498,6 +2498,9 @@ static void mt8188_dai_etdm_parse_of(struct mtk_base_afe *afe) /* etdm in only */ for (i = 0; i < 2; i++) { + dai_id = ETDM_TO_DAI_ID(i); + etdm_data = afe_priv->dai_priv[dai_id]; + snprintf(prop, sizeof(prop), "mediatek,%s-chn-disabled", of_afe_etdms[i].name);