#11296 NORM 1.75-so: mmap to snd-mmp2-pcm fails (was: Gstreamer does not work)
Zarro Boogs per Child
bugtracker at laptop.org
Tue Oct 11 12:09:13 EDT 2011
#11296: mmap to snd-mmp2-pcm fails
--------------------------------+-------------------------------------------
Reporter: erikos | Owner: saadia
Type: defect | Status: new
Priority: normal | Milestone: 1.75-software
Component: kernel | Version: Development build as of this date
Resolution: | Keywords:
Next_action: diagnose | Verified: 0
Deployment_affected: | Blockedby:
Blocking: |
--------------------------------+-------------------------------------------
Comment(by dsd):
All of these cases trigger a codepath where the area of physical memory
used for DMA communication with the device is mapped into userspace. The
mmp2_pcm_mmap() function is broken here.
The reason audio works elsewhere is that, for some reason, other codepaths
do not use this direct memory access for audio recording/playback. I
presume there is a good reason for this. Either way, it is good that the
mmap codepath is being used at least in some cases, and it is definitely
broken.
mmp2_pcm_mmap() is broken because it tries to call into the DMA API for
providing a mapping. However, the memory area we use was not allocated
with the DMA API, so that doesn't work. Instead we hardcode a memory area
at 0xe0000000. Mitch says this is the address of the audio SRAM. If I
understand it correctly, this is not actually DMA, it is CPU-driven access
to the device memory.
Here's a patch which maps 0xe0000000 to userspace without using the DMA
API.
--
Ticket URL: <http://dev.laptop.org/ticket/11296#comment:2>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system
More information about the Bugs
mailing list