PATCH: gspca-sonixb-led-off.patch
Hi,
* Turn the led of the cam off after plugging in the cam
* Move the probe code from open to config, so that if the probe fails we never register
Signed-off-by Hans de Goede <[email protected]>
Regards,
Hans
* Turn the led of the cam off after plugging in the cam
* Move the probe code from open to config, so that if the probe fails we never register
Signed-off-by Hans de Goede <[email protected]>
linux/drivers/media/video/gspca/sonixb.c +8 -3
@@ -789,6 +789,11 @@struct sd *sd = (struct sd *) gspca_dev;struct cam *cam;int sif =0 ; +const __u8 stop =0x09 ;/* Disable stream turn of LED */ + +reg_r (gspca_dev,0x00 ); +if (gspca_dev->usb_buf[0 ] !=0x10 ) +return -ENODEV ;/* copy the webcam info from the device id */ sd->sensor = (id->driver_info >>24 ) &0xff ;
@@ -821,15 +826,15 @@ sd->autogain =AUTOGAIN_DEF ; sd->freq =FREQ_DEF ; +/* Disable stream turn of LED */ +reg_w (gspca_dev,0x01 , &stop,1 ); +return 0 ; }/* this function is called at open time */ static int sd_open (struct gspca_dev *gspca_dev) { -reg_r (gspca_dev,0x00 ); -if (gspca_dev->usb_buf[0 ] !=0x10 ) -return -ENODEV ;return 0 ; }
--
video4linux-list mailing list
Unsubscribe mailto:[email protected]?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list