linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 00/15] ASoC: sun4i-i2s: Updates to the driver
@ 2019-08-14  6:08 codekipper
  2019-08-14  6:08 ` [PATCH v5 01/15] ASoC: sun4i-i2s: Add regmap field to sign extend sample codekipper
                   ` (14 more replies)
  0 siblings, 15 replies; 43+ messages in thread
From: codekipper @ 2019-08-14  6:08 UTC (permalink / raw)
  To: maxime.ripard, wens, linux-sunxi
  Cc: alsa-devel, Marcus Cooper, lgirdwood, linux-kernel, be17068,
	broonie, linux-arm-kernel

From: Marcus Cooper <codekipper@gmail.com>

Hi All,

here is a patch series to add some improvements to the sun4i-i2s driver
found whilst getting slave clocking and hdmi audio working on the newer
SoCs. As the LibreELEC project is progressing extremely well then there
has been some activity getting H6 SoC support with surround sound
working and these changes are also included.

The functionality included with the new patch set has been extended to
cover more sample resolutions, multi-lane data output for HDMI audio
and some bug fixes that have been discovered along the way. I have
changed some of the original reg fields into function calls as this made
it easier to setup for multi-channel audio especially across different
SoCs.

I can see more usage of the tdm property since I last attempted to push
these patches and the examples currently in mainline sort of the opposite
to what I'm trying to achieve. When we first started looking at the i2s
driver, the codecs that we were using allowed for the frame width to be
determined based on the sampling resolution but in most use cases it
seems that a fixed width is required(my highest priority should be to get
HDMI audio support in). We're using the tdm property to override the old
way to calculate the frame width. What I've seen in what has already been
mainlined is that the i2s driver has a frame width that is fixed to 32
bits and this can be overridden using the tdm property.

My test branch for this can be found at
https://github.com/codekipper/linux-sunxi/commits/upstream-i2s , I've been
using a Pine64 to test with; validating the new SoC block with HDMI audio
and ensuring that I've not broken the old block by making sure that the audio
codec still works. If we able to get the first three patches delivered then
that is enough for HDMI audio support on the newer SoCs(H3, A64 etc).

I still need to investigate the FIFO syncing issues which i've not had a
chance to change or address the concerns that broonie and wens brought up.
This change has been moved to the top of the patch stack. I would also like
to make the multi-channel audio and audio mapping more configurable via the
device tree. Currently what is implemented suites our current needs.

BR,
CK

---
v5 changes compared to v4 are:
- removed delivered patches.
- Added more details to commit messages.
- replaced some reg fields with function calls.
- Added DSP_A and DSP_B support for H3 and later SoCs.
- Added support for the Allwinner H6.

v4 changes compared to v3 are:
- Moved patches around so that the more controversial of patches are
  at the top of the stack.
- Added more details to commit messages.
- Fixed 20bit audio PCM format to use 4 bytes.
- Reduced number of flags used to indicate a new SoC.

v3 changes compared to v2 are:
 - added back slave mode changes
 - added back the use of tdm properties
 - changes to regmap and caching
 - removed loopback functionality
 - fixes to the channel offset mask

v2 changes compared to v1 are:
 - removed slave mode changes which didn't set mclk and bclk div.
 - removed use of tdm and now use a dedicated property.
 - fix commit message to better explain reason for sign extending
 - add divider calculations for newer SoCs.
 - add support for multi-lane i2s data output.
 - add support for 20, 24 and 32 bit samples.
 - add loopback property so blocks can be tested without a codec.


---
Jernej Skrabec (3):
  clk: sunxi-ng: h6: Allow I2S to change parent rate
  dt-bindings: ASoC: sun4i-i2s: Add H6 compatible
  ASoC: sun4i-i2s: Add support for H6 I2S

Marcus Cooper (12):
  ASoC: sun4i-i2s: Add regmap field to sign extend sample
  ASoC: sun4i-i2s: Add set_tdm_slot functionality
  ASoC: sun4i-i2s: Correct divider calculations
  ASoC: sun4i-i2s: Support more formats on newer SoCs
  ASoC: sun4i-i2s: Add functions for RX and TX channel offsets
  ASoC: sun4i-i2s: Add functions for RX and TX channel enables
  ASoC: sun4i-i2s: Add functions for RX and TX channel selects
  ASoC: sun4i-i2s: Add functions for channel mapping
  ASoC: sun4i-i2s: Add multi-lane functionality
  ASoC: sun4i-i2s: Add multichannel functionality
  ASoc: sun4i-i2s: Add 20, 24 and 32 bit support
  ASoC: sun4i-i2s: Adjust regmap settings

 .../sound/allwinner,sun4i-a10-i2s.yaml        |   2 +
 drivers/clk/sunxi-ng/ccu-sun50i-h6.c          |   8 +-
 sound/soc/sunxi/sun4i-i2s.c                   | 690 ++++++++++++++----
 3 files changed, 542 insertions(+), 158 deletions(-)

