From patchwork Mon Oct 23 09:54:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432642 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 579E0C00A8F for ; Mon, 23 Oct 2023 09:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4YC/W8702n/IhtK2/nRJYRFXj5SA3+z6eWXwAmZT4eY=; b=GlgC+jGJQDRSyiQ/m5JF7NATKn um9UEu3tKHtpPQ3NxeJd+npjrW/wTqQ/uET6DHsX+bagnycg/8UtlT6yRvQIsREL0otykb9VmpUtP p6VAr06obSYAPzTOQOy0TsPXXbKin+tyeDJ5FNd11P8ErJ903cDgxf90izPPEkGpgh7e8z1XxlhTO rRkXVqSytiKop1w0CM1q8vXIuIFlEbX8zWFVmx3rNRFVayyrijcQYjMrtWdibvYfeHIgftWcUmUT+ SgO+vkrvIoNdd2JU0nbeOpwa3Kt1C1TDBDrgwycgYo4h9HPkrOkLdyGQREl+mFBopKT3g+BW/tp/h esF0GcEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qure3-006wEV-0B; Mon, 23 Oct 2023 09:54:47 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qurdt-006w8T-1C for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:38 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32d834ec222so2098495f8f.0 for ; Mon, 23 Oct 2023 02:54:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054875; x=1698659675; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4YC/W8702n/IhtK2/nRJYRFXj5SA3+z6eWXwAmZT4eY=; b=Jnj28O4spZ76L5XvfFtGi+0dJF7PXoeJnlHXjR54uhpThr4UqXIwKQg7WTqLtV3OYE 0lOkritIIMYkgjQs5z6B60lq3plqKZI8Y51JRwHFPT2j9epr3P9B8plD92N+nt+r1N8E pSeEAxjsWLHGH+wkjGoWAKj2G85A75NtAsdNF2HyLbIn1OE2wbiAaqqxEaVdcpvhEYuH NyMiz/fkc0piM51YBJg+cMPcNXG7l7Ihk/WfYhAfOxWT1+ldsFniYDziyvEzLp/cbxUx Bz9fsM4qe3WAYUwo76ta4AhZZWbyp5V/sAnSOhjcaaw1g6GD82p1p1hv0ZmX4ayzweC2 UyYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054875; x=1698659675; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4YC/W8702n/IhtK2/nRJYRFXj5SA3+z6eWXwAmZT4eY=; b=oywcVm+7I2LojWoxHDt5nEYL4BH5AGKVlKXTTaAzK4OjwISfpe6qrs30pG9WYSRIDT xXszpP7uwXNXhE52f2tsXV9QOlfJdm62FCPiWBsIdvoxg5RS6eOCFPAuNSN3kThox+Mg o0vwRqzcuwnBeuhfTllaG1ZlbXz7G8Bge/1Uld9TPJ3lBlfG1Rjw9CueW1oDT0X87BD0 ryAvLz+06UHI/BnFcnjHcAZJuBL1OMWdEgINOq7BiHo7EAnoHfJN/o04Fj6Pe1z0bCpW OlaaFMQt24FygT5Dkf/hexUiH1KrD/4qXnuHGTQsSQqGN/XkRCxvR99IKLrolaJpFGZT Phng== X-Gm-Message-State: AOJu0YyB3TQ3XpDYn37AfP6FExB2XROQLWvFTXnyZb0va/OhRUC8oYqD GMj2WAFH4SFxD3D2Wre04CkgOg== X-Google-Smtp-Source: AGHT+IEHt7MU0pVVH3QtAU35Dth6+VQAGLU4qZyA/p6jZNdd35Imw6TEqgJZWhxMs2mnHadLP+Eb6A== X-Received: by 2002:adf:fc09:0:b0:323:10b8:543e with SMTP id i9-20020adffc09000000b0032310b8543emr5848249wrr.49.1698054875438; Mon, 23 Oct 2023 02:54:35 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:35 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 01/17] ASoC: codecs: 88pm860x: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:12 +0200 Message-Id: <20231023095428.166563-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025437_406050_8D066BCC X-CRM114-Status: GOOD ( 11.22 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/88pm860x-codec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/88pm860x-codec.c b/sound/soc/codecs/88pm860x-codec.c index d99b674d574b..be01f0928393 100644 --- a/sound/soc/codecs/88pm860x-codec.c +++ b/sound/soc/codecs/88pm860x-codec.c @@ -400,9 +400,9 @@ static int pm860x_dac_event(struct snd_soc_dapm_widget *w, unsigned int dac = 0; int data; - if (!strcmp(w->name, "Left DAC")) + if (!snd_soc_dapm_widget_name_cmp(w, "Left DAC")) dac = DAC_LEFT; - if (!strcmp(w->name, "Right DAC")) + if (!snd_soc_dapm_widget_name_cmp(w, "Right DAC")) dac = DAC_RIGHT; switch (event) { case SND_SOC_DAPM_PRE_PMU: From patchwork Mon Oct 23 09:54:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432643 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B1E56C004C0 for ; Mon, 23 Oct 2023 09:54:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xJErgU+nUAjpf1N+MX3RFSZtoYrYFdNiReNrVNbPccY=; b=rKpG+4a/UcYqSOHV0TDchi9JUK Lej97goOrQtK+XqvJeMfHHqivn6zUO3MRS9dzuU3/eCwDGkkgxAUp2+/rsbdsvRQxO24Qs6dOMEn8 p7zrygdXLZdrwl7r2wb3iM+k7d9k/eWDrgvmYsOQ/VC2RrrI/smjETQoBWXk81DWtMTIVhu9B9suW +fCQnF0Fw/cp5vleP2BkHgo154hirq4DSgXBrRzrfYNUFR06jC+rQEeaa05ajLwUSbYqdnW0Yrhab NecRTnXIl2Qwq9iqwRlD1yoErW/XIFoPA6RNM8Q2RAjHuzm8gQxDUux0WkwuD7VCCuUCf8lcYO5X6 PUDCnkKQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qure3-006wEx-1I; Mon, 23 Oct 2023 09:54:47 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qurdv-006w9G-0f for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:40 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31f71b25a99so2082847f8f.2 for ; Mon, 23 Oct 2023 02:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054877; x=1698659677; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xJErgU+nUAjpf1N+MX3RFSZtoYrYFdNiReNrVNbPccY=; b=hn2QXz4HpBOS/dSKuoFDO12npD6Kfhs1aDjN4EtBlT7QwBaNfLxflKyxKdy8TVJy3F 5RLCUGrO02VygmiMJBOjNs00FIZv8MWk9XV9FmYo1TV+sZYyaZ0+GinF4FPS4cXig4hs 2nH2UJUTg54t1OBRCpr3iuiYo3yU0MWXObYWXDdawHgsKR0mNU+YuyKZC88k1AkVYPVt 1bjL2NQp37wksT/1KjCG61ANTLEhCtwmcu8YJaVXYrcH0xiPLULvKglUeTzpX1s6zA1M iDUh2m+z7uDBFm4prgEn4P+mQlJ3BVXdpED52qlgux0sRjW84WKX00OfoycqanCSOS1P +bkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054877; x=1698659677; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xJErgU+nUAjpf1N+MX3RFSZtoYrYFdNiReNrVNbPccY=; b=xNkCVyh7ow+/+CVD86pO+66EoMHDipgU07837aIXyub4Ebzdi0G3UlKw8Fr+coYkzx uYp7hBP4rV9skaSQVMfeZvZYqa/DYmWtRZbdOxvlFw8OWP26YMc+YiUHbKYJMDyjo9bp UW6tYSB4ISgpHfXSDCsqa/5Qxo3PfbSb7Pt12jOqxMbrFlQn0NDdfvYXh6hHIAoCvWRF I4MnXZ5DCAIji9gOFJ1CL2MYpXHoGFdLXPH4K1yNiGZfHKhnN4dEOSJBwuyt8E2FTZPa kO7mVM04Po/vPn0QU6qMJqYnzTTPHJyf3YzndTXsORR08wAWtMMJDBjYNIuOAkv4o5KR wwUA== X-Gm-Message-State: AOJu0YwblpPNARUY94eDWEKlgOta/P86WQNzNxH+kphAvaEtvp6xp5sX XC8nc2uTwQjYt+oebEdYs7GZ8A== X-Google-Smtp-Source: AGHT+IGm+wzbFOSTt4RIIX0gXAgxOLyRHhiU4Y3meUgY+Qffx0kn9EZ6h3swR1er/PSz6I6OP4nsNQ== X-Received: by 2002:a5d:4483:0:b0:319:8a66:f695 with SMTP id j3-20020a5d4483000000b003198a66f695mr6356947wrq.55.1698054877529; Mon, 23 Oct 2023 02:54:37 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:37 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 02/17] ASoC: codecs: adau1373: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:13 +0200 Message-Id: <20231023095428.166563-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025439_260216_1FA4931B X-CRM114-Status: GOOD ( 10.83 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa --- sound/soc/codecs/adau1373.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c index b0ab0a69b207..3582c4b968a0 100644 --- a/sound/soc/codecs/adau1373.c +++ b/sound/soc/codecs/adau1373.c @@ -834,7 +834,7 @@ static int adau1373_check_aif_clk(struct snd_soc_dapm_widget *source, else clk = "SYSCLK2"; - return strcmp(source->name, clk) == 0; + return snd_soc_dapm_widget_name_cmp(source, clk) == 0; } static int adau1373_check_src(struct snd_soc_dapm_widget *source, From patchwork Mon Oct 23 09:54:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432644 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E5C17C001E0 for ; Mon, 23 Oct 2023 09:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P05PzWbQ4hBl2fNZN6KJaeVrZFnQ7VS3APzpcXPmWmM=; b=35cFuubdybzF+HwU/cs1yUxB5M aowgqt54o/R3511nwarpZVHN/oYyLfQDSqXiN1Mrg7slhnCfmv4vDhQ3Gfp3TJGNKwdWzr7wBPbxr 71HZxBAx8lJ58fs0UGZEs66UjLJHY1bycyL9V3MhoOnAzNniclICV5kg0MFzhQkIr7UF4U3mPyPTo OSnjyvkLB5nr38a7vcnU0nT6LSMb+11BJjuWWCRYttyj0+o02WKKL2XoypMo4azDDKLQTOKgcfXC5 6K8fI8OIJiDuSnE2BnwSZ0iKI5bpT5WncNkdyqtHwVF5v/iH8sUur9sV05DUwrTwWB6SCQ2pyZ76s HAVI+0bQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qure5-006wGo-1d; Mon, 23 Oct 2023 09:54:49 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qurdw-006wAj-2Y for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:42 +0000 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32ddfb38c02so2225582f8f.3 for ; Mon, 23 Oct 2023 02:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054879; x=1698659679; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=P05PzWbQ4hBl2fNZN6KJaeVrZFnQ7VS3APzpcXPmWmM=; b=sgpFwwebDEu2Lm8AsQi98ThQG0Bj9KBB5K/ccpOxUaa/1RGJ2wsLDdbSQkHupCdgJ5 YgNoD72/gZ2f0ZWQWco8+jlzfrB4SSqqceRdtRsNEewV5/5vyqMDdZQNDxskmI0xsTwa FAI1rznYpa876SfvtTv7OOJUT52OsOqg29XPpuKs/p7scNx8RAoi3wlyoWboZkpjc/0q Xm3Co/huLc2W6mL0CfhijDWPCy7PVpSJOnEZgkgiGrPpyLu3X6JYAH82zui8Wm1HPQjW foN5WwofVKQgfusjjVuKBnkN3ID1vmEIPPXP6IRCbrgCsyyBSCnAAw7smJmspOvB4kJN 65/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054879; x=1698659679; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=P05PzWbQ4hBl2fNZN6KJaeVrZFnQ7VS3APzpcXPmWmM=; b=itjaDbLuhg9dYTNHw8M3CtnUWtwJkOhklSZlCK05C9Lig9gx7ChA5qm9HOJqRwUKEy 5NUaaU+QKFBVz5RfUNj2Dv+qzkCrwMQzzXWSOxK1uRCo+UuQm0510AlvofRWOVBLxBG6 ymr6gtCXce7x0jfNxyg6lkFvCN5KCtqnZeWA6ynQB0Bm57cr9H1naLVxocAd0Mpz4eQn GrJI8TJ9K8djS6WvG2sfZ0/MfYaSOw5geOFALjcG3O9EbxIERIBqIuKf5Qxe104kyuXR a7cJDtSmt/1B1YsQaHNjpmB0JxyZxtrI71dwjdd3iI7QlgyjFmohfOSI4J1zL2+lWUDd er3Q== X-Gm-Message-State: AOJu0Yxa6rVFMZoySyB2aNu8cQF1InispDa6YufvpPW9fIQN6VvDMONI d/8WeJWJwo7olYD2umn73OtOpQ== X-Google-Smtp-Source: AGHT+IE7M5wXmUXIEeObjapurzse0V6MkE8fsf1gV1jhgG074/79sH+mXQ9giKjm7AVwWA1w8KdepA== X-Received: by 2002:a5d:67c5:0:b0:32d:b7d4:b90 with SMTP id n5-20020a5d67c5000000b0032db7d40b90mr4943276wrw.39.1698054879636; Mon, 23 Oct 2023 02:54:39 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:39 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 03/17] ASoC: codecs: adav80x: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:14 +0200 Message-Id: <20231023095428.166563-4-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025440_872685_3BD690CD X-CRM114-Status: GOOD ( 10.92 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa --- sound/soc/codecs/adav80x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/adav80x.c b/sound/soc/codecs/adav80x.c index bb08969c5917..c8c0fc928211 100644 --- a/sound/soc/codecs/adav80x.c +++ b/sound/soc/codecs/adav80x.c @@ -229,7 +229,7 @@ static int adav80x_dapm_sysclk_check(struct snd_soc_dapm_widget *source, return 0; } - return strcmp(source->name, clk) == 0; + return snd_soc_dapm_widget_name_cmp(source, clk) == 0; } static int adav80x_dapm_pll_check(struct snd_soc_dapm_widget *source, From patchwork Mon Oct 23 09:54:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432645 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 213B7C004C0 for ; Mon, 23 Oct 2023 09:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xuBgkJ0BPVMUW15lL794m55ZCdp9DH+A+t98MliJqVQ=; b=xYRYN7Gb0ti4ANGnWS/Ygtguo5 w6bFdwwqfigMBLheLSWrG4y2OpP2WIK2FbImZ2rTr9wDZn10uvUXuLSHMeTcf0hbZTnlWpZJd/+Xx Qi3fOnWWqtBW7pCtjyIPsrA6L0wlaE6RaVRd9yl6XLVWJ6FfkOkpVx5fb6f7NFjLe8469VbGOKau2 p0jSl5O/N0GWWNUZCmJGmefnwsMryo6QK7nlrwSAq+KL7SxJF7FU0aKodlYPevLH95GiE0qKjPbjb v65nMMZG/rEVqb2Q/6Kd26thiSPZe4FsbUhi4uAyMf+NWHKf2FMJw6ib2aPvgdhJy7mZYk9hiwMBx 1YNvoCkg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qure6-006wIB-2j; Mon, 23 Oct 2023 09:54:50 +0000 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qurdz-006wC7-2t for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:45 +0000 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-407da05f05aso22556655e9.3 for ; Mon, 23 Oct 2023 02:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054882; x=1698659682; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xuBgkJ0BPVMUW15lL794m55ZCdp9DH+A+t98MliJqVQ=; b=rAgArMzZIBs02/qey3c6XBtL6BH8LyXC7Gn3FVZKfQ+ImuDMZAq0Td63oTxRSWV22o A1umIYQAfvz9NqUHKUj4VACNkORy8IqUpgPDS++Dlxn7RVyow9myHKErqoAn5rdQnkxm +czFp5IhzT5floPul/dAk017ZBff9GFRCGPhZ+jKjDabD1zmGNqN5BdDtfkbOCzE3XR9 0txaPNSJUE/7K2GXYXV9olzngy8MRkHhiEMyFTI9wWAbYzlRXjMtdceFUvzDZ5qPioTv och08vJveAA2c5H934wGFfiG+CFeuDIhWNHzFSMS/67nXnFg21qG3jyuni/81MupnrSV XK0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054882; x=1698659682; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xuBgkJ0BPVMUW15lL794m55ZCdp9DH+A+t98MliJqVQ=; b=E2oajS3sRzX8HcaEDmPa/yHh9wuollbFzJ9/hvyijHWTXbHAHP82TplGFs6gElwEk+ jDJkJXN7GkQmJx6qfzPNU7oXkwJJBdSCpcbHYIcp5xhc1KOFrdrJQ16SrFT6oWxPyUWb B5vUMHCVbKwlfJrFR9Cq6DC+iL8t+fKpQnsEAUqndKvh2BG1c9128cHLzQYW2i9ZzlTy ccAPtBDzMgYvD9HjIqmUCj6CEfF0M1GbCLC6t0OSA1bHNXi6HXRGixVIFLy3jzoePeDF CHiVUQL+xN92gpWnKWePu+as2eY3XuiLWdk4yEyugp/jzfLY2Oj5hyoZZ2V8mepyBqux dLFg== X-Gm-Message-State: AOJu0YxJOLyhhQkoyRC1SzuBGGtyclpG52nwNECKpBayKEdzixZblReq Wk6bfGFk3yQNAxo1pOkGv+piKw== X-Google-Smtp-Source: AGHT+IG3Sib29NO6K06c5CyIqf4YSqLzbtzzhUEleL/6uhtgyT7dZmxfyYTlGNAw3kPpeYYlW/TKCQ== X-Received: by 2002:a05:6000:152:b0:31f:8999:c409 with SMTP id r18-20020a056000015200b0031f8999c409mr6421464wrx.66.1698054882090; Mon, 23 Oct 2023 02:54:42 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:41 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 04/17] ASoC: codecs: lpass-rx-macro: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:15 +0200 Message-Id: <20231023095428.166563-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025443_938416_4A43FFC8 X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/lpass-rx-macro.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/lpass-rx-macro.c b/sound/soc/codecs/lpass-rx-macro.c index 29197d34ec09..f35187d69cac 100644 --- a/sound/soc/codecs/lpass-rx-macro.c +++ b/sound/soc/codecs/lpass-rx-macro.c @@ -2906,14 +2906,14 @@ static int rx_macro_enable_echo(struct snd_soc_dapm_widget *w, val = snd_soc_component_read(component, CDC_RX_INP_MUX_RX_MIX_CFG4); - if (!(strcmp(w->name, "RX MIX TX0 MUX"))) + if (!(snd_soc_dapm_widget_name_cmp(w, "RX MIX TX0 MUX"))) ec_tx = ((val & 0xf0) >> 0x4) - 1; - else if (!(strcmp(w->name, "RX MIX TX1 MUX"))) + else if (!(snd_soc_dapm_widget_name_cmp(w, "RX MIX TX1 MUX"))) ec_tx = (val & 0x0f) - 1; val = snd_soc_component_read(component, CDC_RX_INP_MUX_RX_MIX_CFG5); - if (!(strcmp(w->name, "RX MIX TX2 MUX"))) + if (!(snd_soc_dapm_widget_name_cmp(w, "RX MIX TX2 MUX"))) ec_tx = (val & 0x0f) - 1; if (ec_tx < 0 || (ec_tx >= RX_MACRO_EC_MUX_MAX)) { From patchwork Mon Oct 23 09:54:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432646 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 85196C00A8F for ; Mon, 23 Oct 2023 09:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TezS6fAbmZRfIE/9gAJPYUtZvuonet12GZ8K7ihJ9/I=; b=1ldt+Ik7rVgqAAOREwgqTHzUAN pI2v1YFMZPtdyKkckJWCqaqnudDAVi5wEaQ1/c2pzdiuYzUMTuSqCRqv+bZ4dxhbr0I3NZVKKjSnB /5c9FSRjlgw7Hti/GfQmrAvF/g4XKeKeSUMHiMQlsOShUfE9ql3cWUAjodNnxsGzcNLy7SOfOFrgp iSooKQHgPeQLsi+jb+U0NsxMIwb2KSe87Bx6UxW0dCMvev0k43lHL4tvX/Gz3veOXbIC1nVJmlu1g xTDtrLLERr0P7o1C1MoRc95NmUJmEjwV08Ss3pUKpEh4K1O7pXWpenV8LZ7rhwRmnB9SKPn3dJ5K3 EkVEHwRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qureE-006wQi-2l; Mon, 23 Oct 2023 09:54:58 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qure2-006wCu-01 for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:47 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32dd70c5401so2160278f8f.0 for ; Mon, 23 Oct 2023 02:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054884; x=1698659684; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TezS6fAbmZRfIE/9gAJPYUtZvuonet12GZ8K7ihJ9/I=; b=WYl97ENvxBFVDw4c7F7jUnBb7vlZh9L/LenPCmTkOVL1vTXQ8QBFN9ofct2YD++rXe nLsE3utz1HwX1Aq8IJolIlqtrjnZAb3gYCcgB6Bc/W8sdO2uQXIvghwGbLTNRH6SRIAK cETK3F3I9z+4Fz2p8iJZPicAOmixiYe6cPXrtgZtrekZqo6mnZQ5IngYYXTr/xbJfYwM Uv05DBsdI25MqnDo1o9uoqwrGe5Mk9hjfW3HrKizekbB80jlsn51Jjh0keAefL1kUGpz o27hyg0Stl4wY0g1MSrQ1Lgw+IYgqLhNjAFnpWvq7wbYBeH3C1PG6jAhfg8VYFkjjG05 s0dA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054884; x=1698659684; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TezS6fAbmZRfIE/9gAJPYUtZvuonet12GZ8K7ihJ9/I=; b=DqNRs0kPP7ecCAMlXTq7YZmAXCWoQCtWhD+ekE+hU5bM0gcVMeHERcV1hNSDarQNt6 pzj+uYcS9uufCTCgqFjY7U+ONcxM6sZw409FaE23NvqiRDiAVE/8FPrUbIn2e7aRZlq6 8iFm7nDKH7QvWk1atVnIenHIjvVNC3uT6VTUhVJAAUsSVn2pOIE7EelQFR0Urfdau1Qd IUcg8L8mn+GFzsBsBgfak1urjHjdWD9O+Q96mQu/fNq5mHpgKq0277QeIhrfDxm4WUnN 0u17KHBR1oM5LosmsTGMOpcn3esawHFxhgIET1VN/gMpcsOP/eR9tbpr2QXvmkXFjZO2 D/hQ== X-Gm-Message-State: AOJu0YzzMUA/omyb0gl5MzXFhB9zjRVQ6MRCjtZlmAUT6VPNxY571h35 YtikbjmDCBx23r7ScwsGnNZXUA== X-Google-Smtp-Source: AGHT+IHsx/9dXkgIRE0i/tyQBHSemsOVRBosIhYnxE5jqsYSPyBJogKhqbIAWQxRyZ17AF8k0sON7w== X-Received: by 2002:adf:f603:0:b0:31a:d450:c513 with SMTP id t3-20020adff603000000b0031ad450c513mr6210328wrp.26.1698054884307; Mon, 23 Oct 2023 02:54:44 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:43 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 05/17] ASoC: codecs: max9867: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:16 +0200 Message-Id: <20231023095428.166563-6-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025446_041576_B106720F X-CRM114-Status: GOOD ( 10.34 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Nuno Sa --- sound/soc/codecs/max9867.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c index b616ad39858c..3b9dd158c34b 100644 --- a/sound/soc/codecs/max9867.c +++ b/sound/soc/codecs/max9867.c @@ -56,13 +56,13 @@ static int max9867_adc_dac_event(struct snd_soc_dapm_widget *w, struct max9867_priv *max9867 = snd_soc_component_get_drvdata(component); enum max9867_adc_dac adc_dac; - if (!strcmp(w->name, "ADCL")) + if (!snd_soc_dapm_widget_name_cmp(w, "ADCL")) adc_dac = MAX9867_ADC_LEFT; - else if (!strcmp(w->name, "ADCR")) + else if (!snd_soc_dapm_widget_name_cmp(w, "ADCR")) adc_dac = MAX9867_ADC_RIGHT; - else if (!strcmp(w->name, "DACL")) + else if (!snd_soc_dapm_widget_name_cmp(w, "DACL")) adc_dac = MAX9867_DAC_LEFT; - else if (!strcmp(w->name, "DACR")) + else if (!snd_soc_dapm_widget_name_cmp(w, "DACR")) adc_dac = MAX9867_DAC_RIGHT; else return 0; From patchwork Mon Oct 23 09:54:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432647 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 B0431C25B41 for ; Mon, 23 Oct 2023 09:55:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=mg1xiJ4tpWrc01TGrYLaIzComQYv1hvzEAR610Ntv3U=; b=dcCDFL3FIO8brQq82wIbc8eW/P ZC/zB1gHDT28hUKZ1s2ijnrwhmVs1aTJ1UiU9eh3nTx5AozCx0FVRcznqWdQWSY9wYwHjLQ64/Tf4 UWVgshi+daRHIXIMs78dDwS9aIwoEzbbHwITldeH+9V71VErrtIi0MC9Ow1YT6g62RcCxgtI1cX+M /eyK80CfMjCDelXJ/Odc8BljN/bRDc7WQsl+VRObXlYqi/VA9NAlWxOC+iOSHc6i+yBt0UqlyB3xN 7SQJZmGXcfEgLXZzV/w4cwQ+aRU3nETvmBwE0UEsdtI37xmTIC6z9//s2iUYbGGqyBcUEBkg3sr1w z0tJs1WQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qureF-006wRA-1C; Mon, 23 Oct 2023 09:54:59 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qure4-006wET-2g for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:50 +0000 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-50797cf5b69so4201997e87.2 for ; Mon, 23 Oct 2023 02:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054886; x=1698659686; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mg1xiJ4tpWrc01TGrYLaIzComQYv1hvzEAR610Ntv3U=; b=b2/+XrPn2ZOeEtaJbxQ/A9nd2NX3kN61R+tujC3pb1IkZkQqr17a0rbRzV6fymVB6A TznNZDDlkTUyhJe1yAU4gfVNMJlayU3A5dNFxLxzihiJQdFiwk0141LZJCKcvXgeRC6B wsp1j0NkL219SlGtaPxuJNW+eu5H3PIKSi2ig3kt8yxi/XOFxwEa8B8e4a9y/Z6uvrYU VRZnbkDNNmKK5e8V3AWxHWbxAue6R+m2XcKDF2tezwu3KYKzrPPutHEltmdb9grIV3DW gtXjg9xmPL9zWrbeO6jP2PlmMF/7KsURPW0sLuaBDCdV5eyKbm6VpJrCMfbTIlV3R836 XmGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054886; x=1698659686; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mg1xiJ4tpWrc01TGrYLaIzComQYv1hvzEAR610Ntv3U=; b=LADlmD/H2cH1PZjEwcUpiY9MrmRXH4RBUCcW0EshWvqh1qKomah5HXnAg1Dq7Mnyd4 kMI6W4pmzz0vyhBEuW4kmJIMtnrVwlFTTTIbqNKaf9wCZdERKNoR8kVxpZ21azW+VFc3 qymshLY6jlxG2M/DJZil526xWjFLn7YiuseqMN3ZA/pKFyrVRBlHfDRxdrJ61mfE2Jsp 6QWSAIuN9vGJJMw3W/t7ODV8Nh/pNu+OrkpL2uimktivEE35fc/xpPM/BMdC6KGk94Hk Z3RcirSxmn2m9B0ff1JK87n45JLMVcsrhW7v6H71lV6fvulEeWprDFk7sLayjh4/ocMQ PpNg== X-Gm-Message-State: AOJu0YyK9dJ/+Rv3XodKdjzFYlioX5W7NcX7qaBe5o09Dyg6M3HP4ofV bXS8riY+UHajRFnHv/UMmAltig== X-Google-Smtp-Source: AGHT+IGVnDVUzhqtZG2Rxtx8SwcXnzeMCoNHkuKGJvqRY3jD0nxvOcWU8+AB175lzXv5OfVrm4BxmA== X-Received: by 2002:ac2:4430:0:b0:500:b7ed:105a with SMTP id w16-20020ac24430000000b00500b7ed105amr6312430lfl.29.1698054886439; Mon, 23 Oct 2023 02:54:46 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:46 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 06/17] ASoC: codecs: rt5682s: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:17 +0200 Message-Id: <20231023095428.166563-7-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025448_870319_E23731C8 X-CRM114-Status: GOOD ( 11.43 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/rt5682s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5682s.c b/sound/soc/codecs/rt5682s.c index 68ac5ea50396..c261c33c4be7 100644 --- a/sound/soc/codecs/rt5682s.c +++ b/sound/soc/codecs/rt5682s.c @@ -1323,9 +1323,9 @@ static int set_i2s_event(struct snd_soc_dapm_widget *w, if (SND_SOC_DAPM_EVENT_ON(event)) on = 1; - if (!strcmp(w->name, "I2S1") && !rt5682s->wclk_enabled) + if (!snd_soc_dapm_widget_name_cmp(w, "I2S1") && !rt5682s->wclk_enabled) rt5682s_set_i2s(rt5682s, RT5682S_AIF1, on); - else if (!strcmp(w->name, "I2S2")) + else if (!snd_soc_dapm_widget_name_cmp(w, "I2S2")) rt5682s_set_i2s(rt5682s, RT5682S_AIF2, on); return 0; From patchwork Mon Oct 23 09:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432648 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 86C73CDB474 for ; Mon, 23 Oct 2023 09:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ohG7h5MVOd61zy+5ypL65RpxKjVv+oL8L5RUWwJJdI0=; b=we5Xs+0N8T4lAU1+gJAVqwxg0K cWOrlt72FsLAnT1k1yRJlYloVFfmjKETCME01wR02CVQKZo1m6NFEeuCo8OsgL2UqH7PUPH8zfaAi NOgMxT1pr6TtMMwA+pBt1uMqyzqRg2ErbwcQze1druw0Dawcm46a0SVxdPvtH1RlcWwCLrNu7wFLt 7r4T4+LVYzXf3ax3jt5cUgSS7CI5Eqcniw/Ap2Z3hUvZf4gwPt7upuaZOcD35X1khLYDXemyowFp0 0WyHZiFf32nFmA3p/YlTtxr1IB3CVhqm0plAYDsaWgcsO1MbmNUuPS2p5dGEcrs++vFekFJrTy4t0 o+5fKp+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qureN-006wZf-2v; Mon, 23 Oct 2023 09:55:07 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qure6-006wGb-1n for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:52 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31f71b25a99so2082999f8f.2 for ; Mon, 23 Oct 2023 02:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054888; x=1698659688; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ohG7h5MVOd61zy+5ypL65RpxKjVv+oL8L5RUWwJJdI0=; b=pZ6dVjrLD0/0b+J1jWetRrBLFtsr3r/6cBxI/ExsmzTsEHRLPVY5hgeVPH84qFYTho S2GcY5x7DshQI17Hat/0XOnKu8BtmZtD36nF9VOapaaXeSxhpe7YsoNRCt47ZZzz67Vo OwIiifIfZaEzMPUIWzlOSv1wHhGNT/F2cJIvnoJwBPUcK9Zl3sHlSB2LMZpIzrGAVrZ+ 1HIfZc9CoeUtA56iMuAw0lx2LZnSlyCelhDRiIkPgrU+O/zlg2KGpyMdWHWKB1p86S1p 4WfZIhcSQGqvbGYpFnAY7GuYe+HVKvZTqI3CWpbmeZzyRBGNX8/fCwpzGKZS/xsGmSaY 9ijw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054888; x=1698659688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ohG7h5MVOd61zy+5ypL65RpxKjVv+oL8L5RUWwJJdI0=; b=CwWhI2EW7NURD6W025cxXw6ip+9L5GkcnIfJ+yARoQMzESbJK0cMYKb4L2UyDv2+OP Lxg2EgE/hRYs/iA9LhfSHx8Zyd25FjoaHeVYpi4E31dFbIqWTE/9HrGN1VaX0ycHa4zt N2kMbwqw0xQ2AIH929VYIH0nz4vywJ364Hcf1gDim24MiYLPl6GF7N3K05a+I+MgiA43 xHggQkBCFsajgAOqci4HVEy78Ixq0CNuqkLR/LZoy3cjf0Nnr8YvsG4Rvp652Gf5dn6V pBp3MBF3TC8zKbQOIJCWdpPwBRL9/ktQWWYqYXef4uXSoPpjB8PmeVvJGXkhpSdWk3HH NwHQ== X-Gm-Message-State: AOJu0Yy6qvmHrg3UnanmOjOrF7MSW0nt2AvD6goETXB2YGweS8kr7WYo hltBq4UwiZ0rjaptIevzLRM8yA== X-Google-Smtp-Source: AGHT+IF2XQ2NytyZKfSuKXcxhn8MgqaftjUTA3vcBEY0OG7GzuniO27qe9jeb7abDdumrFZMKzYUnQ== X-Received: by 2002:adf:fd90:0:b0:32d:8a32:3b2f with SMTP id d16-20020adffd90000000b0032d8a323b2fmr5871452wrr.16.1698054888606; Mon, 23 Oct 2023 02:54:48 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:48 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 07/17] ASoC: codecs: rtq9128: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:18 +0200 Message-Id: <20231023095428.166563-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025450_616124_69C14173 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/rtq9128.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c index 371d622c6214..c22b047115cc 100644 --- a/sound/soc/codecs/rtq9128.c +++ b/sound/soc/codecs/rtq9128.c @@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event); - if (strcmp(w->name, "DAC1") == 0) + if (snd_soc_dapm_widget_name_cmp(w, "DAC1") == 0) shift = 6; - else if (strcmp(w->name, "DAC2") == 0) + else if (snd_soc_dapm_widget_name_cmp(w, "DAC2") == 0) shift = 4; - else if (strcmp(w->name, "DAC3") == 0) + else if (snd_soc_dapm_widget_name_cmp(w, "DAC3") == 0) shift = 2; else shift = 0; From patchwork Mon Oct 23 09:54:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432649 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 279E7C004C0 for ; Mon, 23 Oct 2023 09:55:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=9PvbddIvQlG0l/ZDn5njSVhrq4RgzTBlbX25/MYIgFc=; b=WB7Knl68Czz4qJUeZRHD7fKyfn 3Syl88pey237VCu5V14d6Dop8ZxCZ599x/ueboXuq/XSAP26Ki/KjnsrbtoXlirHdDp6XgsOPCtLQ 5SXFURtkehFoYhXm066H7bd7lGSGQaoP9Uh7SZp7arlwlomP1O1ek0Y7d3ECtOtlMTs5TB9B8fRGt 4iCNzBsoKVXhcbeNPQy7myjXmhLoNskU5dJmtcp70hV6vfMkAaTeHeeckNAWKaayMYj7zvqE7CW4y BsQge7wKT0IVaitJOGj6P9UfMwWJoIt4RElRKcBHDPQknTtPcgWofLOtjE01kw8eHrnGCcNghLe2E qTGnPNMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qureP-006wc0-2b; Mon, 23 Oct 2023 09:55:09 +0000 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qure8-006wIq-27 for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:54 +0000 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-40859c466efso13243295e9.3 for ; Mon, 23 Oct 2023 02:54:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054891; x=1698659691; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9PvbddIvQlG0l/ZDn5njSVhrq4RgzTBlbX25/MYIgFc=; b=ayhr7NKY8UA/kGthj+b/Aw8JpdbUaUcfXQRVrcQ8aGfCjn/mBEhkl4T5F1cKVDhA/Y HBbOqJU3/Spn6lY45ThZE3OrX1kjWh1EvN+NnFE6d6VX7JUVs32InLbsCmaYAKk2Iw85 FJFeShV5y3CffnwgW3jTlGzcmEz2tduTU6+bcGu7e0XorzrbLWlXXlnKLNwqh9826Q6b oWtgb7958LAtwQS02xtR79atzXG04MyXaKj9jHE9lU+MS4Z/VaWHIrygGZhKDNG7iCOW o6RysZzYQqenHoDtzyQQEis7kHqA22iKNsZUdXkAj99VB+bCrO2iHMIdvDzEq4ddWND+ IbnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054891; x=1698659691; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9PvbddIvQlG0l/ZDn5njSVhrq4RgzTBlbX25/MYIgFc=; b=hcRl0PTayYt7LFm2tccmie4eThl/BKwYG/Pcz3uH8/wkCsO5QhAUO6TOede40LurkX PSCfdRBIb0BxIw5OaJLk1xkMe139UtEJNp/jo7QD6NyWdj+oTLPSyCtzdwOxOCpRyGLZ RgQcdu2/CuNvTr5Q2SgWM8cn1HALltTV+1+s921iM4ChlpDjHZTGV2pIKcAl4SMxgl6V 5A3Z0WQX36ebYE8Z+Mx++O5B8ke+uu883tEtcfC2vTpJvaI76hjl48mqHGLFRn5/mG+q B1A3WsBWxFJCU8v3B8yvyIIuiOGOcmPUuth6wwlraT/yvZn2rBPhceKuQ7KhPCi4EhMo LC3Q== X-Gm-Message-State: AOJu0YwNVvoynSISM3GED3ZQUrlkb9Px/dDr3urjTUYGUYwezPeDQ8Dn /3gGjChd6Tq9wX/Kl5pVB+tBrQ== X-Google-Smtp-Source: AGHT+IEmmCcXMvV2AiWhQpKHX0IqP6/STlrOm+onc5uiN24/C1EAIXqoQxx+Ad9L+iK6N0Yq3GEInA== X-Received: by 2002:a5d:5709:0:b0:32d:9fd1:91f9 with SMTP id a9-20020a5d5709000000b0032d9fd191f9mr5739165wrv.60.1698054890848; Mon, 23 Oct 2023 02:54:50 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:50 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 08/17] ASoC: codecs: wcd9335: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:19 +0200 Message-Id: <20231023095428.166563-9-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025452_715334_5E870084 X-CRM114-Status: UNSURE ( 9.82 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/wcd9335.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sound/soc/codecs/wcd9335.c b/sound/soc/codecs/wcd9335.c index a05b553e6472..43c648efd0d9 100644 --- a/sound/soc/codecs/wcd9335.c +++ b/sound/soc/codecs/wcd9335.c @@ -3296,31 +3296,31 @@ static int wcd9335_codec_enable_interpolator(struct snd_soc_dapm_widget *w, int val; int offset_val = 0; - if (!(strcmp(w->name, "RX INT0 INTERP"))) { + if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT0 INTERP"))) { reg = WCD9335_CDC_RX0_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX0_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT1 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT1 INTERP"))) { reg = WCD9335_CDC_RX1_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX1_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT2 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT2 INTERP"))) { reg = WCD9335_CDC_RX2_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX2_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT3 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT3 INTERP"))) { reg = WCD9335_CDC_RX3_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX3_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT4 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT4 INTERP"))) { reg = WCD9335_CDC_RX4_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX4_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT5 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT5 INTERP"))) { reg = WCD9335_CDC_RX5_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX5_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT6 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT6 INTERP"))) { reg = WCD9335_CDC_RX6_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX6_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT7 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT7 INTERP"))) { reg = WCD9335_CDC_RX7_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX7_RX_VOL_CTL; - } else if (!(strcmp(w->name, "RX INT8 INTERP"))) { + } else if (!(snd_soc_dapm_widget_name_cmp(w, "RX INT8 INTERP"))) { reg = WCD9335_CDC_RX8_RX_PATH_CTL; gain_reg = WCD9335_CDC_RX8_RX_VOL_CTL; } else { From patchwork Mon Oct 23 09:54:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432650 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 43C95C004C0 for ; Mon, 23 Oct 2023 09:55:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=iygGW2h2lVMWeGfG3UfW0SGTTyTrk1COvj9PMOD/Pf4=; b=jld1iihRFXdquvJXVL8pj9rS/B v16uI1+pGMxObBENCfOGrDj7a33Y9Vp7UlwtQkrOyJiXLU9vBWGSw87wbuLlWq4xnkt1SixqhHXz9 QCMoAMxGYDfrXHr4fZ2t469WFThQ6TyK6pOXb8a+1GTxn8KM6vd4GSUg/VHQ+ZFYQNYntl3az7E0f +Kf+nODrIIVrZeKbVg+wOyqkVAaYC0I64BCsILLNlHLbRkbNCIXqA2xN0nAuj/nc3Uvmia4xLOeTw sS3jCxUvugOJChbB3O5tWQxbej8K4d6440dCowzKc2dZAhfhZ9+q8SkJHfvf5Iz2k6nBxTjHgCp5j SpMW0T2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qureX-006wiT-0d; Mon, 23 Oct 2023 09:55:17 +0000 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureA-006wLN-1u for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:54:56 +0000 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32003aae100so2389402f8f.0 for ; Mon, 23 Oct 2023 02:54:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054893; x=1698659693; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iygGW2h2lVMWeGfG3UfW0SGTTyTrk1COvj9PMOD/Pf4=; b=DyRd7VFzmecXs5Ikr4BixC8DARKe6wTTaT/3gZaD9zNJgvkzmwrZypRGlXv12X8u7O S+ZnxMbWifDHn9cWxiFOUcVl+W+INrMxKZugGhgnpLwIdAXYF747sbAs0BvZo6Mb7LSS y0kH8KBspor5nPJoxx+fuRkY/7WI3cJoYXD5WKZ7n+QLmK3yudC1MgFA6iBJSnusRaWN SCeS3m6/hpMP848dpAbSY9uF+LhJ0Jrcwiez/kAJSngd4jjaM/GnwT5aw+mbeJzpsYPC 8/WIbcteLLJZ8fVAkUMgTdwmHHNxTC/YpA7Sm+oeNk7T20bqUZ4e4iGCt3og1CuC1Pn1 yorQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054893; x=1698659693; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iygGW2h2lVMWeGfG3UfW0SGTTyTrk1COvj9PMOD/Pf4=; b=QuoIIHjBBLAH+LrQcxsdI65KcwcTa4N6zxeBMkSktUInAA1yG8lIoi97NJksyalLxg 6iBuVzwZky/DcBaMXA7ccRV7IZCIliJmQzMYodAKvGroYfSUp2PHP6CqZIdqg535Hbsl FXNl4TLaBdcsOWdSgM7uDQW6+EdabmBWMwlBt8LSe9UcdvIXlwpyoScmzY5jiG5Pootn NX9/oAZinFbp8c8G/7ucdMKyFCOPqu3ilwfIQUqY32kLRlbp2VKKdszS3Fpz3PktSXqA ISI95W9yYUk2eznUWhszWcrWgYnymWaO36Kw/GiycW6idTwMnOHIdcW9fUpTJpu/biGm YrBw== X-Gm-Message-State: AOJu0YxOVpGogNAJDs0WO00p+w2azAEjxKGuF2FqBWRrGCU7pomkSmV5 QkE/+w2Az8W/WYAXtlgsMJtGsA== X-Google-Smtp-Source: AGHT+IHTc2UW0PcRRtRg3EJmwXBDKZ0rRGICIe4tZ3tRk+SG6RlHUvnvHSIX5664+drOKrq+nZy8rg== X-Received: by 2002:a05:6000:92c:b0:32d:81f9:7712 with SMTP id cx12-20020a056000092c00b0032d81f97712mr8264026wrb.20.1698054893380; Mon, 23 Oct 2023 02:54:53 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:53 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 09/17] ASoC: codecs: wm8962: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:20 +0200 Message-Id: <20231023095428.166563-10-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025454_667608_D6D5A98E X-CRM114-Status: GOOD ( 11.40 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- sound/soc/codecs/wm8962.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 83ce5dbecc45..fb90ae6a8a34 100644 --- a/sound/soc/codecs/wm8962.c +++ b/sound/soc/codecs/wm8962.c @@ -1854,10 +1854,10 @@ static int tp_event(struct snd_soc_dapm_widget *w, reg = WM8962_ADDITIONAL_CONTROL_4; - if (!strcmp(w->name, "TEMP_HP")) { + if (!snd_soc_dapm_widget_name_cmp(w, "TEMP_HP")) { mask = WM8962_TEMP_ENA_HP_MASK; val = WM8962_TEMP_ENA_HP; - } else if (!strcmp(w->name, "TEMP_SPK")) { + } else if (!snd_soc_dapm_widget_name_cmp(w, "TEMP_SPK")) { mask = WM8962_TEMP_ENA_SPK_MASK; val = WM8962_TEMP_ENA_SPK; } else { From patchwork Mon Oct 23 09:54:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432651 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DB193C25B44 for ; Mon, 23 Oct 2023 09:55:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SkUvzAZAFAxBUpUecaFOI7DumC3gwDv4zZE7XoEdjuk=; b=Wc+BB5lsyhjn7+C8VQYFmLXZZI gKj8wkFCYNBgHJr9KZBCtzQIlBr3a8zlWTDA+M3CdWjbV/8Rh6EE/rlWflE9Msk5pd71X5dWijV99 Yz9YsMobkRP6TUiykNzLF1jr2ezQ5bYiWtjT3hUdacs6cKtuNblo24QOJpjkz2ASvm4itD/DltfkX zMT8UrnubnkQUJE4VUusMSbiE3h3qbLv7Ojr3RNHUA4qdlFz8xPlFRvxHfM7aiFibyyi7WudNNMJ3 fpPEPg7n+24mOW1KCOzEbGiAdnvhWKoAKQTcUol0LsTuwVa1asl1XTXlfDHYKb8FJelf7VR3C4pyq 0AylBgZA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurev-006x1U-1T; Mon, 23 Oct 2023 09:55:41 +0000 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureD-006wNC-0B for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:00 +0000 Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32d9b507b00so2282582f8f.1 for ; Mon, 23 Oct 2023 02:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054896; x=1698659696; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=SkUvzAZAFAxBUpUecaFOI7DumC3gwDv4zZE7XoEdjuk=; b=nm+fpqL/t7EqKI2+EdexkyHTlbNIRBH9IsG+DUcF9h1fqZzSGuY4VziXWTbPjH1o3Q OLtZW6H1a/vcLQ78Qd9biBqJe/Z898GovBv7R+wbI0YsSxcNSTRlZrUQxllbdR0oJoAp 78ekObYlAjE0LJmysHFi7RunW4tqIHUNLth5PG0OYmnCxSH2aI5smq2NCjEWsUcLOHzS /xooR+351gIbDcmRZOZ/QFC2RasUbqxuzCjUCthePzbAYjWxMpLN+c1iLUARrTgLKCeB 867umneb8+JbOKQ2ODb8oDbCkHy9ZceNe9z8LnlDVspDgUqkAhcSrNLg2i8RzFYn/F3V XVDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054896; x=1698659696; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SkUvzAZAFAxBUpUecaFOI7DumC3gwDv4zZE7XoEdjuk=; b=Z+abHMzdUxklFpOBmEcUxftF0X1vuJzO51l9rzbNM4PywDzzkVbdrEQwl8GkkKAjAf wMBwct3w9xVpTWo7Mu+B1P513ayB9c9KQfCjEjxcr8CtlCw/gsp4kbo+WDc1B8Z+usEO DAo9TzCVNQY3UIJy/yACR2xETUv5TndPVY7QoT6Xywccjv1Jfe8vjAy+xCZFyqp5qAdG 49c3HEh4Fd/kZ8843MBqV+DgULaLb1yEbDt5fYwBT2Ta1g6A03AkxnHJN6lbPwk1PEUX o91XqPNk5HPb+Tbn7zsy8MRZ9te8AzlVcI0dpJnPKTuYJiIFuJhaQggB0gueytJp87Qp VqdQ== X-Gm-Message-State: AOJu0YwoltM5P5xkK8W+C8f63aStt4KQ1CT5TDNikJ8yaguGl9BRCgbG gGuF/jRGn3C0WOT5gf3qZNQ2wg== X-Google-Smtp-Source: AGHT+IHWg8SLe3xjPrj28tLTDiymcbd03RUAChA7SD3rg/2FeMGUhVv6IRTOZLXoX6FA5TVWxviBfw== X-Received: by 2002:a5d:6804:0:b0:32d:8907:4528 with SMTP id w4-20020a5d6804000000b0032d89074528mr5681524wru.28.1698054895793; Mon, 23 Oct 2023 02:54:55 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:55 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 10/17] ASoC: codecs: wm8994: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:21 +0200 Message-Id: <20231023095428.166563-11-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025457_218069_F164F392 X-CRM114-Status: GOOD ( 11.08 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- sound/soc/codecs/wm8994.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index a48e904a9740..fc9894975a1d 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -262,7 +262,7 @@ static int check_clk_sys(struct snd_soc_dapm_widget *source, else clk = "AIF1CLK"; - return strcmp(source->name, clk) == 0; + return snd_soc_dapm_widget_name_cmp(source, clk) == 0; } static const char *sidetone_hpf_text[] = { From patchwork Mon Oct 23 09:54:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432652 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 13D8DC001E0 for ; Mon, 23 Oct 2023 09:55:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sOdWx51KZzcP4yPFkM05Libt2LPoTXL1hZ7dHc5xIDc=; b=a0ToFwlD/73MFQKjfu0kM6r4kx unxAp1dHr0EJHKZo6VMxhbuBF6I97mbrMttpa2U6cof42H0U41GtJ2eaFa3wnfdMoD/z/0/cv3wvQ jsK+Fgc1JRfHFvD7mrC1UvbgV9lM+7Saqx+9TfNp2+VNBaAvCE/FuAoow2LYnpgJoM+lpyaoE6A7W F3KtdxVYziwk/1UpFslt+WkzYBjf0be3kqJOUg0UZOybpx4jmUiooPQUz5ucd9tQuHyjTf1fL9KxC obp6lqg0q355WHkGD3VY7bk/ZEnKG4dLmO9SINVxE97OYIvjfHqXPoVrqFLOa7H/7KKdyZlJ/a6AA v8FwACTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurf0-006x6M-1E; Mon, 23 Oct 2023 09:55:46 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureG-006wQg-1G for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:02 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-408382da7f0so25697485e9.0 for ; Mon, 23 Oct 2023 02:54:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054898; x=1698659698; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sOdWx51KZzcP4yPFkM05Libt2LPoTXL1hZ7dHc5xIDc=; b=a0DMLFd7orUMMJfF6wYGNSBSZgJ9GszAEY8OFr4uaJJtYpilJpIL0oL3qQqmab8WOY IhxpUB/LJAFtBcc34dQjPLwfqrW6LHuUr68JR5Nj17QKkS/W3EJVRjdjMfSFo2TVIBHl BcYcCupnUjzTZnVCgMTRPnMsA/fL6DFgPAggP+8G/CotmjL89B8ye42zoyMA7k0FHrOb jN4ODSgugxPDCqMCrc6gmz4lqoR2rgGRaPPNu02XTaGoXOzIHjohL2aolL2G192pww/l Az1HlvBeghGW11cKcWfSUR5XQuEkBzlrYlTH9UdL1bYXUEb+exjBZkZAQY4N3kLam1eP bb3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054898; x=1698659698; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sOdWx51KZzcP4yPFkM05Libt2LPoTXL1hZ7dHc5xIDc=; b=DeJbG9hGtI/GXOIwUMaQ5k64lOSLBQ/vWtjsPl0AbmcycjhqaRcE8tkd7e+jzAeVax bSAJ56GAb2LwXN29I7SJDeBPZfgSVgLBOFVnTBbTygzur3nzFMBkneK3V2kN2xIHf24i 8wweehgWr/EZb0VcJ1yQnPLzXXDtH5Ih0HOJDjvudUOeg6o8D3kkK0BIzygK5SIOB38U qa9kEPTGANIQpGv7Hsg6s04xRDBJbMPyWM9aPYb8somWLT34I02XyYs4OY0ekqrrXvVU Hf0TBlHNd3/y2YV3E2/Loug0eQ0GTIMQnHax1MwcbkJ2GHnAG7Yp5UZk0/rxZKxif6gu 4AGQ== X-Gm-Message-State: AOJu0YzPfgj+7mEuxnppS+L4eG+AYRQQlJkPmZ1VQ5rRx5B8kxMLU0GT fyf0Hu3Gk9irK4HeXhjBHyXyYA== X-Google-Smtp-Source: AGHT+IHEVLDPnEUrrX/PY+GOmXCghoQi2Q5x3tEYdDkzUdmjkSVDumB20aWrVD4RN64ThYu9YeLKpg== X-Received: by 2002:a5d:6941:0:b0:32d:a022:855a with SMTP id r1-20020a5d6941000000b0032da022855amr5924003wrw.20.1698054898321; Mon, 23 Oct 2023 02:54:58 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:57 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 11/17] ASoC: codecs: wm8995: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:22 +0200 Message-Id: <20231023095428.166563-12-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025500_474285_050DF869 X-CRM114-Status: GOOD ( 10.62 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Acked-by: Charles Keepax --- sound/soc/codecs/wm8995.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 4ffa1896faab..59ef2ef8ce00 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -541,7 +541,7 @@ static int check_clk_sys(struct snd_soc_dapm_widget *source, clk = "AIF2CLK"; else clk = "AIF1CLK"; - return !strcmp(source->name, clk); + return !snd_soc_dapm_widget_name_cmp(source, clk); } static int wm8995_put_class_w(struct snd_kcontrol *kcontrol, From patchwork Mon Oct 23 09:54:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432653 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 1B311C004C0 for ; Mon, 23 Oct 2023 09:55:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=XaRWK1PxbLteLkMq7b8+dA2nXiGKOdN1dmpy3IbpNyI=; b=ket+Cyy9EgNdRUUUtoAkrIB7Kz LsSmOedR3Kj7ZWfG26uUrUsMvQGBwc2e0hc2Py5AqhaFXTUUo2FZdDqo9HXAmZX2lNroG8hMeoQub vuqSbeq2JxzHOEkfGy/ehtBOir+IOyvs13YEVgVPSBnslyMMXjsNlfbXKZMO5hT+L0xI5xOeFwA2b K8MrfKhM42ueQGHZb+Syv6ro6pXTwJaso9ZU3y087VZSP4IAueLty+YvgFB4im4D5uZHXYogmzdLZ BoHvl5xHp/+IfSmQZIlD28AnWQcLnj6Riu5e+IfLPosOI9pUzdkfThnsDtkl81YuSKqAJN00gSSDq npo1frgQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurf6-006xCn-2B; Mon, 23 Oct 2023 09:55:52 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureI-006wTD-0u for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:04 +0000 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-408382da7f0so25697845e9.0 for ; Mon, 23 Oct 2023 02:55:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054900; x=1698659700; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XaRWK1PxbLteLkMq7b8+dA2nXiGKOdN1dmpy3IbpNyI=; b=esHc+EoF6WdlPfJmdL0KfxtdYih1kgszrw636u8xCo4G6lsTSt5tRbZPy6Bqyi0QEa Jp2hzdORhASP1QFR84inIhdHXW1dULAMvUrqLEKnxU/Sn65JYH74hptzky6ZuAUzQGRQ CjHxUMHhMZrJsM+EJXtc4CsoDm10VQQEjln42ed8dpBrv0nWaNEkmUDtiXQx1jQEaNQG uoJZ5KKe54hCw0T7b2ncLBFiv5SSZJAEEjNpghNIwHeQaVMQuXqGT0HnXHcU0uEPB7Q5 80LTi9mqd6FS8eluGAjfGoyj/RAyCzBP/pUD3lfQYtEXjuvek0qJJrGObhH8OaKEi/ov lLPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054900; x=1698659700; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XaRWK1PxbLteLkMq7b8+dA2nXiGKOdN1dmpy3IbpNyI=; b=b5IEYV5S5lkrvWkpuQ35/bb9Rx/dFB2QB599xWva+gBs53hhcNU9BLbwfLI+JBDJoR vLJVB8BCqK0i8I5LSYbpIK4g1+xDeARNV+ltpqT3MWSTOLkhC9cY9LMuSRaRuxYpKW6Q 0Qr6bcfkD/Bz5lC3HVJU6jUqayp/aQPjom7tUkECySBUnOl/UP6L5IvI/tW3P0ybwqKI sm8BxSnSTFscQ6vYVfCHSV2zyxYwnQqUyO9QdGByFEYALNc2FUboQLIR+GxdNYLHjKq2 DGyar0KZ5s2syrT3Pd9TQ1fsgUOhQwreKEARzxqT/9W6zjRqucSMGyELDeOyNYqwgCZV bCoA== X-Gm-Message-State: AOJu0YzIc5+m6GUGHTyzU6P8iHLi3h1UkMJpeLpPZFGOkZBtnJPNP2cA wFP39mqsHbeZZbsvlC1RAU9l/A== X-Google-Smtp-Source: AGHT+IGcRnlB4vFMFDgducXrQmS80dOVHAS+aDCp1wKs33+friJEQiADUVo77kFzrMbe1bXLDVGcYA== X-Received: by 2002:adf:fe48:0:b0:323:15d7:900e with SMTP id m8-20020adffe48000000b0032315d7900emr5319691wrs.53.1698054900441; Mon, 23 Oct 2023 02:55:00 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:00 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 12/17] ASoC: mediatek: mt8183: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:23 +0200 Message-Id: <20231023095428.166563-13-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025502_394228_BA7DEC41 X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c index 8645ab686970..65e46ebe7be6 100644 --- a/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c +++ b/sound/soc/mediatek/mt8183/mt8183-dai-i2s.c @@ -276,13 +276,13 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8183_apll1_enable(afe); else mt8183_apll2_enable(afe); break; case SND_SOC_DAPM_POST_PMD: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8183_apll1_disable(afe); else mt8183_apll2_disable(afe); From patchwork Mon Oct 23 09:54:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432655 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 03AFEC004C0 for ; Mon, 23 Oct 2023 09:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sijvR+hKjJi+AfXfyjsruHtUHe1YLoATqzDljEq9PNo=; b=uLDdRXUp1pfrnYNiCQhs+e0SNG OKlbcXtFHgGzgaMSA6aoxNjb91wWy9lsylJMuOxSnKBxa8OmCGwB988Y6zXWiBM+c+8QJBxSd/iiR Xzjnh+3PqZMIx2p1CcNxDKRbHccK3TFeOk1i6uvRgG3GKALSfma/v9b4vF83mpweO2YUUgLdWTheG ArWx+U3x+scdnH9MN/5MRYOtiZZg6h/NNjbYLpMjZjACiAp/Lrt0Fplq7A/g/UuAi4S0Mas7WUUDQ GUYgide2FyKSTJjQxS2wVwTPyYZCkoVygLNCobk2ETEn2wgMaf855N1ve9xnhElS72bBFUC8zvB2l YTWz7CHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurfF-006xL1-3B; Mon, 23 Oct 2023 09:56:02 +0000 Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureM-006wVf-2T for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:08 +0000 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2c4fe37f166so43316841fa.1 for ; Mon, 23 Oct 2023 02:55:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054902; x=1698659702; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=sijvR+hKjJi+AfXfyjsruHtUHe1YLoATqzDljEq9PNo=; b=mTC692F/FVYfYeghQDaoFCkfGdde1MgeV011RKQC/W6jvzEkQD0I3HS/pfYZogByTs IFBdqZC/GD0nwUhj/GNmrhmpPVEaPXWX7b5uXgEQte0+suTg5s1JDkYbgq+kIdEzS6L+ 1woG+LDixy5G8+nLdorXTwf2zfNmAcmMIKvEkq5jRTezUfgpVCqQD3lxvHhy+f8yIxM7 mhZQ4usMMxw0cEUSpn1OnSXT8ZIPaA2byV+bzI344dIwIJ8Hd11Ix/U448wLvlFgedG+ No2PRAVkpDXZ4Wmu+XX9GlxUIFQCUtc+VI238vg8XcvXuHbHEVvNxueEeSYZUep0adOw tqCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054902; x=1698659702; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sijvR+hKjJi+AfXfyjsruHtUHe1YLoATqzDljEq9PNo=; b=GkVtuZO6zuW3EelFJeXDlF4eCXVGyzZap7y1z+We2LDGR/jlP8sCACYLX/MYXU75/A 0haUvulXJpAOMJpGK9JCUopnfooUaHc2UEFRsN6+VM7ukuFyOV6Ap3kbpHuY8f2VB3qR byoyh8f1UFjho8EDUNpD0CAF9XQLMebWEbdDhNtojxz2glTE6W4AWG/a0R34oStoWLfO cH5eI5TkkgAr1/Fk9W5tmPVvJT3lwMmv17biJejAjCdGjEmCopUsZbDkWBxWfW2YMXUF ooUxFTt9NhWXGTNuPrHFT2hH6rOVbSU/XnOdhh4/dJZA2OqnQW1UyqNyMS3rDAutaQkL 0T+g== X-Gm-Message-State: AOJu0Ywo1ZsRPFrIGXUDLfIlGLz0zzPSq1VsebkxHYlIQ3Sb08dpmNFm m9t7E7WUCYBcD1lcwf6rutDudg== X-Google-Smtp-Source: AGHT+IF54Qe6n/zvNqpT0Lxz4KVrjRL1LPUYGQ1mvRY5NOKen/Ok/2JBtT1ZFsNaf/o7AVD7jqRWnw== X-Received: by 2002:a2e:a792:0:b0:2bf:e9e8:de23 with SMTP id c18-20020a2ea792000000b002bfe9e8de23mr7862726ljf.16.1698054902708; Mon, 23 Oct 2023 02:55:02 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.55.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:02 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 13/17] ASoC: mediatek: mt8186: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:24 +0200 Message-Id: <20231023095428.166563-14-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025506_809196_D7A0A483 X-CRM114-Status: GOOD ( 13.91 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8186/mt8186-dai-adda.c | 2 +- sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c | 2 +- sound/soc/mediatek/mt8186/mt8186-dai-i2s.c | 4 ++-- sound/soc/mediatek/mt8186/mt8186-dai-src.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c index 247ab8df941f..85ae3f76d951 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-adda.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-adda.c @@ -321,7 +321,7 @@ static int mtk_adda_mtkaif_cfg_event(struct snd_soc_dapm_widget *w, MTKAIF_RXIF_CLKINV_ADC_MASK_SFT, BIT(MTKAIF_RXIF_CLKINV_ADC_SFT)); - if (strcmp(w->name, "ADDA_MTKAIF_CFG") == 0) { + if (snd_soc_dapm_widget_name_cmp(w, "ADDA_MTKAIF_CFG") == 0) { if (afe_priv->mtkaif_chosen_phase[0] < 0 && afe_priv->mtkaif_chosen_phase[1] < 0) { dev_err(afe->dev, diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c b/sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c index 33edd6cbde12..75cb30790b1b 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c @@ -47,7 +47,7 @@ static int mtk_hw_gain_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - if (strcmp(w->name, HW_GAIN_1_EN_W_NAME) == 0) { + if (snd_soc_dapm_widget_name_cmp(w, HW_GAIN_1_EN_W_NAME) == 0) { gain_cur = AFE_GAIN1_CUR; gain_con1 = AFE_GAIN1_CON1; } else { diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c b/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c index f07181be4370..7c4021221950 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-i2s.c @@ -393,13 +393,13 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8186_apll1_enable(afe); else mt8186_apll2_enable(afe); break; case SND_SOC_DAPM_POST_PMD: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8186_apll1_disable(afe); else mt8186_apll2_disable(afe); diff --git a/sound/soc/mediatek/mt8186/mt8186-dai-src.c b/sound/soc/mediatek/mt8186/mt8186-dai-src.c index 67989ffd67ca..e475f4591aef 100644 --- a/sound/soc/mediatek/mt8186/mt8186-dai-src.c +++ b/sound/soc/mediatek/mt8186/mt8186-dai-src.c @@ -322,7 +322,7 @@ static int mtk_hw_src_event(struct snd_soc_dapm_widget *w, struct mtk_afe_src_priv *src_priv; unsigned int reg; - if (strcmp(w->name, HW_SRC_1_EN_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, HW_SRC_1_EN_W_NAME) == 0) id = MT8186_DAI_SRC_1; else id = MT8186_DAI_SRC_2; @@ -487,7 +487,7 @@ static int mtk_afe_src_en_connect(struct snd_soc_dapm_widget *source, struct mt8186_afe_private *afe_priv = afe->platform_priv; struct mtk_afe_src_priv *src_priv; - if (strcmp(w->name, HW_SRC_1_EN_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, HW_SRC_1_EN_W_NAME) == 0) src_priv = afe_priv->dai_priv[MT8186_DAI_SRC_1]; else src_priv = afe_priv->dai_priv[MT8186_DAI_SRC_2]; From patchwork Mon Oct 23 09:54:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432654 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 68E5ACDB474 for ; Mon, 23 Oct 2023 09:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Uu/sTtccUwF0ah9E+SK4dukpMAzlv54jZyNo0CSiF0c=; b=XuaazySu2PvTQXWidfDLfj8inE 51zObn3UQ5dNZ6QiXdn0ZQkKi4l7EPDlRJmfAdNLTIbJFLHHBVA9O5Q/Iitim9Oo1I629kfvU/ki9 7YabM4EyRsANU56tTwd+TsNFAqZdFLtgqdXXz1TZLvZIkLJm2nIKNgzPjoNjvq3zbMH3V9+84kneg zt79ivqIbiQLJX/zeHQ/S1kVlCvzwuVFTG6+VQzxpK+c8vDaf6UUR25ZLl6cHfkLyGnI0UoZjbYjX inD3g/Z/m8QVE4GoDPgWRDggZ6YiAEJdm0xVKpLRSXkgAysM7NXTlhJNHvJYfF4CUz9e2UvRhwSa6 wIattr1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurfF-006xKI-1E; Mon, 23 Oct 2023 09:56:01 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureM-006wXN-0q for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:07 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-32da7ac5c4fso2149103f8f.1 for ; Mon, 23 Oct 2023 02:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054905; x=1698659705; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Uu/sTtccUwF0ah9E+SK4dukpMAzlv54jZyNo0CSiF0c=; b=Uotgxo3bE1iNVmngUF9VtWlO7cmMEMza37WNVRYfRPOCHV14xJopkoBfkRNfAGVmVU /y28OnW+2XdBdpfFrPZG+5wDMaFLQ/FH0sYY2iHkoAO6MVssL8FG4be4Dc1y8Q9ejjYE 9OKvLiuffjsXAWiiJNakxHVR3crcLBeo2IzxC4UCiF0XGRQa8OUmNAScgkUOBcV1C++M Teqpqaqk3xbbdwWTx5xm9Ky2K9CD9ADuHdvZvi9o9sxx/eUwjAxF9aQ/YP9TrlQUtvG3 af/eeQ21Ao2Fnu3J2mnJVdRQ1H/QzDsC+IsEmvdVoyz1CbWJLp1mJZYXtsEk1xACHKzS TX2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054905; x=1698659705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Uu/sTtccUwF0ah9E+SK4dukpMAzlv54jZyNo0CSiF0c=; b=tmHAGllx0dlYS1PFbwy41/kHqQXQT+4nnKOjGIf4OXA0bJ/Nf903ru6Xk1L6JKWcwW 1PIUP8LsD23ZyhEb6zV8c9ro2Rtd9t1f9EP7qqyakwrPSExAnAORU3N5j4FLXwSWi2oz LdFdd6xXT5WibGYdPRRE90ZjG+c0LgMqwoMvJ2iKPkshSaux5cGSg7Zgz5eEAVg1scls 1XsdXCZElaPoSPQ2owbTJKVYdpKhSrasfircq3qNUsJDHJYXnH+ZA1L44uWfYL8ZjxR7 Z0j/9ZHzhwV0UhacpOlQdEby1IijEhtjqNhKI1y10tBbh61FSMt4ap39n4/LopwWljBm fgYw== X-Gm-Message-State: AOJu0Yy/qbPHeceJGE/QnnxD3Co+uksENLdZA1DRQTNLUYyB9o56oBnF BUsDl4H8GkA0RJKd7r1QO6Nx/g== X-Google-Smtp-Source: AGHT+IFC/yAsny5qrYVg+EkJz4fUi483BdHJQWDTMZauGOFIlXds5DqFSdeJFZSj0XyhBOmMbTRyIg== X-Received: by 2002:a5d:5267:0:b0:31f:f65f:74ac with SMTP id l7-20020a5d5267000000b0031ff65f74acmr7213785wrc.70.1698054905019; Mon, 23 Oct 2023 02:55:05 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.55.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:04 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 14/17] ASoC: mediatek: mt8188: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:25 +0200 Message-Id: <20231023095428.166563-15-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025506_297627_985A17DD X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Trevor Wu --- sound/soc/mediatek/mt8188/mt8188-dai-etdm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c index 16440dd0a89c..2a48f5fd6826 100644 --- a/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c +++ b/sound/soc/mediatek/mt8188/mt8188-dai-etdm.c @@ -576,13 +576,13 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8188_apll1_enable(afe); else mt8188_apll2_enable(afe); break; case SND_SOC_DAPM_POST_PMD: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8188_apll1_disable(afe); else mt8188_apll2_disable(afe); From patchwork Mon Oct 23 09:54:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432656 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8681DCDB474 for ; Mon, 23 Oct 2023 09:56:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=L7AsNVigM8lbJ2TEkTHkh3DJVAWVStJtaNwYVukOeww=; b=DTcuo/GlWIejHKrcSHrXv2Nkx4 BdzlfvHFCtD4SGtcch62iri1RivZPU00KMOBTliJNDhsHfz7vfLzOINJ2aGYiL2XdhowgGaM9ckhS eTXQqPuVdmiM+6SckQAp7jsu6TGSbgYgGQMg4bXdTXplnBIuDFILH2DDhHffHa4wpQAO5x0vkstID gz8fmMZRUO36jnES50rdt/jGR8X6LuVZ9ZBaMUiesk8m7IDT7VpFrcRASrBloVKe+TJqXrOD2oq1a ZXCIlltxfQPqKF8zGd45sNmlrx0P1RiDNs7/pPUkFeLTIqN0AjVZZ6YEQ54RJOLx4YLz34ngAjJn1 dPHUYj4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurfb-006xa0-1c; Mon, 23 Oct 2023 09:56:23 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureO-006wZd-2X for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:10 +0000 Received: by mail-wr1-x42b.google.com with SMTP id ffacd0b85a97d-3296b3f03e5so2173073f8f.2 for ; Mon, 23 Oct 2023 02:55:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054907; x=1698659707; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L7AsNVigM8lbJ2TEkTHkh3DJVAWVStJtaNwYVukOeww=; b=BdSiXQcpqjeAYqqNLxjwANWwQa9DLK449M7QEaf7SOa0JA5wdTbgwbQRtUAcj1HbSo 7HDcSD5xcgitHX/IzHu4oYY834lUSMh/sUY0p4LgFE1+xzglb9oaWOXG/Y/kC6sEhkEf dlA2mmffRcUmqmMuoSZObmWluuDhvb0LbYbfonCN9XXp3aLVIlJCAXzg20fg4HvXmC6N KG9kWncf8cR9lQpqUxwtow2Tr9dSswDIc1Sz55iXGpftF0y1XlJHH8mod1uzyfE/JgZM kmQveHVnInf1eiFI1u+8wtQbRIKWV4vpLIpujLbWIHCn9nMzzasvvMzyhrP0zP1KvBo+ jOyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054907; x=1698659707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L7AsNVigM8lbJ2TEkTHkh3DJVAWVStJtaNwYVukOeww=; b=lwMgQL4mJYrnOoQwMO3eoojo+MAn2QCU2ephuMEwVKhEDapc1FJElBiDPkDKzfhwHI Sqs7llYLKlb02vDYtQtBl1Ovifq9ARNg9XMF3dqommXcsmFBQOOu7EvDmuayiEr0xOID pm76nC+0WPDzldl5jU87hSQJy3YfH+367w3teGp6woPG5hA2gllA/WbP3DGHy+T32Kb0 9osZogqmyVJAOujRizTwLsn9aMvvhL1X/8Jg0l57pV3dsqnYWu/AqSgDJ5CX4jeZoW3G mEF5RJOEqDaqwhULE8M/7ATX9i463ofa2Yhr2oaL0Zv9ZjtsA0r1E6QJmW3io1O3cgXC KGmA== X-Gm-Message-State: AOJu0Yxlf3Jjx0pbMS9U8uJFuBjTLzcASxWhR7kHHUd42lJhASPqfEvI eEJIUJrFv7hGEGy3ZCo//g+Tow== X-Google-Smtp-Source: AGHT+IG0DaJTatBkYQl759RhB3DEXbNMmxDZLlPU/SGS2hOJRk1TRuMc/RVGopj7Uuqttkf+UNyBLw== X-Received: by 2002:adf:cf11:0:b0:32d:967d:1baf with SMTP id o17-20020adfcf11000000b0032d967d1bafmr5476727wrj.1.1698054907228; Mon, 23 Oct 2023 02:55:07 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.55.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:06 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 15/17] ASoC: mediatek: mt8192: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:26 +0200 Message-Id: <20231023095428.166563-16-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025508_867914_E2F4C82C X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno Tested-by: AngeloGioacchino Del Regno --- sound/soc/mediatek/mt8192/mt8192-dai-adda.c | 4 ++-- sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c index 4919535e2759..36d33032a37a 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-adda.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-adda.c @@ -435,7 +435,7 @@ static int mtk_adda_mtkaif_cfg_event(struct snd_soc_dapm_widget *w, regmap_write(afe->regmap, AFE_ADDA6_MTKAIF_CFG0, 0x00010000); - if (strcmp(w->name, "ADDA_MTKAIF_CFG") == 0 && + if (snd_soc_dapm_widget_name_cmp(w, "ADDA_MTKAIF_CFG") == 0 && (afe_priv->mtkaif_chosen_phase[0] < 0 || afe_priv->mtkaif_chosen_phase[1] < 0)) { dev_warn(afe->dev, @@ -444,7 +444,7 @@ static int mtk_adda_mtkaif_cfg_event(struct snd_soc_dapm_widget *w, afe_priv->mtkaif_chosen_phase[0], afe_priv->mtkaif_chosen_phase[1]); break; - } else if (strcmp(w->name, "ADDA6_MTKAIF_CFG") == 0 && + } else if (snd_soc_dapm_widget_name_cmp(w, "ADDA6_MTKAIF_CFG") == 0 && afe_priv->mtkaif_chosen_phase[2] < 0) { dev_warn(afe->dev, "%s(), mtkaif_chosen_phase[2]:%d\n", diff --git a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c index ea516d63d94d..47dc7ec4cae7 100644 --- a/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c +++ b/sound/soc/mediatek/mt8192/mt8192-dai-i2s.c @@ -623,13 +623,13 @@ static int mtk_apll_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_PRE_PMU: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8192_apll1_enable(afe); else mt8192_apll2_enable(afe); break; case SND_SOC_DAPM_POST_PMD: - if (strcmp(w->name, APLL1_W_NAME) == 0) + if (snd_soc_dapm_widget_name_cmp(w, APLL1_W_NAME) == 0) mt8192_apll1_disable(afe); else mt8192_apll2_disable(afe); From patchwork Mon Oct 23 09:54:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432657 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AAB23C004C0 for ; Mon, 23 Oct 2023 09:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ZC07USduWdC7NjdC5xCXcdF31ciW6Iy95zkt28zTytw=; b=QUtZdmwKq8HDhminPZLkUfLWKJ 0skEvBtMKhj52SNcm78q5y4e74a5sGARiEe7Ars/Dnf3Y2qQLG90sjWKdRBtG2PEW9RGTLJxwYZi2 Nj1rBpnyjJOULze9Uzawd6xF38JufIjc2s+5/k32A3+rRKKcK701U9pNgQCJ+u/V4QmFzRvkbJqul oFylXxvYOxN7I0B3CGU8naAHIPMxtOy5LDbHErWFtkZTewS5e+G+7TIy9lAQufQX0ZVP+3w9mj48D JeIT8/dqzBnW/E8iiv2Rq3OrJvuzl+Pws6uXvrJg/I0mPjEE7AbYpxgWgo0+UgVRqFCHB9SjHw/H0 m3UNnwUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurfm-006xhP-1C; Mon, 23 Oct 2023 09:56:34 +0000 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureQ-006wc5-1v for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:12 +0000 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32caaa1c493so2237546f8f.3 for ; Mon, 23 Oct 2023 02:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054909; x=1698659709; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZC07USduWdC7NjdC5xCXcdF31ciW6Iy95zkt28zTytw=; b=dIG6ySz/UNEoLYPwgtadc2X+sSv01tJlB1FeTRkt2fXnZd+hd82JkObhbIOdPWFYuv h7aMVdK7fpOk3orO/vKlmx4IshaW20kZJc6yiqBExPoaaAQB9wNd9ZLO25kKKHZmascq 3yhpdBkItrKh6vRWx/6/lo3UdeidyKpYFZuPlBiAqWRji4Q9HcC0JZJ7gwrFzJVARCOj th3uLemccMQwPX6uyEZu/e8LIsxlBed1NXGhc2BskukDUsUwN43S4DLADy6pp8OtzphK DXZ9vWnKPgbNI2SWYoomEnBCLVh64NPnbJjyaZgR0x7C93j9CKvj63tP7Orupqw4MTYM nTIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054909; x=1698659709; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZC07USduWdC7NjdC5xCXcdF31ciW6Iy95zkt28zTytw=; b=nqfz5Ilw1bNp8+/sKm87My5u9H2cFoxCYfPV4Khuh9Zz2WWniAqFlnmMx0eJAhfapO NOyYa3+9DkrQBQZbJZCXges8cTEtmH7fzbx9ZklXBF5tjtV7ruuBaEi4Uk/C+zgd+HXX wT174CFMvt0qF767dqz/h+wRoCRAv4NyP/qh6zPlWp3J56t/9ey1KlO97ccGsHUAHbYh 1i66tDYBGhHCrNZ7RuJYkGPnFWNP2sIgQ1y9+Wsoai0fiiGRR/dFDCYHG8mBt3d2sS6m R4lZlOu30n6V5vIvKF2vHvexiWfrWr47TjrizoU0tlaGlk1ZlG4QfJsdMv1u464/OxYv x3IQ== X-Gm-Message-State: AOJu0YxB8NiwfdF6zmUYVmxOQ7+xwGFPQgI+L8EVFMdPzJwZFYchsC7j RMrxqOSZ2nAaWlO2fScs0TD0FQ== X-Google-Smtp-Source: AGHT+IEj7uxeA3nMNUo9sdq2wgfqK3o3A7RdYb9gMk09HGqmRvuI7EP8mG67nJpViU+BpTyEwFeWzQ== X-Received: by 2002:adf:e80a:0:b0:32d:8c6d:cda4 with SMTP id o10-20020adfe80a000000b0032d8c6dcda4mr6419354wrm.43.1698054909354; Mon, 23 Oct 2023 02:55:09 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:08 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 16/17] ASoC: samsung: speyside: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:27 +0200 Message-Id: <20231023095428.166563-17-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025510_663422_5DDADE16 X-CRM114-Status: GOOD ( 11.29 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/samsung/speyside.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/samsung/speyside.c b/sound/soc/samsung/speyside.c index 43519572dc69..79476e8eb680 100644 --- a/sound/soc/samsung/speyside.c +++ b/sound/soc/samsung/speyside.c @@ -111,9 +111,9 @@ static int speyside_jack_polarity; static int speyside_get_micbias(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink) { - if (speyside_jack_polarity && (strcmp(source->name, "MICB1") == 0)) + if (speyside_jack_polarity && (snd_soc_dapm_widget_name_cmp(source, "MICB1") == 0)) return 1; - if (!speyside_jack_polarity && (strcmp(source->name, "MICB2") == 0)) + if (!speyside_jack_polarity && (snd_soc_dapm_widget_name_cmp(source, "MICB2") == 0)) return 1; return 0; From patchwork Mon Oct 23 09:54:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13432658 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A0381C001E0 for ; Mon, 23 Oct 2023 09:56:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=G81EZhNEBfjywIhuDWJjtpTXYP61176MP839Y8OZoG8=; b=mcIzadJjXukxI62d9MoU4E87ko fVjHWL/0r+l2IS/D01Svdfr4RBX0U+lYEdt4x5xvmIApU0ue3CSRzGl68f35KGdElc9oySkHWbUWP 8/jkZa5aapxcYcEvBVcpUmD4OcfPJ6S03bBRZf/2KdCJg7QZoiJN69um6jUr/WARI/gI2BDXfDfSD Uq52n+fDQwZZrwJZs+JST6tX5UK1IbPbAUaKSbn3qf9qwqLkUEDEjlo+anC1+//3lofnecoMkkzZ2 v0bed6ETswxHl40NKjwqscmHPy2A/Rs0SY3JAFCxRPdml1RR0+v3vDmmkPm0SlIyZEBeWOhdcuhpB rp6r9sXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qurfn-006xhm-0C; Mon, 23 Oct 2023 09:56:35 +0000 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qureS-006weH-2Q for linux-mediatek@lists.infradead.org; Mon, 23 Oct 2023 09:55:14 +0000 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-32da4ffd7e5so1725553f8f.0 for ; Mon, 23 Oct 2023 02:55:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054911; x=1698659711; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G81EZhNEBfjywIhuDWJjtpTXYP61176MP839Y8OZoG8=; b=J7T6p0od4pEeDOcbxJoXJcDzJGB+Z0x9xJ+2WwIuOphndrldZFzaEhzEEbtPEk3/ko BNB+OJLPa8cGtXFvsFzygFgCHyEnmlxTqNPFldduZhhVSm9i8hncu18458ZSfyZJEqxE bdILQ/PMKbkeDM74qVwvajf48J0ckCNJ+xB22q3XZ+kaFvGtqpLPG7qzosJ6USkuhZo3 0XuiDbD45lLu6dGglv6Ae/p8ZUA0a5ar4PVyijChIydfUQWMPmJbhJ0CHQWl/3urvWL6 spliZ63U5C1vuqUN1bShQJGVp/fHE5nqvOuqwPmJaRlqFVhRp7Nvj4bv4HAjLd2x0tV5 P35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054911; x=1698659711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G81EZhNEBfjywIhuDWJjtpTXYP61176MP839Y8OZoG8=; b=Vqwhx/cZKnqDmXt902V2dl9QAfzAMeBo9FWMugPMc/ehmOJPFNfsJ8KRN/+BcX8ug9 NtSQZgSVlrpxoqnkzG0MDS7kzpMvomoaWusYuFxbGv4JTueaSNtIanX2AKgoWN7OEPE3 Y7Ob5fy9VqTbjcbQvKQBVmmB+XdVjpRuB6SVlMky3sksYXfG5V7DtTN2bmAoxN4SJAr1 MvrIfuhndHXqV3x26yrnQ7tP+eZlzVxl/4GORhbrMjiktM/OZpYn+9IwsCpzlDBxnCKD ZIbjxJRZfdNKoFDVHsSRvLZfGB3AKeULnjRA4esfkPqgzFXgImguljjU3vYi6kOAahPq g+2g== X-Gm-Message-State: AOJu0Yx2r6o7+pevt8qPn75Q0IcEIeCKADd9F2TwbU3D8Ug/mRq1CUAX kFt3BvfXkSoIaPypIDAuO3VdXQ== X-Google-Smtp-Source: AGHT+IF2iXpBOUlnIxhQVTQ1O4HJJuZY9k94V739kocrPuR1iW5RroQxWCPWTyJ4Y36tYCQLJLsx0Q== X-Received: by 2002:adf:a499:0:b0:32d:a3f7:f0dd with SMTP id g25-20020adfa499000000b0032da3f7f0ddmr10781049wrb.25.1698054911534; Mon, 23 Oct 2023 02:55:11 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.55.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:55:11 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 17/17] ASoC: tegra: machine: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:28 +0200 Message-Id: <20231023095428.166563-18-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231023_025512_802604_E52DD3E7 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/tegra/tegra_asoc_machine.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sound/soc/tegra/tegra_asoc_machine.c b/sound/soc/tegra/tegra_asoc_machine.c index 3caadee9584f..192e9692bdf2 100644 --- a/sound/soc/tegra/tegra_asoc_machine.c +++ b/sound/soc/tegra/tegra_asoc_machine.c @@ -81,19 +81,23 @@ static int tegra_machine_event(struct snd_soc_dapm_widget *w, struct snd_soc_dapm_context *dapm = w->dapm; struct tegra_machine *machine = snd_soc_card_get_drvdata(dapm->card); - if (!strcmp(w->name, "Int Spk") || !strcmp(w->name, "Speakers")) + if (!snd_soc_dapm_widget_name_cmp(w, "Int Spk") || + !snd_soc_dapm_widget_name_cmp(w, "Speakers")) gpiod_set_value_cansleep(machine->gpiod_spkr_en, SND_SOC_DAPM_EVENT_ON(event)); - if (!strcmp(w->name, "Mic Jack") || !strcmp(w->name, "Headset Mic")) + if (!snd_soc_dapm_widget_name_cmp(w, "Mic Jack") || + !snd_soc_dapm_widget_name_cmp(w, "Headset Mic")) gpiod_set_value_cansleep(machine->gpiod_ext_mic_en, SND_SOC_DAPM_EVENT_ON(event)); - if (!strcmp(w->name, "Int Mic") || !strcmp(w->name, "Internal Mic 2")) + if (!snd_soc_dapm_widget_name_cmp(w, "Int Mic") || + !snd_soc_dapm_widget_name_cmp(w, "Internal Mic 2")) gpiod_set_value_cansleep(machine->gpiod_int_mic_en, SND_SOC_DAPM_EVENT_ON(event)); - if (!strcmp(w->name, "Headphone") || !strcmp(w->name, "Headphone Jack")) + if (!snd_soc_dapm_widget_name_cmp(w, "Headphone") || + !snd_soc_dapm_widget_name_cmp(w, "Headphone Jack")) gpiod_set_value_cansleep(machine->gpiod_hp_mute, !SND_SOC_DAPM_EVENT_ON(event));