From: Srinivas Kandagatla <srini@kernel.org>
To: Luca Weiss <luca.weiss@fairphone.com>
Cc: Banajit Goswami <bgoswami@quicinc.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
~postmarketos/upstreaming@lists.sr.ht,
phone-devel@vger.kernel.org, alsa-devel@alsa-project.org,
linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
Neil Armstrong <neil.armstrong@linaro.org>
Subject: Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
Date: Thu, 1 May 2025 12:37:45 +0100 [thread overview]
Message-ID: <aBNdCRk_fP2q1vxQ@srini-hackbase> (raw)
In-Reply-To: <20250425-fp5-dp-sound-v3-2-7cb45180091b@fairphone.com>
On Fri, Apr 25, 2025 at 10:07:26AM +0200, Luca Weiss wrote:
> Sound machine drivers for Qualcomm SoCs can be reused across multiple
> SoCs. But user space ALSA UCM files depend on the card driver name which
> should be set per board/SoC.
>
> Allow such customization by using driver match data as sound card driver
> name.
>
> Also while we're already touching these lines, sort the compatibles
> alphabetically.
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> sound/soc/qcom/sm8250.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
> index b70b2a5031dfbf69024666f8a1049c263efcde0a..e920b413b762c803cfcc4049f35deba828275478 100644
> --- a/sound/soc/qcom/sm8250.c
> +++ b/sound/soc/qcom/sm8250.c
> @@ -16,7 +16,6 @@
> #include "usb_offload_utils.h"
> #include "sdw.h"
>
> -#define DRIVER_NAME "sm8250"
> #define MI2S_BCLK_RATE 1536000
>
> struct sm8250_snd_data {
> @@ -200,15 +199,15 @@ static int sm8250_platform_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - card->driver_name = DRIVER_NAME;
> + card->driver_name = of_device_get_match_data(dev);
> sm8250_add_be_ops(card);
> return devm_snd_soc_register_card(dev, card);
> }
>
> static const struct of_device_id snd_sm8250_dt_match[] = {
> - {.compatible = "qcom,sm8250-sndcard"},
> - {.compatible = "qcom,qrb4210-rb2-sndcard"},
> - {.compatible = "qcom,qrb5165-rb5-sndcard"},
> + { .compatible = "qcom,qrb4210-rb2-sndcard", .data = "sm8250" },
sm4250 for rb2?
> + { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
> + { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
> {}
> };
>
>
> --
> 2.49.0
>
next prev parent reply other threads:[~2025-05-01 11:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-25 8:07 [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
2025-04-25 8:07 ` [PATCH v3 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
2025-04-25 8:07 ` [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
2025-04-25 12:12 ` Mark Brown
2025-04-25 18:19 ` Luca Weiss
2025-04-25 19:03 ` Mark Brown
2025-04-25 20:47 ` Luca Weiss
2025-04-25 20:56 ` Mark Brown
2025-05-01 11:37 ` Srinivas Kandagatla [this message]
2025-05-01 14:13 ` Luca Weiss
2025-05-02 11:06 ` Srinivas Kandagatla
2025-05-06 12:07 ` Luca Weiss
2025-04-25 8:07 ` [PATCH v3 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
2025-04-25 9:07 ` Dmitry Baryshkov
2025-04-25 8:07 ` [PATCH v3 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible Luca Weiss
2025-04-25 8:07 ` [PATCH v3 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Luca Weiss
2025-06-09 21:00 ` (subset) [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aBNdCRk_fP2q1vxQ@srini-hackbase \
--to=srini@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=bgoswami@quicinc.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox