]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Serialize codec registrations
authorTakashi Iwai <tiwai@suse.de>
Wed, 30 Jan 2019 16:46:03 +0000 (17:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 1 Feb 2019 10:30:09 +0000 (11:30 +0100)
commitac0552c8d50f1bef9b4b4b5a8b4208fbd6a02488
treeb443210ad45be6c9c0b4f7dfdb52a7593cdf647f
parent7b4974d68dabddb711de4c4f9b3eddc0ccbb583b
ALSA: hda - Serialize codec registrations

In the current code, the codec registration may happen both at the
codec bind time and the end of the controller probe time.  In a rare
occasion, they race with each other, leading to Oops due to the still
uninitialized card device.

This patch introduces a simple flag to prevent the codec registration
at the codec bind time as long as the controller probe is going on.
The controller probe invokes snd_card_register() that does the whole
registration task, and we don't need to register each piece
beforehand.

Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hda_codec.h
sound/pci/hda/hda_bind.c
sound/pci/hda/hda_intel.c