linux-sunxi.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/7] PinePhone BT audio bringup
@ 2021-04-30  3:58 Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

This series uses the additional DAIs added to the sun8i-codec driver to
add hardware routing for BT SCO (headset) audio on the PinePhone.

The BT audio connection is represented by the "dummy" bt-sco codec. The
connection to the Quectel EG-25G modem via AIF2 works as well, but I do
not include it here because there is no appropriate codec driver in
tree. We have been using an out-of-tree "dummy" codec driver for the
modem similar to bt-sco, and I'm not sure if such a driver would be
desired upstream.

Changes from v2:
  - Also accept #sound-dai-cells in the binding. Since dt-core.yaml
    already sets the type of this property, it is not possible to use
    oneOf, nor make a specific value deprecated.

Changes from v1:
  - Fixed DT binding example to follow new binding

Arnaud Ferraris (1):
  arm64: dts: allwinner: pinephone: Set audio card name

Samuel Holland (6):
  ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
  ARM: dts: sun8i-a33: Allow using multiple codec DAIs
  arm64: dts: allwinner: a64: Allow using multiple codec DAIs
  arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
  arm64: dts: allwinner: a64: Allow multiple DAI links
  arm64: dts: allwinner: pinephone: Add support for Bluetooth audio

 .../sound/allwinner,sun8i-a33-codec.yaml      |  8 +++-
 arch/arm/boot/dts/sun8i-a33.dtsi              |  4 +-
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 25 +++++++++++++
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 37 ++++++++++++++-----
 4 files changed, 60 insertions(+), 14 deletions(-)

-- 
2.26.3


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

* [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30 21:46   ` Rob Herring
  2021-04-30  3:58 ` [PATCH v3 2/7] ARM: dts: sun8i-a33: Allow using multiple codec DAIs Samuel Holland
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

Increase sound-dai-cells to 1 to allow using the DAIs in the codec
corresponding to AIF2 and AIF3.

The generic ASoC OF code supports a #sound-dai-cells value of 0 or 1
with no impact to the driver, so this is a backward-compatible change.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../bindings/sound/allwinner,sun8i-a33-codec.yaml         | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
index 67405e6d8168..19f111f40225 100644
--- a/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
+++ b/Documentation/devicetree/bindings/sound/allwinner,sun8i-a33-codec.yaml
@@ -12,7 +12,11 @@ maintainers:
 
 properties:
   "#sound-dai-cells":
-    const: 0
+    minimum: 0
+    maximum: 1
+    description:
+      A value of 0 is deprecated. When used, it only allows access to
+      the ADC/DAC and AIF1 (the CPU DAI), not the other two AIFs/DAIs.
 
   compatible:
     oneOf:
@@ -50,7 +54,7 @@ additionalProperties: false
 examples:
   - |
     audio-codec@1c22e00 {
-      #sound-dai-cells = <0>;
+      #sound-dai-cells = <1>;
       compatible = "allwinner,sun8i-a33-codec";
       reg = <0x01c22e00 0x400>;
       interrupts = <0 29 4>;
-- 
2.26.3


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

* [PATCH v3 2/7] ARM: dts: sun8i-a33: Allow using multiple codec DAIs
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 3/7] arm64: dts: allwinner: a64: " Samuel Holland
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

Increase #sound-dai-cells on the digital codec to allow using the other
DAIs provided by the codec for AIF2 and AIF3.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 arch/arm/boot/dts/sun8i-a33.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi
index 7344c37107c6..2beddbb3c518 100644
--- a/arch/arm/boot/dts/sun8i-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a33.dtsi
@@ -198,7 +198,7 @@ simple-audio-card,cpu {
 		};
 
 		link_codec: simple-audio-card,codec {
-			sound-dai = <&codec>;
+			sound-dai = <&codec 0>;
 		};
 	};
 
@@ -238,7 +238,7 @@ dai: dai@1c22c00 {
 		};
 
 		codec: codec@1c22e00 {
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			compatible = "allwinner,sun8i-a33-codec";
 			reg = <0x01c22e00 0x400>;
 			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.26.3


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

* [PATCH v3 3/7] arm64: dts: allwinner: a64: Allow using multiple codec DAIs
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 2/7] ARM: dts: sun8i-a33: Allow using multiple codec DAIs Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 4/7] arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 Samuel Holland
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

