Corrections for pcm_a52 to work with pulseaudio

GitHub pull_request - opened github at alsa-project.org
Wed Mar 18 22:53:11 CET 2020


alsa-project/alsa-plugins pull request #8 was opened from amotzkau:

Hi there,

First this is my first contact with ALSA programming, so please excuse any obvious mistakes.

On my computer Pulseaudio didn't work with the pcm_a52 plugin (Digital Surround 5.1 profile in Pulseaudio), everything was played with 30x speed (approximately). So I looked into the cause of this. Pulseaudio uses the zero-copy mmap interface of ALSA and expects that snd_pcm_mmap_commit() will except all frames that snd_pcm_mmap_begin() allowed to send. If snd_pcm_mmap_commit() accepts less frames or none (-EAGAIN) then Pulseaudio didn't remember that or even saved those frames. They were just discarded.

I thought that it would be a sound contract to guarantee that snd_pcm_mmap_commit() will always take those frames. Therefore I looked into pcm_a52, why it doesn't promise that, and changed the a52_pointer() function to offer such a guarantee.

These are my patches to make it work.

Best regards,
Alex

Request URL   : https://github.com/alsa-project/alsa-plugins/pull/8
Patch URL     : https://github.com/alsa-project/alsa-plugins/pull/8.patch
Repository URL: https://github.com/alsa-project/alsa-plugins


More information about the Alsa-devel mailing list