• Takashi Iwai's avatar
    ALSA: seq: ump: Optimize conversions from SysEx to UMP · 952b13c2
    Takashi Iwai authored
    The current conversion from the legacy SysEx event to UMP SysEx packet
    in the sequencer core has a couple of issues:
    
    * The first packet trims the SysEx start byte (0xf0), hence it
      contains only 5 bytes instead of 6.  This isn't wrong, per
      specification, but it's strange not to fill 6 bytes.
    
    * When the SysEx end marker (0xf7) is placed at the first byte of the
      next packet, it'll end up with an empty data just with the END
      status.  It can be rather folded into the previous packet with the
      END status.
    
    This patch tries to address those issues.  The first packet may have 6
    bytes even with the SysEx start, and an empty packet with the SysEx
    end marker is omitted.
    
    Fixes: e9e02819 ("ALSA: seq: Automatic conversion of UMP events")
    Cc: <stable@vger.kernel.org>
    Link: https://patch.msgid.link/20240726143455.3254-1-tiwai@suse.deSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    952b13c2
seq_ump_convert.c 37.7 KB