]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Add codec on bus address table lately
authorTakashi Iwai <tiwai@suse.de>
Tue, 13 Aug 2019 15:25:39 +0000 (17:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 14 Aug 2019 16:25:16 +0000 (18:25 +0200)
commitd696b1403763192aec30fad49ab9588e1db5fde4
treec374dcb843e2b0dd98190019547e44d7949f22ef
parentbdeba794c2f1b067dc6f029bcf0fd12ff507afa7
ALSA: hda: Add codec on bus address table lately

The call of snd_hdac_bus_add_device() is needed only for registering
the codec onto the bus caddr_tbl[] that is referred essentially only
in the unsol event handler.  That is, the reason of this call and the
release by the counter-part function snd_hdac_bus_remove_device() is
just to assure that the unsol event gets notified to the codec.

But the current implementation of the unsol notification wouldn't work
properly when the codec is still in a premature init state.  So this
patch tries to work around it by delaying the caddr_tbl[] registration
at the point of snd_hdac_device_register().

Also, the order of snd_hdac_bus_remove_device() and device_del() calls
are shuffled to make sure that the unsol event is masked before
deleting the device.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=204565
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_device.c