[alsa-devel] snd-usb-audio syncronisation problem

Adrian Stancu adrian.stancu.82 at gmail.com
Fri Feb 22 17:49:23 CET 2008


forgot to mention:

vader:~# while sleep 0.05; do grep "Momentary freq"
/proc/asound/card1/stream0 >> out; done

vader:~# cat out | sort | uniq -c
   1272     Momentary freq = 48000 Hz (0x6.0000)
      7     Momentary freq = 48063 Hz (0x6.0200)
vader:~#

On Fri, Feb 22, 2008 at 6:46 PM, Adrian Stancu
<adrian.stancu.82 at gmail.com> wrote:
> Yes!!! the feedback works correctly this way => perfect playback!
>
>  what I had to do was:
>                 [...]
>                 f = combine_quad((u8*)urb->transfer_buffer) & 0x0fffffff;
>                 f /= 8;
>                 if (f >= subs->freqn - subs->freqn / 8 && f <= subs->freqmax) {
>                         spin_lock_irqsave(&subs->lock, flags);
>                         subs->freqm = f;
>                 [...]
>
>  otherwise, the 'if' condition would still not be satisfied.
>  Words can not describe how thankful I am about this one!
>
>  Now, is there a way to incorporate this change into the driver without
>  affecting functionality for other usb audio devices?
>
>
>  On Fri, Feb 22, 2008 at 6:31 PM, Clemens Ladisch <clemens at ladisch.de> wrote:
>
>
> > Adrian Stancu wrote:
>  >  > According to dmesg, the device is running at high speed:
>  >  > usb 1-6: new high speed USB device using ehci_hcd and address 20
>  >  >
>  >
>  > > So, if I convert the freq using the high speed formula, I get a value
>  >  > within the acceptable range,
>  >
>  >  No; the device is high speed, but it sends a full speed feedback value.
>  >
>  >  Please try "subs->freqm = f / 8;"
>  >
>  >
>  >  The value quoted in your previous message was exactly 48000 Hz; please
>  >  check if it ever changes.
>  >
>  >
>  >  Regards,
>  >  Clemens
>  >
>


More information about the Alsa-devel mailing list