Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: Re: [PATCH 0/3] ALSA: firewire-lib: report extra delay of PCM runtime
Date: Thu, 12 Jan 2023 12:15:35 +0100	[thread overview]
Message-ID: <87h6ww6m20.wl-tiwai@suse.de> (raw)
In-Reply-To: <20230110134933.322794-1-o-takashi@sakamocchi.jp>

On Tue, 10 Jan 2023 14:49:30 +0100,
Takashi Sakamoto wrote:
> 
> For reasons, all drivers in ALSA firewire stack have never reported extra
> delay for the runtime of PCM substream. The main reason is that the
> meaning of extra delay differs depending on driver design. Another
> technical reason is that no kernel API was provided to know the current
> hardware time.
> 
> I realized that the extra delay is helpful to user space PCM applications
> in the case of packet-oriented drivers since the drivers have a gap
> between the current transmission cycle and the latest transmission cycle
> to which the packet is processed (for PCM capture) or scheduled (for PCM
> playback). The amount of PCM frames delivered during the gap is usually
> invisible from the application as is in reported delay.
> 
> A commit baa914cd81f5 ("firewire: add kernel API to access CYCLE_TIME
> register") was already merged into Linux kernel v5.19 or later, and the
> unit drivers can read hardware time and calculate the current isochronous
> cycle. Moreover, a commit f0117128879b ("ALSA: firewire-lib: keep history
> to process isochronous packet") enables to keep the recent history of
> packets, including cycle count and data block count.
> 
> It is ready at last. This patchset adds computation of the extra delay.
> 
> Takashi Sakamoto (3):
>   ALSA: firewire-lib: move parameter for pcm frame multiplier from
>     context payload processing layer
>   ALSA: firewire-lib: obsolete return value from context payload
>     processing layer
>   ALSA: firewire-lib: compute extra delay for runtime of PCM substream

Thanks, applied now.


Takashi

      parent reply	other threads:[~2023-01-12 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 13:49 [PATCH 0/3] ALSA: firewire-lib: report extra delay of PCM runtime Takashi Sakamoto
2023-01-10 13:49 ` [PATCH 1/3] ALSA: firewire-lib: move parameter for pcm frame multiplier from context payload processing layer Takashi Sakamoto
2023-01-10 13:49 ` [PATCH 2/3] ALSA: firewire-lib: obsolete return value " Takashi Sakamoto
2023-01-10 13:49 ` [PATCH 3/3] ALSA: firewire-lib: compute extra delay for runtime of PCM substream Takashi Sakamoto
2023-01-12 11:15 ` Takashi Iwai [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=87h6ww6m20.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=o-takashi@sakamocchi.jp \
    /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