libusb driver - #10
Conversation
|
Thanks @elmattic ! I pushed a quick edit to make the CI happy, but otherwise it's looking good at a glance. I'll give the fork a proper test on Linux later to see how it's doing. One small thing: can you move the cdtext reference files to a subfolder, |
|
The libusb fork compiled okay on Linux, but it isn't playing nice with my PIONEER BD-RW BDR-X13U drive; a I remember your first PR had trouble identifying my drive and offset, so I suspect that's probably still the case, there's just more error-handling now. Haha. Not sure how helpful it is, but the state before that point looks like this: Is there anything you'd like me to try to help narrow the issue down, or should I just sit back and wait for the PR to bake a bit more? |
|
Great success! I love those hardware errors. So far, I’ve only tested it on my Verbatim Ultra HD 4K Blu-ray Writer (HL-DT-ST BD-RE BU40N). I haven’t had many issues on either macOS or Fedora (that doesn’t mean it’s rock solid, though, as you can see). The first thing I’d check is whether the MMC command for The logic for handling stalls in I’ll keep you posted when I know more. Can you just confirm the error is happening during |
|
Btw, is the error fully reproducible? |
|
As you can see in the MMC payload for Could you simply hardcode the number of tracks on your audio CD? How many have you, 9? We’re asking for 804 bytes, but your drive only has 84 bytes of TOC data. A standards-compliant device should simply return 84 bytes and then the CSW. But optical-drive firmware can be surprisingly quirky. Haha. |
How can we make sure the drive is properly detected and offset correctly set? |
I don't know enough about the BOT protocol yet, but I suspect that some firmware/controllers may also return data in a short packet. In that case, we will need to check the CSW for the residual data bytes and, if the residual is > 0, call |
Optical drives are such quirky little shits. Haha. A
Yeah, failure is pretty immediate when the
Manually changing the
The Rip Rip isn't making it to this stage so I don't know if detection would still be an issue for me or not, but looking at the code I suspect it would be for at least some drives because For the // Vendor might be empty.
let vendor =
if vendor_u8[0] == 0 { "" }
else {
CStr::from_bytes_until_nul(vendor_u8.as_slice())
.ok()
.and_then(|v| v.to_str().ok())?
};
// But model is required.
let model =
if model_u8[0] == 0 { None }
else {
CStr::from_bytes_until_nul(model_u8.as_slice())
.ok()
.and_then(|v| v.to_str().ok())
}?;(
Yeah, me neither. Could be worth looking to see how the libcdio MMC driver handles it. |
|
@elmattic, how would you feel about having proper I've been considering it for a while now, both as a replacement for the current Given how much heavy lifting your driver has to do, I'm thinking it would be better to get that in place sooner rather than later, but wanted to check with you first in case you had any reservations! (As big a change as that would be, I don't think it should pose any particular rebase problems; the driver code is fairly well isolated now. 🤞) |
No description provided.