From patchwork Fri Dec 1 13:53:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 749007 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 0D8D6C4167B for ; Fri, 1 Dec 2023 13:54:34 +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 66FBBA4B; Fri, 1 Dec 2023 14:54:22 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 66FBBA4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1701438872; bh=9S9uW1BWygzIc6yZMYOE2M5Cqga0J78zXl+ahFk36fs=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=I7JVzi4uiAKWFDO46Ski2kHVLBbKqiKl05bd0lOq9o2MHw1/nXlB/7tTn1sBNODkd 4VaYYYyS7PVVwEBP4nM16XlgC/ERqZBQ0BCODVbUwdkhE0+ra4DnT1T4NWyagzHL/g 7lNjp1oXWsRB1TWQsWCOuImxr7joD1DrijLdJ9h0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4AA03F8055B; Fri, 1 Dec 2023 14:53:49 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 24095F8057F; Fri, 1 Dec 2023 14:53:49 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8BB64F801D5; Fri, 1 Dec 2023 14:53:43 +0100 (CET) Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) (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 E3BECF80114 for ; Fri, 1 Dec 2023 14:53:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E3BECF80114 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=EkqBwMvV Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50bbfad8758so2936630e87.3 for ; Fri, 01 Dec 2023 05:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701438815; x=1702043615; darn=alsa-project.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=P7K5IV7jdfgIwO6ukGuP2RwaX7x4/Mv+9On20bS7YMg=; b=EkqBwMvVuOtSiYibbpqbpjn4pQiqjaEODFLa6V976xFf1qxlYal8ecneaRZx7k6HYr m2W/xW9GZCc3bQ/kimOyv/lxDYJ/WRliKelusw1ZFWt+Fu9Ij2VYTb3Tx7ZzUmcGva9+ pW4gJsPNF0G2HGMVbVfd94nM78VsTj4oHJkJlFGmGqo2SWKwvY/1oRyCOF9mNjIVIGdF eaV5gGyj0C721MG4D+PWQYBIvU3fa9nduMoRcmS1pGRtUC2c1LN8OCRsDlBcEpdxp7A2 T8ADdAoC2YQ31/gw5RDKJjhg/f6UfcVYSaLRgxSr4msPnYTZM1zT3y3DRx/aVamSqwDn V50Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701438815; x=1702043615; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=P7K5IV7jdfgIwO6ukGuP2RwaX7x4/Mv+9On20bS7YMg=; b=bZYcCzO4m0IxDCTM6PgAJuTng2gq9vYhRU0A0vWC1y5qyNoft3O1s6xg92JVd3puCi leIj1G9isOSjSZO5bLXoHyy5fEffM1Ih1p4jRwK6eJPx8K/yYSJJAW5y8at+3St9jlv0 y/tY2XAmXicDCflOuiPAZl7scqE6w62IqgnK3eUvAnxSjSMUDCQerhSoBCtw00IWtTSU MtdK/ZfV2s1GDc/KgKLPG+7DZNvHLssp+jCfBQ35SIjPtBOXfhylw9SWAcqZOGy1D4Cq XrSkCM0AbbiAXXmDkqm4ncEVgTQRKkp1/c8E6zF8u8uQQJyEehGp4G/hMKI0/dcmVKNx RdVA== X-Gm-Message-State: AOJu0Yy580i1ZLywxjCllYEcdDxMsMrlXc2pY4wG6OW2K9GwImCaBqmW ru1xeC8PAkmzZd8vWbSK4UhtnQ== X-Google-Smtp-Source: AGHT+IEacAtD9giIRCaITOlBrlQe56T1GJ0qBYxW6GO25Dtmjc8UIVW3w/USQrHdEQXdcy/BGYheAQ== X-Received: by 2002:a05:6512:48ce:b0:50b:d944:c049 with SMTP id er14-20020a05651248ce00b0050bd944c049mr357349lfb.267.1701438815464; Fri, 01 Dec 2023 05:53:35 -0800 (PST) Received: from krzk-bin.. ([178.197.223.109]) by smtp.gmail.com with ESMTPSA id d20-20020a056402001400b0054b531907f8sm1643159edu.73.2023.12.01.05.53.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 05:53:35 -0800 (PST) From: Krzysztof Kozlowski To: Srinivas Kandagatla , Banajit Goswami , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] ASoC: qcom: sc8280xp: set card driver name from match data Date: Fri, 1 Dec 2023 14:53:31 +0100 Message-Id: <20231201135332.154017-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: QEMCDYK7TP26EOLPIZ6FXFML72IZR7OB X-Message-ID-Hash: QEMCDYK7TP26EOLPIZ6FXFML72IZR7OB 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.9 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: Sound machine drivers for all newer Qualcomm SoC platforms are the exactly same, therefore it makes sense to use same machine driver for newer platforms as well. Choice of sound topology and user-space Alsa UCM files depends however on card driver name, which must be customized per each board. Allow such customization by using driver match data as sound card driver name. Signed-off-by: Krzysztof Kozlowski --- sound/soc/qcom/sc8280xp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/qcom/sc8280xp.c b/sound/soc/qcom/sc8280xp.c index d93b18f07be5..7df28ecefd65 100644 --- a/sound/soc/qcom/sc8280xp.c +++ b/sound/soc/qcom/sc8280xp.c @@ -14,8 +14,6 @@ #include "common.h" #include "sdw.h" -#define DRIVER_NAME "sc8280xp" - struct sc8280xp_snd_data { bool stream_prepared[AFE_PORT_MAX]; struct snd_soc_card *card; @@ -133,13 +131,13 @@ static int sc8280xp_platform_probe(struct platform_device *pdev) if (ret) return ret; - card->driver_name = DRIVER_NAME; + card->driver_name = of_device_get_match_data(dev); sc8280xp_add_be_ops(card); return devm_snd_soc_register_card(dev, card); } static const struct of_device_id snd_sc8280xp_dt_match[] = { - {.compatible = "qcom,sc8280xp-sndcard",}, + {.compatible = "qcom,sc8280xp-sndcard", "sc8280xp"}, {} };