[Opalvoip-devel] ALSA glithches
Brought to you by:
csoutheren,
rjongbloed
From: Alexander S. <ale...@gm...> - 2014-05-14 14:43:36
|
I've discovered current trunk produce a lot of sounds artifacts on my system. I see buffer underruns on write and buffer overruns on read from sound system. And sound become quite "clicky". I've tweak buffer size inside sound_alsa.cxx up to m_bufferSize(12800) and underruns/overruns go away. But new with changes conopal starts acts differently. conopal start read and write sound in big batches. Like this: 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.040 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.041 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.041 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.041 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.120 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.120 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.120 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.120 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.120 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.121 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.121 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.121 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.210 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.210 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.210 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.210 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.211 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.211 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.211 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.211 Media Patc...cff9df9700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.287 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.288 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 0:37.288 Media Patc...cff930d700 sound_alsa.cxx(412) ALSA Buffer read 640 640 Same time codectest start working flawlessly (there was a lot of clicking also) and still read/write by one per operation. 0:01.418 Audio:0x7f4a24e31700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:01.418 Audio:0x7f4a24e31700 sound_alsa.cxx(412) ALSA Buffer read 320 320 0:01.419 Audio:0x7f4a24e31700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:01.419 Audio:0x7f4a24e31700 sound_alsa.cxx(412) ALSA Buffer read 320 320 0:01.582 Audio:0x7f4a24e31700 sound_alsa.cxx(355) ALSA Buffer write 320 320 0:01.583 Audio:0x7f4a24e31700 sound_alsa.cxx(412) ALSA Buffer read 320 320 So the logic behind those batch operations must be somethere on a higher levels than ALSA plugin. My question is next: Is it ok for conopal to read in batches? Is there a possibility of time lag for audio? Any thoughts? I will try to play with buffers size next week. See if there is some balance for buffer size between it's size and possible lag. |