[PATCH v4] Make module loopback honor requested latency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06.02.2015 11:02, Alexander E. Patrakov wrote:
> 06.02.2015 14:56, Georg Chini wrote:
>> One more thing: There is a systematic error in the adjust_time I could
>> not work around without
>> introducing too much overhead. The latency snapshot varies widely in the
>> execution time, I
>> measured values between 50 us and more than 60 ms. So if the extreme
>> values follow each other
>> you will have one adjust time that is around 60 ms too long and another
>> one which is 60 ms too
>> short. Maybe this also contributes significantly to the (in)stability of
>> regulation.
>
> Thanks for this observation. I will look into it, too.
>
I just ran perf to look at the difference between using module-loopback with
"latency_msec=10" and "latency_msec=6 buffer_latency_msec=4". I cannot
clock down my CPU, it is an Atom board. Top shows about 14% CPU with the
first option and 9% with the second option.
With perf I cannot see where this difference comes from:

latency_msec=10 (everything below 0.5% omitted):
    2,67%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x000000000000985d
    2,11%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x0000000000009855
    1,92%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x000000000000984c
    1,88%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x0000000000009844
    1,71%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x000000000000986d
    1,24%  alsa-sink-ALC88  [snd_hda_intel]             [k] 
0x00000000000000a7
    0,74%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x0000000000009858
    0,66%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x000000000000984f
    0,52%  alsa-sink-ALC88  libspeexdsp.so.1.5.0        [.] 
0x0000000000009861

latency_msec=6 buffer_latency_msec=4 (everything below 0.5% omitted):
    3,51%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x000000000000985d
    2,64%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009855
    2,45%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009844
    2,44%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x000000000000984c
    2,29%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x000000000000986d
    1,83%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009a02
    1,69%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009a11
    0,99%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009858
    0,97%  alsa-sink-ALC88  [snd_hda_intel]           [k] 0x00000000000000a7
    0,87%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x000000000000984f
    0,69%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009a2f
    0,61%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009861
    0,54%  alsa-sink-ALC88  libspeexdsp.so.1.5.0      [.] 0x0000000000009a2c

As there seem to be less overall busy cycles in the second case the 
somewhat higher
(instead of lower as expected) numbers can be explained by that.



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux