[pulseaudio-discuss] [PATCHv2 56/60] bluetooth: Process source messages for BlueZ 5 cards

João Paulo Rechi Vita jprvita at gmail.com
Fri Sep 13 16:23:44 PDT 2013


On Mon, Aug 19, 2013 at 6:08 AM, Tanu Kaskinen
<tanu.kaskinen at linux.intel.com> wrote:
> On Tue, 2013-08-13 at 01:54 -0300, jprvita at gmail.com wrote:
>> +        case PA_SOURCE_MESSAGE_GET_LATENCY: {
>> +            pa_usec_t wi, ri;
>> +
>> +            if (u->read_smoother) {
>> +                wi = pa_smoother_get(u->read_smoother, pa_rtclock_now());
>> +                ri = pa_bytes_to_usec(u->read_index, &u->sample_spec);
>> +
>> +                *((pa_usec_t*) data) = (wi > ri ? wi - ri : 0) + u->source->thread_info.fixed_latency;
>
> I don't know why didn't complain about this last time, but I think this
> has the same issue as the sink latency calculation: fixed_latency is
> supposed to be the maximum latency, but here we should report the
> current real latency. Instead of adding fixed_latency here, we should
> only add FIXED_LATENCY_RECORD_A2DP.
>

The same comment as in PA_SINK_MESSAGE_GET_LATENCY applies here. I'll
send a v3 without changing this so we can discuss a little further.

-- 
João Paulo Rechi Vita
http://about.me/jprvita


More information about the pulseaudio-discuss mailing list