-- 
2.22.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2019-08-21  9:36 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14  6:08 [PATCH v5 00/15] ASoC: sun4i-i2s: Updates to the driver codekipper
2019-08-14  6:08 ` [PATCH v5 01/15] ASoC: sun4i-i2s: Add regmap field to sign extend sample codekipper
2019-08-14  6:43   ` Maxime Ripard
2019-08-14 11:24     ` Code Kipper
2019-08-14  6:08 ` [PATCH v5 02/15] ASoC: sun4i-i2s: Add set_tdm_slot functionality codekipper
2019-08-14  7:09   ` Maxime Ripard
2019-08-16  6:27     ` Code Kipper
2019-08-14  9:30   ` Mark Brown
2019-08-16  6:22     ` Code Kipper
2019-08-14  6:08 ` [PATCH v5 03/15] ASoC: sun4i-i2s: Correct divider calculations codekipper
2019-08-14  7:13   ` Maxime Ripard
2019-08-14  9:31   ` Mark Brown
2019-08-14  6:08 ` [PATCH v5 04/15] ASoC: sun4i-i2s: Support more formats on newer SoCs codekipper
2019-08-14  7:16   ` Maxime Ripard
2019-08-14 11:23     ` Code Kipper
2019-08-14  6:08 ` [PATCH v5 05/15] ASoC: sun4i-i2s: Add functions for RX and TX channel offsets codekipper
2019-08-14  6:08 ` [PATCH v5 06/15] ASoC: sun4i-i2s: Add functions for RX and TX channel enables codekipper
2019-08-14  6:08 ` [PATCH v5 07/15] ASoC: sun4i-i2s: Add functions for RX and TX channel selects codekipper
2019-08-14  6:08 ` [PATCH v5 08/15] ASoC: sun4i-i2s: Add functions for channel mapping codekipper
2019-08-14  6:08 ` [PATCH v5 09/15] clk: sunxi-ng: h6: Allow I2S to change parent rate codekipper
2019-08-21  4:07   ` [linux-sunxi] " Chen-Yu Tsai
2019-08-21  5:52     ` Code Kipper
2019-08-21  6:01       ` Chen-Yu Tsai
2019-08-21  9:19   ` Code Kipper
2019-08-21  9:35     ` [linux-sunxi] " Chen-Yu Tsai
2019-08-14  6:08 ` [PATCH v5 10/15] dt-bindings: ASoC: sun4i-i2s: Add H6 compatible codekipper
2019-08-14  6:08 ` [PATCH v5 11/15] ASoC: sun4i-i2s: Add support for H6 I2S codekipper
2019-08-14  7:57   ` Jernej Škrabec
2019-08-14 11:08     ` Code Kipper
2019-08-14  6:08 ` [PATCH v5 12/15] ASoC: sun4i-i2s: Add multi-lane functionality codekipper
2019-08-14  7:20   ` Maxime Ripard
2019-08-14 11:16     ` Code Kipper
2019-08-14  8:27   ` [linux-sunxi] " Jernej Škrabec
2019-08-14  6:08 ` [PATCH v5 13/15] ASoC: sun4i-i2s: Add multichannel functionality codekipper
2019-08-14  6:08 ` [PATCH v5 14/15] ASoc: sun4i-i2s: Add 20, 24 and 32 bit support codekipper
2019-08-14  8:28   ` [linux-sunxi] " Jernej Škrabec
2019-08-14  9:03     ` Code Kipper
2019-08-14  6:08 ` [PATCH v5 15/15] ASoC: sun4i-i2s: Adjust regmap settings codekipper
2019-08-14  7:20   ` Maxime Ripard
2019-08-14 11:31     ` [linux-sunxi] " Jernej Škrabec
2019-08-14  8:37   ` [linux-sunxi] " Jernej Škrabec
2019-08-14  9:02     ` Code Kipper
2019-08-14 11:31   ` Chen-Yu Tsai

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).