[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+Px+wUo7i331kEuc2mjE9uqSna7Lxnua=hvgPc+0T2YdeCgMg@mail.gmail.com>
Date: Thu, 9 Jan 2020 13:11:38 +0800
From: Tzung-Bi Shih <tzungbi@...gle.com>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: ALSA development <alsa-devel@...a-project.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Samsung SOC <linux-samsung-soc@...r.kernel.org>,
Mark Brown <broonie@...nel.org>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Dylan Reid <dgreid@...gle.com>,
Jimmy Cheng-Yi Chiang <cychiang@...gle.com>,
Krzysztof Kozlowski <krzk@...nel.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Subject: Re: [PATCH 1/2] ASoC: max98090: fix incorrect helper in max98090_dapm_put_enum_double()
On Wed, Jan 8, 2020 at 7:50 PM Marek Szyprowski
<m.szyprowski@...sung.com> wrote:
> Fixes: 62d5ae4cafb7 ("ASoC: max98090: save and restore SHDN when changing sensitive registers")
> Signed-off-by: Marek Szyprowski <m.szyprowski@...sung.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@...gle.com>
Thanks for finding and fixing the bug.
The fix also reminded me: there are two possible "context" to call
max98090_dapm_put_enum_double( ): DAPM and userspace mixer control.
- max98090_shdn_save( ) is designed for mixer control because it
acquires dapm_mutex.
- max98090_shdn_save_locked( ) is designed for DAPM without acquiring lock.
Current code:
> +static int max98090_dapm_put_enum_double(struct snd_kcontrol *kcontrol,
[snip]
> + max98090_shdn_save(max98090);
> + ret = snd_soc_dapm_put_enum_double(kcontrol, ucontrol);
> + max98090_shdn_restore(max98090);
Should it cause a deadlock if DAPM calls the
max98090_dapm_put_enum_double( )? I didn't see a deadlock last time I
tested the series. Will do further analysis on this.
Powered by blists - more mailing lists