Skip to contentSkip to conversation

Corrections for pcm_a52 to work with pulseaudio

DISCUSSION GitHub pull_request - opened 1 participant 1 message Mar 18, 2020 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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