[PATCH] echo-cancel: drift compensation timer event now restarts correctly.

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

 



Hi Arun,

I'm having an issue where the drift compensation timer event isn't
restarting when the sink/source state changes to RUNNING.

Some information about my set up: I'm using a usb microphone, my speakers
are plugged into a usb sound card, and I'm running Arch Linux. The
application that I'm using the echo cancel source/sink with is Mumble.

Implementing the above patch fixed it, but now that you mention the state
change callbacks (to be quite honest I didn't look into those at first, I'm
fairly new to pulseaudio), I'll debug it more this week to see what's going
on.

I'm not quite sure what to say when it comes to steps to reproduce. It's a
persistent problem I'm having. Start pulseaudio, load the echo cancel
module, start Mumble with the echo cancel source/sink set to default. I
threw a pa_log_debug into time_callback, and when I check my pulseaudio
log, I only see that debug info once, when the source/sink is first created.

Thanks for the response,
Robert


On Fri, Aug 1, 2014 at 11:39 PM, Arun Raghavan <arun at accosted.net> wrote:

> Hi Robert,
> Thanks for the patch.
>
> On 2 August 2014 05:43, Robert Kolchmeyer <robert.kolchmeyer at gmail.com>
> wrote:
> > The drift compensation timer event now restarts even if the source/sink
> > becomes inactive. This allows the drift compensation to work correctly
> > when the source/sink becomes active again.
> > ---
> >  src/modules/echo-cancel/module-echo-cancel.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/src/modules/echo-cancel/module-echo-cancel.c
> b/src/modules/echo-cancel/module-echo-cancel.c
> > index 9df2899..bba6a2e 100644
> > --- a/src/modules/echo-cancel/module-echo-cancel.c
> > +++ b/src/modules/echo-cancel/module-echo-cancel.c
> > @@ -346,8 +346,10 @@ static void time_callback(pa_mainloop_api *a,
> pa_time_event *e, const struct tim
> >      pa_assert(u->time_event == e);
> >      pa_assert_ctl_context();
> >
> > -    if (!IS_ACTIVE(u))
> > +    if (!IS_ACTIVE(u)){
> > +        pa_core_rttime_restart(u->core, u->time_event, pa_rtclock_now()
> + u->adjust_time);
> >          return;
> > +    }
>
> The timer is already restarted when the sink or source state changes
> to RUNNING (see the state change callbacks a little later on), so this
> patch should effectively be a no-op.
>
> Could you describe the problem you're seeing and possibly steps to
> reproduce it?
>
> Cheers,
> Arun
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20140803/6219cc3e/attachment.html>


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

  Powered by Linux