Bug in pcm_lib.c ?? (using Xmms)
Hi!
Just updated CVS tree and recompiled. Everything works OK execpt that I got this message in log when using Xmms with ALSA-plugin and OSS-plugin. Using aplay the message dont apear.
Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:110: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../../alsa-kernel/pci/cs46xx/dsp_spos_scb_lib.c:226: cs46xx_dsp_proc_free_scb_desc: freeing PCMReader_SCB0 Dec 8 13:40:16 cactus kernel: ALSA ../../alsa-kernel/pci/cs46xx/dsp_spos_scb_lib.c:226: cs46xx_dsp_proc_free_scb_desc: freeing SrcTask_SCB0
With the ALSA-plugin I got the message only one time, with the OSS-plugin it apears about a 1000 of times. (have not done any changes to the cs46xx driver yet, except what's in current CVS ;) )
/Benny
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 21 lines · Benny Sjostrand
Hi!
Just updated CVS tree and recompiled. Everything works OK execpt that I got this message in log
when using Xmms with ALSA-plugin and OSS-plugin. Using aplay the message dont apear.Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:110: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../alsa-kernel/core/pcm_lib.c:176: BUG: stream = 0, pos = 0x4000, buffer size = 0x4000, period size = 0x200 Dec 8 13:40:16 cactus kernel: ALSA ../../alsa-kernel/pci/cs46xx/dsp_spos_scb_lib.c:226: cs46xx_dsp_proc_free_scb_desc: freeing PCMReader_SCB0 Dec 8 13:40:16 cactus kernel: ALSA
Quoted 7 lines
../../alsa-kernel/pci/cs46xx/dsp_spos_scb_lib.c:226:cs46xx_dsp_proc_free_scb_desc: freeingSrcTask_SCB0With the ALSA-plugin I got the message only one time, with the OSS-plugin it apears about a 1000 of times.
(have not done any changes to the cs46xx driver yet, except what's in current CVS ;) )
It's definitely a bug in CS46xx driver. I've changed the test for the ring buffer pointer to be in range 0 .. buffer_size-1 . pointer equal to buffer_size doesn't make any sense and it should be really zero.
Jaroslav
-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 5 lines
It's definitely a bug in CS46xx driver. I've changed the test for the ring buffer pointer to be in range 0 .. buffer_size-1 . pointer equal to
buffer_sizedoesn't make any sense and it should be really zero.
I believe that this is not a new bug, just undiscovered with previous releases. For the moment I got no idea what possibly could be wrong, depending on which appl. used it only a few times when playbacking a stream.
/Benny
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Quoted 6 lines
It's definitely a bug in CS46xx driver. I've changed the test for the ring buffer pointer to be in range 0 .. buffer_size-1 . pointer equal to
buffer_sizedoesn't make any sense and it should be really zero.
I guess I found a fix for this problem (at least the message disapears from the log) in cs46xx_lib.c in snd_cs46xx_playback_indirect_pointer(...) function:
if (bytes < 0)
bytes += buffer_size;
cpcm->hw_io = ptr;
cpcm->hw_ready -= bytes;
cpcm->sw_io += bytes;
- if (cpcm->sw_io > cpcm->sw_bufsize)
+ if (cpcm->sw_io >= cpcm->sw_bufsize)
cpcm->sw_io -= cpcm->sw_bufsize;
snd_cs46xx_playback_transfer(substream, 0);
I cant hear any difference in sound quality, maybe it's just not posible to hear the difference ... ... and now it's too late, i'll continue tomorrow ...
/Benny
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf