HomeFreeBSD

audio/alsa-plugins: Fix two bugs in ALSA OSS backend.

Description

audio/alsa-plugins: Fix two bugs in ALSA OSS backend.

When computing the oss_pointer() return value, use the application
pointer value as reference, so that ALSA audio applications at any
time don't read/write more audio data than is possible. Following the
cyclic DMA pointer is not a good idea, because it doesn't account for
under- or overruns and this quickly leads to a situation where some
applications may want to write more data, ending in infinite loops.

The SNDCTL_DSP_GET space ioctls operate on buffer fragments. Any
size less than bi.fragsize is reported as zero bytes. Don't set the
water level less than bi.fragsize, because it leads to infinite
polling the way ALSA PCM is working.

Approved by: pi (implicit)

Details

Provenance
hselaskyAuthored on Jan 30 2022, 2:11 PM
Parents
R11:9db869df05ce: graphics/ssocr: Update to 2.22.1
Branches
Unknown
Tags
Unknown