All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: Dylan Reid <dgreid@chromium.org>, alsa-devel@alsa-project.org
Subject: Re: [PATCH] ALSA: hda - Apply codec delay to wallclock.
Date: Mon, 08 Apr 2013 18:34:27 +0200	[thread overview]
Message-ID: <s5hy5ctx9po.wl%tiwai@suse.de> (raw)
In-Reply-To: <5162F0D0.7050402@linux.intel.com>

At Mon, 08 Apr 2013 11:31:12 -0500,
Pierre-Louis Bossart wrote:
> 
> 
> > +	if (hinfo->ops.get_delay) {
> > +		codec_nsec =
> > +			hinfo->ops.get_delay(hinfo, codec, substream) * 1000000;
> > +		if (stream == SNDRV_PCM_STREAM_CAPTURE)
> > +			nsec = (nsec > codec_nsec) ? nsec - codec_nsec : 0;
> > +		else if (stream == SNDRV_PCM_STREAM_PLAYBACK)
> > +			nsec += codec_nsec;
> 
> Can the .get_delay be modified to provide a better resolution than a ms? 
> If you already convert to time, microseconds would seem like a better 
> fit? Your codec seems to report frames (ie 20.83 us).

Actually the patch must be wrong -- get_delay returns the delay in
frame (sample) unit.


Takashi

  reply	other threads:[~2013-04-08 16:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  0:22 [PATCH] ALSA: hda - Apply codec delay to wallclock Dylan Reid
2013-04-07  7:41 ` Takashi Iwai
2013-04-08 15:44   ` Dylan Reid
2013-04-08 16:31 ` Pierre-Louis Bossart
2013-04-08 16:34   ` Takashi Iwai [this message]
2013-04-08 16:56     ` Dylan Reid
2013-04-08 23:37       ` Pierre-Louis Bossart
2013-04-09  0:05         ` Dylan Reid

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=s5hy5ctx9po.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=dgreid@chromium.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.