[pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-01-31 Thread Georg Chini
This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and contains a lot more changes than the previous versions: - Honor specified latency if possible, if not adjust to the lowest possible value - Smooth switching from fixed latency to dyna

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-05 Thread Alexander E. Patrakov
01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and contains a lot more changes than the previous versions: - Honor specified latency if possible, if not adjust to the lowest possible value - Smoo

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-05 Thread Georg Chini
On 05.02.2015 16:59, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and contains a lot more changes than the previous versions: - Honor specified latency if possibl

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-05 Thread Alexander E. Patrakov
First of all, thanks for a quick and detailed answer. 06.02.2015 02:02, Georg Chini wrote: On 05.02.2015 16:59, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and co

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-06 Thread Georg Chini
On 06.02.2015 08:17, Alexander E. Patrakov wrote: First of all, thanks for a quick and detailed answer. 06.02.2015 02:02, Georg Chini wrote: On 05.02.2015 16:59, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-06 Thread Georg Chini
On 06.02.2015 09:42, Georg Chini wrote: On 06.02.2015 08:17, Alexander E. Patrakov wrote: First of all, thanks for a quick and detailed answer. 06.02.2015 02:02, Georg Chini wrote: On 05.02.2015 16:59, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: This is the final versio

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-06 Thread Alexander E. Patrakov
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 value

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-07 Thread Georg Chini
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

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-07 Thread Alexander E. Patrakov
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 value

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-07 Thread Georg Chini
On 07.02.2015 20:50, 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

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
08.02.2015 02:14, Georg Chini wrote: Sorry, but I do not think the smoother is the problem here. I do get quite reliable latency results. The problem is really (if there is a problem at all) the execution time of the code. These are not asynchronously called functions, they wait until they are fi

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
08.02.2015 13:21, Alexander E. Patrakov wrote: 08.02.2015 02:14, Georg Chini wrote: Sorry, but I do not think the smoother is the problem here. I do get quite reliable latency results. The problem is really (if there is a problem at all) the execution time of the code. These are not asynchronous

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
in the case of timer-based scheduling (where even module-alsa-sink does not trust the result, i.e. discards it if it is greater than the non-transformed time interval). And, if I recollect correctly, there were complaints about it being fooled by batch cards, and they were cited as one of the re

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
I think there is some misunderstanding. Let me repeat in a different way. The smoother works perfectly (both for timer-based scheduling and for the needs of your module) on non-batch cards. But, even for batch cards, where timer-based scheduling is disabled, the smoother is active and is a

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
08.02.2015 17:35, Georg Chini wrote: I think there is some misunderstanding. Let me repeat in a different way. The smoother works perfectly (both for timer-based scheduling and for the needs of your module) on non-batch cards. But, even for batch cards, where timer-based scheduling is disable

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 14:03, Alexander E. Patrakov wrote: 08.02.2015 17:35, Georg Chini wrote: I think there is some misunderstanding. Let me repeat in a different way. The smoother works perfectly (both for timer-based scheduling and for the needs of your module) on non-batch cards. But, even for b

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
08.02.2015 18:50, Georg Chini wrote: On 08.02.2015 14:03, Alexander E. Patrakov wrote: 08.02.2015 17:35, Georg Chini wrote: I think there is some misunderstanding. Let me repeat in a different way. The smoother works perfectly (both for timer-based scheduling and for the needs of your module

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 16:52, Alexander E. Patrakov wrote: OK, then I think there was some misunderstanding on my side. Could you please post some log lines with two USB devices to completely clear this up? I want logs without the stop criterion (which is properly called a "deadband"), and with both 0

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
08.02.2015 22:43, Georg Chini wrote: On 08.02.2015 16:52, Alexander E. Patrakov wrote: OK, then I think there was some misunderstanding on my side. Could you please post some log lines with two USB devices to completely clear this up? I want logs without the stop criterion (which is properly ca

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and contains a lot more changes than the previous versions: - Honor specified latency if possible, if not adjust to the lowest possible value - Smoo

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 19:33, Alexander E. Patrakov wrote: 08.02.2015 22:43, Georg Chini wrote: On 08.02.2015 16:52, Alexander E. Patrakov wrote: OK, then I think there was some misunderstanding on my side. Could you please post some log lines with two USB devices to completely clear this up? I want lo

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
01.02.2015 03:43, Georg Chini wrote: +/* Minimum number of adjust times + 1 needed to adjust at 0.75% deviation from base rate */ +min_cycles = (double)abs(latency_difference) / u->adjust_time / 0.0075 + 1; + +/* Rate calculation, maximum deviation from base rate will be less than 0

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 19:54, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: +/* Minimum number of adjust times + 1 needed to adjust at 0.75% deviation from base rate */ +min_cycles = (double)abs(latency_difference) / u->adjust_time / 0.0075 + 1; + +/* Rate calculation, m

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 20:30, Georg Chini wrote: On 08.02.2015 19:54, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: +/* Minimum number of adjust times + 1 needed to adjust at 0.75% deviation from base rate */ +min_cycles = (double)abs(latency_difference) / u->adjust_time / 0

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Alexander E. Patrakov
09.02.2015 00:35, Georg Chini пишет: On 08.02.2015 20:30, Georg Chini wrote: On 08.02.2015 19:54, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: +/* Minimum number of adjust times + 1 needed to adjust at 0.75% deviation from base rate */ +min_cycles = (double)abs(l

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-08 Thread Georg Chini
On 08.02.2015 19:34, Alexander E. Patrakov wrote: 01.02.2015 03:43, Georg Chini wrote: This is the final version of my patch for module-loopback. It is on top of the patch I sent about an hour ago and contains a lot more changes than the previous versions: - Honor specified latency if possibl

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-22 Thread Alexander E. Patrakov
This is mostly for Tanu's patch-status page. I have split the patch into 11 components and sent the result to Georg privately. I have not done a careful self-review of the resulting components, and can't say that I 100% agree with the result. But there are definitely some things worth cherry-p

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-22 Thread Georg Chini
On 22.02.2015 23:25, Alexander E. Patrakov wrote: This is mostly for Tanu's patch-status page. I have split the patch into 11 components and sent the result to Georg privately. I have not done a careful self-review of the resulting components, and can't say that I 100% agree with the result. B

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-25 Thread Tanu Kaskinen
On Mon, 2015-02-23 at 18:56 +0100, Georg Chini wrote: > On 23.02.2015 08:02, Georg Chini wrote: > > On 22.02.2015 23:25, Alexander E. Patrakov wrote: > > > >> Anyway, the original submission (i.e. the patch that I am replying > >> to) has a bug: it crashes PulseAudio in the Bluetooth A2DP -> HDA

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-25 Thread Georg Chini
On 25.02.2015 17:51, Tanu Kaskinen wrote: On Mon, 2015-02-23 at 18:56 +0100, Georg Chini wrote: On 23.02.2015 08:02, Georg Chini wrote: On 22.02.2015 23:25, Alexander E. Patrakov wrote: Anyway, the original submission (i.e. the patch that I am replying to) has a bug: it crashes PulseAudio in

Re: [pulseaudio-discuss] [PATCH v4] Make module loopback honor requested latency

2015-02-25 Thread Tanu Kaskinen
On Wed, 2015-02-25 at 18:48 +0100, Georg Chini wrote: > On 25.02.2015 17:51, Tanu Kaskinen wrote: > > If there was the kind of function that you propose, would it return > > false in this scenario? If so, that would just make module-alsa-card.c > > kill the sink input, because it's not going to can