From patchwork Mon Oct 23 09:54:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 737317 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0912ECDB474 for ; Mon, 23 Oct 2023 09:58:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id EF2C1AE9; Mon, 23 Oct 2023 11:57:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz EF2C1AE9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698055086; bh=WwwsqWVst6am8unSVoQoAkBT7G0naqY4SOdWNG5s4bQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=QRkUvxsxWBtO6dia8jH42S31UKYwD3YGbkVAccViuyMrwO2OMrfB9o3Iu2KfNXSfd Rz1iiDwWmGfCkVEpDROcTwe11HJ1NZQjka1PvCC2WbIFvhDE1BuaQgZH62OPiiniKl rR86D8Ec3+FKGIBLKkul0dhviVPunovWpD7/Lbq4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F0A4FF805E1; Mon, 23 Oct 2023 11:55:09 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id DED83F805D9; Mon, 23 Oct 2023 11:55:08 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 26FDEF80587; Mon, 23 Oct 2023 11:54:54 +0200 (CEST) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4E08AF8055A for ; Mon, 23 Oct 2023 11:54:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4E08AF8055A Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=Rpl7Xuut Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-32daeed7771so2082523f8f.3 for ; Mon, 23 Oct 2023 02:54:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1698054888; x=1698659688; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ohG7h5MVOd61zy+5ypL65RpxKjVv+oL8L5RUWwJJdI0=; b=Rpl7XuutaBYGYwcD/p6HtMyo3PSFSvB93B0hiYYrcsxJpXVdbIpUmfOPSNGLCqJx6l r2Nw8cDItFWaCDNInkELPhjP6eh1CVwniIgJCKJ/q2/arYdcTBeWpAufJIfToYErDhRV xs79b1zp535msWYknzSty5VpTmCdA/qt5YiqhNXKHm2P6aNgJyeV2PDR+cLEezpPsZfS WyxkYph2On19sa6AlV1BA4dHxcG3NPpewA8pIVraXApswhatdw3e5Tw0mxg6o+YaKK8L tc9IZHoUfoMJtyR/F5fy2lbGkeda3S81c23xOcp/Kj0bdVV3B2P6atgj4p82uXvcxJSS XpWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698054888; x=1698659688; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ohG7h5MVOd61zy+5ypL65RpxKjVv+oL8L5RUWwJJdI0=; b=e/2hrN5L4hH05geWqYQAmW8OGm8mPdAVmXE1S4OLHOyD9tJA4cf4IKAwDUC1QuJJlr yT/1M5wpZEwfv9+MhepUNTuzua/5WSQhlyYPObxBCPJISjmf86HRpnAGZDsZuBQv6pgZ duEK3Fv4nbCkErWyFLCa58LttZRh32zaE9muTtwKn3kU6XCnYGRrhGYfYRbNN7BGVP7V codsTZXJ6Ha4GklELskRDtjEvKqTGepZ+cCMqBKYkkskUj++veeqvGDwzPtPG4ronSNE ClkiOiGknMdEL6d/2PxnTOXnaXNFdws+HHCOyV4t0lURNyN4DnTi/1aaCB9j2EwJpzMK L00w== X-Gm-Message-State: AOJu0YwWFlSQ66C8wTuTFky6TYVmkmxxNshZb7xte4MCo613Dz4wNzuv nxhRyMacbhzZDB9g/EObO6h+yA== X-Google-Smtp-Source: AGHT+IF2XQ2NytyZKfSuKXcxhn8MgqaftjUTA3vcBEY0OG7GzuniO27qe9jeb7abDdumrFZMKzYUnQ== X-Received: by 2002:adf:fd90:0:b0:32d:8a32:3b2f with SMTP id d16-20020adffd90000000b0032d8a323b2fmr5871452wrr.16.1698054888606; Mon, 23 Oct 2023 02:54:48 -0700 (PDT) Received: from krzk-bin.. ([178.197.218.126]) by smtp.gmail.com with ESMTPSA id u14-20020a5d468e000000b00323330edbc7sm7428801wrq.20.2023.10.23.02.54.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:54:48 -0700 (PDT) From: Krzysztof Kozlowski To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Lars-Peter Clausen , =?utf-8?q?Nuno_S=C3=A1?= , Srinivas Kandagatla , Banajit Goswami , Oder Chiou , Matthias Brugger , AngeloGioacchino Del Regno , Sylwester Nawrocki , Thierry Reding , Jonathan Hunter , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [RFT PATCH 07/17] ASoC: codecs: rtq9128: Handle component name prefix Date: Mon, 23 Oct 2023 11:54:18 +0200 Message-Id: <20231023095428.166563-8-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> References: <20231023095428.166563-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Message-ID-Hash: 7B5BT4PML45JYBUAHJUHBZVMB6GR2OWK X-Message-ID-Hash: 7B5BT4PML45JYBUAHJUHBZVMB6GR2OWK X-MailFrom: krzysztof.kozlowski@linaro.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Use snd_soc_dapm_widget_name_cmp() helper when comparing widget names, to include also the component's name prefix. Signed-off-by: Krzysztof Kozlowski --- sound/soc/codecs/rtq9128.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c index 371d622c6214..c22b047115cc 100644 --- a/sound/soc/codecs/rtq9128.c +++ b/sound/soc/codecs/rtq9128.c @@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event); - if (strcmp(w->name, "DAC1") == 0) + if (snd_soc_dapm_widget_name_cmp(w, "DAC1") == 0) shift = 6; - else if (strcmp(w->name, "DAC2") == 0) + else if (snd_soc_dapm_widget_name_cmp(w, "DAC2") == 0) shift = 4; - else if (strcmp(w->name, "DAC3") == 0) + else if (snd_soc_dapm_widget_name_cmp(w, "DAC3") == 0) shift = 2; else shift = 0;