diff options
author | Hans de Goede <hdegoede@redhat.com> | 2009-08-14 10:05:38 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:19:58 -0400 |
commit | 5494378911df767d408df28524a19a1617154ea3 (patch) | |
tree | 5cee04aff1f177a550712e373c342007bcdab521 /drivers/media/video/gspca/mr97310a.c | |
parent | 5f5e26b1e6c23f23e9b116a4439437e752e56eb7 (diff) |
V4L/DVB (12622): gspca_mr97310a: make the probing a bit less chatty
gspca_mr97310a: make the probing a bit less chatty
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/mr97310a.c')
-rw-r--r-- | drivers/media/video/gspca/mr97310a.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/media/video/gspca/mr97310a.c b/drivers/media/video/gspca/mr97310a.c index 1a6532fa854..7540ea94e1a 100644 --- a/drivers/media/video/gspca/mr97310a.c +++ b/drivers/media/video/gspca/mr97310a.c | |||
@@ -305,7 +305,8 @@ static int zero_the_pointer(struct gspca_dev *gspca_dev) | |||
305 | if (err_code < 0) | 305 | if (err_code < 0) |
306 | return err_code; | 306 | return err_code; |
307 | } | 307 | } |
308 | PDEBUG(D_ERR, "status is %02x", status); | 308 | if (status != 0x0a) |
309 | PDEBUG(D_ERR, "status is %02x", status); | ||
309 | 310 | ||
310 | tries = 0; | 311 | tries = 0; |
311 | while (tries < 4) { | 312 | while (tries < 4) { |
@@ -321,7 +322,6 @@ static int zero_the_pointer(struct gspca_dev *gspca_dev) | |||
321 | if (err_code < 0) | 322 | if (err_code < 0) |
322 | return err_code; | 323 | return err_code; |
323 | } | 324 | } |
324 | PDEBUG(D_ERR, "Read 16 bytes from camera"); | ||
325 | 325 | ||
326 | data[0] = 0x19; | 326 | data[0] = 0x19; |
327 | err_code = mr_write(gspca_dev, 1); | 327 | err_code = mr_write(gspca_dev, 1); |
@@ -348,8 +348,7 @@ static u8 get_sensor_id(struct gspca_dev *gspca_dev) | |||
348 | if (err_code < 0) | 348 | if (err_code < 0) |
349 | return err_code; | 349 | return err_code; |
350 | 350 | ||
351 | PDEBUG(D_ERR, "Read 16 bytes from camera"); | 351 | PDEBUG(D_PROBE, "Byte zero reported is %01x", gspca_dev->usb_buf[0]); |
352 | PDEBUG(D_ERR, "Byte zero reported is %01x", gspca_dev->usb_buf[0]); | ||
353 | 352 | ||
354 | return gspca_dev->usb_buf[0]; | 353 | return gspca_dev->usb_buf[0]; |
355 | } | 354 | } |
@@ -367,10 +366,6 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
367 | cam->cam_mode = vga_mode; | 366 | cam->cam_mode = vga_mode; |
368 | cam->nmodes = ARRAY_SIZE(vga_mode); | 367 | cam->nmodes = ARRAY_SIZE(vga_mode); |
369 | 368 | ||
370 | PDEBUG(D_PROBE, | ||
371 | "MR97310A camera detected" | ||
372 | " (vid/pid 0x%04X:0x%04X)", id->idVendor, id->idProduct); | ||
373 | |||
374 | if (id->idProduct == 0x010e) { | 369 | if (id->idProduct == 0x010e) { |
375 | sd->cam_type = CAM_TYPE_CIF; | 370 | sd->cam_type = CAM_TYPE_CIF; |
376 | cam->nmodes--; | 371 | cam->nmodes--; |
@@ -401,13 +396,15 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
401 | else | 396 | else |
402 | sd->sensor_type = 0; | 397 | sd->sensor_type = 0; |
403 | 398 | ||
404 | PDEBUG(D_ERR, "Sensor type is %01x", sd->sensor_type); | 399 | PDEBUG(D_PROBE, "MR97310A CIF camera detected, sensor: %d", |
400 | sd->sensor_type); | ||
405 | 401 | ||
406 | if (sd->sensor_type == 0) | 402 | if (sd->sensor_type == 0) |
407 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX) | | 403 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX) | |
408 | (1 << EXPOSURE_IDX) | (1 << GAIN_IDX); | 404 | (1 << EXPOSURE_IDX) | (1 << GAIN_IDX); |
409 | } else { | 405 | } else { |
410 | sd->cam_type = CAM_TYPE_VGA; | 406 | sd->cam_type = CAM_TYPE_VGA; |
407 | PDEBUG(D_PROBE, "MR97310A VGA camera detected"); | ||
411 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX) | | 408 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX) | |
412 | (1 << EXPOSURE_IDX) | (1 << GAIN_IDX); | 409 | (1 << EXPOSURE_IDX) | (1 << GAIN_IDX); |
413 | } | 410 | } |
@@ -568,8 +565,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) | |||
568 | if (err_code < 0) | 565 | if (err_code < 0) |
569 | return err_code; | 566 | return err_code; |
570 | 567 | ||
571 | PDEBUG(D_ERR, "Read 16 bytes from camera"); | 568 | PDEBUG(D_PROBE, "Byte reported is %02x", data[0]); |
572 | PDEBUG(D_ERR, "Byte reported is %02x", data[0]); | ||
573 | 569 | ||
574 | msleep(200); | 570 | msleep(200); |
575 | /* | 571 | /* |
@@ -604,7 +600,7 @@ static int start_vga_cam(struct gspca_dev *gspca_dev) | |||
604 | data[0] = get_sensor_id(gspca_dev); | 600 | data[0] = get_sensor_id(gspca_dev); |
605 | if (data[0] == 0x7f) { | 601 | if (data[0] == 0x7f) { |
606 | sd->sensor_type = 1; | 602 | sd->sensor_type = 1; |
607 | PDEBUG(D_ERR, "sensor_type corrected to 1"); | 603 | PDEBUG(D_PROBE, "sensor_type corrected to 1"); |
608 | } | 604 | } |
609 | msleep(200); | 605 | msleep(200); |
610 | } | 606 | } |
@@ -715,10 +711,8 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
715 | zero_the_pointer(gspca_dev); | 711 | zero_the_pointer(gspca_dev); |
716 | msleep(200); | 712 | msleep(200); |
717 | if (sd->cam_type == CAM_TYPE_CIF) { | 713 | if (sd->cam_type == CAM_TYPE_CIF) { |
718 | PDEBUG(D_ERR, "CIF camera"); | ||
719 | err_code = start_cif_cam(gspca_dev); | 714 | err_code = start_cif_cam(gspca_dev); |
720 | } else { | 715 | } else { |
721 | PDEBUG(D_ERR, "VGA camera"); | ||
722 | err_code = start_vga_cam(gspca_dev); | 716 | err_code = start_vga_cam(gspca_dev); |
723 | } | 717 | } |
724 | return err_code; | 718 | return err_code; |