From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Cezary Rojewski <cezary.rojewski@intel.com>,
alsa-devel@alsa-project.org, broonie@kernel.org
Cc: hdegoede@redhat.com, tiwai@suse.com, amadeuszx.slawinski@linux.intel.com
Subject: Re: [PATCH 2/2] ASoC: Intel: avs: Disconnect substream if suspend or resume fails
Date: Thu, 10 Nov 2022 10:36:19 -0600 [thread overview]
Message-ID: <65f24445-11ed-cd36-4fd2-e326bf877f54@linux.intel.com> (raw)
In-Reply-To: <e4aabd6c-ac79-5e72-9012-2abfbc7515e8@intel.com>
On 11/10/22 10:29, Cezary Rojewski wrote:
> On 2022-11-10 5:18 PM, Pierre-Louis Bossart wrote:
>> On 11/10/22 10:06, Cezary Rojewski wrote:
>
>>> Unless something new has been added/updated, there is no runtime->state
>>> field available. All the PCM code works with runtime->status->state.
>>
>> cd sound/
>>
>> git grep -c 'runtime->state'
>> core/compress_offload.c:27
>
> ...
>
>> git grep -c 'status->state'
>> core/pcm_compat.c:2
>> core/pcm_native.c:4
>
> I see now, thanks. Commit from late September "ALSA: pcm: Avoid
> reference to status->state" add a new field. Will update the code to use
> __snd_pcm_set_state() instead.
>
> My base did not have it yet.
Right, it's relatively recent, and my point is that the helper does use
stream locking when testing the same state you modify. Maybe that's a
red herring but I thought I'd ask.
static void snd_pcm_set_state(struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
snd_pcm_stream_lock_irq(substream);
if (substream->runtime->state != SNDRV_PCM_STATE_DISCONNECTED)
__snd_pcm_set_state(substream->runtime, state);
snd_pcm_stream_unlock_irq(substream);
}
next prev parent reply other threads:[~2022-11-10 16:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 14:13 [PATCH 0/2] ASoC: Intel: avs: DSP recovery and resume fixes Cezary Rojewski
2022-11-10 14:13 ` [PATCH 1/2] ASoC: Intel: avs: Lock substream before snd_pcm_stop() Cezary Rojewski
2022-11-10 14:13 ` [PATCH 2/2] ASoC: Intel: avs: Disconnect substream if suspend or resume fails Cezary Rojewski
2022-11-10 15:39 ` Pierre-Louis Bossart
2022-11-10 16:06 ` Cezary Rojewski
2022-11-10 16:18 ` Pierre-Louis Bossart
2022-11-10 16:29 ` Cezary Rojewski
2022-11-10 16:36 ` Pierre-Louis Bossart [this message]
2022-11-10 16:44 ` Cezary Rojewski
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=65f24445-11ed-cd36-4fd2-e326bf877f54@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=hdegoede@redhat.com \
--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.