]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda - Skip jack and others for non-existing PCM streams
authorTakashi Iwai <tiwai@suse.de>
Wed, 25 Apr 2018 14:19:13 +0000 (16:19 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 25 Apr 2018 14:37:19 +0000 (16:37 +0200)
commit8ae6861ca2c41e51dfa2e4ab2bafdb8138812a63
treee26b05b8015dcb44f16275cbaeaabc92b12a4b45
parentc743654cd200f9897de0e9613433195d071870a3
ALSA: hda - Skip jack and others for non-existing PCM streams

When CONFIG_SND_DYNAMIC_MINORS isn't set, there are only limited
number of devices available, and HD-audio, especially with HDMI/DP
codec, will fail to create more than two devices.

The driver warns about the lack of such devices and skips the PCM
device creations, but the HDMI driver still tries to create the
corresponding JACK, SPDIF and ELD controls even for the non-existing
PCM substreams.  This results in confusion on user-space, and even may
break the operation.

Similarly, Intel HDMI/DP codec builds the ELD notification from i915
graphics driver, and this may be broken if a notification is sent for
the non-existing PCM stream.

This patch adds the check of the existence of the assigned PCM
substream in the both scenarios above, and skips the further operation
if the PCM substream is not assigned.

Fixes: 7030f4eac407 ("ALSA: hda - add DP MST audio support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_hdmi.c