Skip to content

Commit

Permalink
ALSA: usb-audio: Clean up check_input_term()
Browse files Browse the repository at this point in the history
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: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Aug 25, 2019
1 parent 744f51e commit e0ccdef
Showing 1 changed file with 209 additions and 192 deletions.
Loading

0 comments on commit e0ccdef

Please sign in to comment.