Skip to content

Commit

Permalink
bcm2835-i2s: Enable MMAP support via a DT property
Browse files Browse the repository at this point in the history
Code ported from bcm2708-i2s driver in Raspberry Pi tree.

RPi commit 7ee829f ("bcm2708-i2s:
Enable MMAP support via a DT property and overlay")

The i2s driver used to claim to support MMAP, but that feature was disabled
when some problems were found. Add the ability to enable this feature
through Device Tree, using the i2s-mmap overlay.

See: raspberrypi#1004

Signed-off-by: Matthias Reichl <[email protected]>
  • Loading branch information
HiassofT authored and popcornmix committed Aug 23, 2016
1 parent b99821f commit 224a465
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sound/soc/bcm/bcm2835-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ static const struct snd_soc_component_driver bcm2835_i2s_component = {
.name = "bcm2835-i2s-comp",
};

static const struct snd_pcm_hardware bcm2835_pcm_hardware = {
static struct snd_pcm_hardware bcm2835_pcm_hardware = {
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_JOINT_DUPLEX,
.formats = SNDRV_PCM_FMTBIT_S16_LE |
Expand Down Expand Up @@ -835,6 +835,11 @@ static int bcm2835_i2s_probe(struct platform_device *pdev)
}
dma_reg_base = be32_to_cpup(addr);

if (of_property_read_bool(pdev->dev.of_node, "brcm,enable-mmap"))
bcm2835_pcm_hardware.info |=
SNDRV_PCM_INFO_MMAP |
SNDRV_PCM_INFO_MMAP_VALID;

/* Request both ioareas */
for (i = 0; i <= 1; i++) {
void __iomem *base;
Expand Down

0 comments on commit 224a465

Please sign in to comment.