linux-sound.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone
@ 2025-05-07  8:01 Luca Weiss
  2025-05-07  8:01 ` [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
                   ` (6 more replies)
  0 siblings, 7 replies; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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/

The ASoC bits depend on the patches for USB audio offloading merged
through Greg's tree so this cannot easily be applied for v6.16 through
the sound tree. Either it waits for v6.17 or also goes through Greg's
tree.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Changes in v4:
- Use "sm4250" for qcom,qrb4210-rb2-sndcard (Srinivas)
- Expand cover letter to mention dependencies for ASoC patches
- Pick up tags
- Link to v3: https://lore.kernel.org/r/20250425-fp5-dp-sound-v3-0-7cb45180091b@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: f819a667fa466d3b96b542b147053b6873f18ea1
change-id: 20240809-fp5-dp-sound-b3768f3019bd

Best regards,
-- 
Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
@ 2025-05-07  8:01 ` Luca Weiss
  2025-05-27 19:32   ` Rob Herring
  2025-05-07  8:01 ` [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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] 11+ messages in thread

* [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
  2025-05-07  8:01 ` [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
@ 2025-05-07  8:01 ` Luca Weiss
  2025-05-14  6:42   ` Srinivas Kandagatla
  2025-05-07  8:01 ` [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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. The QRB4210 RB2 gets its name set to "sm4250" as requested by
Srinivas Kandagatla, and since no (known) UCM has been written yet this
should not break anything.

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..f0d83a843765d8dcdd51569e7cbc95eb72292497 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 = "sm4250" },
+	{ .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
+	{ .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
 	{}
 };
 

-- 
2.49.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
  2025-05-07  8:01 ` [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
  2025-05-07  8:01 ` [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
@ 2025-05-07  8:01 ` Luca Weiss
  2025-05-14  6:43   ` Srinivas Kandagatla
  2025-05-07  8:01 ` [PATCH v4 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible Luca Weiss
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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 support for DisplayPort Jack events, so that user space can
configure the audio routing correctly.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
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 f0d83a843765d8dcdd51569e7cbc95eb72292497..2317fe285ee7d41689d7fac453164fbe706744ff 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] 11+ messages in thread

* [PATCH v4 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
                   ` (2 preceding siblings ...)
  2025-05-07  8:01 ` [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
@ 2025-05-07  8:01 ` Luca Weiss
  2025-05-07  8:01 ` [PATCH v4 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Luca Weiss
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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 2317fe285ee7d41689d7fac453164fbe706744ff..69c514fad0b1babafae4b61bb5ac944c6b4906dd 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 = "sm4250" },
 	{ .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
 	{ .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },

-- 
2.49.0


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v4 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
                   ` (3 preceding siblings ...)
  2025-05-07  8:01 ` [PATCH v4 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible Luca Weiss
@ 2025-05-07  8:01 ` Luca Weiss
  2025-05-13 20:46 ` (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Bjorn Andersson
  2025-06-09 21:00 ` Mark Brown
  6 siblings, 0 replies; 11+ messages in thread
From: Luca Weiss @ 2025-05-07  8:01 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] 11+ messages in thread

* Re: (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
                   ` (4 preceding siblings ...)
  2025-05-07  8:01 ` [PATCH v4 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Luca Weiss
@ 2025-05-13 20:46 ` Bjorn Andersson
  2025-06-09 21:00 ` Mark Brown
  6 siblings, 0 replies; 11+ messages in thread
From: Bjorn Andersson @ 2025-05-13 20:46 UTC (permalink / raw)
  To: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jaroslav Kysela,
	Takashi Iwai, Konrad Dybcio, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, alsa-devel, linux-arm-msm,
	linux-sound, devicetree, linux-kernel, Dmitry Baryshkov,
	Neil Armstrong


On Wed, 07 May 2025 10:01:36 +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, thanks!

[5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support
      commit: 8fc88fbd471044d66cb2fd85dc0d431866ed7448

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data
  2025-05-07  8:01 ` [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
@ 2025-05-14  6:42   ` Srinivas Kandagatla
  0 siblings, 0 replies; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-05-14  6:42 UTC (permalink / raw)
  To: Luca Weiss, 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, Dmitry Baryshkov,
	Neil Armstrong



On 5/7/25 09:01, 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. The QRB4210 RB2 gets its name set to "sm4250" as requested by
> Srinivas Kandagatla, and since no (known) UCM has been written yet this
> should not break anything.
> 
> 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>

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.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..f0d83a843765d8dcdd51569e7cbc95eb72292497 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 = "sm4250" },
> +	{ .compatible = "qcom,qrb5165-rb5-sndcard", .data = "sm8250" },
> +	{ .compatible = "qcom,sm8250-sndcard", .data = "sm8250" },
>  	{}
>  };
>  
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support
  2025-05-07  8:01 ` [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
@ 2025-05-14  6:43   ` Srinivas Kandagatla
  0 siblings, 0 replies; 11+ messages in thread
From: Srinivas Kandagatla @ 2025-05-14  6:43 UTC (permalink / raw)
  To: Luca Weiss, 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, Dmitry Baryshkov



On 5/7/25 09:01, Luca Weiss wrote:
> Add support for DisplayPort Jack events, so that user space can
> configure the audio routing correctly.
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.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 f0d83a843765d8dcdd51569e7cbc95eb72292497..2317fe285ee7d41689d7fac453164fbe706744ff 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)
> 


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card
  2025-05-07  8:01 ` [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
@ 2025-05-27 19:32   ` Rob Herring
  0 siblings, 0 replies; 11+ messages in thread
From: Rob Herring @ 2025-05-27 19:32 UTC (permalink / raw)
  To: Luca Weiss
  Cc: Srinivas Kandagatla, Banajit Goswami, Liam Girdwood, Mark Brown,
	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 Wed, May 07, 2025 at 10:01:37AM +0200, Luca Weiss wrote:
> 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(+)

Once again, QCom .dts changes merged without bindings...

I've applied it.

Rob

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone
  2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
                   ` (5 preceding siblings ...)
  2025-05-13 20:46 ` (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Bjorn Andersson
@ 2025-06-09 21:00 ` Mark Brown
  6 siblings, 0 replies; 11+ 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 Wed, 07 May 2025 10:01:36 +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] 11+ messages in thread

end of thread, other threads:[~2025-06-09 21:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-07  8:01 [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Luca Weiss
2025-05-07  8:01 ` [PATCH v4 1/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 5 sound card Luca Weiss
2025-05-27 19:32   ` Rob Herring
2025-05-07  8:01 ` [PATCH v4 2/5] ASoC: qcom: sm8250: set card driver name from match data Luca Weiss
2025-05-14  6:42   ` Srinivas Kandagatla
2025-05-07  8:01 ` [PATCH v4 3/5] ASoC: qcom: sm8250: add DisplayPort Jack support Luca Weiss
2025-05-14  6:43   ` Srinivas Kandagatla
2025-05-07  8:01 ` [PATCH v4 4/5] ASoC: qcom: sm8250: Add Fairphone 5 soundcard compatible Luca Weiss
2025-05-07  8:01 ` [PATCH v4 5/5] arm64: dts: qcom: qcm6490-fairphone-fp5: Add DisplayPort sound support Luca Weiss
2025-05-13 20:46 ` (subset) [PATCH v4 0/5] Add DisplayPort sound support for Fairphone 5 smartphone Bjorn Andersson
2025-06-09 21:00 ` 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).