Okay, nevermind that, I've figured out what's going on. The Clipv2 uses a different chipset and hence has a different USB driver than the iPod. Instead of patching "firmware/target/arm/usb-drv-arc.c" [Which the iPods use], one must patch "firmware/target/arm/as3525/usb-drv-as3525v2.c" and add the `usb_drv_recv_blocking()` function in there, and you'll no longer get compile errors.
Originally Posted by Hellmonkeys
That said, it still doesn't seem to function. I think there must be other things one needs to change in order to get this to work with the AS3525, and I'm not exactly sure what those are.
In order to compile this for the Clipv2, make sure to add in the following function to the usb-drv-as3525v2.c file, after the usb_drv_recv function:
Also, make sure to edit the 'firmware/export/config/sansaclipv2.h' and change the applicable section to this:
int usb_drv_recv_blocking(int ep, void *ptr, int len)
return usb_drv_transfer(ep, ptr, len, false, true);
Again, I must say, I do *NOT* think this works, as there probably needs to be more done for the AS3525. However, either way, it *does* come up as an Unknown Device in Windows. I tried doing the jailbreak with it on the PS3 and it didn't seem to do anything, but I've never jailbroken it with anything before, so it's possible I just screwed that up.
/* enable these for the experimental usb stack */
#define USB_VENDOR_ID 0x0781
#define USB_PRODUCT_ID 0x7435
[EDIT: Yuck, I'm sure there's more that needs changed. At the very least, the "PP502x-only regs..." need changed. Currently I figured out the REG_ENDPTCTRL, but I need to figure out the EPCTRL_TX_DATA_TOGGLE_RST, etc:
Honestly, I'm not too sure what's going on with all this, as I'm not familiar with the coding of USB drivers. But, if anyone can point me in the right direction to complete this port, please let me know.
#define REG_ENDPTCTRL(_x_) (*(volatile unsigned int *)(USB_BASE+0x1c0+4*(_x_)))
#define EPCTRL_TX_DATA_TOGGLE_RST (0x00400000) // in
#define EPCTRL_RX_DATA_TOGGLE_RST (0x00000040) // out
#define DIEPCTL(ep) DEV_REG(0x100 + (ep) * 0x20)
#define REG_ENDPTCTRL(x) DIEPCTL(x)
[Edit #2: Yes, it looks like this all boils down to porting the Endpoint_ResetDataToggle function to the AS3525v2. I (think) I have part of it, but still need to figure out the rest... Bah, I dunno a whole lot about what's going on... would be nice if someone who actually new something about these USB drivers would take a look.
If anyone's curious and wants to try, you can download the '.rockbox' folder you can try on your Clipv2 here: http://www.megaupload.com/?d=HB15N7J2