* [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec @ 2025-04-17 23:32 J. Neuschäfer via B4 Relay 2025-04-27 5:28 ` Chen-Yu Tsai 0 siblings, 1 reply; 5+ messages in thread From: J. Neuschäfer via B4 Relay @ 2025-04-17 23:32 UTC (permalink / raw) To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel, J. Neuschäfer From: "J. Neuschäfer" <j.ne@posteo.net> Line out playback and microphone capture work, after enabling the corresponding ALSA controls. Tested with the Orange Pi Zero interface board, which is a (mostly) passive adapter from the 13-pin header to standard connectors (2x USB A, 1x Audio/Video output, 1x built-in microphone). https://orangepi.com/index.php?route=product/product&product_id=871 Signed-off-by: J. Neuschäfer <j.ne@posteo.net> --- arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts index 1b001f2ad0efd2e77218742efe6d8edfdd18a816..d65ede3dd6ed1206248a39c91e46065684e7ba29 100644 --- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts +++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts @@ -112,6 +112,14 @@ wifi_pwrseq: pwrseq { }; }; +&codec { + allwinner,audio-routing = + "Line Out", "LINEOUT", + "MIC1", "Mic", + "Mic", "MBIAS"; + status = "okay"; +}; + &cpu0 { cpu-supply = <®_vdd_cpux>; }; --- base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8 change-id: 20250417-opz-audio-890849c8bb2e Best regards, -- J. Neuschäfer <j.ne@posteo.net> ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec 2025-04-17 23:32 [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec J. Neuschäfer via B4 Relay @ 2025-04-27 5:28 ` Chen-Yu Tsai 2025-04-28 7:26 ` J. Neuschäfer 0 siblings, 1 reply; 5+ messages in thread From: Chen-Yu Tsai @ 2025-04-27 5:28 UTC (permalink / raw) To: j.ne Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Fri, Apr 18, 2025 at 7:32 AM J. Neuschäfer via B4 Relay <devnull+j.ne.posteo.net@kernel.org> wrote: > > From: "J. Neuschäfer" <j.ne@posteo.net> > > Line out playback and microphone capture work, after enabling the > corresponding ALSA controls. Tested with the Orange Pi Zero interface > board, which is a (mostly) passive adapter from the 13-pin header to > standard connectors (2x USB A, 1x Audio/Video output, 1x built-in > microphone). > > https://orangepi.com/index.php?route=product/product&product_id=871 What about the USB ports? In any case, we don't enable peripherals on "headers" by default. That's up to the end user. The description for the whole adapter board could be an overlay that users can then apply directly. ChenYu > Signed-off-by: J. Neuschäfer <j.ne@posteo.net> > --- > arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts > index 1b001f2ad0efd2e77218742efe6d8edfdd18a816..d65ede3dd6ed1206248a39c91e46065684e7ba29 100644 > --- a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts > +++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-orangepi-zero.dts > @@ -112,6 +112,14 @@ wifi_pwrseq: pwrseq { > }; > }; > > +&codec { > + allwinner,audio-routing = > + "Line Out", "LINEOUT", > + "MIC1", "Mic", > + "Mic", "MBIAS"; > + status = "okay"; > +}; > + > &cpu0 { > cpu-supply = <®_vdd_cpux>; > }; > > --- > base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8 > change-id: 20250417-opz-audio-890849c8bb2e > > Best regards, > -- > J. Neuschäfer <j.ne@posteo.net> > > > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec 2025-04-27 5:28 ` Chen-Yu Tsai @ 2025-04-28 7:26 ` J. Neuschäfer 2025-04-28 8:37 ` Chen-Yu Tsai 0 siblings, 1 reply; 5+ messages in thread From: J. Neuschäfer @ 2025-04-28 7:26 UTC (permalink / raw) To: Chen-Yu Tsai Cc: j.ne, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Sun, Apr 27, 2025 at 01:28:58PM +0800, Chen-Yu Tsai wrote: > On Fri, Apr 18, 2025 at 7:32 AM J. Neuschäfer via B4 Relay > <devnull+j.ne.posteo.net@kernel.org> wrote: > > > > From: "J. Neuschäfer" <j.ne@posteo.net> > > > > Line out playback and microphone capture work, after enabling the > > corresponding ALSA controls. Tested with the Orange Pi Zero interface > > board, which is a (mostly) passive adapter from the 13-pin header to > > standard connectors (2x USB A, 1x Audio/Video output, 1x built-in > > microphone). > > > > https://orangepi.com/index.php?route=product/product&product_id=871 > > What about the USB ports? Good point, I could test these. I have not mentioned them because they are not related to audio. > In any case, we don't enable peripherals on "headers" by default. That's > up to the end user. The description for the whole adapter board could be > an overlay that users can then apply directly. For features such as pinmuxed UARTs (already present and disabled in the dts), I fully agree, because they could as well be used as GPIO, and that's for the user to decide. For the audio pins, there's nothing else one can do with them, as far as I understand it. It is possible to use at the least the Line Out pins with very minimal setup, e.g. just connecting the pins to headphones or something else. I'll clarify the following points in a comment in the next version: - The audio signals are exposed on the 1x13 header described in https://linux-sunxi.org/Xunlong_Orange_Pi_Zero - The pins can't be used for anything else according to section 3.1. Pin Characteristics of the Allwinner H3 Datasheet. Although I would prefer to enable the audio pins by default (because they are present on the Orange Pi Zero board), I would also be ok with adding them as status = "disabled", as is the case with uart1 and uart2. Please let me know your opinion. I will test the USB ports and write a devicetree overlay at arch/arm/boot/dts/allwinner/orangepi-zero-interface-board.dtso Best regards, J. Neuschäfer ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec 2025-04-28 7:26 ` J. Neuschäfer @ 2025-04-28 8:37 ` Chen-Yu Tsai 2025-04-28 10:58 ` J. Neuschäfer 0 siblings, 1 reply; 5+ messages in thread From: Chen-Yu Tsai @ 2025-04-28 8:37 UTC (permalink / raw) To: J. Neuschäfer Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, Apr 28, 2025 at 3:26 PM J. Neuschäfer <j.ne@posteo.net> wrote: > > On Sun, Apr 27, 2025 at 01:28:58PM +0800, Chen-Yu Tsai wrote: > > On Fri, Apr 18, 2025 at 7:32 AM J. Neuschäfer via B4 Relay > > <devnull+j.ne.posteo.net@kernel.org> wrote: > > > > > > From: "J. Neuschäfer" <j.ne@posteo.net> > > > > > > Line out playback and microphone capture work, after enabling the > > > corresponding ALSA controls. Tested with the Orange Pi Zero interface > > > board, which is a (mostly) passive adapter from the 13-pin header to > > > standard connectors (2x USB A, 1x Audio/Video output, 1x built-in > > > microphone). > > > > > > https://orangepi.com/index.php?route=product/product&product_id=871 > > > > What about the USB ports? > > Good point, I could test these. I have not mentioned them because they > are not related to audio. > > > In any case, we don't enable peripherals on "headers" by default. That's > > up to the end user. The description for the whole adapter board could be > > an overlay that users can then apply directly. > > For features such as pinmuxed UARTs (already present and disabled in the > dts), I fully agree, because they could as well be used as GPIO, and > that's for the user to decide. > > For the audio pins, there's nothing else one can do with them, as far as > I understand it. It is possible to use at the least the Line Out pins > with very minimal setup, e.g. just connecting the pins to headphones or > something else. Sure, but you are also adding the routing information, which could be different if someone designs a different adapter board. One could include GPIOs and I2C from the 26-pin header, and make a headset adapter (mic on the TRRS instead of tv-out) with a headphone amp and headset detection IC. It's easily overridable, and I suppose providing the basic use-case that one can directly use via the pins does have value. Instead of doing a lot of editing, the user can just toggle the status via the bootloader. > I'll clarify the following points in a comment in the next version: > > - The audio signals are exposed on the 1x13 header described in > https://linux-sunxi.org/Xunlong_Orange_Pi_Zero > > - The pins can't be used for anything else according to section > 3.1. Pin Characteristics of the Allwinner H3 Datasheet. > > Although I would prefer to enable the audio pins by default (because > they are present on the Orange Pi Zero board), I would also be ok with > adding them as status = "disabled", as is the case with uart1 and uart2. > Please let me know your opinion. I think it's better to have them disabled by default. We don't want to confuse users that don't have the adapter board, who might end up looking at their audio mixer and wondering where the line out is. If they have the adapter, or they are explicitly using wires to hook up things, then they can toggle the status. If they have something else, then they load whatever overlay that matches their hardware. Thanks ChenYu > I will test the USB ports and write a devicetree overlay at > arch/arm/boot/dts/allwinner/orangepi-zero-interface-board.dtso > > > Best regards, > J. Neuschäfer > ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec 2025-04-28 8:37 ` Chen-Yu Tsai @ 2025-04-28 10:58 ` J. Neuschäfer 0 siblings, 0 replies; 5+ messages in thread From: J. Neuschäfer @ 2025-04-28 10:58 UTC (permalink / raw) To: Chen-Yu Tsai Cc: J. Neuschäfer, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jernej Skrabec, Samuel Holland, devicetree, linux-arm-kernel, linux-sunxi, linux-kernel On Mon, Apr 28, 2025 at 04:37:31PM +0800, Chen-Yu Tsai wrote: > On Mon, Apr 28, 2025 at 3:26 PM J. Neuschäfer <j.ne@posteo.net> wrote: > > > > On Sun, Apr 27, 2025 at 01:28:58PM +0800, Chen-Yu Tsai wrote: > > > On Fri, Apr 18, 2025 at 7:32 AM J. Neuschäfer via B4 Relay > > > <devnull+j.ne.posteo.net@kernel.org> wrote: > > > > > > > > From: "J. Neuschäfer" <j.ne@posteo.net> > > > > > > > > Line out playback and microphone capture work, after enabling the > > > > corresponding ALSA controls. Tested with the Orange Pi Zero interface > > > > board, which is a (mostly) passive adapter from the 13-pin header to > > > > standard connectors (2x USB A, 1x Audio/Video output, 1x built-in > > > > microphone). > > > > > > > > https://orangepi.com/index.php?route=product/product&product_id=871 > > > > > > What about the USB ports? > > > > Good point, I could test these. I have not mentioned them because they > > are not related to audio. > > > > > In any case, we don't enable peripherals on "headers" by default. That's > > > up to the end user. The description for the whole adapter board could be > > > an overlay that users can then apply directly. > > > > For features such as pinmuxed UARTs (already present and disabled in the > > dts), I fully agree, because they could as well be used as GPIO, and > > that's for the user to decide. > > > > For the audio pins, there's nothing else one can do with them, as far as > > I understand it. It is possible to use at the least the Line Out pins > > with very minimal setup, e.g. just connecting the pins to headphones or > > something else. > > Sure, but you are also adding the routing information, which could be > different if someone designs a different adapter board. One could > include GPIOs and I2C from the 26-pin header, and make a headset > adapter (mic on the TRRS instead of tv-out) with a headphone amp > and headset detection IC. Ah, that's a fair point that I didn't consider. > It's easily overridable, and I suppose providing the basic use-case > that one can directly use via the pins does have value. Instead of > doing a lot of editing, the user can just toggle the status via > the bootloader. Sounds good! > > > I'll clarify the following points in a comment in the next version: > > > > - The audio signals are exposed on the 1x13 header described in > > https://linux-sunxi.org/Xunlong_Orange_Pi_Zero > > > > - The pins can't be used for anything else according to section > > 3.1. Pin Characteristics of the Allwinner H3 Datasheet. > > > > Although I would prefer to enable the audio pins by default (because > > they are present on the Orange Pi Zero board), I would also be ok with > > adding them as status = "disabled", as is the case with uart1 and uart2. > > Please let me know your opinion. > > I think it's better to have them disabled by default. We don't want to > confuse users that don't have the adapter board, who might end up looking > at their audio mixer and wondering where the line out is. Fair enough, that makes sense. > If they have the adapter, or they are explicitly using wires to hook up > things, then they can toggle the status. If they have something else, > then they load whatever overlay that matches their hardware. Thank you for your review and explanations! Best regards, J. Neuschäfer ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-04-28 10:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-04-17 23:32 [PATCH] ARM: dts: allwinner: orangepi-zero: Enable audio codec J. Neuschäfer via B4 Relay 2025-04-27 5:28 ` Chen-Yu Tsai 2025-04-28 7:26 ` J. Neuschäfer 2025-04-28 8:37 ` Chen-Yu Tsai 2025-04-28 10:58 ` J. Neuschäfer
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).