[linux-sunxi] [PATCH v7 13/14] dt-bindings: sound: sun4i-i2s: Document H3 with missing RX channel possibility

2020-10-11 Thread Clément Péron
Like A83T the Allwinner H3 doesn't have the DMA reception available for some audio interfaces. As it's already documented for A83T convert this to an enum and add the H3 interface. Acked-by: Rob Herring Signed-off-by: Clément Péron ---

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

2020-10-11 Thread Clément Péron
Hi, Just some minor changes compare to v6. As explain in v6 there is no more HDMI soundcard, I will try to introduce a dedicated Allwinner soundcard in a next series. Clément Change since v6: - move set_channel_cfg() in first position - convert return value to decimal Change since v5: - Drop

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

2020-10-11 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 v7 14/14] arm: dts: sunxi: h3/h5: Add I2S2 node

2020-10-11 Thread Clément Péron
From: Marcus Cooper Add H3/H5 I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git

[linux-sunxi] [PATCH v7 02/14] ASoC: sun4i-i2s: Add support for H6 I2S

2020-10-11 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 Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 222 1

[linux-sunxi] [PATCH v7 11/14] arm64: dts: allwinner: a64: Add I2S2 node

2020-10-11 Thread Clément Péron
From: Marcus Cooper Add the I2S2 node connected to the HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 14 ++ 1 file changed, 14 insertions(+)

[linux-sunxi] [PATCH v7 05/14] ASoc: sun4i-i2s: Add 20 and 24 bit support

2020-10-11 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 Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- sound/soc/sunxi/sun4i-i2s.c | 11 +-- 1 file changed, 9

[linux-sunxi] [PATCH v7 04/14] ASoC: sun4i-i2s: Set sign extend sample

2020-10-11 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 v7 12/14] arm64: defconfig: Enable Allwinner i2s driver

2020-10-11 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 v7 01/14] ASoC: sun4i-i2s: Change set_chan_cfg() params

2020-10-11 Thread Clément Péron
As slots and slot_width can be set manually using set_tdm(). These values are then kept in sun4i_i2s struct. So we need to check if these values are set or not. This is not done actually and will trigger a bug. For example, if we set to the simple soundcard in the device-tree dai-tdm-slot-width =

[linux-sunxi] [PATCH v7 08/14] ASoC: sun4i-i2s: fix coding-style for callback definition

2020-10-11 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. Acked-by: Maxime Ripard Signed-off-by: Clément Péron

[linux-sunxi] [PATCH v7 07/14] ASoC: sun4i-i2s: Fix setting of FIFO modes

2020-10-11 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 Reviewed-by:

[linux-sunxi] [PATCH v7 10/14] arm64: dts: allwinner: h6: Add I2S1 node

2020-10-11 Thread Clément Péron
From: Jernej Skrabec Add Allwinner H6 I2S1 node connected to HDMI interface. Signed-off-by: Jernej Skrabec Signed-off-by: Marcus Cooper Acked-by: Chen-Yu Tsai Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 13 + 1 file changed, 13 insertions(+)

[linux-sunxi] [PATCH v7 09/14] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible

2020-10-11 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 Acked-by: Maxime Ripard Acked-by: Rob Herring Acked-by: Chen-Yu Tsai

[linux-sunxi] [PATCH v7 06/14] ASoC: sun4i-i2s: Fix sun8i volatile regs

2020-10-11 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. Acked-by: Maxime Ripard Reviewed-by: Chen-Yu Tsai Signed-off-by: Clément Péron ---