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

Adrian Stancu adrian.stancu.82 at gmail.com
Fri Feb 22 14:45:07 CET 2008

Hi Clemens,

Thank you very much for helping me!

Using the original module, the momentary frequency is always stalled
at 48000Hz during playback:
vader:~# while sleep 0.3; do grep "Momentary freq"
/proc/asound/card1/stream0; done
    Momentary freq = 48000 Hz (0x6.0000)
    Momentary freq = 48000 Hz (0x6.0000)
    Momentary freq = 48000 Hz (0x6.0000)
    Momentary freq = 48000 Hz (0x6.0000)
    Momentary freq = 48000 Hz (0x6.0000)

 note: I started playback after issuing the command.
So maybe this particular type of interface does not report back
correctly, thus confusing the driver?

After playing with subs->freqm in init_substream_urbs(,,,), the
situation improved dramatically for me, but this is no general fix...
In this case, I get:
Momentary freq = 48001 Hz (0x6.0007) and I get a single little pop
once about 90 seconds, but this is nothing compared to the horrible
sound I normally get when the buffer gets empty.

On Fri, Feb 22, 2008 at 3:09 PM, Clemens Ladisch <clemens at ladisch.de> wrote:
> Adrian Stancu wrote:
>  > I'm using an E-MU 0404 USB interface with the snd-usb-audio module
>  > from alsa 1.0.16, operating in isochronous asynchronous mode. This
>  > interface was producing very annoying click/pop sounds at regular
>  > intervals during playback. Eventually I discovered that the
>  > syncronisation mechanism telling the driver to send audio data faster
>  > or slower to match the interface's consumption speed does not work as
>  > expected, for some reason.
>  The momentary frequency as requested by the device is shown in
>  /proc/asound/card?/stream? (if CONFIG_SND_VERBOSE_PROCFS is enabled).
>  Try something like:
>  while sleep 0.3; do grep "Momentary freq" /proc/asound/card0/stream0; done
>  In theory, once the device has determined its own speed relative to
>  the computer, this value should be nearly constant.  (When a stream has
>  just been started, the requested frequency usually is higher because the
>  device's buffer is empty.)
>  Regards,
>  Clemens

More information about the Alsa-devel mailing list