From: Robert Rosengren <robert.rosengren@axis.com>
To: Lars-Peter Clausen <lars@metafoo.de>, alsa-devel@alsa-project.org
Cc: Danny Smith <dannys@axis.com>
Subject: Re: [PATCH 1/2] ASoC: adau17x1: Handling of DSP_RUN register during fw setup
Date: Wed, 11 Apr 2018 07:16:23 +0200 [thread overview]
Message-ID: <759283a1-3231-8d45-1237-0378869dece8@axis.com> (raw)
In-Reply-To: <4650baa5-d205-2b99-0222-1b08592afe9c@metafoo.de>
On 04/05/2018 05:44 PM, Lars-Peter Clausen wrote:
> On 04/03/2018 10:05 AM, Robert Rosengren wrote:
>> From: Danny Smith <dannys@axis.com>
>>
>> DSP_RUN needs to be disabled during firmware write otherwise
>> we can end up with undefined behavior if writing to a dsp which
>> is already running firmware.
>>
>
> Good point, thanks.
>
> I believe there is a possible (but rare under normal circumstances) race
> condition here though, where DAPM could run at the same time and
> enable/disable the DSP while the firmware is being loaded.
>
> To avoid this the firmware load sequence should be encapsulated in
> snd_soc_dapm_mutex_lock()/snd_soc_dapm_mutex_unlock().
>
> Pass struct snd_soc_component instead of struct adau to this function and
> then use snd_soc_component_get_dapm() to get the DAPM context.
>
> For the next version of the patches please also add the ASoC maintainers to
> the reciver list since they have to apply the patch. The maintainers are:
>
> Liam Girdwood <lgirdwood@gmail.com>
> Mark Brown <broonie@kernel.org>
>
Thanks for your comments! New patches are already sent for your review :)
/ Robert
>
>> Signed-off-by: Danny Smith <dannys@axis.com>
>> ---
>> sound/soc/codecs/adau17x1.c | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
prev parent reply other threads:[~2018-04-11 5:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-03 8:05 [PATCH 1/2] ASoC: adau17x1: Handling of DSP_RUN register during fw setup Robert Rosengren
2018-04-03 8:05 ` [PATCH 2/2] ASoC: adau17x1: Do not reload dsp-fw if samplerate has not changed Robert Rosengren
2018-04-05 15:33 ` Lars-Peter Clausen
2018-04-05 15:44 ` [PATCH 1/2] ASoC: adau17x1: Handling of DSP_RUN register during fw setup Lars-Peter Clausen
2018-04-11 5:16 ` Robert Rosengren [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=759283a1-3231-8d45-1237-0378869dece8@axis.com \
--to=robert.rosengren@axis.com \
--cc=alsa-devel@alsa-project.org \
--cc=dannys@axis.com \
--cc=lars@metafoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox