• Takashi Iwai's avatar
    ALSA: hda - Skip jack and others for non-existing PCM streams · 8a7d6003
    Takashi Iwai authored
    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: 9152085d ("ALSA: hda - add DP MST audio support")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    8a7d6003
patch_hdmi.c 104 KB