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: 13432690 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: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: 13432691 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 CE5B3CDB474 for ; Mon, 23 Oct 2023 09:56:33 +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 E1D5B846; Mon, 23 Oct 2023 11:55:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E1D5B846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698054991; bh=Yau92eR7ZXrmGE9XsEl9CS8njSm+0C0QXAWfvfzq1BQ=; 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=TM3qBjrPIWdmED7QofzKob/Q6AdDNaVqRYakhIWDazE/+2oVtTRZ4yx7CAoayjnOh fyNBZoU6pBTMlhQtj87gJ0fLmCjDVcdt1PV0O2DJBtewnBPdb5VpS4YnABtKkD6OeX 1cz6kXAiWh7opadY0uIkxt0ZiH920Ff0pCOSFpXo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 650C5F80579; Mon, 23 Oct 2023 11:54:53 +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 38F5FF80579; Mon, 23 Oct 2023 11:54:52 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85B80F804F3; Mon, 23 Oct 2023 11:54:43 +0200 (CEST) Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 52F52F804F3 for ; Mon, 23 Oct 2023 11:54:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 52F52F804F3 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=eCP917st Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4083f613272so26740375e9.1 for ; Mon, 23 Oct 2023 02:54:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054877; x=1698659677; 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=xJErgU+nUAjpf1N+MX3RFSZtoYrYFdNiReNrVNbPccY=; b=eCP917stvvnx3Ke77PTN+0DxABhSW3xbogaLkxW2WFH3cVWjxWE4Vks0DfaeXHvhT2 UCmfVprKLSTAkG5/m7knSAlHQadSV09HQIe7KGgQrsVboPJ0MlSBL4VTRryQqJCEvI/6 an8BhHqgGhA+uF7iSwGzdYRcyX+q/r21aUyveiLN0UfpeNEMMlWICy+amS/Trh7Ed59+ YrJ5sYWEuY3QPisyZYIpcuW4dYnqmFl4l4HOe1lOD5V53F+ulZGzzFyCmdA/SK1DgpuW skJ6s40CXfLhAdpM8F3G3/l34erNQq4kXvxznLDIMYxP7K8eQLBUTnsr4h82PmCh0Ssr crZg== 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=afC2E3OdMolEmMwUPN5S+F/PV/+09z9MBG3rBajpyoK92cV5r7JupO2TqwbvHHNW4S jdXbQzyTLPzOeS0idxSfA9L7rv+hFnMI6tD7RPS+QaB1qnePRjTt8OTg9eY455mb2YIW X6Lt7bv7MD1+KDj70QAQm39EECoRrunmyq9hzi270IvyOQ1rG3guGA+Dip4Wv1U/KSN+ eAipDACEZdoZ+w5VFFzDPEql/7OoSxX+zNei3i90tfV7axAb5Zo4sJXxuglzmHzoyb2J Kj5nZSP8NIDskoHMni29YTVRa553igG9hLy1b8wxx3i5r0ifHSELI0zAS9RWp5C8rSF0 6VIA== X-Gm-Message-State: AOJu0YyuMhvE4Ry/D7zEo/YXi/lePiSUCfLsxrzM84hogaLIeuZ6sygI Fje3kWtVfNam00b9o9wAFMcAug== 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 Message-ID-Hash: IPEEC2MDDBHSYCECWMGMRI44GIGA4JLK X-Message-ID-Hash: IPEEC2MDDBHSYCECWMGMRI44GIGA4JLK 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/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: 13432692 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: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: 13432693 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 0378CC001E0 for ; Mon, 23 Oct 2023 09:57:19 +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 0945EBC0; Mon, 23 Oct 2023 11:56:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0945EBC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055038; bh=mt3YCmb8lPCu1uqF1GwtVtpW3ERnj1j1XEFZctgKCSk=; 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=e6GUYa7WPCpzX4BNg37DCsooTShpbby3Sb2Gve22+6NAvDcB4RZ3K5IFtYKh+W6rA KOnKKLIdLnKCRt5il7Lgze7xN0F3o9ZcK/qNaMuFOOSzLxhMQ9uL3pf0cl0rclnJvd VGpDzpjykdSZoEkqPwkgT66jV/nV0iyESq48vp9I= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7666BF805B6; Mon, 23 Oct 2023 11:54:59 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 9F9B8F805AE; Mon, 23 Oct 2023 11:54:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D0971F8055A; Mon, 23 Oct 2023 11:54:46 +0200 (CEST) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 09A0BF8032D for ; Mon, 23 Oct 2023 11:54:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 09A0BF8032D 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=fAqE4lFf Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32db8f8441eso2495982f8f.0 for ; Mon, 23 Oct 2023 02:54:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054882; x=1698659682; 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=xuBgkJ0BPVMUW15lL794m55ZCdp9DH+A+t98MliJqVQ=; b=fAqE4lFfvEd4AGg21XFRQlT6QBJckpZHovW31VlhQRD+L9paNxRZEDcwYpWzLuIXQO /A/jJKfmgFd1SmuoCALJHKo/obci9eSQYP7DgFK+lKnyAQYlgqO12QnDvC4WGJdXS1Cr S7izAkkhyRLgctrjOOuX8fEGTWFehgeKDn8ql8GbPvW7JN+IMNjXva1xMnTQPzHwoBug OWGpVTLKwww2TUvkd4b6tbH3fqcnmSCiei6/nzqrV8hGx05HGcdhpFNk+bmZKBMCNd/9 qEwYA50ihfH8J7EzZO6Gh8rG/iQJxmNaJf1e8r4z+3lOLjxw7Y460frI9r56FQF85nCx nGtg== 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=iKlzCXKHd9Vx3vkJrKaxe5WiuOFqhxPoFXb0EiuqHDe2mE9ttscp0/tASX/wui4LQK aykYk6ifKmI26Nja4QYsfmv80mJEcuPUAW49r/w9WXG5pbCkWCifV4IH2vNcPmpAu5fq inpkgr790ZaHa4mzUUO+I0GFxo8+l9h9L/rMEpkZtFJ3yRsJNhNi5jd2iSVIAYru/6pY laorXijAYpzZJOOwEatOHd9UMsZXuN6st7qNUHDaRy94CQK1Ij0PU2z2rnX+37JQrkii +Ud6ALxEf/WAomZr/MQe46CHB9eAV1pIl1IA2iNME2sHcET95prqd2p6T9cOZK/1tjG+ xhVw== X-Gm-Message-State: AOJu0YzQ+esL9hKUzQity2VZ4Fueu/Q/zZhsV9GsNWmLBpV7duHvoWai uqWt+FQZ8jE73bFTtt1HLKWnDDKc4EsVugW0FJI= 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 Message-ID-Hash: Q2XQ3ZC7FI7YN2U7LGXCXAKUZOOHPABU X-Message-ID-Hash: Q2XQ3ZC7FI7YN2U7LGXCXAKUZOOHPABU 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/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: 13432694 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: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: 13432695 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 20E5CCDB474 for ; Mon, 23 Oct 2023 09:57:44 +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 32A3A83A; Mon, 23 Oct 2023 11:56:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 32A3A83A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055062; bh=kOSnnEflpSYl+K7uyq8L7+y1wzQ+2f0TsYoSpUhE3uM=; 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=sjwXlv2pyrlu3hypGvriZ912xVYDpKrl+fRkIxm0Fle3jHIrhK9imslrnOf5yB3Xl sbul+03YBoMhEO/rD8jTK6kyUHLv5+r9pKIdbrWHxu+f6hEDD3VxajPQwxLJu66d1Z 7AYbPTRQEjfHAEqkRG/dODAvzGYp4Nto5cYSCKzs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6D417F805C4; Mon, 23 Oct 2023 11:55:07 +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 C749DF805C9; Mon, 23 Oct 2023 11:55:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 087A7F80578; Mon, 23 Oct 2023 11:54:50 +0200 (CEST) Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) (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 94FD4F8055A for ; Mon, 23 Oct 2023 11:54:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 94FD4F8055A 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=WhrmvDoD Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-50797cf5b69so4202005e87.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=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=mg1xiJ4tpWrc01TGrYLaIzComQYv1hvzEAR610Ntv3U=; b=WhrmvDoDidLgSh6fTFwW6+EzKxYjI+xVWEN/7uaPXgKYIMUwbDioqf3ztd90btqfht kKHT/FU4fQRPQPnONY1/QIYlWksRz/Lu97BV/8736vs+yN2IrisfuQEmlis16zMD9IsD BoYTj+GsUBrm0dJPRG4eTMzSP/wF1vbBd8hsUSRXvlFrEwDtqylHVOFGXmgfO3ljm9tD +kAwXdVayApMeqBOlXzG3QoveE8VdtXU//NSAYJIh/yzSqUddwYTJtG2eyuN1DEcCMeb nNRxHnDA9yt4PecBrdnqHCijDAs6002tFHs6ksD4rPBtHRt2XTJpFfsm84gy4ebxBhhp hb5Q== 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=kjP+1GH21iwENXs63nhp3+XSr4qBtI9LLYLBGoE8nNxpCvleAUmzVEHT1+eUwEArKY d17I5qYt331gXUWBZCOxpkijHyabfsKyRhGE8WxYG7Bc2jmHUfDlnxujTKOTGSbyl8cA kwDdHQ9nKlaXPT1XWNgUNmXQBVxucx/BEH9RZlLGE43k64sABgCbQBxVCMDaw8WQ1Ei/ Iq2pqCdoYrnm3OA/rrHCOgIQCtnKBLeSiGcL6SAK1w9LNTU5o1ttnj1ZnOiWJJUxRzVE 2cc9/PM+SLTNYfxXP5VNL39nIxGXBjuf1J+NUkYaWWNBNzpT7T0EBeUoHrimR2bu4nUq +OfA== X-Gm-Message-State: AOJu0Yz91Hj7Atehoa9S9rEy2aDgHAftO24+8OhY3yTk7mQs74oBq0gE 5MwIwwjpZ38QgHJMZYdWVuWLHg== 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 Message-ID-Hash: QW4MDWBE3ULGQK7UJ7UOLT6R6SUASMX2 X-Message-ID-Hash: QW4MDWBE3ULGQK7UJ7UOLT6R6SUASMX2 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/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: 13432712 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: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: 13432713 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 71D3BC001E0 for ; Mon, 23 Oct 2023 09:58:18 +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 81353DEE; Mon, 23 Oct 2023 11:57:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 81353DEE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055096; bh=F1/g2zPpNZPH/hTMMtA7BXzCMu15Sn78bbz92qZ4pJM=; 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=bu0wjtEAQmRII9iVxFvyuLsZavuLN71Od6ddQNZtonaBsE80tQnJvwX4KmJ9g/GNO 2dnsjoEeNkPIepBeGcpKaO/3nIn23zcZaZQ0P3ADF9FHA6Flrn1ab1mmbg0q64e9fZ e4BQu/yN5KH3uG9U5qWd5tjZULxOiYFo/xWGCKbI= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F2ADF805E8; Mon, 23 Oct 2023 11:55:13 +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 9000CF805E7; Mon, 23 Oct 2023 11:55:12 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A1B2DF805B0; Mon, 23 Oct 2023 11:54:57 +0200 (CEST) Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) (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 67076F8057B for ; Mon, 23 Oct 2023 11:54:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 67076F8057B 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=jXdMEa8n Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-32da7ac5c4fso2148933f8f.1 for ; Mon, 23 Oct 2023 02:54:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054891; x=1698659691; 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=9PvbddIvQlG0l/ZDn5njSVhrq4RgzTBlbX25/MYIgFc=; b=jXdMEa8nJNrnuUIJAzr9IIRpBVhi9kZp3qM5hv3vwICssr2X0unQ2WdoNpqrACWorE C7U4nRUaMH4EpHSwqNVkJWUkVWs21hcEFy8OETjV6luYH7KgIK+05CHtCZDxBai/aLIH rSSTkjO/RItjdTtXlK8G0mv4dU0pQFJcQKCrQdLtELXpxLEDxW2syqAghm8BRGLjbYPr rwiNGN/FrbKv1X9RblBBIOGEoX7ZWB5GfQA75NWkUFrfwoAyIfq7KoebbSpZ9duBiSOz PSKEQyVvo4oZ8s6mlTshnz8CiD/JOBvsjqgBA1UOJ3KIGzPminAZwBaqXHZhAQEgqW8o ++xA== 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=EyRBr/ipdAsSyJ6J4HVX2wJyybN0v7Gx/LimSMrjz+bA3YtnzpcKQ3YKbM+TXWsYuD wfwheYG78XhH/B/dlpQsIB7CSCTTDUbAGvK7m/toGZR6pRV/EMLojAfRCzLxyMeAENib Lp+yle4DcGPz33ci4GaVuwVNGJW1MUqV/RPKoG1uyWfuHp4LGIEp0C1WGv0dqXrXLWBK 6EIye+W0oo7uzmvadNZq6gDX0pX9vpqhHGaNVTsgyegaWPgftezA98xqzOQLwemDQpJN gB33HLQ1hVcy/zrH+uGRYKYswRXxvKK2cwU1qduashyF9J04UgZqUca/n42ErBjZkwVP kV1g== X-Gm-Message-State: AOJu0Yw6NJiOuiXxJQnQsAaS8OLcsXu18lGUWdeNob5mWNZaxheIgjuD tgRaFkovZwj9wFTJs0L2cd9zDw== 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 Message-ID-Hash: PBSJNL2NMFERHNGMBCVZAKCWWHOTBEOR X-Message-ID-Hash: PBSJNL2NMFERHNGMBCVZAKCWWHOTBEOR 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/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: 13432714 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: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: 13432715 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 13725CDB474 for ; Mon, 23 Oct 2023 09:58:53 +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 3ACE2BC0; Mon, 23 Oct 2023 11:58:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3ACE2BC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055131; bh=BRGQviPY0dp0vMs4AWcB7zw63p+K1lbbftfuwHtRsHk=; 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=Tkx76M5x9PgX0mEZ+PBOAD/q+miRYNI9CQFhcS3scFbOCU3igVBC/8cjdnDIGFVcZ J/pLXyD8e6Gnt+i2eOoc/8uiB3NuaMs+q5vMXAOKo4SQz+Nl6BDsSXUwRnc20qitaF Fwh3TxxQScdR+17Ly5K/gWa6p7JG12t4xNPv9UZ0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id ADEB8F805F9; Mon, 23 Oct 2023 11:55:18 +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 DA622F805F1; Mon, 23 Oct 2023 11:55:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3CCD8F805BD; Mon, 23 Oct 2023 11:55:01 +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 A060AF8057B for ; Mon, 23 Oct 2023 11:54:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A060AF8057B 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=J9saV5Z4 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-31c5cac3ae2so2282064f8f.3 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=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=SkUvzAZAFAxBUpUecaFOI7DumC3gwDv4zZE7XoEdjuk=; b=J9saV5Z4bsscgHrlYQHUGv7BN7LBiKmFBYYt4B70oDolKAaxExDjhXZPl5rPz3aiJJ IYdThdy9EORY5MWloXX4sojUGBrcL6+34SbGhbYaS5f5nnoKoPPMQwkzgjQpL4ZsLBXg eqXvX5IroW66eMIb5nklWxuRJznfrgqiqXbfdGzPAKYaLV8x5Mp/ucdyVwhSNSkaLwD7 Qx9X1rwsFeMOiuFY1WsAyAj+0/5iDI66RxkiGQScRfi0xjtMsUmVkdigUzfiARY7qzKP p4gzQYfil3xbCdRnnd8r0WpF00gweD8c4p5P+Cw8uhfgG93VF2Q7HcT7xirORQ0gZsRC dAiw== 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=hMTWw0CaQIb8gj2CXGY/SeW//DAycJAvNgnmwn5YRSCMa2R8/rw1QfnqoigFbJAVND LrhEFqWMHEisbQKHusWUJPdlM1AZXH82vDdFqHiqaMFg8plvvpPXTejyJIUbHhH5wLk0 dJDNw9YXSAaa94yMq4Y8ToYFplRnp5oVe2Gwwj+PbAVHxCX7cMGctSzDFGjxC8jQO6u2 J/RrsFhMaP26DB/HSkR26JFhpzRI6FRPD2KF1Ducvc9reX5uOzvMyJ9tagvlQZrGwIOW fJU+fVxU7luDZlfASOrS/kn5Y4SGudBqmgpQy1E+AvqMLgEorcjLddmm/5p8Vasb//qX 12Tw== X-Gm-Message-State: AOJu0YyY1vyq0MMzfXBBow1Zf69m3JBneO0JZgdyPfjk4F1jFrsHIGXU 18gHTb8WJ9nAmLPLMrMcc+ja5g== 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 Message-ID-Hash: HOV6IF7KOL6DU7KTE2D5G3JQEDULUY33 X-Message-ID-Hash: HOV6IF7KOL6DU7KTE2D5G3JQEDULUY33 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/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: 13432716 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: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: 13432717 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 1E9B6CDB474 for ; Mon, 23 Oct 2023 09:59:23 +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 50832E85; Mon, 23 Oct 2023 11:58:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 50832E85 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055161; bh=HSTmfGzATJWrpXNhjrbz54DbKs0jWt+eil0G3pIkme8=; 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=aFS360ylxHK12TDMJkQjV9kGa6or0PhoU0391UBZvwTcXN//aaxjTuFx9T3zoLAvY e5AxGNM51AcGWPENGOthbKVSAOJwCvfTRKn5aC9NjIncoVLyEUW2janT18cya3YqCo Fy1p7Xho5kUa7FnmE9hW//1KTEkO1Pt2GRvRUuMA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 79F36F80608; Mon, 23 Oct 2023 11:55:23 +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 A7F6FF80605; Mon, 23 Oct 2023 11:55:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45725F805C4; Mon, 23 Oct 2023 11:55:05 +0200 (CEST) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) (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 670DCF805BA for ; Mon, 23 Oct 2023 11:55:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 670DCF805BA 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=nwjAWXGW Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4083f613275so25527185e9.2 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=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=XaRWK1PxbLteLkMq7b8+dA2nXiGKOdN1dmpy3IbpNyI=; b=nwjAWXGWu9AY0Ct8Pps8w8I2FHQLR2Fqk3aOLHG/GD/Z2Wt/EK0s564DsO/Uo9Sxjz biQM2TtYiZ5Vm4poPLxdel1iJnYSGUVew188hK10R0ICxVc87FKOhpaFZWLDH/nGpWsu ysBSApUolDvGyvkm+fXbFb8RRzKq8ISInMnPWvEeAidXzUnaucUnOQysU8Xpxu52rWVg h529Gyh0yPEWev8CF8U3KzZl5HSw+U4r1t03N7bQeAnn+s5Epp+8e/KgmdZKghG7sq/r AKuhPAkPSya1S7N+YUtlmTXHjtJUKIHFsDT1kS8fVYej47AqPVfOYy51rwrpHK+Cw8qb +sWQ== 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=r0lC88ZY0zgZqpr3mG6jTzJZwxrRyJE3QQXNsODPxZds2bu6+4i2We9WEb7atMcPuo P6t+un0ceDC7Cb6XbYga11/lmbPdcxXPnCT0cAw8MAipx3nBgIxORjMc5aiiImr6dHUS qKIDuLxyCj+gnJAplbmQXs/SiGTdfRS2p3xY44oXo0/IH2U85nyTafvyRhzreavVbjr1 0vO+psPyxko71UrZrR2/0QMIlOocAP6a4Miirz45BYsLiiyBTFiYlVobiIKASGc2fXkK Nmk5n76IO51kVHAfOtyvCyTJPzpl2wIsqqkx9oHXmDPAUXW0+txfOakBP8L7+X2y2/5H nuew== X-Gm-Message-State: AOJu0YxylzskZqetEwWENS9AanzE0npfmk4EHOvyELCI6URZytyl2R31 hWqPc7MW+1T6ki4fLtn734bbJA== 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 Message-ID-Hash: SNLJ5WKINS4P26M7FRRFAR27XUQ4MM7X X-Message-ID-Hash: SNLJ5WKINS4P26M7FRRFAR27XUQ4MM7X 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 --- 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: 13432718 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: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: 13432719 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 905F3CDB474 for ; Mon, 23 Oct 2023 09:59:52 +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 5F3BBE0E; Mon, 23 Oct 2023 11:59:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5F3BBE0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055190; bh=yOJ5gvFYVYRXM+ThkW5ORB9a0uN/J5HWAaqSuML8fzA=; 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=MxGIwNZiuJF0HHVaTlgl1TYmMK8YYllz1wv1o61ImD/dOmx5ewpAIGQxD5w0v8P7J 7xrZ3dmUQhrYOEqvGddmlpuw1RGzxJR+lqkEdJT1M0W5zU0n6ncA/VmyKbUeVJLn6Y BrhW+go34nlbAKTHKjR82Gs6JLt5eSACBPG5bLD8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B9799F80601; Mon, 23 Oct 2023 11:55:29 +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 D9F26F80601; Mon, 23 Oct 2023 11:55:28 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7CDC4F805E2; Mon, 23 Oct 2023 11:55:10 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (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 EC7C8F805C8 for ; Mon, 23 Oct 2023 11:55:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EC7C8F805C8 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=h98/0SxX Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-32da9ef390fso2147827f8f.2 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=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=Uu/sTtccUwF0ah9E+SK4dukpMAzlv54jZyNo0CSiF0c=; b=h98/0SxXddXzhvDVNoUSqlmSblllkU6UjlRTjhGfOTAqY85foB9bdIZzj5aCVSfzbJ e5JUWGHKskSMLlf1dJxpS2CezBRAwb8QJ6rPuaBIXb+YOXrb2YlliKDhT+TvmsDA+yOj JguUdigzsRtTuqcX6p1fbJ9XYOmIXtrxX/tHyn/llRuTgaFM353GMfeoTB//uSEW9nH0 Q4GDvL0Hi84koCKX6xDBSnG+P0E6PzTcQjIERiEVkmmuLPK9g63f1gRSbDH0mO9ZQZPX WWsQ2ylGhzTUiq0UkFqLz5gYRyzt+7NjIWjd8RbPteRKkXk/9036NMh/0ntLEVI0j/eo oO0g== 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=ugYge5HTBndtYK3dcW2UuuyncIBPP7lIHyaGwXkaoNO9g1IDQjjyeky3qX0itUngPE 3RM8rOb1NnerclR1AgVCwxt0x9jcKFVpDmp8k967NaIJdQ8PuqcZvXAAATUfT7nC7c8v cCmxfqxmU3mwiH5qlJPxRPLkKy/kS3cYF4ja8dndi9EX036wu0dG7YmP1ChL/Nc/rRUr Uzk5NB4PXKmYmI+pr+8ccUX9SUejpc1Hu8K4JFlk8fYFLMs4IYXVSUhc9lKI+qgHCa4S ZnQANOiaS0gADfYSjOoS3qasLDxU9NLutTMkzbL/AB6mfEySGD0bUqsuhhijIhPq1RMb Q5mg== X-Gm-Message-State: AOJu0Yw0iV07zmmiqXg2UlbYudGJhE2sZUG7ANDcCQmzMQi5OtCRRg83 8r97owRZY4eQHlETYJmitWmrWA== 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 Message-ID-Hash: IGTLRSD76ZHN5SHAF3VG7BA6WWBMY4FI X-Message-ID-Hash: IGTLRSD76ZHN5SHAF3VG7BA6WWBMY4FI 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 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: 13432720 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: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: 13432721 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 15664C001E0 for ; Mon, 23 Oct 2023 10:00:21 +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 466F9E9A; Mon, 23 Oct 2023 11:59:29 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 466F9E9A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055219; bh=pykBYUeyGmLpMLya3KYa/eooDqdhJ2+KUocu953QcuY=; 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=HfFFS6X+6di/Pb4qHvJDHOtqzUIXoYjic7gyXqNZtaIeEk8SussOCtFU7j325I1Fb Kswvtdaq0etO5Me/xTqCwJw1X2fWO4N+wuPoAka4Y+3fyHaHh+/+cxhthU8683aXgp 6aVJlef5rBul3L/tdmF8YBNGofnaJkLku0PYU0lk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4837AF80639; Mon, 23 Oct 2023 11:55:35 +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 AA6B6F80630; Mon, 23 Oct 2023 11:55:34 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2C010F805E9; Mon, 23 Oct 2023 11:55:13 +0200 (CEST) Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) (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 4474EF805D9 for ; Mon, 23 Oct 2023 11:55:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4474EF805D9 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=GWf7H9uf Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-32db188e254so2253435f8f.0 for ; Mon, 23 Oct 2023 02:55:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054909; x=1698659709; 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=ZC07USduWdC7NjdC5xCXcdF31ciW6Iy95zkt28zTytw=; b=GWf7H9ufoDe9b6wFLyDN7FhHhcO6FxQ7QZxhSqSIRR4Vbzv/EK3IummkQ2WcYcAkYA NNZWE7PFsHtlUXGErgDkUpaMdssDvm456N0cd1D6BSTVjVmHuP92ExvqSXCJSKo9jtN5 bp8FxTLi2mm6/mq9t1nuWg9Y4+dFeiGQ9n+yR458zG/rgJMdeeAU/mSIkcKmCjdHtiGk sjsDliTyUTRlswkSX28jO3mAAZgYH9d2m5r14dZnjYSNV1HcfgO1DtcI4tOz1+GkZ9VI SxIUxrZf/i5YCfrOQYLy/ehtvL1NImyGEtwwKLjcJKtYTFUjEQ2Zd0e3MVUyhYUS5GM3 ZRRg== 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=qMS+VTzgYyuUxm3fIkiQ8V9FE5fde5rnC/iuA2leUU7RrZ4yud/DkQBAQ4J4REkOm4 6CTX4PVkOxDtgWzmmLVeH1WBd8y38nLU8NgNuNC4ykuWEkUn+LdPWFdayTDLLVZRgKcS Nb3ra1HTAuFIGwLnzKGVU3ZPGF7IXIt4QTB5EosUR9QzzxWoZ5qBU86DDN7cMx2WlnBA fWF4q4KZkUD10E6scch95tcdHWFbZvqxPB8cERMvN3oClhzkhsHk4Alnrr19hNBMMxHs IsIZEKiAVR1aUS5GuAg904TYuDv26jgKx/se1kHe17h5/4wYh6aDtsz+835y+IO4p42T UkIg== X-Gm-Message-State: AOJu0YzIuLuR9GJRFuF0FJYOHgPn2y8cByD8oVbfijSRL8Rw6PtcO8/E 7vwj5hgVZljtCELy2YmSxv4IsQ== 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 Message-ID-Hash: JQEBYESTB5KFJ2IBFAMZBVL7CTCAPAX4 X-Message-ID-Hash: JQEBYESTB5KFJ2IBFAMZBVL7CTCAPAX4 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/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: 13432722 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));