if (*count < EM28XX_MIN_BUF)
*count = EM28XX_MIN_BUF;
- dev->mode = EM28XX_ANALOG_MODE;
-
/* Ask tuner to go to analog mode */
memset(&f, 0, sizeof(f));
f.frequency = dev->ctl_freq;
if (urb_init) {
rc = em28xx_init_isoc(dev, EM28XX_NUM_PACKETS,
EM28XX_NUM_BUFS, dev->max_pkt_size,
- em28xx_isoc_copy, EM28XX_ANALOG_CAPTURE);
+ em28xx_isoc_copy);
if (rc < 0)
goto fail;
}
em28xx_videodbg("open minor=%d type=%s users=%d\n",
minor, v4l2_type_names[fh_type], dev->users);
- fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
+ fh = kzalloc(sizeof(struct em28xx_fh), GFP_KERNEL);
if (!fh) {
em28xx_errdev("em28xx-video.c: Out of memory?!\n");
return -ENOMEM;
dev->hscale = 0;
dev->vscale = 0;
+ em28xx_set_mode(dev, EM28XX_ANALOG_MODE);
em28xx_set_alternate(dev);
em28xx_resolution_set(dev);
+ /* Needed, since GPIO might have disabled power of
+ some i2c device
+ */
+ em28xx_config_i2c(dev);
+
}
if (fh->radio) {
em28xx_videodbg("video_open: setting radio device\n");
sizeof(struct em28xx_buffer), fh);
mutex_unlock(&dev->lock);
+
return errCode;
}
/* do this before setting alternate! */
em28xx_uninit_isoc(dev);
+ em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
/* set alternate 0 */
dev->alt = 0;