Skip to content

bcm2835 ALSA driver hardware mixing or mmap? #158

Closed

Description

I want to be able to share the bcm2835 audio among multiple processes. Using the alsa driver alone (latest raspian) fails horribly (lots of crackling/loops/process lockups). I did manage to get it working fairly reliably using PulseAudio after tweaking the buffer settings, however latency is really poor (measured in seconds). I'm not sure if the hardware has native mixing support that the current driver is not properly utilizing? If not the second best solution may be the dmix plugin, which requires mmap support in the driver. Are there plans to add mmap?

Activity

  1. popcornmix commented on Nov 13, 2012

    @popcornmix
    Collaborator

    Patches for mmap support are welcome...

  2. kripton commented on Nov 13, 2012

    @kripton

    Yes, mmap-support would be nice. If anyone wants to do this, here are some hints:
    http://thread.gmane.org/gmane.linux.alsa.devel/50425/focus=50689

    In the meantime (and if it suits your needs), you could try running the "jack-audio-connection-kit" on your Pi as described here:
    http://www.raspberrypi.org/phpBB3/viewtopic.php?p=196500#p196500
    and tell all your applications/processes to use jack (if they support that)

    If your applications do not support audio output via jack, you might try this (doing so on my laptop, not tested on the Pi):
    http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge
    Then you'd basically have:
    Your applications -> ALSA loopback (playback) -> via asoundrc -> ALSA loopback (capture) -> alsa_in -> jack -> alsa_out -> bcm2835 ALSA driver -> HDMI or analog output

  3. martinezjavier commented on Apr 26, 2013

    @martinezjavier
    Contributor

    Hello,

    I've this branch that adds mmap support to the ALSA bcm2835 driver. It also has some (IMHO) improvements to the driver.

    I'll do a few more tests and send a pull request later today. It would be great if I can have some feedback about them.

    Thanks a lot and best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions