diff -N -u r5u870-0.10.0-orig/r5u870_md.c r5u870-0.10.0/r5u870_md.c --- r5u870-0.10.0-orig/r5u870_md.c 2007-10-09 00:47:55.000000000 +0200 +++ r5u870-0.10.0/r5u870_md.c 2007-10-10 20:27:28.000000000 +0200 @@ -66,7 +66,7 @@ #define r5u_dbg(RV, SUBSYS, FMT...) usbcam_dbg((RV)->vh_parent, SUBSYS, FMT) #define R5U870_VERSION KERNEL_VERSION(0,10,0) -#define R5U870_VERSION_EXTRA "" +#define R5U870_VERSION_EXTRA "uuh" struct r5u870_resolution { @@ -2804,6 +2804,18 @@ R5U870_WDM_CTRL_NIGHTMODE, R5U870_WDM_CTRL_LAST, }; +static const int r5u870_1810_183a_ctrls[] = { + /* these are the ones not automatically discovered in uvc controls */ + R5U870_WDM_CTRL_WB_RED, + R5U870_WDM_CTRL_WB_GREEN, + R5U870_WDM_CTRL_WB_BLUE, + R5U870_WDM_CTRL_WB_AUTO, + R5U870_WDM_CTRL_VFLIP, + R5U870_WDM_CTRL_HFLIP, + R5U870_WDM_CTRL_PRIVACY, + R5U870_WDM_CTRL_NIGHTMODE, + R5U870_WDM_CTRL_LAST, +}; /* @@ -2864,6 +2876,7 @@ R5U870_DI_VGP_VCC2_AR2, R5U870_DI_VGP_VCC5, R5U870_DI_VGP_VCC4, + R5U870_DI_VGP_VCC7, R5U870_DI_HP_WEBCAM1K, R5U870_DI_HP_PAVWC_WDM, R5U870_DI_HP_PAVWC_UVC, @@ -2918,6 +2931,13 @@ .rm_wdm_ctrlids = r5u870_1810_1836_ctrls, .rm_uvc = 1, }, + [R5U870_DI_VGP_VCC7] = { + .rm_name = "Sony VGP-VCC7", + .rm_ucode_file = "r5u870_183a.fw", + .rm_ucode_version = 0x0111, + .rm_wdm_ctrlids = r5u870_1810_183a_ctrls, + .rm_uvc = 1, + }, [R5U870_DI_HP_WEBCAM1K] = { .rm_name = "HP Webcam 1000", .rm_ucode_file = "r5u870_1870_1.fw", @@ -3013,6 +3033,7 @@ { R5U870_DEVICE_UVC(0x05CA, 0x1810, R5U870_DI_HP_PAVWC_UVC) }, { R5U870_DEVICE_UVC(0x05CA, 0x1835, R5U870_DI_VGP_VCC5) }, { R5U870_DEVICE_UVC(0x05CA, 0x1836, R5U870_DI_VGP_VCC4) }, + { R5U870_DEVICE_UVC(0x05CA, 0x183a, R5U870_DI_VGP_VCC7) }, }; diff -N -u r5u870-0.10.0-orig/recode-fw.scm r5u870-0.10.0/recode-fw.scm --- r5u870-0.10.0-orig/recode-fw.scm 1970-01-01 01:00:00.000000000 +0100 +++ r5u870-0.10.0/recode-fw.scm 2007-10-10 20:23:31.000000000 +0200 @@ -0,0 +1,92 @@ +#!/usr/bin/guile -s +!# +;; script to extract the firmware from a windows driver file +;; (c) uuh 2007, herewith put into public domain +;; +;; inspection showed that the windows driver file +;; SYSFILE contains blobs of firmware data mixed with the URB request data +;; +;; <1-octet transfer length> for TransferBufferLength +;; <2-octet lsb dest value> for Value slot of request +;; <1-octet index> for Index slot of request +;; For the .fw files that we use we need the 4th octet thrown out, +;; and leave the length in place (since INDEX is always 0x00) + +;; the file that contains the firmware +(define *driverfile* "R5U870FLx86.sys") +;; where to put the result +(define *destfile* "r5u870_183a.fw") +;; start address of firmware data in *DRIVERFILE* +(define *start* 46224) +;; length of data +(define *length* 16981) + +(define *expected-md5sum* #f) + +;;; no user-serviceable parts below + + +;; make sure we get sane byte behaviour +(setlocale LC_ALL "C") + +(use-modules (ice-9 format)) + +(define (read-N-bytes count) + "Read N bytes from CURRENT-INPUT-PORT, failing hard if not enough are there." + (with-output-to-string + (lambda () + (let loop ((remaining count)) + (if (> remaining 0) + (begin (write-char (read-char)) + (loop (- remaining 1)))))))) + +(define (write-N-bytes count data) + "Write N bytes from DATA to CURRENT-OUTPUT-PORT, failing hard if not enough are there." + (with-input-from-string data + (lambda () + (let loop ((remaining count)) + (if (> remaining 0) + (begin (write-char (read-char)) + (loop (- remaining 1)))))))) + +(define (driversegment->fw string) + "Read chunks of from FILE and return a string where the has been dropped." + (with-output-to-string + (lambda () + (with-input-from-string string + (lambda () + (let loop () + (if (eof-object? (peek-char)) + (format (current-error-port) "done~%") + (begin + (let* ((lenbyte (read-char)) + (lenint (char->integer lenbyte)) + (addrbyte1 (read-char)) + (addrbyte2 (read-char)) + (ignoredbyte (read-char)) + (data (read-N-bytes lenint))) + (format (current-error-port) + "~d -> ~x; " lenint + (logior (char->integer addrbyte1) + (* 256 (char->integer addrbyte2)))) + (format #t "~c~c~c" lenbyte addrbyte1 addrbyte2) + (write-N-bytes lenint data) + (loop)))))))))) + +(define (extract-slice file start length) + "Return bytes START through START+LENGTH from FILE as a string" + (with-input-from-file file + (lambda () + (seek (current-input-port) start SEEK_SET) + (read-N-bytes length)))) + +;; main: +(format (current-error-port) + "Decoding firmware from ~A into ~A:~%" *driverfile* *destfile*) +(with-output-to-file *destfile* + (lambda () + (let ((extracted-data (driversegment->fw + (extract-slice *driverfile* *start* *length*)))) + (format (current-error-port) + "Result has length ~d~%" (string-length extracted-data) ) + (write-N-bytes (string-length extracted-data) extracted-data)))) \ No newline at end of file --- r5u870-0.10.0-orig/r5u870_183a.fw.md5sum 1970-01-01 01:00:00.000000000 +0100 +++ r5u870-0.10.0/r5u870_183a.fw.md5sum 2007-10-10 21:16:34.000000000 +0200 @@ -0,0 +1 @@ +fcecd1877b3443f2a771cd6c54eab0f7 r5u870_183a.fw