All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
To: tiwai@suse.de
Cc: alsa-devel@alsa-project.org, clemens@ladisch.de
Subject: Re: [PATCH v3 0/3] ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock of PCM substream
Date: Thu, 10 Jun 2021 12:14:45 +0900	[thread overview]
Message-ID: <20210610031445.GA51001@workstation> (raw)
In-Reply-To: <20210609232230.5963-1-o-takashi@sakamocchi.jp>

Hi,

On Thu, Jun 10, 2021 at 08:22:27AM +0900, Takashi Sakamoto wrote:
> Hi,
> 
> This patchset is revised version of my previous one:
>  * https://lore.kernel.org/alsa-devel/20210609143145.146680-1-o-takashi@sakamocchi.jp/
> 
> All of drivers in ALSA firewire stack have two chances to process
> isochronous packets of any isochronous context; in software IRQ context
> for 1394 OHCI, and in process context of ALSA PCM application.
> 
> In the process context, callbacks of .pointer and .ack are utilized. The
> callbacks are done by ALSA PCM core under acquiring lock of PCM substream,
> 
> In design of ALSA PCM core, call of snd_pcm_period_elapsed() is used for
> drivers to awaken user processes from waiting for available frames. The
> function voluntarily acquires lock of PCM substream, therefore it is not
> called in the process context since it causes dead lock. As a workaround
> to avoid the dead lock, all of drivers in ALSA firewire stack use workqueue
> to delegate the call.
> 
> This patchset is my attempt for the issue. A variant of 
> 'snd_pcm_period_elapsed()' without lock acquisition is going to be added,
> named 'snd_pcm_period_elapsed_under_stream_lock()'. The call is available
> in callbacks of .pointer and .ack of snd_pcm_ops structure.
> 
> Changes from v2:
>  * delete context section from kernel API documentation
> 
> Takashi Sakamoto (3):
>   ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock
>     of PCM substream
>   ALSA: firewire-lib: operate for period elapse event in process context
>   ALSA: firewire-lib: obsolete workqueue for period update
> 
>  include/sound/pcm.h           |  1 +
>  sound/core/pcm_lib.c          | 64 +++++++++++++++++++++++++++--------
>  sound/firewire/amdtp-stream.c | 46 ++++++++-----------------
>  sound/firewire/amdtp-stream.h |  1 -
>  4 files changed, 64 insertions(+), 48 deletions(-)
> 
> -- 
> 2.27.0

Mmm. 4 hours past but the rest of patchset is not delivered. I'll resend
them again just in case...


Regards

Takashi Sakamoto

  reply	other threads:[~2021-06-10  3:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-09 23:22 [PATCH v3 0/3] ALSA: pcm: add snd_pcm_period_elapsed() variant without acquiring lock of PCM substream Takashi Sakamoto
2021-06-10  3:14 ` Takashi Sakamoto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-10  3:17 Takashi Sakamoto
2021-06-10  7:51 ` 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=20210610031445.GA51001@workstation \
    --to=o-takashi@sakamocchi.jp \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=tiwai@suse.de \
    /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.