All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jaroslav Kysela <perex@perex.cz>
To: Maxime Ripard <maxime@cerno.tech>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	Dom Cobley <dom@raspberrypi.com>,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
Subject: Re: Context expectations in ALSA
Date: Thu, 22 Oct 2020 12:03:19 +0200	[thread overview]
Message-ID: <30226f94-72e9-34d2-17d0-11d2501053f0@perex.cz> (raw)
In-Reply-To: <20201022095041.44jytaelnlako54w@gilmour.lan>

Dne 22. 10. 20 v 11:50 Maxime Ripard napsal(a):

> So, I'm not really sure what I'm supposed to do here. The drivers
> involved don't appear to be doing anything extraordinary, but the issues
> lockdep report are definitely valid too. What are the expectations in
> terms of context from ALSA when running the callbacks, and how can we
> fix it?

I think that you should set the non-atomic flag and wake up the workqueue or
so from interrupt handler in this case. Call snd_pcm_period_elapsed() from the
workqueue not the interrupt handler context.

						Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

WARNING: multiple messages have this Message-ID (diff)
From: Jaroslav Kysela <perex@perex.cz>
To: Maxime Ripard <maxime@cerno.tech>, Takashi Iwai <tiwai@suse.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org,
	Dave Stevenson <dave.stevenson@raspberrypi.com>,
	linux-kernel@vger.kernel.org,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	Dom Cobley <dom@raspberrypi.com>
Subject: Re: Context expectations in ALSA
Date: Thu, 22 Oct 2020 12:03:19 +0200	[thread overview]
Message-ID: <30226f94-72e9-34d2-17d0-11d2501053f0@perex.cz> (raw)
In-Reply-To: <20201022095041.44jytaelnlako54w@gilmour.lan>

Dne 22. 10. 20 v 11:50 Maxime Ripard napsal(a):

> So, I'm not really sure what I'm supposed to do here. The drivers
> involved don't appear to be doing anything extraordinary, but the issues
> lockdep report are definitely valid too. What are the expectations in
> terms of context from ALSA when running the callbacks, and how can we
> fix it?

I think that you should set the non-atomic flag and wake up the workqueue or
so from interrupt handler in this case. Call snd_pcm_period_elapsed() from the
workqueue not the interrupt handler context.

						Jaroslav

-- 
Jaroslav Kysela <perex@perex.cz>
Linux Sound Maintainer; ALSA Project; Red Hat, Inc.

  reply	other threads:[~2020-10-22 10:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  9:50 Context expectations in ALSA Maxime Ripard
2020-10-22  9:50 ` Maxime Ripard
2020-10-22 10:03 ` Jaroslav Kysela [this message]
2020-10-22 10:03   ` Jaroslav Kysela
2020-10-22 12:57   ` Maxime Ripard
2020-10-22 12:57     ` Maxime Ripard
2020-10-22 13:20     ` Takashi Iwai
2020-10-22 13:20       ` Takashi Iwai
2020-10-22 13:24       ` Maxime Ripard
2020-10-22 13:24         ` Maxime Ripard
2020-10-22 13:31         ` Takashi Iwai
2020-10-22 13:31           ` Takashi Iwai
2020-10-22 13:50 ` Mark Brown
2020-10-22 13:50   ` Mark Brown
2020-10-22 15:39   ` Maxime Ripard
2020-10-22 15:39     ` Maxime Ripard

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=30226f94-72e9-34d2-17d0-11d2501053f0@perex.cz \
    --to=perex@perex.cz \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dom@raspberrypi.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime@cerno.tech \
    --cc=nsaenzjulienne@suse.de \
    --cc=tiwai@suse.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.