You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jfdelnero I was wondering about this too. In change 1e6936a I removed the read() for the MTP_REQ_CANCEL case because it was causing a hang, however I found that changing that 0-length read to a 0-length write also works. I am unfamiliar with the actual behavior of the USB driver though, so don't know if doing an "ACK" really requires doing a read, or if that was perhaps a copy/paste error and it was supposed to be a write all along.
OK, though given that there's no further explanation or documentation of the reason for the stall, I can't help but wonder if it's just because of a driver quirk in a 20 year old USB driver (that example code was written over 20 years ago).
In any case, that read in the cancel case was definitely causing the hang that caused the Windows playback problems. It does seem to be device-specific though (as I mentioned in another comment it worked OK both with and without the read on a Rock Pi 4C+), so if it turns out to be necessary on some platforms then it should be put back with a compile-time or run-time option to skip the call.
Hello,
Is this a bug for below code that should use write but not read ?
// Just ACK
status = read (ctx->usb_device, &status, 0);
Thanks a lot!
The text was updated successfully, but these errors were encountered: