linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add support for the internal RK3308 audio codec
@ 2022-09-07 14:21 luca.ceresoli
  2022-09-07 14:21 ` [PATCH 1/8] ASoC: rockchip: rk3308: add internal audio codec bindings luca.ceresoli
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: luca.ceresoli @ 2022-09-07 14:21 UTC (permalink / raw)
  To: alsa-devel, linux-rockchip
  Cc: Luca Ceresoli, devicetree, linux-arm-kernel, linux-kernel,
	Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
	Heiko Stuebner, Jaroslav Kysela, Takashi Iwai,
	Nicolas Frattaroli, Philipp Zabel, Johan Jonker, Chris Morgan

From: Luca Ceresoli <luca.ceresoli@bootlin.com>

This series of patches adds support to use the internal audio codec of the
Rockchip RK3308 SoC. This codec is internally connected to the I2S
peripherals on the same chip, and it has some peculiarities arising from
that interconnection.

For proper bidirectional operation with the internal codec, the I2S
peripheral needs two clock sources (tx and rx), while connection with an
external codec commonly needs only one. Since v5.16 there is a driver for
the I2S in sound/soc/rockchip/rockchip_i2s_tdm.c, but it does not correctly
handle receiving those two clocks via the .set_sysclk op. Patch 5 fixes
that.

However the simple-audio-card and audio-graph-card sound card drivers do
not support calling .set_sysclk twice, thus patch 6 makes the .init op of
struct asoc_simple_priv overridable by a driver in order to be able to call
.set_sysclk twice and thus configure both clocks.

Patch 7 adds the codec driver and patch 8 builds on top of all the above by
implementing a simple RK3308-specific audio card, based on
audio-graph-card. This card sets all the I2S input clocks.

Patches 1-2 add DT bindings for the codec and the card. Patches 3-4 add to
the SoC DT file two I2S controllers (those which are internally connected
to the internal codec) and the codec itself.

Luca

Luca Ceresoli (8):
  ASoC: rockchip: rk3308: add internal audio codec bindings
  ASoC: rockchip: rk3308: add audio card bindings
  arm64: dts: rockchip: add i2s_8ch_2 and i2s_8ch_3
  arm64: dts: rockchip: add the internal audio codec
  ASoC: rockchip: i2s-tdm: Fix clk_id usage in .set_sysclk()
  ASoC: audio-graph: let dai_link->init be overridable
  ASoC: codecs: Add RK3308 internal audio codec driver
  ASoC: rockchip: add new RK3308 sound card

 .../rockchip,rk3308-audio-graph-card.yaml     |   50 +
 .../bindings/sound/rockchip,rk3308-codec.yaml |  102 +
 MAINTAINERS                                   |   14 +
 arch/arm64/boot/dts/rockchip/rk3308.dtsi      |   68 +
 .../dt-bindings/sound/rockchip,rk3308-codec.h |   15 +
 include/sound/simple_card_utils.h             |    1 +
 sound/soc/codecs/Kconfig                      |   11 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/rk3308_codec.c               | 2122 +++++++++++++++++
 sound/soc/codecs/rk3308_codec.h               |  648 +++++
 sound/soc/generic/audio-graph-card.c          |    2 +
 sound/soc/rockchip/Kconfig                    |   14 +
 sound/soc/rockchip/Makefile                   |    1 +
 sound/soc/rockchip/rockchip_i2s_tdm.c         |   18 +-
 sound/soc/rockchip/rockchip_rk3308_card.c     |   97 +
 15 files changed, 3159 insertions(+), 6 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3308-audio-graph-card.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
 create mode 100644 include/dt-bindings/sound/rockchip,rk3308-codec.h
 create mode 100644 sound/soc/codecs/rk3308_codec.c
 create mode 100644 sound/soc/codecs/rk3308_codec.h
 create mode 100644 sound/soc/rockchip/rockchip_rk3308_card.c

-- 
2.34.1


_______________________________________________
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] 22+ messages in thread

end of thread, other threads:[~2022-09-09 23:17 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 14:21 [PATCH 0/8] Add support for the internal RK3308 audio codec luca.ceresoli
2022-09-07 14:21 ` [PATCH 1/8] ASoC: rockchip: rk3308: add internal audio codec bindings luca.ceresoli
2022-09-08 11:53   ` Krzysztof Kozlowski
2022-09-07 14:21 ` [PATCH 2/8] ASoC: rockchip: rk3308: add audio card bindings luca.ceresoli
2022-09-08 11:49   ` Krzysztof Kozlowski
2022-09-08 15:20     ` Luca Ceresoli
2022-09-08 15:28       ` Krzysztof Kozlowski
2022-09-07 14:21 ` [PATCH 3/8] arm64: dts: rockchip: add i2s_8ch_2 and i2s_8ch_3 luca.ceresoli
2022-09-07 14:21 ` [PATCH 4/8] arm64: dts: rockchip: add the internal audio codec luca.ceresoli
2022-09-08 11:53   ` Krzysztof Kozlowski
2022-09-07 14:21 ` [PATCH 5/8] ASoC: rockchip: i2s-tdm: Fix clk_id usage in .set_sysclk() luca.ceresoli
2022-09-08 16:36   ` Mark Brown
2022-09-07 14:21 ` [PATCH 6/8] ASoC: audio-graph: let dai_link->init be overridable luca.ceresoli
2022-09-07 14:21 ` [PATCH 7/8] ASoC: codecs: Add RK3308 internal audio codec driver luca.ceresoli
2022-09-07 19:53   ` kernel test robot
     [not found]   ` <202209082103.F4ICyyHT-lkp@intel.com>
2022-09-08 15:33     ` Luca Ceresoli
2022-09-08 16:27   ` Mark Brown
2022-09-09 17:11     ` Luca Ceresoli
2022-09-09 23:15   ` kernel test robot
2022-09-07 14:21 ` [PATCH 8/8] ASoC: rockchip: add new RK3308 sound card luca.ceresoli
2022-09-07 15:41 ` [PATCH 0/8] Add support for the internal RK3308 audio codec Mark Brown
2022-09-07 17:15   ` Luca Ceresoli

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