buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
{
struct em28xx_fh *fh = vq->priv_data;
+ struct em28xx *dev = fh->dev;
+ struct v4l2_frequency f;
*size = 16 * fh->dev->width * fh->dev->height >> 3;
if (0 == *count)
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;
+
+ em28xx_i2c_call_clients(dev, VIDIOC_S_FREQUENCY, &f);
+
return 0;
}