Increase #sound-dai-cells on the digital codec to allow using the other
DAIs provided by the codec for AIF2 and AIF3.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 57786fc120c3..3061031780de 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -150,7 +150,7 @@ cpudai: simple-audio-card,cpu {
 		};
 
 		link_codec: simple-audio-card,codec {
-			sound-dai = <&codec>;
+			sound-dai = <&codec 0>;
 		};
 	};
 
@@ -878,7 +878,7 @@ dai: dai@1c22c00 {
 		};
 
 		codec: codec@1c22e00 {
-			#sound-dai-cells = <0>;
+			#sound-dai-cells = <1>;
 			compatible = "allwinner,sun50i-a64-codec",
 				     "allwinner,sun8i-a33-codec";
 			reg = <0x01c22e00 0x600>;
-- 
2.26.3


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

* [PATCH v3 4/7] arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (2 preceding siblings ...)
  2021-04-30  3:58 ` [PATCH v3 3/7] arm64: dts: allwinner: a64: " Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 5/7] arm64: dts: allwinner: a64: Allow multiple DAI links Samuel Holland
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

Now that the sun8i-codec driver supports AIF2 and AIF3, boards can use
them in DAI links. Add the necessary pinmux nodes.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 3061031780de..a583355a3128 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -658,6 +658,18 @@ pio: pinctrl@1c20800 {
 			interrupt-controller;
 			#interrupt-cells = <3>;
 
+			/omit-if-no-ref/
+			aif2_pins: aif2-pins {
+				pins = "PB4", "PB5", "PB6", "PB7";
+				function = "aif2";
+			};
+
+			/omit-if-no-ref/
+			aif3_pins: aif3-pins {
+				pins = "PG10", "PG11", "PG12", "PG13";
+				function = "aif3";
+			};
+
 			csi_pins: csi-pins {
 				pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6",
 				       "PE7", "PE8", "PE9", "PE10", "PE11";
-- 
2.26.3


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

* [PATCH v3 5/7] arm64: dts: allwinner: a64: Allow multiple DAI links
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (3 preceding siblings ...)
  2021-04-30  3:58 ` [PATCH v3 4/7] arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio Samuel Holland
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

simple-audio-card supports either a single DAI link at the top level, or
subnodes with one or more DAI links. To use the secondary AIFs on the
codec, we need to add additional DAI links to the same sound card, so we
need to use the other binding.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 23 +++++++++++--------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index a583355a3128..5734b4825f64 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -131,12 +131,10 @@ psci {
 	};
 
 	sound: sound {
+		#address-cells = <1>;
+		#size-cells = <0>;
 		compatible = "simple-audio-card";
 		simple-audio-card,name = "sun50i-a64-audio";
-		simple-audio-card,format = "i2s";
-		simple-audio-card,frame-master = <&cpudai>;
-		simple-audio-card,bitclock-master = <&cpudai>;
-		simple-audio-card,mclk-fs = <128>;
 		simple-audio-card,aux-devs = <&codec_analog>;
 		simple-audio-card,routing =
 				"Left DAC", "DACL",
@@ -145,12 +143,19 @@ sound: sound {
 				"ADCR", "Right ADC";
 		status = "disabled";
 
-		cpudai: simple-audio-card,cpu {
-			sound-dai = <&dai>;
-		};
+		simple-audio-card,dai-link@0 {
+			format = "i2s";
+			frame-master = <&link0_cpu>;
+			bitclock-master = <&link0_cpu>;
+			mclk-fs = <128>;
 
-		link_codec: simple-audio-card,codec {
-			sound-dai = <&codec 0>;
+			link0_cpu: cpu {
+				sound-dai = <&dai>;
+			};
+
+			link0_codec: codec {
+				sound-dai = <&codec 0>;
+			};
 		};
 	};
 
-- 
2.26.3


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

* [PATCH v3 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (4 preceding siblings ...)
  2021-04-30  3:58 ` [PATCH v3 5/7] arm64: dts: allwinner: a64: Allow multiple DAI links Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-04-30  3:58 ` [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland

The PinePhone has a Bluetooth chip with its PCM interface connected to
AIF3. Add the DAI link so headeset audio can be routed in hardware.

Even though the link is 16 bit PCM, configuring the link a 32-bit slot
is required for compatibility with AIF2, which also uses a 32-bit slot,
and which shares clock dividers with AIF3. Using equal clock frequencies
allows the modem and headset to be used at the same time.

Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 .../dts/allwinner/sun50i-a64-pinephone.dtsi   | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 9f69d489a81d..51cbfdc12936 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -25,6 +25,11 @@ backlight: backlight {
 		/* Backlight configuration differs per PinePhone revision. */
 	};
 
+	bt_sco_codec: bt-sco-codec {
+		#sound-dai-cells = <1>;
+		compatible = "linux,bt-sco";
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -91,6 +96,8 @@ vibrator {
 };
 
 &codec {
+	pinctrl-names = "default";
+	pinctrl-0 = <&aif3_pins>;
 	status = "okay";
 };
 
@@ -447,6 +454,23 @@ &sound {
 			"MIC1", "Internal Microphone",
 			"Headset Microphone", "HBIAS",
 			"MIC2", "Headset Microphone";
+
+	simple-audio-card,dai-link@2 {
+		format = "dsp_a";
+		frame-master = <&link2_codec>;
+		bitclock-master = <&link2_codec>;
+		bitclock-inversion;
+
+		link2_cpu: cpu {
+			sound-dai = <&bt_sco_codec 0>;
+		};
+
+		link2_codec: codec {
+			sound-dai = <&codec 2>;
+			dai-tdm-slot-num = <1>;
+			dai-tdm-slot-width = <32>;
+		};
+	};
 };
 
 &uart0 {
-- 
2.26.3


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

* [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (5 preceding siblings ...)
  2021-04-30  3:58 ` [PATCH v3 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio Samuel Holland
@ 2021-04-30  3:58 ` Samuel Holland
  2021-05-07  8:09   ` Maxime Ripard
  2021-05-07  8:09 ` [PATCH v3 0/7] PinePhone BT audio bringup Maxime Ripard
  2021-05-11  8:26 ` (subset) " Mark Brown
  8 siblings, 1 reply; 14+ messages in thread
From: Samuel Holland @ 2021-04-30  3:58 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood,
	Mark Brown, Rob Herring
  Cc: alsa-devel, devicetree, linux-arm-kernel, linux-sunxi,
	linux-kernel, Samuel Holland, Arnaud Ferraris

From: Arnaud Ferraris <arnaud.ferraris@collabora.com>

Add the "PinePhone" name to the sound card: this will make
upstreaming an ALSA UCM config easier as we can use a unique name.

It also avoids an issue where the default card name is truncated.

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
[Samuel: Split out change, updated commit message]
Signed-off-by: Samuel Holland <samuel@sholland.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
index 51cbfdc12936..02712f85f6bd 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
@@ -433,6 +433,7 @@ &reg_rtc_ldo {
 
 &sound {
 	status = "okay";
+	simple-audio-card,name = "PinePhone";
 	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
 	simple-audio-card,widgets = "Microphone", "Headset Microphone",
 				    "Microphone", "Internal Microphone",
-- 
2.26.3


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

* Re: [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
  2021-04-30  3:58 ` [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
@ 2021-04-30 21:46   ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2021-04-30 21:46 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Jernej Skrabec, Chen-Yu Tsai, linux-sunxi, Rob Herring,
	linux-arm-kernel, Mark Brown, Maxime Ripard, alsa-devel,
	devicetree, linux-kernel, Liam Girdwood

On Thu, 29 Apr 2021 22:58:53 -0500, Samuel Holland wrote:
> Increase sound-dai-cells to 1 to allow using the DAIs in the codec
> corresponding to AIF2 and AIF3.
> 
> The generic ASoC OF code supports a #sound-dai-cells value of 0 or 1
> with no impact to the driver, so this is a backward-compatible change.
> 
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>  .../bindings/sound/allwinner,sun8i-a33-codec.yaml         | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name
  2021-04-30  3:58 ` [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
@ 2021-05-07  8:09   ` Maxime Ripard
  2021-05-10  1:54     ` Samuel Holland
  0 siblings, 1 reply; 14+ messages in thread
From: Maxime Ripard @ 2021-05-07  8:09 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood, Mark Brown,
	Rob Herring, alsa-devel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, Arnaud Ferraris

[-- Attachment #1: Type: text/plain, Size: 1346 bytes --]

Hi,

On Thu, Apr 29, 2021 at 10:58:59PM -0500, Samuel Holland wrote:
> From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
> 
> Add the "PinePhone" name to the sound card: this will make
> upstreaming an ALSA UCM config easier as we can use a unique name.
> 
> It also avoids an issue where the default card name is truncated.
> 
> Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
> [Samuel: Split out change, updated commit message]
> Signed-off-by: Samuel Holland <samuel@sholland.org>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> index 51cbfdc12936..02712f85f6bd 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> @@ -433,6 +433,7 @@ &reg_rtc_ldo {
>  
>  &sound {
>  	status = "okay";
> +	simple-audio-card,name = "PinePhone";
>  	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
>  	simple-audio-card,widgets = "Microphone", "Headset Microphone",
>  				    "Microphone", "Internal Microphone",

Isn't that reported to the userspace? I'm not sure we can just change it
without breaking it.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 0/7] PinePhone BT audio bringup
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (6 preceding siblings ...)
  2021-04-30  3:58 ` [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
@ 2021-05-07  8:09 ` Maxime Ripard
  2021-05-11  8:26 ` (subset) " Mark Brown
  8 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2021-05-07  8:09 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood, Mark Brown,
	Rob Herring, alsa-devel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

On Thu, Apr 29, 2021 at 10:58:52PM -0500, Samuel Holland wrote:
> This series uses the additional DAIs added to the sun8i-codec driver to
> add hardware routing for BT SCO (headset) audio on the PinePhone.
> 
> The BT audio connection is represented by the "dummy" bt-sco codec. The
> connection to the Quectel EG-25G modem via AIF2 works as well, but I do
> not include it here because there is no appropriate codec driver in
> tree. We have been using an out-of-tree "dummy" codec driver for the
> modem similar to bt-sco, and I'm not sure if such a driver would be
> desired upstream.

I've applied patches 1-6

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name
  2021-05-07  8:09   ` Maxime Ripard
@ 2021-05-10  1:54     ` Samuel Holland
  2021-05-24 12:08       ` Maxime Ripard
  0 siblings, 1 reply; 14+ messages in thread
From: Samuel Holland @ 2021-05-10  1:54 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood, Mark Brown,
	Rob Herring, alsa-devel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, Arnaud Ferraris

On 5/7/21 3:09 AM, Maxime Ripard wrote:
> Hi,
> 
> On Thu, Apr 29, 2021 at 10:58:59PM -0500, Samuel Holland wrote:
>> From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
>>
>> Add the "PinePhone" name to the sound card: this will make
>> upstreaming an ALSA UCM config easier as we can use a unique name.
>>
>> It also avoids an issue where the default card name is truncated.
>>
>> Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
>> [Samuel: Split out change, updated commit message]
>> Signed-off-by: Samuel Holland <samuel@sholland.org>
>> ---
>>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
>> index 51cbfdc12936..02712f85f6bd 100644
>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
>> @@ -433,6 +433,7 @@ &reg_rtc_ldo {
>>  
>>  &sound {
>>  	status = "okay";
>> +	simple-audio-card,name = "PinePhone";
>>  	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
>>  	simple-audio-card,widgets = "Microphone", "Headset Microphone",
>>  				    "Microphone", "Internal Microphone",
> 
> Isn't that reported to the userspace? I'm not sure we can just change it
> without breaking it.

Yes, this is seen by userspace.

Ideally, we would add this property with a unique value when enabling
audio for any board, but as you mention, it would be a breaking change
to add those properties now.

In practice, all distributions supporting the PinePhone are already
carrying this patch, because the ALSA setup needed for the PinePhone is
very different from most other boards. So it would be similarly breaking
for them (and their users) to drop this patch.

Regards,
Samuel

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

* Re: (subset) [PATCH v3 0/7] PinePhone BT audio bringup
  2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
                   ` (7 preceding siblings ...)
  2021-05-07  8:09 ` [PATCH v3 0/7] PinePhone BT audio bringup Maxime Ripard
@ 2021-05-11  8:26 ` Mark Brown
  8 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2021-05-11  8:26 UTC (permalink / raw)
  To: Chen-Yu Tsai, Samuel Holland, Liam Girdwood, Jernej Skrabec,
	Rob Herring, Maxime Ripard
  Cc: Mark Brown, linux-kernel, alsa-devel, linux-arm-kernel,
	devicetree, linux-sunxi

On Thu, 29 Apr 2021 22:58:52 -0500, Samuel Holland wrote:
> This series uses the additional DAIs added to the sun8i-codec driver to
> add hardware routing for BT SCO (headset) audio on the PinePhone.
> 
> The BT audio connection is represented by the "dummy" bt-sco codec. The
> connection to the Quectel EG-25G modem via AIF2 works as well, but I do
> not include it here because there is no appropriate codec driver in
> tree. We have been using an out-of-tree "dummy" codec driver for the
> modem similar to bt-sco, and I'm not sure if such a driver would be
> desired upstream.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells
      commit: 880e007f15a31f446b9e1713720c6ae5a539f3f4

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] 14+ messages in thread

* Re: [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name
  2021-05-10  1:54     ` Samuel Holland
@ 2021-05-24 12:08       ` Maxime Ripard
  0 siblings, 0 replies; 14+ messages in thread
From: Maxime Ripard @ 2021-05-24 12:08 UTC (permalink / raw)
  To: Samuel Holland
  Cc: Chen-Yu Tsai, Jernej Skrabec, Liam Girdwood, Mark Brown,
	Rob Herring, alsa-devel, devicetree, linux-arm-kernel,
	linux-sunxi, linux-kernel, Arnaud Ferraris

[-- Attachment #1: Type: text/plain, Size: 2127 bytes --]

On Sun, May 09, 2021 at 08:54:36PM -0500, Samuel Holland wrote:
> On 5/7/21 3:09 AM, Maxime Ripard wrote:
> > Hi,
> > 
> > On Thu, Apr 29, 2021 at 10:58:59PM -0500, Samuel Holland wrote:
> >> From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
> >>
> >> Add the "PinePhone" name to the sound card: this will make
> >> upstreaming an ALSA UCM config easier as we can use a unique name.
> >>
> >> It also avoids an issue where the default card name is truncated.
> >>
> >> Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
> >> [Samuel: Split out change, updated commit message]
> >> Signed-off-by: Samuel Holland <samuel@sholland.org>
> >> ---
> >>  arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> >> index 51cbfdc12936..02712f85f6bd 100644
> >> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
g> >> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
> >> @@ -433,6 +433,7 @@ &reg_rtc_ldo {
> >>  
> >>  &sound {
> >>  	status = "okay";
> >> +	simple-audio-card,name = "PinePhone";
> >>  	simple-audio-card,aux-devs = <&codec_analog>, <&speaker_amp>;
> >>  	simple-audio-card,widgets = "Microphone", "Headset Microphone",
> >>  				    "Microphone", "Internal Microphone",
> > 
> > Isn't that reported to the userspace? I'm not sure we can just change it
> > without breaking it.
> 
> Yes, this is seen by userspace.
> 
> Ideally, we would add this property with a unique value when enabling
> audio for any board, but as you mention, it would be a breaking change
> to add those properties now.
> 
> In practice, all distributions supporting the PinePhone are already
> carrying this patch, because the ALSA setup needed for the PinePhone is
> very different from most other boards. So it would be similarly breaking
> for them (and their users) to drop this patch.

Ack :)

Since no one else complained, I merged this patch too

Thanks!
Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2021-05-24 12:08 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30  3:58 [PATCH v3 0/7] PinePhone BT audio bringup Samuel Holland
2021-04-30  3:58 ` [PATCH v3 1/7] ASoC: dt-bindings: sun8i-codec: Increase #sound-dai-cells Samuel Holland
2021-04-30 21:46   ` Rob Herring
2021-04-30  3:58 ` [PATCH v3 2/7] ARM: dts: sun8i-a33: Allow using multiple codec DAIs Samuel Holland
2021-04-30  3:58 ` [PATCH v3 3/7] arm64: dts: allwinner: a64: " Samuel Holland
2021-04-30  3:58 ` [PATCH v3 4/7] arm64: dts: allwinner: a64: Add pinmux nodes for AIF2/AIF3 Samuel Holland
2021-04-30  3:58 ` [PATCH v3 5/7] arm64: dts: allwinner: a64: Allow multiple DAI links Samuel Holland
2021-04-30  3:58 ` [PATCH v3 6/7] arm64: dts: allwinner: pinephone: Add support for Bluetooth audio Samuel Holland
2021-04-30  3:58 ` [PATCH v3 7/7] arm64: dts: allwinner: pinephone: Set audio card name Samuel Holland
2021-05-07  8:09   ` Maxime Ripard
2021-05-10  1:54     ` Samuel Holland
2021-05-24 12:08       ` Maxime Ripard
2021-05-07  8:09 ` [PATCH v3 0/7] PinePhone BT audio bringup Maxime Ripard
2021-05-11  8:26 ` (subset) " 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).