• Takashi Iwai's avatar
    ALSA: usb-audio: Clean up check_input_term() · e0ccdef9
    Takashi Iwai authored
    The primary changes in this patch are cleanups of __check_input_term()
    and move to a non-nested switch-case block by evaluating the pair of
    UAC version and the unit type, as we've done for parse_audio_unit().
    Also each parser is split into the function for readability.
    
    Now, a slight behavior change by this cleanup is the handling of
    processing and extension units.  Formerly we've dealt with them
    differently between UAC1/2 and UAC3; the latter returns an error if no
    input sources are available, while the former continues to parse.
    
    In this patch, unify the behavior in all cases: when input sources are
    available, it parses recursively, then override the type and the id,
    as well as channel information if not provided yet.
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    e0ccdef9
mixer.c 94.3 KB