• Takashi Iwai's avatar
    ALSA: pcm: Don't treat NULL chmap as a fatal error · e6dc243c
    Takashi Iwai authored
    commit 2deaeaf1 upstream.
    
    The standard PCM chmap helper callbacks treat the NULL info->chmap as
    a fatal error and spews the kernel warning with stack trace when
    CONFIG_SND_DEBUG is on.  This was OK, originally it was supposed to be
    always static and non-NULL.  But, as the recent addition of Intel LPE
    audio driver shows, the chmap content may vary dynamically, and it can
    be even NULL when disconnected.  The user still sees the kernel
    warning unnecessarily.
    
    For clearing such a confusion, this patch simply removes the
    snd_BUG_ON() in each place, just returns an error without warning.
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    e6dc243c
pcm_lib.c 71.2 KB