]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ALSA: pcm: fix the fix of the runtime->boundary calculation
authorClemens Ladisch <clemens@ladisch.de>
Fri, 21 May 2010 07:15:59 +0000 (09:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:00 +0000 (11:22 -0700)
commit8882ac1b4eb11bd9031af3710193534f18f16c2e
tree48ae6424ea3faefed362e11bc694ce6b08884e40
parent945fb1b1535c71df6d3ac4c1a52149662515d854
ALSA: pcm: fix the fix of the runtime->boundary calculation

commit ead4046b2fdfd69acc4272e693afd249ad3eb689 upstream.

Commit 7910b4a1db63fefc3d291853d33c34c5b6352e8e in 2.6.34 changed the
runtime->boundary calculation to make this value a multiple of both the
buffer_size and the period_size, because the latter is assumed by the
runtime->hw_ptr_interrupt calculation.

However, due to the lack of a ioctl that could read the software
parameters before they are set, the kernel requires that alsa-lib
calculates the boundary value, too.  The changed algorithm leads to
a different boundary value used by alsa-lib, which makes, e.g., mplayer
fail to play a 44.1 kHz file because the silence_size parameter is now
invalid; bug report:
<https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5015>.

This patch reverts the change to the boundary calculation, and instead
fixes the hw_ptr_interrupt calculation to be period-aligned regardless
of the boundary value.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/core/pcm_lib.c
sound/core/pcm_native.c