* [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone
@ 2025-04-25 8:07 Luca Weiss
2025-04-25 8:07 ` [PATCH v3 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
` (5 more replies)
0 siblings, 6 replies; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss,
Dmitry Baryshkov, Neil Armstrong
Add the necessary sound card bits and some dts additions to enable sound
over DisplayPort-over-USB-C, e.g. to a connected TV or monitor.
The UCM files can be found here:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-fairphone-fp5/ucm
This series - in spirit - depends on the series enabling DisplayPort in
the first place, but can land pretty independently, especially the ASoC
bits:
https://lore.kernel.org/linux-arm-msm/20250312-fp5-pmic-glink-dp-v2-0-a55927749d77@fairphone.com/
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v3:
- Simplify return qcom_snd_wcd_jack_setup in machine driver
- Pick up tags
- Link to v2: https://lore.kernel.org/r/20250418-fp5-dp-sound-v2-0-05d65f084b05@fairphone.com
Changes in v2:
- Revamp series based on comments on v1, doesn't have much too much in
common anymore
- Use sm8250 instead of sc8280xp sndcard file, so port other required
changes from sc8280xp.c to sm8250.c
- This also changes the sound card compatible to from
qcom,qcm6490-sndcard to fairphone,fp5-sndcard
- Link to v1: https://lore.kernel.org/r/20240809-fp5-dp-sound-v1-0-d7ba2c24f6b9@fairphone.com
---
Luca Weiss (5):
ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card
ASoC: qcom: sm8250: set card driver name from match data
ASoC: qcom: sm8250: add DisplayPort Jack support
ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support
.../devicetree/bindings/sound/qcom,sm8250.yaml | 1 +
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 31 ++++++++++++++++++++++
sound/soc/qcom/sm8250.c | 27 ++++++++++---------
3 files changed, 47 insertions(+), 12 deletions(-)
---
base-commit: 7f1dd4e6634d085f3c9652d4e0f1903659fb96f9
change-id: 20240809-fp5-dp-sound-b3768f3019bd
Best regards,
--
Luca Weiss <luca.weiss@fairphone.com>
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v3 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card
2025-04-25 8:07 [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
@ 2025-04-25 8:07 ` Luca Weiss
2025-04-25 8:07 ` [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss
Document the bindings for the sound card on Fairphone 5 which uses the
older non-audioreach audio architecture.
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/sound/qcom,sm8250.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
index 4e208cb7f6c61adfd4b687227038d275f849480a..57f62a228c262f38e703816efdcf443355052619 100644
--- a/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,sm8250.yaml
@@ -28,6 +28,7 @@ properties:
- qcom,sm8750-sndcard
- const: qcom,sm8450-sndcard
- enum:
+ - fairphone,fp5-sndcard
- qcom,apq8096-sndcard
- qcom,qcm6490-idp-sndcard
- qcom,qcs6490-rb3gen2-sndcard
--
2.49.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
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 ` Luca Weiss
2025-04-25 12:12 ` Mark Brown
2025-05-01 11:37 ` Srinivas Kandagatla
2025-04-25 8:07 ` [PATCH v3 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
` (3 subsequent siblings)
5 siblings, 2 replies; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss,
Dmitry Baryshkov, Neil Armstrong
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" },
+ { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
+ { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
{}
};
--
2.49.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support
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 8:07 ` 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
` (2 subsequent siblings)
5 siblings, 1 reply; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss
Add support for DisplayPort Jack events, so that user space can
configure the audio routing correctly.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
sound/soc/qcom/sm8250.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index e920b413b762c803cfcc4049f35deba828275478..a4bf6eff811ea3e2b005071cf3410e5a0410f5d8 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -25,6 +25,7 @@ struct sm8250_snd_data {
struct snd_soc_jack jack;
struct snd_soc_jack usb_offload_jack;
bool usb_offload_jack_setup;
+ struct snd_soc_jack dp_jack;
bool jack_setup;
};
@@ -32,14 +33,16 @@ static int sm8250_snd_init(struct snd_soc_pcm_runtime *rtd)
{
struct sm8250_snd_data *data = snd_soc_card_get_drvdata(rtd->card);
struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0);
- int ret;
- if (cpu_dai->id == USB_RX)
- ret = qcom_snd_usb_offload_jack_setup(rtd, &data->usb_offload_jack,
- &data->usb_offload_jack_setup);
- else
- ret = qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup);
- return ret;
+ switch (cpu_dai->id) {
+ case DISPLAY_PORT_RX:
+ return qcom_snd_dp_jack_setup(rtd, &data->dp_jack, 0);
+ case USB_RX:
+ return qcom_snd_usb_offload_jack_setup(rtd, &data->usb_offload_jack,
+ &data->usb_offload_jack_setup);
+ default:
+ return qcom_snd_wcd_jack_setup(rtd, &data->jack, &data->jack_setup);
+ }
}
static void sm8250_snd_exit(struct snd_soc_pcm_runtime *rtd)
--
2.49.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
2025-04-25 8:07 [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
` (2 preceding siblings ...)
2025-04-25 8:07 ` [PATCH v3 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
@ 2025-04-25 8:07 ` 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
5 siblings, 0 replies; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss,
Dmitry Baryshkov, Neil Armstrong
Add a compatible for the QCM6490-based Fairphone 5 which can use this
machine driver.
As a note, QCM6490 RB3 board is using audioreach architecture while
Fairphone 5 uses pre-audioreach.
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 | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index a4bf6eff811ea3e2b005071cf3410e5a0410f5d8..43c93e24d77259f232062c7e4182a39151111c59 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -208,6 +208,7 @@ static int sm8250_platform_probe(struct platform_device *pdev)
}
static const struct of_device_id snd_sm8250_dt_match[] = {
+ { .compatible = "fairphone,fp5-sndcard", .data = "qcm6490" },
{ .compatible = "qcom,qrb4210-rb2-sndcard", .data = "sm8250" },
{ .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
{ .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
--
2.49.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH v3 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support
2025-04-25 8:07 [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
` (3 preceding siblings ...)
2025-04-25 8:07 ` [PATCH v3 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible Luca Weiss
@ 2025-04-25 8:07 ` Luca Weiss
2025-06-09 21:00 ` (subset) [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Mark Brown
5 siblings, 0 replies; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 8:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Luca Weiss,
Dmitry Baryshkov
Add the required nodes for sound playback via a connected external
display (DisplayPort over USB-C).
In user space just the following route needs to be set (e.g. using
ALSA UCM):
amixer -c0 cset name='DISPLAY_PORT_RX Audio Mixer MultiMedia1' 1
Afterwards one can play audio on the MultiMedia1 sound device, e.g.:
aplay -D plughw:0,0 test.wav
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
index 9e8f9fb57c4723a24704a8239a86c6081910916b..e115b6a52b299ef663ccfb614785f8f89091f39d 100644
--- a/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
+++ b/arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts
@@ -14,6 +14,8 @@
#include <dt-bindings/leds/common.h>
#include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
+#include <dt-bindings/sound/qcom,q6asm.h>
+#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
#include "sc7280.dtsi"
#include "pm7250b.dtsi"
#include "pm7325.dtsi"
@@ -1147,6 +1149,35 @@ &sdhc_2 {
status = "okay";
};
+&sound {
+ compatible = "fairphone,fp5-sndcard";
+ model = "Fairphone 5";
+
+ mm1-dai-link {
+ link-name = "MultiMedia1";
+
+ cpu {
+ sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>;
+ };
+ };
+
+ displayport-rx-dai-link {
+ link-name = "DisplayPort Playback";
+
+ codec {
+ sound-dai = <&mdss_dp>;
+ };
+
+ cpu {
+ sound-dai = <&q6afedai DISPLAY_PORT_RX>;
+ };
+
+ platform {
+ sound-dai = <&q6routing>;
+ };
+ };
+};
+
&spi13 {
status = "okay";
--
2.49.0
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v3 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support
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
0 siblings, 0 replies; 17+ messages in thread
From: Dmitry Baryshkov @ 2025-04-25 9:07 UTC (permalink / raw)
To: Luca Weiss
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
Takashi Iwai, Bjorn Andersson, Konrad Dybcio,
~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel
On Fri, Apr 25, 2025 at 10:07:27AM +0200, Luca Weiss wrote:
> Add support for DisplayPort Jack events, so that user space can
> configure the audio routing correctly.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> sound/soc/qcom/sm8250.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
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-05-01 11:37 ` Srinivas Kandagatla
1 sibling, 1 reply; 17+ messages in thread
From: Mark Brown @ 2025-04-25 12:12 UTC (permalink / raw)
To: Luca Weiss
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
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.
This doesn't apply against current code, please check and resend.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-04-25 12:12 ` Mark Brown
@ 2025-04-25 18:19 ` Luca Weiss
2025-04-25 19:03 ` Mark Brown
0 siblings, 1 reply; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 18:19 UTC (permalink / raw)
To: Mark Brown
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
Hi Mark,
On Fri Apr 25, 2025 at 2:12 PM CEST, Mark Brown wrote:
> 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.
>
> This doesn't apply against current code, please check and resend.
I've based this series on next-20250417 tag, so this is probably due to
the changes from the USB sound offloading series that Greg has picked
up.
So either Greg also picks up these changes when they're ready, or we
wait until 6.17?
Regards
Luca
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-04-25 18:19 ` Luca Weiss
@ 2025-04-25 19:03 ` Mark Brown
2025-04-25 20:47 ` Luca Weiss
0 siblings, 1 reply; 17+ messages in thread
From: Mark Brown @ 2025-04-25 19:03 UTC (permalink / raw)
To: Luca Weiss
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
[-- Attachment #1: Type: text/plain, Size: 409 bytes --]
On Fri, Apr 25, 2025 at 08:19:39PM +0200, Luca Weiss wrote:
> I've based this series on next-20250417 tag, so this is probably due to
> the changes from the USB sound offloading series that Greg has picked
> up.
> So either Greg also picks up these changes when they're ready, or we
> wait until 6.17?
Or base it on my tree and let things get sorted in the merge, I don't
know what the conflicts might be?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-04-25 19:03 ` Mark Brown
@ 2025-04-25 20:47 ` Luca Weiss
2025-04-25 20:56 ` Mark Brown
0 siblings, 1 reply; 17+ messages in thread
From: Luca Weiss @ 2025-04-25 20:47 UTC (permalink / raw)
To: Mark Brown
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
On Fri Apr 25, 2025 at 9:03 PM CEST, Mark Brown wrote:
> On Fri, Apr 25, 2025 at 08:19:39PM +0200, Luca Weiss wrote:
>
>> I've based this series on next-20250417 tag, so this is probably due to
>> the changes from the USB sound offloading series that Greg has picked
>> up.
>
>> So either Greg also picks up these changes when they're ready, or we
>> wait until 6.17?
>
> Or base it on my tree and let things get sorted in the merge, I don't
> know what the conflicts might be?
For this patch here it might be okay but patch 3/5 from this series very
much depends on the patch in Greg's tree, given it refactors/expands on
the USB_RX if there. Resolving this through merge wouldn't be very
pretty.
Regards
Luca
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-04-25 20:47 ` Luca Weiss
@ 2025-04-25 20:56 ` Mark Brown
0 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2025-04-25 20:56 UTC (permalink / raw)
To: Luca Weiss
Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
[-- Attachment #1: Type: text/plain, Size: 566 bytes --]
On Fri, Apr 25, 2025 at 10:47:42PM +0200, Luca Weiss wrote:
> On Fri Apr 25, 2025 at 9:03 PM CEST, Mark Brown wrote:
> > Or base it on my tree and let things get sorted in the merge, I don't
> > know what the conflicts might be?
> For this patch here it might be okay but patch 3/5 from this series very
> much depends on the patch in Greg's tree, given it refactors/expands on
> the USB_RX if there. Resolving this through merge wouldn't be very
> pretty.
Well, unfortunately Greg didn't put things on a branch so yeah waiting
for next release might be easiest.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
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-05-01 11:37 ` Srinivas Kandagatla
2025-05-01 14:13 ` Luca Weiss
1 sibling, 1 reply; 17+ messages in thread
From: Srinivas Kandagatla @ 2025-05-01 11:37 UTC (permalink / raw)
To: Luca Weiss
Cc: Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, ~postmarketos/upstreaming,
phone-devel, alsa-devel, linux-arm-msm, linux-sound, devicetree,
linux-kernel, Dmitry Baryshkov, Neil Armstrong
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
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-05-01 11:37 ` Srinivas Kandagatla
@ 2025-05-01 14:13 ` Luca Weiss
2025-05-02 11:06 ` Srinivas Kandagatla
0 siblings, 1 reply; 17+ messages in thread
From: Luca Weiss @ 2025-05-01 14:13 UTC (permalink / raw)
To: ~postmarketos/upstreaming, Srinivas Kandagatla, Luca Weiss
Cc: Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, phone-devel, alsa-devel,
linux-arm-msm, linux-sound, devicetree, linux-kernel,
Dmitry Baryshkov, Neil Armstrong
Hi Srini,
Srinivas Kandagatla <srini@kernel.org> schreef op 1 mei 2025 13:37:45 CEST:
>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?
Since this name is visible to user space and used for picking the UCM config, I don't think it's a good idea to change it.
Regards
Luca
>
>> + { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
>> + { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
>> {}
>> };
>>
>>
>> --
>> 2.49.0
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-05-01 14:13 ` Luca Weiss
@ 2025-05-02 11:06 ` Srinivas Kandagatla
2025-05-06 12:07 ` Luca Weiss
0 siblings, 1 reply; 17+ messages in thread
From: Srinivas Kandagatla @ 2025-05-02 11:06 UTC (permalink / raw)
To: Luca Weiss, ~postmarketos/upstreaming, Srinivas Kandagatla,
Luca Weiss
Cc: Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, phone-devel, alsa-devel,
linux-arm-msm, linux-sound, devicetree, linux-kernel,
Dmitry Baryshkov, Neil Armstrong
On 5/1/25 15:13, Luca Weiss wrote:
> Hi Srini,
>
> Srinivas Kandagatla <srini@kernel.org> schreef op 1 mei 2025 13:37:45 CEST:
>> 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?
>
> Since this name is visible to user space and used for picking the UCM config, I don't think it's a good idea to change it.
>
It is not correct to pretend that rb2 is sm8250 for ucm cases, I agree previous code was
already doing this, Good thing is that we do not have a ucm written yet for RB2.
Lets fix this as you are already doing this for other compatibles.
--srini
> Regards
> Luca
>
>>
>>> + { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
>>> + { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
>>> {}
>>> };
>>>
>>>
>>> --
>>> 2.49.0
>>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v3 2/5] ASoC: qcom: sm8250: set card driver name from match data
2025-05-02 11:06 ` Srinivas Kandagatla
@ 2025-05-06 12:07 ` Luca Weiss
0 siblings, 0 replies; 17+ messages in thread
From: Luca Weiss @ 2025-05-06 12:07 UTC (permalink / raw)
To: Srinivas Kandagatla, Luca Weiss, ~postmarketos/upstreaming,
Srinivas Kandagatla
Cc: Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, phone-devel, alsa-devel,
linux-arm-msm, linux-sound, devicetree, linux-kernel,
Dmitry Baryshkov, Neil Armstrong
Hi Srini,
On Fri May 2, 2025 at 1:06 PM CEST, Srinivas Kandagatla wrote:
> On 5/1/25 15:13, Luca Weiss wrote:
>> Hi Srini,
>>
>> Srinivas Kandagatla <srini@kernel.org> schreef op 1 mei 2025 13:37:45 CEST:
>>> 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?
>>
>> Since this name is visible to user space and used for picking the UCM config, I don't think it's a good idea to change it.
>>
> It is not correct to pretend that rb2 is sm8250 for ucm cases, I agree previous code was
> already doing this, Good thing is that we do not have a ucm written yet for RB2.
>
> Lets fix this as you are already doing this for other compatibles.
Okay, will change this in v4.
Regards
Luca
>
> --srini
>
>> Regards
>> Luca
>>
>>>
>>>> + { .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
>>>> + { .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
>>>> {}
>>>> };
>>>>
>>>>
>>>> --
>>>> 2.49.0
>>>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: (subset) [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone
2025-04-25 8:07 [PATCH v3 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
` (4 preceding siblings ...)
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 ` Mark Brown
5 siblings, 0 replies; 17+ messages in thread
From: Mark Brown @ 2025-06-09 21:00 UTC (permalink / raw)
To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela, Takashi Iwai,
Bjorn Andersson, Konrad Dybcio, Luca Weiss
Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
linux-sound, devicetree, linux-kernel, Dmitry Baryshkov,
Neil Armstrong
On Fri, 25 Apr 2025 10:07:24 +0200, Luca Weiss wrote:
> Add the necessary sound card bits and some dts additions to enable sound
> over DisplayPort-over-USB-C, e.g. to a connected TV or monitor.
>
> The UCM files can be found here:
> https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-fairphone-fp5/ucm
>
> This series - in spirit - depends on the series enabling DisplayPort in
> the first place, but can land pretty independently, especially the ASoC
> bits:
> https://lore.kernel.org/linux-arm-msm/20250312-fp5-pmic-glink-dp-v2-0-a55927749d77@fairphone.com/
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card
(no commit info)
[2/5] ASoC: qcom: sm8250: set card driver name from match data
commit: c4b79a2fbfb28308e958e4ffdd988f3cf678fe2a
[3/5] ASoC: qcom: sm8250: add DisplayPort Jack support
commit: ed82808c6a0f333e51fee4e97cbe8e0189b7f354
[4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
commit: e6e8897995a9e6028563ce36c27877e5478c8571
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2025-06-09 21:00 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).