in most_usb.c [309:327]
static int hdm_remove_padding(struct most_dev *mdev, int channel,
struct mbo *mbo)
{
struct most_channel_config *const conf = &mdev->conf[channel];
unsigned int frame_size = get_stream_frame_size(&mdev->dev, conf);
unsigned int j, num_frames;
if (!frame_size)
return -EINVAL;
num_frames = mbo->processed_length / USB_MTU;
for (j = 1; j < num_frames; j++)
memmove(mbo->virt_address + frame_size * j,
mbo->virt_address + USB_MTU * j,
frame_size);
mbo->processed_length = frame_size * num_frames;
return 0;
}