Odd behaviour with my driver
I am testing out my driver (for the AICA sound device on the Dreamcast) with mpg123 compiled for OSS only (I am using the oss emulation as I cannot seem to get pure ALSA to work).
For some reason the trigger (and prepare) callbacks are continually being called and this is (afaics) dynamically resizing the runtime buffer to the size of the samples being transferred (in this case 2 periods - one for each channel), which is in turn generating bug reports such as the one below:
ALSA sound/core/pcm_lib.c:158: BUG: stream = 0, pos = 0x3066, buffer size = 0x2000, period size = 0x400
The hardware buffer is 0x8000 in size and I think that means pos might quite legitamtely go as high as 0x3FFF.
Does any of this make sense and can someone point me to a reason why this might be happening?
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Quoted 2 lines · Adrian McMenamin
For some reason the trigger (and prepare) callbacks are continually being called
When the midlevel code thinks that there is an xrun, it calls stop, prepare, and start.
Quoted 5 lines
ALSA
sound/core/pcm_lib.c:158: BUG: stream = 0, pos =0x3066, buffer size =0x2000, period size =0x400The hardware buffer is
0x8000in size and I think that means pos might quite legitamtely go as high as0x3FFF.
This message shows that the buffer size is 0x2000 frames. If your number 0x8000 is in bytes, then each frame has four bytes.
HTH
Clemens
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Quoted 10 lines · Clemens Ladisch
Quoted 2 lines · Adrian McMenamin
For some reason the trigger (and prepare) callbacks are continually being called
When the midlevel code thinks that there is an xrun, it calls stop, prepare, and start.
Quoted 3 lines
ALSA
sound/core/pcm_lib.c:158: BUG: stream = 0, pos =0x3066, buffer size =0x2000, period size =0x400
Quoted 8 lines
Quoted 2 lines
The hardware buffer is
0x8000in size and I think that means pos might quite legitamtely go as high as0x3FFF.This message shows that the buffer size is
0x2000frames. If your number0x8000is in bytes, then each frame has four bytes.HTH
Thanks. I was wrong about what was going on - as you are correctly pointing out. The problem was that the hardware buffer on two channels was twice as big as on one, so the system was reporting overruns. I adjusted the hardware buffer sizes (in 'firmware') and it Just Worked.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642