Skip to content

Commit c6aeb7d

Browse files
koalobroonie
authored andcommitted
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. Signed-off-by: Florian Meier <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 6ce4eac commit c6aeb7d

File tree

6 files changed

+928
-0
lines changed

6 files changed

+928
-0
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
* Broadcom BCM2835 SoC I2S/PCM module
2+
3+
Required properties:
4+
- compatible: "brcm,bcm2835-i2s"
5+
- reg: A list of base address and size entries:
6+
* The first entry should cover the PCM registers
7+
* The second entry should cover the PCM clock registers
8+
- dmas: List of DMA controller phandle and DMA request line ordered pairs.
9+
- dma-names: Identifier string for each DMA request line in the dmas property.
10+
These strings correspond 1:1 with the ordered pairs in dmas.
11+
12+
One of the DMA channels will be responsible for transmission (should be
13+
named "tx") and one for reception (should be named "rx").
14+
15+
Example:
16+
17+
bcm2835_i2s: i2s@7e203000 {
18+
compatible = "brcm,bcm2835-i2s";
19+
reg = <0x7e203000 0x20>,
20+
<0x7e101098 0x02>;
21+
22+
dmas = <&dma 2>,
23+
<&dma 3>;
24+
dma-names = "tx", "rx";
25+
};

sound/soc/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ config SND_SOC_GENERIC_DMAENGINE_PCM
3333
# All the supported SoCs
3434
source "sound/soc/atmel/Kconfig"
3535
source "sound/soc/au1x/Kconfig"
36+
source "sound/soc/bcm/Kconfig"
3637
source "sound/soc/blackfin/Kconfig"
3738
source "sound/soc/cirrus/Kconfig"
3839
source "sound/soc/davinci/Kconfig"

sound/soc/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ obj-$(CONFIG_SND_SOC) += codecs/
1010
obj-$(CONFIG_SND_SOC) += generic/
1111
obj-$(CONFIG_SND_SOC) += atmel/
1212
obj-$(CONFIG_SND_SOC) += au1x/
13+
obj-$(CONFIG_SND_SOC) += bcm/
1314
obj-$(CONFIG_SND_SOC) += blackfin/
1415
obj-$(CONFIG_SND_SOC) += cirrus/
1516
obj-$(CONFIG_SND_SOC) += davinci/

sound/soc/bcm/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config SND_BCM2835_SOC_I2S
2+
tristate "SoC Audio support for the Broadcom BCM2835 I2S module"
3+
depends on ARCH_BCM2835 || COMPILE_TEST
4+
select SND_SOC_DMAENGINE_PCM
5+
select SND_SOC_GENERIC_DMAENGINE_PCM
6+
select REGMAP_MMIO
7+
help
8+
Say Y or M if you want to add support for codecs attached to
9+
the BCM2835 I2S interface. You will also need
10+
to select the audio interfaces to support below.

sound/soc/bcm/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# BCM2835 Platform Support
2+
snd-soc-bcm2835-i2s-objs := bcm2835-i2s.o
3+
4+
obj-$(CONFIG_SND_BCM2835_SOC_I2S) += snd-soc-bcm2835-i2s.o
5+

0 commit comments

Comments
 (0)