Commit graph

8 commits

Author SHA1 Message Date
Hans Petter Selasky
e66a5ac7ef audio/alsa-plugins: Fix more oss_pointer() calculation bugs.
Correctly set the water level based on min_avail to avoid infinite
polling loops.

Applications tested: chrome, musescore, aplay and arecord .

PR:		261767
Approved by:	pi (implicit)
2022-02-08 10:15:40 +01:00
Hans Petter Selasky
472a942f9c 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)
2022-01-30 15:54:47 +01:00
Hans Petter Selasky
fedba31a63 audio/alsa-plugins: Try to cleanup ALSA-OSS backend patch.
Approved by: pi (implicit)
2022-01-29 18:56:52 +01:00
Hans Petter Selasky
2738adad73 audio/alsa-plugins: Merge ALSA-OSS patches to simplify future patching.
Approved by: pi (implicit)
2022-01-29 18:56:52 +01:00
Jan Beich
a185384bd9 audio/alsa-plugins: move r505839 to the correct file
files/alsa-plugins.patch contains an assortment of FreeBSD-specific
improvements that may not work on alternative OSS implementations.
So, restore the ability to exclude the patch for debugging.
2019-12-03 04:33:21 +00:00
Jan Beich
a3f26bc3b9 audio/alsa-plugins: regen via "make makepatch" 2019-12-03 04:33:06 +00:00
Hans Petter Selasky
38b2315add Fix issues with ALSA OSS backend for firefox and chrome.
1) When read() or write() fails due to EAGAIN because no buffer is available or
   buffer is full, return 0 instead of failure. Else clients may simply close
   the device and re-open it instantly chopping the audio.
2) Implement OSS delay function to fix an issue with negative delays.
3) Use at least 16ms of HW buffer by default to avoid jitter.

Approved by:	pi, jbeich
2019-07-04 15:46:15 +00:00
Mathieu Arnold
9fa9eb9ac7 Cleanup patches, a* categories.
Rename them to follow the make makepatch naming, and regenerate them.

With hat:	portmgr
Sponsored by:	Absolight
2016-07-26 16:51:15 +00:00
Renamed from audio/alsa-plugins/files/patch-oss-pcm_oss.c (Browse further)