-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ALSA: bcm2835: add memory-mapped I/O mode for audio stream
ALSA supports two transfers methods for PCM playback: Read/Write transfer where samples are writtern to the device using standard read and write functions and Direct Read/Write transfers where samples can be written directly to a mapped memory area and the driver is signaled once this has been done. The bcm2835 driver only supported Read/Write transfer method so this patch adds mmap support to the driver. The ARM CPU is not able to directly address the audio device hardware buffer so audio samples are sent to the device using a message passing interface (vchiq). Since hardware buffers can't be directly mapped to user-space memory, an intermediate buffer (using the PCM indirect API) is needed to store the audio samples and push them to the device through videocore. Signed-off-by: Javier Martinez Canillas <[email protected]>
- Loading branch information
Javier Martinez Canillas
committed
Apr 25, 2013
1 parent
24f64ad
commit bad49c2
Showing
2 changed files
with
45 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bad49c2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an API to help me use this capability? The ALSA API doesn't seem to have anything on this. I have written a peak meter routine but it is based on the Squeezelite mmap, which has shortcomings.