• Takashi Iwai's avatar
    ALSA: usb-audio: More relaxed check of MIDI jack names · 41c25e19
    Takashi Iwai authored
    The USB audio driver tries to retrieve MIDI jack name strings that can
    be used for rawmidi substream names and sequencer port names, but its
    checking is too strict: often the firmware provides the jack info for
    unexpected directions, and then we miss the info although it's
    present.
    
    In this patch, the code to extract the jack info is changed to allow
    both in and out directions in a single loop.  That is, the former two
    functions to obtain the descriptor pointers for jack in and out are
    changed to a single function that returns iJack of the corresponding
    jack ID, no matter which direction is used.  It's a code
    simplification at the same time as well as the fix.
    
    Fixes: eb596e0f ("ALSA: usb-audio: generate midi streaming substream names from jack names")
    Link: https://lore.kernel.org/r/20240215153144.26047-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    41c25e19
midi.c 71.8 KB