ASoC: Add support for BCM2835
Subsystems (5)
PATCH v4 1/1 ASoC: Add support for BCM2835
This driver adds support for digital audio (I2S)
for the BCM2835 SoC that is used by the
Raspberry Pi. External audio codecs can be
connected to the Raspberry Pi via P5 header.
It relies on cyclic DMA engine support for BCM2835.
---
Minor style improvements compared to PATCHv3.
.../devicetree/bindings/sound/bcm2835-i2s.txt | 25 + sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/bcm/Kconfig | 10 + sound/soc/bcm/Makefile | 5 + sound/soc/bcm/bcm2835-i2s.c | 892 ++++++++++++++++++++ 6 files changed, 934 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/bcm2835-i2s.txt create mode 100644 sound/soc/bcm/Kconfig create mode 100644 sound/soc/bcm/Makefile create mode 100644 sound/soc/bcm/bcm2835-i2s.c
Documentation/devicetree/bindings/sound/bcm2835-i2s.txt new file +25 -0
@@ -0,0 +1,25 @@ +* Broadcom BCM2835 SoC I2S/PCM module + +Required properties: +- compatible: "brcm,bcm2835-i2s" +- reg: A list of base address and size entries: + * The first entry should cover the PCM registers + * The second entry should cover the PCM clock registers +- dmas: List of DMA controller phandle and DMA request line ordered pairs. +- dma-names: Identifier string for each DMA request line in the dmas property. + These strings correspond 1:1 with the ordered pairs in dmas. + + One of the DMA channels will be responsible for transmission (should be + named "tx") and one for reception (should be named "rx"). + +Example: + +bcm2835_i2s: i2s@7e203000 { + compatible = "brcm,bcm2835-i2s"; + reg = <0x7e203000 0x20>, + <0x7e101098 0x02>; + + dmas = <&dma 2>, + <&dma 3>; + dma-names = "tx", "rx"; +};
sound/soc/Kconfig +1 -0
@@ -33,6 +33,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM # All the supported SoCs source "sound/soc/atmel/Kconfig" source "sound/soc/au1x/Kconfig" +source "sound/soc/bcm/Kconfig" source "sound/soc/blackfin/Kconfig" source "sound/soc/cirrus/Kconfig" source "sound/soc/davinci/Kconfig"
sound/soc/Makefile +1 -0
@@ -10,6 +10,7 @@ obj-$(CONFIG_SND_SOC) += codecs/ obj-$(CONFIG_SND_SOC) += generic/ obj-$(CONFIG_SND_SOC) += atmel/ obj-$(CONFIG_SND_SOC) += au1x/ +obj-$(CONFIG_SND_SOC) += bcm/ obj-$(CONFIG_SND_SOC) += blackfin/ obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += davinci/
sound/soc/bcm/Kconfig new file +10 -0
@@ -0,0 +1,10 @@ +config SND_BCM2835_SOC_I2S + tristate "SoC Audio support for the Broadcom BCM2835 I2S module" + depends on ARCH_BCM2835 || COMPILE_TEST + select SND_SOC_DMAENGINE_PCM + select SND_SOC_GENERIC_DMAENGINE_PCM + select REGMAP_MMIO + help + Say Y or M if you want to add support for codecs attached to + the BCM2835 I2S interface. You will also need + to select the audio interfaces to support below.
sound/soc/bcm/Makefile new file +5 -0
@@ -0,0 +1,5 @@ +# BCM2835 Platform Support +snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o + +obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o +
sound/soc/bcm/bcm2835-i2s.c new file +892 -0
892 lines not on this page · raw message
Signature · 5 lines
1.7.9.5 -- 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
sound/soc/bcm/bcm2835-i2s.c line 815
Quoted 4 lines
sound/soc/bcm/bcm2835-i2s.c new file +4
-0+ dev =devm_kzalloc (&pdev->dev,sizeof (*dev), +GFP_KERNEL ); +if (IS_ERR (base)) +return PTR_ERR (base);
Found a typo here, should be IS_ERR(dev) and PTR_ERR(dev).
Is the patch acceptable apart from that now?
Greetings,
Florian
Mark Brown
maintainerQuoted 6 lines · Florian Meier
sound/soc/bcm/bcm2835-i2s.c line 815
Quoted 4 lines
sound/soc/bcm/bcm2835-i2s.c new file +4
-0+ dev =devm_kzalloc (&pdev->dev,sizeof (*dev), +GFP_KERNEL ); +if (IS_ERR (base)) +return PTR_ERR (base);Found a typo here, should be
IS_ERR(dev)andPTR_ERR(dev).
No, it should be a check for NULL and returning -ENOMEM.
Quoted 1 line
Is the patch acceptable apart from that now?
Not looked yet.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20131122/c9136bce/attachment.sig>