Add I2S/ADV7511 audio support for ARC AXS10x boards
Subsystems (4)
v5 cover Add I2S/ADV7511 audio support for ARC AXS10x boards
Hi all,
This is v5 of these patches. In this version I dropped the ADV7511 audio patch because, quoting Lars-Peter Clausen:
"The reason why this driver is still out of tree, is because there has been no conclusion yet on how to go forward with the whole HDMI integration. So this is not going to get merged until that issue has been addressed."
So, until that issue is addressed I will not send any ADV7511 audio related patches but if for some reason anyone wants to merge it I can send the pathes again. V4, which includes the ADV7511 audio patches is available at:
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-April/106650.html
Looking forward to your comments!
Best regards,
Jose Miguel Abreu
-----
ARC AXS10x platforms consist of a mainboard with several peripherals. One of those peripherals is an HDMI output port controlled by the ADV7511 transmitter.
This patch set adds I2S audio for the AXS10x platform.
Changes v4 -> v5
* Resolve undefined references when compiling as module
* Dropped adv7511 audio patches
* Use DMA properties in I2S to check which mode to use: PIO or DMA (as suggested by Lars-Peter Clausen)
Changes v3 -> v4:
* Reintroduced custom PCM driver (see note below)
* Use DT boolean to switch between ALSA DMA engine PCM or custom PCM
* Use fifo depth to program I2S FCR
* Update I2S documentation
Changes v2 -> v3:
* Removed pll_config functions (as suggested by Alexey Brodkin)
* Removed HDMI start at adv7511_core (as suggested by Archit Taneja)
* Use NOP functions for adv7511_audio (as suggested by Archit Taneja)
* Added adv7511_audio_exit() function (as suggested by Archit Taneja)
* Moved adv7511 to its own folder (as suggested by Archit Taneja)
* Separated file rename of adv7511_core (as suggested by Emil Velikov)
* Compile adv7511 as module if ALSA SoC is compiled as module
* Load adv7511 audio only if declared in device tree (as suggested by Laurent Pinchart)
* Dropped custom platform driver, using now ALSA DMA engine
* Dropped IRQ handler for I2S
Changes v1 -> v2:
* DT bindings moved to separate patch (as suggested by Alexey Brodkin)
* Removed defconfigs entries (as suggested by Alexey Brodkin)
NOTE:
Although the mainline I2S driver uses ALSA DMA engine, this controller can be built without DMA support so it was necessary to add this custom platform driver so that HDMI audio works in AXS boards.
Jose Abreu (2):
ASoC: dwc: Add custom PCM driver
ASoC: dwc: Update DOCUMENTATION for I2S Driver
.../devicetree/bindings/sound/designware-i2s.txt | 9 +- sound/soc/dwc/Kconfig | 9 + sound/soc/dwc/Makefile | 1 + sound/soc/dwc/designware.h | 71 +++++++ sound/soc/dwc/designware_i2s.c | 94 ++++++--- sound/soc/dwc/designware_pcm.c | 230 +++++++++++++++++++++ 6 files changed, 385 insertions(+), 29 deletions(-) create mode 100644 sound/soc/dwc/designware.h create mode 100644 sound/soc/dwc/designware_pcm.c
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v5 1/2 ASoC: dwc: Add custom PCM driver
HDMI audio support was added to the AXS board using an I2S cpu driver and a custom platform driver.
The platform driver supports two channels @ 16 bits with rates 32k, 44.1k and 48k.
Although the mainline I2S driver uses ALSA DMA engine, this controller can be built without DMA support so it was necessary to add this custom platform driver so that HDMI audio works in AXS boards.
The selection between the use of DMA engine or PIO mode is detected by declaring or not the DMA parameters in the device tree.
---
Changes v4 -> v5:
* Resolve undefined references when compiling as module
* Use DMA properties in I2S to check which mode to use: PIO or DMA (as suggested by Lars-Peter Clausen)
Changes v3 -> v4:
* Reintroduced custom PCM driver
* Use DT boolean to switch between ALSA DMA engine PCM or custom PCM
Changes v2 -> v3:
* Removed pll_config functions (as suggested by Alexey Brodkin)
* Dropped custom platform driver, using now ALSA DMA engine
* Dropped IRQ handler for I2S
No changes v1 -> v2.
sound/soc/dwc/Kconfig | 9 ++ sound/soc/dwc/Makefile | 1 + sound/soc/dwc/designware.h | 71 +++++++++++++ sound/soc/dwc/designware_i2s.c | 94 ++++++++++++----- sound/soc/dwc/designware_pcm.c | 230 +++++++++++++++++++++++++++++++++++++++++ 5 files changed, 378 insertions(+), 27 deletions(-) create mode 100644 sound/soc/dwc/designware.h create mode 100644 sound/soc/dwc/designware_pcm.c
sound/soc/dwc/Kconfig +9 -0
@@ -7,4 +7,13 @@ config SND_DESIGNWARE_I2S Synopsys desigwnware I2S device. The device supports upto maximum of 8 channels each for play and record. +config SND_DESIGNWARE_PCM + tristate "Synopsys I2S PCM Driver" + help + Say Y or M if you want to add support for ALSA ASoC platform driver + using I2S. + + Select this option if you want to be able to create a sound interface + using the I2S device driver as CPU driver. Instead of using ALSA + DMA engine by selecting this driver a custom PCM driver will be used.
sound/soc/dwc/Makefile +1 -0
@@ -1,3 +1,4 @@ # SYNOPSYS Platform Support obj-$(CONFIG_SND_DESIGNWARE_I2S) += designware_i2s.o +obj-$(CONFIG_SND_DESIGNWARE_PCM) += designware_pcm.o
sound/soc/dwc/designware.h new file +71 -0
71 lines not on this page · raw message
sound/soc/dwc/designware_i2s.c +67 -27
142 lines not on this page · raw message
sound/soc/dwc/designware_pcm.c new file +230 -0
230 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 2/2 ASoC: dwc: Update DOCUMENTATION for I2S Driver
In reply to Jose AbreuThis patch updates documentation for the Designware I2S driver.
---
Changes v4 -> v5:
* interrupts is now required property
* Drop 'snps-use-dmaengine' property
This patch was only introduced in v4.
Documentation/devicetree/bindings/sound/designware-i2s.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/designware-i2s.txt +7 -2
@@ -3,14 +3,18 @@ DesignWare I2S controller Required properties: - compatible : Must be "snps,designware-i2s" - reg : Must contain the I2S core's registers location and length + - interrupts: <IRQ> where IRQ is the interrupt number. - clocks : Pairs of phandle and specifier referencing the controller's clocks. The controller expects one clock: the clock used as the sampling rate reference clock sample. - clock-names : "i2sclk" for the sample rate reference clock. + +Optional properties: - dmas: Pairs of phandle and specifier for the DMA channels that are used by the core. The core expects one or two dma channels: one for transmit and - one for receive. - - dma-names : "tx" for the transmit channel, "rx" for the receive channel. + one for receive. Set this parameter if the I2S DMA block is enabled. + - dma-names : "tx" for the transmit channel, "rx" for the receive channel. Set + this parameter if the I2S DMA block is enabled. For more details on the 'dma', 'dma-names', 'clock' and 'clock-names' properties please check:
@@ -23,6 +27,7 @@ Example: soc_i2s: i2s@7ff90000 { compatible = "snps,designware-i2s"; reg = <0x0 0x7ff90000 0x0 0x1000>; + interrupts = <15>; clocks = <&scpi_i2sclk 0>; clock-names = "i2sclk"; #sound-dai-cells = <0>;
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2 v5] ASoC: dwc: Update DOCUMENTATION for I2S Driver
Quoted 6 lines · Jose Abreu
This patch updates documentation for the Designware I2S driver.
---
Quoted 8 lines
Changes v4 -> v5:
* interrupts is now required property
* Drop 'snps-use-dmaengine' propertyThis patch was only introduced in v4.
Documentation/devicetree/bindings/sound/designware-i2s.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html