ASoC: zx: Add ZTE zx296702 I2S DAI driver
Subsystems (3)
PATCH 1/2 ASoC: zx: Add ZTE zx296702 I2S DAI driver
Add ZTE zx296702 I2S DAI driver
--- sound/soc/zte/Kconfig | 7 + sound/soc/zte/Makefile | 1 + sound/soc/zte/zx296702-i2s.c | 437 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 445 insertions(+) create mode 100644 sound/soc/zte/zx296702-i2s.c
sound/soc/zte/Kconfig +7 -0
@@ -13,3 +13,10 @@ config ZX296702_SPDIF help Say Y or M if you want to add support for codecs attached to the zx296702 spdif interface + +config ZX296702_I2S + bool "ZX296702 i2s" + select ZX_PCM_DMA + help + Say Y or M if you want to add support for codecs attached to the + zx296702 i2s interface
sound/soc/zte/Makefile +1 -0
@@ -1,2 +1,3 @@ obj-$(CONFIG_SND_SOC_ZX296702) += zx296702-pcm.o obj-$(CONFIG_ZX296702_SPDIF) += zx296702-spdif.o +obj-$(CONFIG_ZX296702_I2S) += zx296702-i2s.o
sound/soc/zte/zx296702-i2s.c new file +437 -0
437 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 2/2 dt: Add documentation for the ZTE I2S controller
This patch adds the devicetree documentation for the ZTE zx296702 I2S audio controller.
--- .../devicetree/bindings/sound/zte,zx-i2s.txt | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/zte,zx-i2s.txt
Documentation/devicetree/bindings/sound/zte,zx-i2s.txt new file +44 -0
@@ -0,0 +1,44 @@ +ZTE ZX296702 I2S controller + +Required properties: + - compatible : Must be "zte,zx296702-i2s" + - reg : Must contain I2S core's registers location and length + - clocks : Pairs of phandle and specifier referencing the controller's clocks. + - clock-names: "tx" for the clock to the I2S interface. + - dmas: Pairs of phandle and specifier for the DMA channel that is used by + the core. The core expects two dma channels for transmit. + - dma-names : Must be "tx" and "rx" + +For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties +please check: + * resource-names.txt + * clock/clock-bindings.txt + * dma/dma.txt + +Example: + i2s0: i2s0@0b005000 { + #sound-dai-cells = <0>; + compatible = "zte,zx296702-i2s"; + reg = <0x0b005000 0x1000>; + clocks = <&lsp0clk ZX296702_I2S0_DIV>; + clock-names = "tx"; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + dmas = <&dma 5>, <&dma 6>; + dma-names = "tx", "rx"; + status = "okay"; + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "zx296702_snd"; + simple-audio-card,format = "left_j"; + simple-audio-card,bitclock-master = <&sndcodec>; + simple-audio-card,frame-master = <&sndcodec>; + sndcpu: simple-audio-card,cpu { + sound-dai = <&i2s0>; + }; + + sndcodec: simple-audio-card,codec { + sound-dai = <&acodec>; + }; + };
Signature · 1 line
1.9.1
Mark Brown
maintainerQuoted 1 line · Jun Nie
Add ZTE zx296702 I2S DAI driver
This looks good but depends on the DMA driver and a couple of small nits:
sound/soc/zte/Kconfig config ZX296702_SPDIF · line 18
Quoted 2 lines
sound/soc/zte/Kconfig +2
-0+config ZX296702_I2S + bool "ZX296702 i2s"
I see no reason for this to be bool as opposed to a tristate - why not let people build it as a module?
Review
Quoted 2 lines
(quoted diff) +2
-0+ default: + dev_err(cpu_dai->dev, "Unknwon master/slave format\n");
The driver consistently misspells unknown.
2015-05-22 20:36 GMT+08:00 Mark Brown <[email protected]>:
Quoted 9 lines · Jun Nie
Quoted 1 line
Add ZTE zx296702 I2S DAI driver
This looks good but depends on the DMA driver and a couple of small nits:
sound/soc/zte/Kconfig config ZX296702_SPDIF · line 18
Quoted 2 lines
sound/soc/zte/Kconfig +2
-0+config ZX296702_I2S + bool "ZX296702 i2s"
Quoted 7 lines
I see no reason for this to be bool as opposed to a tristate - why not let people build it as a module?
Review
Quoted 2 lines
(quoted diff) +2
-0+ default: + dev_err(cpu_dai->dev, "Unknwon master/slave format\n");The driver consistently misspells unknown.
Will fix the two issues. Thanks!
Jun