linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] ASoC: sunxi: Add support for audio codec in A23/H3 SoCs
@ 2016-11-12  6:46 Chen-Yu Tsai
  2016-11-12  6:46 ` [PATCH 01/10] ASoC: sunxi: Add bindings for A23/A33/H3 codec's analog path controls Chen-Yu Tsai
                   ` (9 more replies)
  0 siblings, 10 replies; 20+ messages in thread
From: Chen-Yu Tsai @ 2016-11-12  6:46 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Maxime Ripard, Lee Jones, Rob Herring,
	Mark Rutland
  Cc: Chen-Yu Tsai, alsa-devel, linux-arm-kernel, linux-kernel,
	devicetree, Mylene Josserand

Hi everyone,

This series adds support for the audio codec found in Allwinner A23 and
H3 SoCs. The design and data paths are similar to the audio codec found
in earlier SoCs such as the A31. The analog audio paths are symmetrical
with left/right channels and down-mix selectors for mono differential
output.

What deviates from previous SoCs is that the analog path controls have
been moved to a separate control bus, accessed through a message box
like register interface in the PRCM block. This necessitates writing
a separate component driver for it, which is then tied into the sound
card as an ASoC auxiliary device.

Patches 1 and 2 add the binding and driver for the analog path control
block. This is the more complete version. Previously I provided a not
fully tested version to Mylene Josserand from Free Electrons to use
with the A33. Their version was then trimmed down and switched to 
SOC_DAPM_SINGLE controls. Mine implements all the commonly used paths,
and uses the new stereo SOC_DAPM_DOUBLE controls. I also have a separate
patch for "Phone In" in case anyone wants to test them. It is not included
as my hardware does not use that input.

As for the A33, the analog controls are exactly the same as the A23, so
this driver can be reused, but the PCM and DAI bits are completely
different.

Patch 3 adds the analog path controls block to the sun6i-prcm driver as
a sub-device, for the A23. The H3 currently does not use the PRCM driver.

Patch 4 adds PCM and card support for the A23 codec to the sun4i-codec
driver.

Patch 5 adds a device node for the analog path controls block to the A23
dtsi.

Patch 6 adds a device node for the audio codec, and the phandle for the
analog path controls block to the A23 dtsi.

Patch 7 enables the audio codec for the A23 Q8 tablets. On these tablets
the headphone output is driven in DC coupled, or "direct drive", mode.

Patch 8 adds PCM and card support for the H3 codec to the sun4i-codec
driver.

Patch 9 adds device nodes for the audio codec and analog path controls
block to the H3 dtsi.

Patch 10 enables the audio codec on the Orange Pi PC. The audio output
jack on the board is tied to the line out pins on the SoC.


Please take a look and let me know what you think.

In addition, the sun4i-codec driver is getting pretty large. Maybe we
want to split the different parts into different files?


Regards
ChenYu


Chen-Yu Tsai (10):
  ASoC: sunxi: Add bindings for A23/A33/H3 codec's analog path controls
  ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls
  mfd: sun6i-prcm: Add codec analog controls sub-device for Allwinner
    A23
  ASoC: sun4i-codec: Add support for A23 codec
  ARM: dts: sun8i: Add codec analog path controls node in PRCM for
    A23/A33
  ARM: dts: sun8i-a23: Add device node for internal audio codec
  ARM: dts: sun8i-a23: q8-tablet: Enable internal audio codec
  ASoC: sun4i-codec: Add support for H3 codec
  ARM: dts: sun8i-h3: Add device nodes for audio codec and its analog
    controls
  ARM: dts: sun8i-h3: orange-pi-pc: Enable audio codec

 .../devicetree/bindings/sound/sun4i-codec.txt      |  14 +-
 .../bindings/sound/sun8i-codec-analog.txt          |  16 +
 arch/arm/boot/dts/sun8i-a23-a33.dtsi               |   4 +
 arch/arm/boot/dts/sun8i-a23-q8-tablet.dts          |  23 +
 arch/arm/boot/dts/sun8i-a23.dtsi                   |  16 +
 arch/arm/boot/dts/sun8i-h3-orangepi-pc.dts         |   8 +
 arch/arm/boot/dts/sun8i-h3.dtsi                    |  19 +
 drivers/mfd/sun6i-prcm.c                           |  17 +
 sound/soc/sunxi/Kconfig                            |   8 +
 sound/soc/sunxi/Makefile                           |   1 +
 sound/soc/sunxi/sun4i-codec.c                      | 179 ++++++
 sound/soc/sunxi/sun8i-codec-analog.c               | 665 +++++++++++++++++++++
 12 files changed, 968 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
 create mode 100644 sound/soc/sunxi/sun8i-codec-analog.c

-- 
2.10.2

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

end of thread, other threads:[~2016-11-30 18:07 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-12  6:46 [PATCH 00/10] ASoC: sunxi: Add support for audio codec in A23/H3 SoCs Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 01/10] ASoC: sunxi: Add bindings for A23/A33/H3 codec's analog path controls Chen-Yu Tsai
2016-11-15 22:22   ` Rob Herring
2016-11-22 19:13   ` Applied "ASoC: sunxi: Add bindings for A23/A33/H3 codec's analog path controls" to the asoc tree Mark Brown
2016-11-12  6:46 ` [PATCH 02/10] ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls Chen-Yu Tsai
2016-11-22 19:13   ` Applied "ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls" to the asoc tree Mark Brown
     [not found]   ` <901011480052591@web1j.yandex.ru>
2016-11-25  5:45     ` [PATCH 02/10] ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 03/10] mfd: sun6i-prcm: Add codec analog controls sub-device for Allwinner A23 Chen-Yu Tsai
2016-11-21 13:23   ` Lee Jones
2016-11-12  6:46 ` [PATCH 04/10] ASoC: sun4i-codec: Add support for A23 codec Chen-Yu Tsai
2016-11-15 22:23   ` Rob Herring
2016-11-30 18:07   ` Applied "ASoC: sun4i-codec: Add support for A23 codec" to the asoc tree Mark Brown
2016-11-12  6:46 ` [PATCH 05/10] ARM: dts: sun8i: Add codec analog path controls node in PRCM for A23/A33 Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 06/10] ARM: dts: sun8i-a23: Add device node for internal audio codec Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 07/10] ARM: dts: sun8i-a23: q8-tablet: Enable " Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 08/10] ASoC: sun4i-codec: Add support for H3 codec Chen-Yu Tsai
2016-11-15 22:23   ` Rob Herring
2016-11-30 18:07   ` Applied "ASoC: sun4i-codec: Add support for H3 codec" to the asoc tree Mark Brown
2016-11-12  6:46 ` [PATCH 09/10] ARM: dts: sun8i-h3: Add device nodes for audio codec and its analog controls Chen-Yu Tsai
2016-11-12  6:46 ` [PATCH 10/10] ARM: dts: sun8i-h3: orange-pi-pc: Enable audio codec 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).