[linux-sunxi] [PATCH v5 06/20] ASoc: sun4i-i2s: Add 20 and 24 bit support

2020-09-27 Thread Clément Péron
From: Marcus Cooper Extend the functionality of the driver to include support of 20 and 24 bits per sample. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-)

[linux-sunxi] [PATCH v5 17/20] ARM: dts: sun8i-h3: Enable HDMI audio on Orange Pi PC/One

2020-09-27 Thread Clément Péron
From: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-orangepi-one.dts | 8 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts | 8 2 files changed, 16 insertions(+) diff --git

[linux-sunxi] [PATCH v5 18/20] arm64: dts: sun50i-h6-orangepi-3: Enable HDMI audio

2020-09-27 Thread Clément Péron
From: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 8 1 file changed, 8 insertions(+) diff --git

[linux-sunxi] [PATCH v5 00/20] Add Allwinner H3/H5/H6/A64 HDMI audio

2020-09-27 Thread Clément Péron
Hi, This is exactly the same as v4 but with more details in some commit log and also device-tree soundcard and DAI node have been merged. Regards, Clement Change since v4; - add more comment on get_wss() and set_channel_cfg() patch - merge soundcard and DAI HDMI patches Change since v3: - add

[linux-sunxi] [PATCH v5 16/20] arm64: dts: allwinner: Enable HDMI audio on Orange Pi PC 2

2020-09-27 Thread Clément Péron
From: Ondrej Jirman The board has HDMI output, enable audio on it. Signed-off-by: Ondrej Jirman Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts | 8 1 file changed, 8 insertions(+) diff --git

[linux-sunxi] [PATCH v5 04/20] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible

2020-09-27 Thread Clément Péron
From: Jernej Skrabec H6 I2S is very similar to H3, except that it supports up to 16 channels and thus few registers have fields on different position. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron Acked-by: Maxime Ripard Acked-by: Rob Herring ---

[linux-sunxi] [PATCH v5 11/20] arm: dts: sunxi: h3/h5: Add DAI node and soundcard for HDMI

2020-09-27 Thread Clément Péron
From: Marcus Cooper Add the new DAI block for I2S2 which is used for HDMI audio and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the

