/[pkgs]/rpms/kernel/F-10/alsa-pcm-always-reset-invalid-position.patch
ViewVC logotype

Contents of /rpms/kernel/F-10/alsa-pcm-always-reset-invalid-position.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download) (as text)
Mon Apr 13 18:21:11 2009 UTC (7 months, 1 week ago) by cebbert
Branch: MAIN
CVS Tags: kernel-2_6_29_1-41_fc10, kernel-2_6_29_3-60_fc10, kernel-2_6_29_6-99_fc10, kernel-2_6_29_1-42_fc10, kernel-2_6_29_6-93_fc10, kernel-2_6_29_2-45_rc1_fc10, kernel-2_6_29_2-48_rc1_fc10, kernel-2_6_29_6-97_fc10, kernel-2_6_29_5-84_fc10, kernel-2_6_29_2-55_fc10, kernel-2_6_29_2-52_fc10, kernel-2_6_29_1-36_fc10, kernel-2_6_29_4-72_fc10, kernel-2_6_29_5-88_fc10, kernel-2_6_29_4-75_fc10, kernel-2_6_29_4-80_fc10, kernel-2_6_29_1-30_fc10, kernel-2_6_29_1-38_fc10, HEAD
File MIME type: text/x-patch
Copy ALSA pulseaudio fixes from F-11.
1 From: Takashi Iwai <tiwai@suse.de>
2 Date: Thu, 19 Mar 2009 09:01:47 +0000 (+0100)
3 Subject: ALSA: pcm - Reset invalid position even without debug option
4 X-Git-Url: http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff_plain;h=f28f43ce9ae6573952d2348bb6da859cad762143
5
6 ALSA: pcm - Reset invalid position even without debug option
7
8 Always reset the invalind hw_ptr position returned by the pointer
9 callback. The behavior should be consitent independently from the
10 debug option.
11
12 Also, add the printk_ratelimit() check to avoid flooding debug
13 prints.
14
15 Signed-off-by: Takashi Iwai <tiwai@suse.de>
16 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
17 ---
18
19 diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
20 index 3026547..92ed6d8 100644
21 --- a/sound/core/pcm_lib.c
22 +++ b/sound/core/pcm_lib.c
23 @@ -159,11 +159,15 @@ snd_pcm_update_hw_ptr_pos(struct snd_pcm_substream *substream,
24 pos = substream->ops->pointer(substream);
25 if (pos == SNDRV_PCM_POS_XRUN)
26 return pos; /* XRUN */
27 -#ifdef CONFIG_SND_DEBUG
28 if (pos >= runtime->buffer_size) {
29 - snd_printk(KERN_ERR "BUG: stream = %i, pos = 0x%lx, buffer size = 0x%lx, period size = 0x%lx\n", substream->stream, pos, runtime->buffer_size, runtime->period_size);
30 + if (printk_ratelimit()) {
31 + snd_printd(KERN_ERR "BUG: stream = %i, pos = 0x%lx, "
32 + "buffer size = 0x%lx, period size = 0x%lx\n",
33 + substream->stream, pos, runtime->buffer_size,
34 + runtime->period_size);
35 + }
36 + pos = 0;
37 }
38 -#endif
39 pos -= pos % runtime->min_align;
40 return pos;
41 }

admin@fedoraproject.org
ViewVC Help
Powered by ViewVC 1.1.2