]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
From luigi:
authorariff <ariff@FreeBSD.org>
Mon, 14 Nov 2005 18:20:47 +0000 (18:20 +0000)
committerariff <ariff@FreeBSD.org>
Mon, 14 Nov 2005 18:20:47 +0000 (18:20 +0000)
commit23cbfb6404aad05209d7d6d35f8b2ad124c13cbf
treece3e51b6a365a360443b4e05b50464ea81989544
parent96c796ea3f16c4187623c86aa709b08362521155
From luigi:
In SNDCTL_DSP_SETFRAGMENT, if you specify both read and
write channels, the existing code first acts on the
read channel, but as a side effect it updates the
arguments (maxfrags, fragsz) passed by the caller according
to acceptable values for the read channel, and then uses the
modified values to act on the write channel.
The problem with this approach is that, given a
(maxfrags, fragsz) user-specified value, the actual
values computed by the read and write channels may differ:
e.g. the read channel might want to allocate more fragments
than what the user specified because it has no side-effects
on the delay and it helps in case of slow readers,
whereas the write channel needs to use as few fragments
as possible to keep the audio latency low (very important
with telephony apps).

This patch stores the values computed by the read channel
into temproary variables so the write channel will use
the actual arguments of the ioctl.

This patch is very helpful with telephony apps such as asterisk.

Submitted by: luigi
Approved by: netchild (mentor)
sys/dev/sound/pcm/dsp.c