This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] gspca - nw80x: Get the sensor ID when bridge et31x110
Author:  Jean-François Moine <moin...@free.fr>
Date:    Tue Mar 22 06:07:40 2011 -0300

Signed-off-by: Jean-François Moine <moin...@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mche...@redhat.com>

 drivers/media/video/gspca/nw80x.c |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=b11cf61ffeee1b2ae42e368f9e9e2ffe7ebfcedf

diff --git a/drivers/media/video/gspca/nw80x.c 
b/drivers/media/video/gspca/nw80x.c
index cfab897..b6d7c8d 100644
--- a/drivers/media/video/gspca/nw80x.c
+++ b/drivers/media/video/gspca/nw80x.c
@@ -1768,6 +1768,8 @@ static int sd_config(struct gspca_dev *gspca_dev,
         * If 0x0500 does not exist => NW802
         * If it does, test 0x109b. If it doesn't exist,
         * then it's a NW801. Else, a NW800
+        * If a et31x110 (nw800 and 06a5:d800)
+        *      get the sensor ID
         */
        if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) {
                sd->bridge = BRIDGE_NW802;
@@ -1777,6 +1779,24 @@ static int sd_config(struct gspca_dev *gspca_dev,
                sd->bridge = BRIDGE_NW801;
                if (sd->webcam == Generic800)
                        sd->webcam = P35u;
+       } else if (id->idVendor == 0x06a5 && id->idProduct == 0xd800) {
+               reg_r(gspca_dev, 0x0403, 1);            /* GPIO */
+               PDEBUG(D_PROBE, "et31x110 sensor type %02x",
+                               gspca_dev->usb_buf[0]);
+               switch (gspca_dev->usb_buf[0] >> 1) {
+               case 0x00:                              /* ?? */
+                       if (sd->webcam == Generic800)
+                               sd->webcam = SpaceCam;
+                       break;
+               case 0x01:                              /* Hynix? */
+                       if (sd->webcam == Generic800)
+                               sd->webcam = Twinkle;
+                       break;
+               case 0x0a:                              /* Pixart */
+                       if (sd->webcam == Generic800)
+                               sd->webcam = SpaceCam2;
+                       break;
+               }
        }
        if (webcam_chip[sd->webcam] != sd->bridge) {
                err("Bad webcam type %d for NW80%d", sd->webcam, sd->bridge);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to