[alsa-devel] [PATCH v2] ASoC: max98090: save and restore SHDN when changing sensitive registers
Mark Brown
broonie at kernel.org
Wed Dec 18 14:26:20 CET 2019
On Fri, Dec 13, 2019 at 02:05:32AM +0800, Tzung-Bi Shih wrote:
> I have no enough resources to test and trace the code temporarily.
> But is it possible:
> - snd_card_new( ) succeed in snd_soc_bind_card( ), so that userspace
> can see the control
This feels like snd_card_new() is being overly enthusiastic here, I'd
expect that we might have other problems elsewhere with that. I'd not
expect userspace to see things until snd_card_register() since between
_new() and that we're in the process of building the card up. Given
this we *will* need to handle partially constructed cards after all,
unless we change the ALSA core. Takashi?
> - code in later snd_soc_bind_card( ) decided to defer the probe
> - soc_cleanup_card_resources( ) may forget to clean the control? (not
> sure about this)
There's going to be a race condition where userspace can see the control
on the partially built card regardless of if it gets cleaned up or not.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20191218/e66ea2ad/attachment-0001.sig>
More information about the Alsa-devel
mailing list