[linux-sunxi] [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

2020-09-27 Thread Clément Péron
We are actually using a complex formula to just return a bunch of simple values. Also this formula is wrong for sun4i when calling get_wss() the function return 4 instead of 3. Replace this with a simpler switch case. Also drop the i2s params which is unused and return a simple int as returning

[linux-sunxi] [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI

2020-09-27 Thread Clément Péron
From: Jernej Skrabec Add the I2S node used by the HDMI and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the simple-soundcard to do that.

[linux-sunxi] [PATCH v5 01/20] ASoC: sun4i-i2s: Add support for H6 I2S

2020-09-27 Thread Clément Péron
From: Jernej Skrabec H6 I2S is very similar to that in H3, except it supports up to 16 channels. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 224 1 file changed, 224

[linux-sunxi] [PATCH v5 19/20] arm64: defconfig: Enable Allwinner i2s driver

2020-09-27 Thread Clément Péron
Enable Allwinner I2S driver for arm64 defconfig. Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 63003ec116ee..9a3c3bbe60e4 100644 ---

[linux-sunxi] [PATCH v5 08/20] ASoC: sun4i-i2s: Fix setting of FIFO modes

2020-09-27 Thread Clément Péron
From: Samuel Holland Because SUN4I_I2S_FIFO_CTRL_REG is volatile, writes done while the regmap is cache-only are ignored. To work around this, move the configuration to a callback that runs while the ASoC core has a runtime PM reference to the device. Signed-off-by: Samuel Holland

[linux-sunxi] [PATCH v5 07/20] ASoC: sun4i-i2s: Fix sun8i volatile regs

2020-09-27 Thread Clément Péron
The FIFO TX reg is volatile and sun8i i2s register mapping is different from sun4i. Even if in this case it's doesn't create an issue, Avoid setting some regs that are undefined in sun8i. Signed-off-by: Clément Péron Acked-by: Maxime Ripard --- sound/soc/sunxi/sun4i-i2s.c | 15 +++

[linux-sunxi] [PATCH v5 15/20] arm64: dts: allwinner: a64: Add HDMI audio to Pine64

2020-09-27 Thread Clément Péron
From: Marcus Cooper Enable HDMI audio on Pine64. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts

[linux-sunxi] [PATCH v5 12/20] arm64: dts: allwinner: a64: Add DAI node and soundcard for HDMI

2020-09-27 Thread Clément Péron
From: Marcus Cooper Add the new DAI block for I2S2 which is used for HDMI audio and a simple-soundcard to link audio between HDMI and I2S. Note that the HDMI codec requires an inverted frame clock and a fixed I2S width. As there is no such option for I2S we use TDM property of the

[linux-sunxi] [PATCH v5 13/20] arm: sun8i: h3: Add HDMI audio to Orange Pi 2

2020-09-27 Thread Clément Péron
From: Marcus Cooper Enable HDMI audio on the Orange Pi 2. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-orangepi-2.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-2.dts

[linux-sunxi] [PATCH v5 02/20] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-09-27 Thread Clément Péron
As slots and slot_width can be overwritter in case set_tdm() is called. Avoid to have this logic in set_chan_cfg(). Instead pass the required values as params to set_chan_cfg(). This will also avoid a bug when we will enable 20/24bits support, i2s->slot_width is not actually used in the

[linux-sunxi] [PATCH v5 10/20] arm64: dts: allwinner: h6: Enable HDMI sound for Beelink GS1

2020-09-27 Thread Clément Péron
Now that HDMI sound node is available in the SoC dtsi. Enable it for this board. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts

[linux-sunxi] [PATCH v5 05/20] ASoC: sun4i-i2s: Set sign extend sample

2020-09-27 Thread Clément Péron
From: Marcus Cooper On the newer SoCs such as the H3 and A64 this is set by default to transfer a 0 after each sample in each slot. However the A10 and A20 SoCs that this driver was developed on had a default setting where it padded the audio gain with zeros. This isn't a problem while we have

[linux-sunxi] [PATCH v5 14/20] arm: sun8i: h3: Add HDMI audio to Beelink X2

2020-09-27 Thread Clément Péron
From: Marcus Cooper Enable HDMI audio on the Beelink X2. Signed-off-by: Marcus Cooper Signed-off-by: Clément Péron --- arch/arm/boot/dts/sun8i-h3-beelink-x2.dts | 8 1 file changed, 8 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-h3-beelink-x2.dts

[linux-sunxi] [PATCH v5 20/20] ASoC: sun4i-i2s: fix coding-style for callback definition

2020-09-27 Thread Clément Péron
Checkpatch script produces warning: WARNING: function definition argument 'const struct sun4i_i2s *' should also have an identifier name. Let's fix this by adding identifier name to get_bclk_parent_rate() and set_fmt() callback definition. Signed-off-by: Clément Péron ---

Re: [linux-sunxi] [PATCH v5 02/20] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > As slots and slot_width can be overwritter in case set_tdm() is > called. Avoid to have this logic in set_chan_cfg(). It doesn't seem that set_tdm_slot() would get called concurrently with hw_params(), at least not for the simple-card

Re: [linux-sunxi] [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 12:37 PM Chen-Yu Tsai wrote: > > On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > > > We are actually using a complex formula to just return a bunch of > > simple values. Also this formula is wrong for sun4i when calling BTW, it is entirely possible that the

Re: [linux-sunxi] [PATCH v5 01/20] ASoC: sun4i-i2s: Add support for H6 I2S

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > From: Jernej Skrabec > > H6 I2S is very similar to that in H3, except it supports up to 16 > channels. > > Signed-off-by: Jernej Skrabec > Signed-off-by: Marcus Cooper > Signed-off-by: Clément Péron > --- > sound/soc/sunxi/sun4i-i2s.c

Re: [linux-sunxi] [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > From: Jernej Skrabec > > Add the I2S node used by the HDMI and a simple-soundcard to > link audio between HDMI and I2S. > > Note that the HDMI codec requires an inverted frame clock and > a fixed I2S width. As there is no such option for

Re: [linux-sunxi] [PATCH v5 10/20] arm64: dts: allwinner: h6: Enable HDMI sound for Beelink GS1

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > Now that HDMI sound node is available in the SoC dtsi. > Enable it for this board. > > Signed-off-by: Clément Péron Acked-by: Chen-Yu Tsai -- You received this message because you are subscribed to the Google Groups "linux-sunxi"

Re: [linux-sunxi] [PATCH v5 09/20] arm64: dts: allwinner: h6: Add DAI node and soundcard for HDMI

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 1:32 PM Chen-Yu Tsai wrote: > > On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > > > From: Jernej Skrabec > > > > Add the I2S node used by the HDMI and a simple-soundcard to > > link audio between HDMI and I2S. > > > > Note that the HDMI codec requires an

Re: [linux-sunxi] [PATCH v5 03/20] ASoC: sun4i-i2s: Change get_sr() and get_wss() to be more explicit

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > We are actually using a complex formula to just return a bunch of > simple values. Also this formula is wrong for sun4i when calling > get_wss() the function return 4 instead of 3. > > Replace this with a simpler switch case. > > Also drop

Re: [linux-sunxi] [PATCH v5 04/20] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible

2020-09-27 Thread Chen-Yu Tsai
On Mon, Sep 28, 2020 at 3:29 AM Clément Péron wrote: > > From: Jernej Skrabec > > H6 I2S is very similar to H3, except that it supports up to 16 channels > and thus few registers have fields on different position. > > Signed-off-by: Jernej Skrabec > Signed-off-by: Marcus Cooper >