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: 737320 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 82ECFC001E0 for ; Mon, 23 Oct 2023 09:56:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F05689F6; Mon, 23 Oct 2023 11:55:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F05689F6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698054988; bh=NbEnwE8a+KjhRgiB2luA34lgTX1W5wMgnCBJ6j8UFlU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JsQU8pwzt6rK+XbOwZIebNfXoveObyqDxHCyLUGGraC7Md9AQFgh5+G6XgghVKevg La8Rl7ZArYn0sOU5B7859YX/LECfuPdO1i8WX6BKY0C37F2aDDcoZi+/Qy9FU8oNqQ ie8uWlwOZsBf1hMBJ+xIP40HQN3+PjMzqYAGGCis= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C394FF8056F; Mon, 23 Oct 2023 11:54:49 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id BBE3EF8032D; Mon, 23 Oct 2023 11:54:48 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38CD5F80527; Mon, 23 Oct 2023 11:54:42 +0200 (CEST) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 790F7F8024E for ; Mon, 23 Oct 2023 11:54:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 790F7F8024E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=wiH8HnEA Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32db8924201so2093892f8f.1 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=alsa-project.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=wiH8HnEA1+t142oV7mGf+geuc4/8jugAxY52BTb4hdz54KThSTwn+p+LXBs6kc1MxE 0Dd8WNsrRHj4ug88UAmElx8R7QxhFwpf73fFFb7H6ixt/1UAxtVVN3KRhfXoqzwy/8UF /HyZpL6f8eDQSSI2DnskWArBcYhIQ2OU0Jdj4maAufD35qUCUDwgRUxR9T7Yq+8nNqKB g/sZJJP+6pE/Zq43iqcMHWkdeXoXkyHU/mMIsKgcyondogZCsRX4eM6WTSjfhuh6xgUn hdCbtt/rWwG6NV88K+lUe4u5q5m0dRh6YfNqknIJIPwU+OUTwq0A8P5e+ZdWAnZ8YLl0 d47w== 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=xFy8XowPp1OFTb2GrtcXCwC5jVDAYNFaMCON3NnEpPoKTIB8sQY61sr25tb7OFJMsO Jod+XIFrZp3ie8S+QzhiElrdOnXgR5+aTGpkLBL+AzhFecDXq2RRsUHi6Wzes/v4aC+F H7aiDDryYAUpHxUyuoezXHkIToemVw67eHy0D7n/OkemP3cuTmnm7Rzk16gS+dcg6J4V eh/XCii+to8iIuJ1boqEHkPSDr016nZJ5Y6zzuuxN2s1S62Cu3sykNY8E6meRYx0B92z gBLqgBu1sjNUB9BDULiLKKRR1ro7VhWrZA9l+bRb8PA7vBWDQPOsKMV3rfZs7wYPIXf7 RpTQ== X-Gm-Message-State: AOJu0YzmBNZMa7t4AqQgZZRmC5O0+WkN+62j8rRDRS6wTMD6ynTkgAUt Jt/zZnResF2yZ4D1mYcw2NaG7A== 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 Message-ID-Hash: HQ6NRFE4C37EOYICECDYRJCQNUMOZJRH X-Message-ID-Hash: HQ6NRFE4C37EOYICECDYRJCQNUMOZJRH X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737319 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6CFCC004C0 for ; Mon, 23 Oct 2023 09:56:56 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A62D3DEB; Mon, 23 Oct 2023 11:56:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A62D3DEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055014; bh=SSV8gcCUb1WE4/Y0BdYKXDFpSRu1X2oATTuwtNlI+8k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=LBxblFye21ENoxsnjZwVkergq5FGS7aVoJHoHrl6XzWZQ8F1w2ShFCAeL9phGXqQy AOG5LoieWsRjrkEatF6oqJfdHF2H9n2QsakSaGdrSa3qirMpmfcXZ/ZUhCvaPPSqSs IW9QaJv2I7GMfuiGCUbg8/j1nt6hxy+HPxiejroQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 97510F805AB; Mon, 23 Oct 2023 11:54:56 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6E163F80589; Mon, 23 Oct 2023 11:54:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D18C4F80527; Mon, 23 Oct 2023 11:54:44 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7ACFBF80134 for ; Mon, 23 Oct 2023 11:54:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7ACFBF80134 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=DbnSY5nr Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-31fa15f4cc6so2227088f8f.2 for ; Mon, 23 Oct 2023 02:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054879; x=1698659679; darn=alsa-project.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=DbnSY5nr0Drv+Sz8q2oG/sGSd9CFn/nNXGhidGIBBz0Sk2rBWRMGRtBf/2n3WOqie3 6R2cU+josXn278sgpcajl4ZkVtEU1fQgZb5QDs0JRypXt5O0LMxRjvXFxt2Q7u1fDJZ/ DvlJ6qpkQN5u+PX8J4dJm6Jh52XchWAx+nGv6rk/3RlYrfW9ZLtN4kR9krmtV6Ri5OUO 7Ap8BM1pLxMMPJ+8jtfuQmMYS4+y0EGehR7pewTXVuS9O4MvJTAA7dcw2DJCX8NOtSTY yJ9CySmKcligbkerugWlNS67l/lzO4g760DWNxxkXl6nT3q6wpean9WPZ6nCOdxlgcdF iPnA== 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=MMUlBk1ajR60aHoHdEqndX6yCDoDI4xTK8bcNmm3OTqWvZW4/ggqBYCCM/p4zg3yBS v/VnLdwN4bShts9dEj4BViZC7+4sCrIuOufjkZMb7SKWpgQL2wYoHDHyxz70NYiJZ0B/ RXWgoluyNUxDEPjVbYYZQ818ZsMVJqTpLHxefLmk6TrAJbpAD9gCUksxrNvyUTfWPita Nl6i5IM7bMBEG3zUW/KhmXAdcC/an9/NvVQFqA8dgK60k/iKFmdIKD82sANPzq7bPzqY zjtwdTbQNGB6DBXSe3iv0AjT1CPOMd2OU/BKSgVFAqSDIkCNo2eAE0IXIyDc3L1ai7Sy lmDg== X-Gm-Message-State: AOJu0YwGMjjsr7l6kdP+i7EhcJnTprZdeTqwLRFNPAKVSXPBATaFjWp0 /5cQNuW2Ehg/T/490FvobzwyAQ== 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 Message-ID-Hash: P6LOAGG2KGW3ZHN6ZIWPPFSGFDMH3R5M X-Message-ID-Hash: P6LOAGG2KGW3ZHN6ZIWPPFSGFDMH3R5M X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737318 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CB1B7C001E0 for ; Mon, 23 Oct 2023 09:57:27 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 03851A4B; Mon, 23 Oct 2023 11:56:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 03851A4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055046; bh=MBHGFWiNafo43RFtlVV7A4bk450A/qSKcGPyTpE59aE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dobf91JQtWoV1+IUmQKKUawqwzwwcCqPCeUxSbZV5gOS0jzgLWgEJQZ64pPmCzqzq l2q3woZ347UPOlg4uyUEE244m99OvPwEKLDUKGZPThNo+TfFTZq9OWAK3xLL48Hw+W kS+f1cFCVCySb+fJ6BWCvrokaD1hqX5eBYZqK4vA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2707EF805C5; Mon, 23 Oct 2023 11:55:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id E8C6CF805C1; Mon, 23 Oct 2023 11:55:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5E908F8055B; Mon, 23 Oct 2023 11:54:48 +0200 (CEST) Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DAAC8F8032D for ; Mon, 23 Oct 2023 11:54:45 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DAAC8F8032D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Q3cDzMju Received: by mail-wr1-x430.google.com with SMTP id ffacd0b85a97d-32da9ef390fso2147592f8f.2 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=alsa-project.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=Q3cDzMjueBvgExxHC7y4ECCgSu+t+HT43oZcqmFPJqZM3L7jfMxAuwdNXXYhoq9cVg FZizqQbVZhpOc5IZr7C2UVT1/0q+Ck0gREdKylnQBur6lLDdX6+3Tyj2igsoBgrScqjO wc3Er8hZGDcvIGXScjr6RP7O9Qr7crIx/AyJqHgyqZn/OPMqsURVTG3+esJLrbUkbxFr HT7pJUtAS6HBDQRCOKL7gJwigHUZ/vOqRjtU8UoAjRukAHoqzTBCY+CjutC4T2bwp43r xX69ew+pBpI7vN4UDP5N2kBYS+YJhA5A7JVvgcQPqpoNVMwG1L4X5UjzrZ/Owqa8GtoK MnBg== 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=Ty99Ppyj81BbFgghkkJBQmFiRhKqQqIm1FbmEzfA9CWuBdHKLdBHEFgJKe4dTJLr2Y 8431UEiM6s9/FYWaa3Su2+2YMbvWIGcK7VqNus9N3V2w5RXTa3bQjRYWXGFXW3y6fLzY b2AbisB3UAZBW3wY0LvCrMAqYOsKEG4hvOXYxU3KBbGNvhTnVTv6lxAaLqjTrVCI0avr NSz0m4aFRijxyRiZnhHB0rTOk0HqHph5Gh6x0TwHMepa5cNmMrc+HPnSgS8T4PQPygh/ ueb7/O+Od2/mNrEcxP19A3WzmMgMtzGsE+j9/4WujAkiQAT7Bj/Suxgfusc9h2lt9X+O hy9Q== X-Gm-Message-State: AOJu0YwxF7cwMP6ISpQj8/YJtePFjlm/g7DZSPl2ngTiyXmbRnbtXvGD Dq1RkDCKIL3ixLxASyEq7v1m7Q== 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 Message-ID-Hash: J6SMJ7PC4V5A343P4IIGA5XR4OARDIS3 X-Message-ID-Hash: J6SMJ7PC4V5A343P4IIGA5XR4OARDIS3 X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0912ECDB474 for ; Mon, 23 Oct 2023 09:58:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EF2C1AE9; Mon, 23 Oct 2023 11:57:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF2C1AE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055086; bh=WwwsqWVst6am8unSVoQoAkBT7G0naqY4SOdWNG5s4bQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QRkUvxsxWBtO6dia8jH42S31UKYwD3YGbkVAccViuyMrwO2OMrfB9o3Iu2KfNXSfd Rz1iiDwWmGfCkVEpDROcTwe11HJ1NZQjka1PvCC2WbIFvhDE1BuaQgZH62OPiiniKl rR86D8Ec3+FKGIBLKkul0dhviVPunovWpD7/Lbq4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F0A4FF805E1; Mon, 23 Oct 2023 11:55:09 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DED83F805D9; Mon, 23 Oct 2023 11:55:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26FDEF80587; Mon, 23 Oct 2023 11:54:54 +0200 (CEST) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4E08AF8055A for ; Mon, 23 Oct 2023 11:54:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4E08AF8055A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Rpl7Xuut Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32daeed7771so2082523f8f.3 for ; Mon, 23 Oct 2023 02:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054888; x=1698659688; darn=alsa-project.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=Rpl7XuutaBYGYwcD/p6HtMyo3PSFSvB93B0hiYYrcsxJpXVdbIpUmfOPSNGLCqJx6l r2Nw8cDItFWaCDNInkELPhjP6eh1CVwniIgJCKJ/q2/arYdcTBeWpAufJIfToYErDhRV xs79b1zp535msWYknzSty5VpTmCdA/qt5YiqhNXKHm2P6aNgJyeV2PDR+cLEezpPsZfS WyxkYph2On19sa6AlV1BA4dHxcG3NPpewA8pIVraXApswhatdw3e5Tw0mxg6o+YaKK8L tc9IZHoUfoMJtyR/F5fy2lbGkeda3S81c23xOcp/Kj0bdVV3B2P6atgj4p82uXvcxJSS XpWw== 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=e/2hrN5L4hH05geWqYQAmW8OGm8mPdAVmXE1S4OLHOyD9tJA4cf4IKAwDUC1QuJJlr yT/1M5wpZEwfv9+MhepUNTuzua/5WSQhlyYPObxBCPJISjmf86HRpnAGZDsZuBQv6pgZ duEK3Fv4nbCkErWyFLCa58LttZRh32zaE9muTtwKn3kU6XCnYGRrhGYfYRbNN7BGVP7V codsTZXJ6Ha4GklELskRDtjEvKqTGepZ+cCMqBKYkkskUj++veeqvGDwzPtPG4ronSNE ClkiOiGknMdEL6d/2PxnTOXnaXNFdws+HHCOyV4t0lURNyN4DnTi/1aaCB9j2EwJpzMK L00w== X-Gm-Message-State: AOJu0YwWFlSQ66C8wTuTFky6TYVmkmxxNshZb7xte4MCo613Dz4wNzuv nxhRyMacbhzZDB9g/EObO6h+yA== 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 Message-ID-Hash: 7B5BT4PML45JYBUAHJUHBZVMB6GR2OWK X-Message-ID-Hash: 7B5BT4PML45JYBUAHJUHBZVMB6GR2OWK X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BB21C00A8F for ; Mon, 23 Oct 2023 09:58:36 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4032DE7F; Mon, 23 Oct 2023 11:57:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4032DE7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055114; bh=xSH/xpyVPhStwFe24/u3gzVA3r1kdQymL5j+3JegQnY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=JOCXQvWAf+9fGEr78ILo+o2AJEm2Befb3U7J6/FDGnfyAgaSHNn55WsAyNPUVaf9R TBAusAdhRCu/eV3tzthLlyoSwBfGwJ/dtvZuvpS5qU6HQTroWx5y8mMgYtQrNwBIpv TzzfTuV9k/RSeLgVAJ76IJt59vwqkEUNt27yxHTA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2B824F805EE; Mon, 23 Oct 2023 11:55:14 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9B283F805E6; Mon, 23 Oct 2023 11:55:14 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2ED7AF805BD; Mon, 23 Oct 2023 11:55:00 +0200 (CEST) Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1C9EDF80587 for ; Mon, 23 Oct 2023 11:54:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1C9EDF80587 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Lqodfggx Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-32dbbf3c782so2378930f8f.1 for ; Mon, 23 Oct 2023 02:54:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054893; x=1698659693; darn=alsa-project.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=Lqodfggxr/xB66DHttvcSxfk/KA2Vagc/IR9grABE923EJfl/wSTbiFHa5/C/kat1E m6xNZxLk3E7De0NI7v/++TSRNsJCPJAihcuxySgAIR3vrK53pC0A0cafWQEU1raY4MDb P68Ej0WLEXjT+1SI2BgdKbbCBZsSCvDe6Mg+k4a4LuXzQGB21wHiDVcTXEXkXISe8Im8 A23DJWSUzi+XE28ql/1dxUe0H2I5grM5uVp5mCPuFzNk3qK+MrbIWdzWVvN6WVM5lugq P0J68Pw74SyHDUAEgJZCsGa/YAy6N9oKqKYtNRPyqH2WBduuAwtchbD12vZ9cciOeB4J rqAg== 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=kJAHWD74IUhStqJhgpI6vX+G3hD6geEza4mWAiuAiVg0F9yO3xupFBcYCO43k1z6KO G0svBMOE+D9oykHuxuxI2ZiQcQiwYevK+an8WMqunOOcIwad9EV2G7TTdn6KDBGWllBX kCOtcHRtrwujxKLrSQxvX0kopdAPCdiOtEh2nFY41eCxbvfiv7jNzwzNM7IgLSyFXkhu cNNghUNFtnPksD0N7OMp38KLYTEfAt6qPOwUuRchaLIv8+YMvInifiJIRTvgMyK+yynZ ihaSHw39W0xtdKLEwIEB6eVCABEmiBLKfJxQiHRGu09LhhcGovYsxOVUXLA9FvYRgP+S 4cXw== X-Gm-Message-State: AOJu0YxcfZMsaXiUDVDwauDyYJGQEtIHKZ/3tuGu5XGU5k+HOrAzVhxd rh/T6jdWL1cRT6O6MeUBna5H/w== 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 Message-ID-Hash: Q6QZUVNJZKYJAEOTO3LZ6YGNESXRXC5I X-Message-ID-Hash: Q6QZUVNJZKYJAEOTO3LZ6YGNESXRXC5I X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737315 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CA6CCCDB474 for ; Mon, 23 Oct 2023 09:59:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id F3819E82; Mon, 23 Oct 2023 11:58:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz F3819E82 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055142; bh=he4FjFlxeR2KKvVorHVhGK5pixL7ZmRHco1OiNRxlNs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=HUfCL8k6C/WWQbCSoPIQ/xRQktU971mxsWwhC+GQ4CC5XEnMBEmed3u8CASlt0fq6 Da13hGRNElsCRnOH9YBgGPe5w7evgCmSkT77AsCOe3GZXrFpPYgU57A9DUzHeU9xHD NVj7lLTGQqQDvF07yAYKkV+P4rufhQpXzSRSbL28= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 444B6F805FF; Mon, 23 Oct 2023 11:55:20 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B053EF80600; Mon, 23 Oct 2023 11:55:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72F77F805C4; Mon, 23 Oct 2023 11:55:03 +0200 (CEST) Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 450ECF80587 for ; Mon, 23 Oct 2023 11:54:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 450ECF80587 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=hIEemEU+ Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-408382da7f0so25697495e9.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=alsa-project.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=hIEemEU+YSdPaF1ETtgRg4/zQb85bmy/vRya7g7/n2DNEcJRJueqUqgMjlHC6namzl CjLy1szDL2X/dRoy/XveMwOzE2ZxyDvBOWdskmGCl1zXsjX8a44X74LlkNDSSgAU64YW 2wIE21WLBksYNqw5Hkr2EvZ18ErMOcldjZvgS51Um65MUeIhKlN4BccxQLJFpHJTbNbc FDPn2twvTluT8mi/92c1gBqxn/sGjFg4JOCjp0MwAH6XlyKXJp4AVg8eLSU4oTQyqzdX A+tp2UsiZwrJF0yhRz+yN8sVn0Waq3jGV8kxTePLbeRruzz6z66ACF0MlL5QO86zR1rH yjVw== 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=DaBiNfcAtTDZuPddzVtqq6wOkALxAaAOEZk4HEtOGUfpG5tNKKDRNg1+AeFkoJeKM0 7g04CTOFE70p5ltkK1qRq7T7jawELp8I6gcaCdkdEDYHK8TjPdVNzFFn1na+y3MfK18J NWtSMsq+dld+TQavGUbeNnh/GoLTUXN8WmPqUYrzIExVT0I0cR2jTHy+6N4yxxyeKN4r FhZx8O0exah10D2pZQaCbkUV37Olzwyz4ofS79RYboIPouo7d+z57HIaUGpu2GFjS2Bl Eat+VGdVZEVDOwjydJ/Gg5lBn5DTudaAZTk/+x4Y75sJGeUVRw5y8H5mFyIHr6Jsec5p EuHQ== X-Gm-Message-State: AOJu0YwX7cvy1WytL13JB3eRX82AJ171BF7omHjxMfdfYMlHCZrgTKwW xdy1sFUdiF/xj19jDphUVg7wBg== 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 Message-ID-Hash: D3GHFOSBPS4N5HIDJEKCMGCKB5M6AVDS X-Message-ID-Hash: D3GHFOSBPS4N5HIDJEKCMGCKB5M6AVDS X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737314 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F312CDB474 for ; Mon, 23 Oct 2023 09:59:38 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 227EFE12; Mon, 23 Oct 2023 11:58:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 227EFE12 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055176; bh=wPPgGf55US6HMuw9y5MjdIDf9psk/BCW+uO9J+Iu4cI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TqTVbLzBnpdrLBIqlzXBiv3Uz0e5vgxgGqJuZTZTh6sDz5S/eeeeAo+TElW1Ws0ty gRiLqu2eBqdmTKUQ7gluWTSkjh0kBuyvrEGmmtYudssnSYGiytlqGS7INap0vuO+qN 2EbJVBPuEApk1YTTfj+2ZVafiWshcmJbfAerKeuU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 51C22F80615; Mon, 23 Oct 2023 11:55:26 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 94893F80610; Mon, 23 Oct 2023 11:55:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D9083F805D5; Mon, 23 Oct 2023 11:55:09 +0200 (CEST) Received: from mail-lj1-x235.google.com (mail-lj1-x235.google.com [IPv6:2a00:1450:4864:20::235]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 98DB7F80587 for ; Mon, 23 Oct 2023 11:55:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 98DB7F80587 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=NHXaqV41 Received: by mail-lj1-x235.google.com with SMTP id 38308e7fff4ca-2c4fe37f166so43316861fa.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=alsa-project.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=NHXaqV41r1lotZG3WbxOMbAat4emihC/8f2T2RJlEsiicQf4Cb1HYeUQfofr+0zx1V JEem5/RvmiEOfbHcnMcFsYKreWxP1JeB8RPumSd4SB1cJexz8+iVYUzKxTOqjKQggoaZ 78Ys65Fkzwj+/E/YlfQSdObOw/1rUsaw6dwp4/QxE+VILt4y2ju6AUJ5K+jy+gDwxoG6 Tbm9kEik296HY4TXdhdaWqB7V+3f7olTJTJbtBiYck9yr+gy0A2EbVuOA6FyqUixOfb3 zu0FxI1jSKtVBjy/vtvtWoifpinF8+gV1l8UfWQVn1RfJj4D6zP2Xxub274qPzYQnBmY 0dgA== 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=qgq4r2y8BYCal4BVBlNj1tM1jHG99hPoIV6pc6iQXFq96N03uIMBRPQe6SGwBPwcYO vD3sxsIrO0zsgdhN6AD1ZPkwKCwWpTGl1WkMW8WDyVHmnxYCodnd+pj++JtO6OB143CD f9/jpN5l3NUFkGXTNQOr8uqdEAxAzMz8isbA/ap179qLIHzbK7HrDL0VXkW6iiSSj5xv ay5N5MqpXw8TQhnyjzfCtCJLVINH2qPRMl06FSee9MCgq6ZKCxbZKw3zApkBR/oO2wcX IV2Bh7gIZw7a39FcltixHHpXa5uaL0Vrwwv92sufty0kgoTVVcvwo8jbnN9fkdB+TStq 0apA== X-Gm-Message-State: AOJu0YxdmADzyDUdtxRdAlNrWqI/uf9hT7bZVy78y+ZBMPpVCusMiBaL a4Byn2CPOz1APZnym/k+ZvcSAQ== 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 Message-ID-Hash: 7TR5EP6E7EXSJAKXEL6L3EBGSJH7YEPH X-Message-ID-Hash: 7TR5EP6E7EXSJAKXEL6L3EBGSJH7YEPH X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737313 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 777B7CDB474 for ; Mon, 23 Oct 2023 10:00:09 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 235DEE84; Mon, 23 Oct 2023 11:59:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 235DEE84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055207; bh=iXjF3RPCmBoWQ+GKpaYH8Hub2UMRDp2Tg63QY6VTcuI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V3XLsbeOaBb0FlJ9PiqFkmsT9aaKCVpF2kI56d3Pt1BvciNv6b06Ok9XeXCaQ/u8U fMyzHLWtAFR99Khjob4QlwIeAUI/SGSSEY/QjLg+EXi1ENJtmn10ilqiQjHuRTjpkI QyBw/SYhq9N8IgZWuGPTcmqZYpsKy8iYtaAg4mNI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A00A1F80622; Mon, 23 Oct 2023 11:55:31 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DD730F80623; Mon, 23 Oct 2023 11:55:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A4DADF805E3; Mon, 23 Oct 2023 11:55:11 +0200 (CEST) Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0DFECF805E0 for ; Mon, 23 Oct 2023 11:55:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0DFECF805E0 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=MSjwI1ZC Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-4079ed65582so24037335e9.1 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=alsa-project.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=MSjwI1ZCARsYBY1ln/pa1SxI9nctI/h6KpzHJf+ZzJGp0pCo/Z+WmpdCabmmI/zVOz +8NzQlpwDxNBagS/J44/sROxQn+omBuuxNBE0QfGk3h5dFWGuzjTXC0rQgnn27wcQO0i abhe9/UG3oSF32W+lIjuzKkwfMFYY8Bff/3VVBH/VHHZbz8dlwSiEKwQ9FrPdH7AgLX+ G7r4few8sD0biLK/Nipg3PW8N0YbfLSEG9J6ZFHYU0d4nfEKg0nclFWyNumHXP+W/Mty HmjFnzomkQY2ZodIpWxeOcSbkuJSWfdRPeqzQbsQ1ZYksu2pFGcQjUEiVOhaJRlwbMIS AFdg== 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=jluCdLw0JtHc1G9Sf6Vb1FTUZ3GgBvy6DA/1f+MO0S14ZJeTzPZyItfhzfvOW1C9tE /DC9OTXQoVBOVQI55Wv9A0ZYJdjgjuODf3VqpuElBXrN5gZzm5VfY7CDEmq7cdvheUjQ t300BMBRRSWxKSyKQ7luyBJEWLDkkeYUXi4kDOVw0JpHIiKAoQJtaoOldGy3mpxxvrSS DBksrpIuqt+6/n1l7IgI5Ra60pjPaubb9sVk1Zl+sMl1ii7+tLT1NNmQglMhjh/WECNm Q7f3jEl86IW99B5BFNQVYf5zNObCRzYbPTE+LZo9Z1EyaMFgHDg2FOF2ooIG/I3olLwu fNyQ== X-Gm-Message-State: AOJu0YxMAcFJgcLQo+XiqSRnjX0vmJ7uajF0Ot7VctyFuwFubh/cV7FW nyTxY4Ww5cVABEtXocKi8bHwqg== 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 Message-ID-Hash: 4XYT27FC5UYBMZG6XIXN6K6YMEPRUZPD X-Message-ID-Hash: 4XYT27FC5UYBMZG6XIXN6K6YMEPRUZPD X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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: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: 737312 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CCAFAC001E0 for ; Mon, 23 Oct 2023 10:00:37 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 07F67EA0; Mon, 23 Oct 2023 11:59:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 07F67EA0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055236; bh=RcSEfi9+6KkNkFc+DB/j4AL/7U7XuX1do84BI9frLzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=AOg5mL4OYi2QhaKXVj1sDYEkBMnezfM/kNU86N6WRCrn25JkSQCvGbtyxoWpAXxnX FjktpSujAXkE07LIyPwhHEBQaEUhzlTrc1snwZk6kfnaqMMuMBBCQjCWpieMlQgP4b bTVyc3P5LNoN2/YYcsaijXI3gO0rygrVfsyhBB8A= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8F810F8063E; Mon, 23 Oct 2023 11:55:37 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A2987F8063E; Mon, 23 Oct 2023 11:55:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 20EC3F805EC; Mon, 23 Oct 2023 11:55:18 +0200 (CEST) Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0B47DF805EC for ; Mon, 23 Oct 2023 11:55:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B47DF805EC Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=h+6BvQx8 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-32da4ffd7e5so1725556f8f.0 for ; Mon, 23 Oct 2023 02:55:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054911; x=1698659711; darn=alsa-project.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=h+6BvQx80gwcMKMTxcT8PnRai20cxYbbhTYjhCwtCEu+o0NDbxxJ74UhatPreWt4my Ug05d91w0khW9avfOfDTIFVnQPfQ1VopGwZT0WKMDulBQSeMeR+3kmuFQ288FLxHCcjX d+kXhjkuZM9WVvkBqtd0kD9+jBXlyAjQLqEoRalnaSnG7vhiAcaDVzXPcK6d+ByS9uPf 7jaqptiu+ZoSeuwTCnnWXyqeMMI4EcnVuGT6Jdnf0rhOf45Xx4wWMSZLYlIGekvZTOff QQRjZw5Nk2sQalxqXDV50HGYZtUSp8oXSc+lfyM+p2zHI++lnjsY/w5pciUwQMgqi00/ ND8A== 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=qXbryqy/SOPu2lOhuuIMQ4Sl+MPc0c4evRJYDkE9zRjcwmbYG7xoFg643kl7gp+YjR oREYsE5dVgsMbnh4i0j1mTtGn8VSnfLnVjnxX1MrnDyImBcC5V81XICQPEOrSvOM3bqC xZtlXLUJfrhsZv6q4yquxYd9LZoCQsMNMXKmZ1u+loVDCnhFMKIRoLgdh25TN2S9MVOO Ehk6rKH4gt71GwMRiMS0XYjgzMKPnAxiRAyOGQxjG2updIgTX9fy7qJXZ8PFfJBQb9L3 05dLnWfO2VO/zAuoxqDMJbJG8TFscHaSqH3oxUXrYNBg7K6sS8io/h2W/nD/qQqt0Sx7 ijJQ== X-Gm-Message-State: AOJu0YyANSjFtDbHbiJYKBLGz0XdCe0jm6c/Qj+s2mbg6hcOoFKUge/1 LzmUyCw4mQGPspg0umJMD3Fkuw== 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 Message-ID-Hash: TN2N2ATWZBIXBDCHDIMRAJCNFFVEKLHU X-Message-ID-Hash: TN2N2ATWZBIXBDCHDIMRAJCNFFVEKLHU X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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));