alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Raymond Yau <superquad.vortex2@gmail.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] ALSA: hda: support for wallclock timestamps
Date: Sat, 29 Sep 2012 09:47:24 +0800	[thread overview]
Message-ID: <CAN8ccibY_X4LPdpxkUZVA1ZxonwVcFSp3dTWUgppd6UDnvEp8w@mail.gmail.com> (raw)
In-Reply-To: <1348820142-15822-2-git-send-email-pierre-louis.bossart@linux.intel.com>

>
> Reuse code from clocksource to handle wall clock counter.
> Since wrapparound occurs, the audio timestamp is reinitialized
> to zero on a trigger. Synchronized linked devices will
> start counting from same reference to avoid any drift.

> @@ -2024,6 +2096,22 @@ static int azx_pcm_trigger(struct
snd_pcm_substream *substream, int cmd)
>                         azx_readl(chip, OLD_SSYNC) & ~sbits);
>         else
>                 azx_writel(chip, SSYNC, azx_readl(chip, SSYNC) & ~sbits);
> +       if (start) {
> +               azx_timecounter_init(substream, 0, 0);
> +               if (nsync > 1) {
> +                       cycle_t cycle_last;
> +
> +                       /* same start cycle for master and group */
> +                       azx_dev = get_azx_dev(substream);
> +                       cycle_last = azx_dev->azx_tc.cycle_last;
> +
> +                       snd_pcm_group_for_each_entry(s, substream) {
> +                               if (s->pcm->card != substream->pcm->card)
> +                                       continue;
> +                               azx_timecounter_init(s, 1, cycle_last);
> +                       }
> +               }
> +       }
>         spin_unlock(&chip->reg_lock);
>         return 0;
>  }

Will the timer reinitialise when multistreaming using front panel headphone
, rear panel speakers , digital output and hdmi ?

  parent reply	other threads:[~2012-09-29  1:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  8:15 [PATCH 1/2] ALSA: core: add hooks for audio timestamps Pierre-Louis Bossart
2012-09-28  8:15 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-09-28  9:33   ` Clemens Ladisch
2012-09-29 20:12     ` Pierre-Louis Bossart
2012-09-30 10:12       ` Clemens Ladisch
2012-09-29  1:47   ` Raymond Yau [this message]
2012-09-28  9:33 ` [PATCH 1/2] ALSA: core: add hooks for audio timestamps Clemens Ladisch
2012-09-29 20:17   ` Pierre-Louis Bossart
2012-09-30 10:11     ` Clemens Ladisch
  -- strict thread matches above, loose matches on Subject: below --
2012-06-28 21:12 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-28 21:12 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-06-13 20:26 [PATCH 0/2] RFC: support for audio wall clock Pierre-Louis Bossart
2012-06-13 20:26 ` [PATCH 2/2] ALSA: hda: support for wallclock timestamps Pierre-Louis Bossart
2012-06-14  3:32   ` Wang Xingchao
2012-06-14  4:57     ` Pierre-Louis Bossart
2012-06-14  8:15       ` Clemens Ladisch
2012-06-14 17:01         ` Pierre-Louis Bossart
2012-06-14  7:38   ` Takashi Iwai
2012-06-15 10:02     ` Pierre-Louis Bossart
2012-06-15 10:34       ` Takashi Iwai

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=CAN8ccibY_X4LPdpxkUZVA1ZxonwVcFSp3dTWUgppd6UDnvEp8w@mail.gmail.com \
    --to=superquad.vortex2@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).