From: Clemens Ladisch <clemens@ladisch.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
alsa-devel@alsa-project.org
Subject: Re: usb: offset in trigger_tstamp?
Date: Fri, 21 Nov 2014 14:28:17 +0100 [thread overview]
Message-ID: <546F3DF1.50205@ladisch.de> (raw)
In-Reply-To: <546E1D3D.50500@linux.intel.com>
Pierre-Louis Bossart wrote:
> I was trying to find a bug in the timestamping logic I am working on
> and after some time I realized the USB audio class driver seems to
> have an issue.
> If I instrument the code in sound/usb/pcm.c, I see a offset of up to
> 6ms between the snd_usb_substream_playback_trigger and
> prepare_playback_urb steps
>
> [45053.102625] trigger_start
> [45053.108320] prepare_playback_urb
>
> My understanding is that empty URBs are submitted in the prepare step
> to avoid underflows, which is fine. The problem with that is that the
> trigger_tstamp value is captured before audio transfers actually start
> and there is a constant offset when trying to track audio/system time
> drifts or do basic a/v sync.
Most other devices have a FIFO that gets filled quickly when the stream
is started. This results in a small offset in the opposite direction.
AFAICS you cannot avoid having an offset when trying to relate the
trigger_tstamp value to the sample clock.
Regards,
Clemens
prev parent reply other threads:[~2014-11-21 13:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-20 9:49 [PATCH] ASoC: samsung: In the i2s_set_sysclk() callback we are currently clearing all bits of the IISMOD register in i2s_set_sysclk. It's due to an incorrect mask used for the AND operation which is introduced in commit a5a56871f804edac93a53b5e871c0e9818fb9033 (ASoC: samsung: add support for exynos7 I2S controller) and also adds the missing break statement Padmavathi Venna
2014-11-20 9:49 ` Padmavathi Venna
2014-11-20 10:08 ` [alsa-devel] " Padma Venkat
2014-11-20 10:08 ` Padma Venkat
2014-11-20 16:56 ` usb: offset in trigger_tstamp? Pierre-Louis Bossart
2014-11-21 13:28 ` Clemens Ladisch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=546F3DF1.50205@ladisch.de \
--to=clemens@ladisch.de \
--cc=alsa-devel@alsa-project.org \
--cc=pierre-louis.bossart@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.