]> git.sesse.net Git - bmusb/blobdiff - bmusb.cpp
Some corrections about firmware upgrade.
[bmusb] / bmusb.cpp
index 8d0918c2215bd6b750ba015b421d50b4c3f38c72..fb196f38aede4cd8fbdab3c35263c32059dde35b 100644 (file)
--- a/bmusb.cpp
+++ b/bmusb.cpp
@@ -604,8 +604,8 @@ void BMUSBCapture::start_bm_capture()
                printf("  interface %d\n", interface_number);
                const libusb_interface *interface = &config->interface[interface_number];
                for (int altsetting = 0; altsetting < interface->num_altsetting; ++altsetting) {
-                       printf("    alternate setting %d\n", altsetting);
                        const libusb_interface_descriptor *interface_desc = &interface->altsetting[altsetting];
+                       printf("    alternate setting %d\n", interface_desc->bAlternateSetting);
                        for (int endpoint_number = 0; endpoint_number < interface_desc->bNumEndpoints; ++endpoint_number) {
                                const libusb_endpoint_descriptor *endpoint = &interface_desc->endpoint[endpoint_number];
                                printf("        endpoint address 0x%02x\n", endpoint->bEndpointAddress);
@@ -675,6 +675,8 @@ void BMUSBCapture::start_bm_capture()
        //
        //    so only first 16 bits count, and 0x0100 is a mask for ok/stable signal?
        //
+       //    Bottom 16 bits of this register seem to be firmware version number (possibly not all all of them).
+       //
        //    28 and 32 seems to be analog audio input levels (one byte for each of the eight channels).
        //    however, if setting 32 with HDMI embedded audio, it is immediately overwritten back (to 0xe137002a).
        //
@@ -684,6 +686,11 @@ void BMUSBCapture::start_bm_capture()
        //    36 can be set to 0 with no apparent effect (all of this tested on both video and audio),
        //    but the driver sets it to 0x8036802a at some point.
        //
+       //    all of this is on request 214/215. other requests (192, 219,
+       //    222, 223, 224) are used for firmware upgrade. Probably best to
+       //    stay out of it unless you know what you're doing.
+       //
+       //
        // register 16:
        // first byte is 0x39 for a stable 576p60 signal, 0x2d for a stable 720p60 signal, 0x20 for no signal
        //