Skip to content

Commit

Permalink
V4L/DVB (7600): em28xx: Sets frequency when changing to analog mode
Browse files Browse the repository at this point in the history
This will make tuner-xc2028 to change to analog, if needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 52284c3 commit d2d9fbf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/media/video/em28xx/em28xx-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ static int
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)
Expand All @@ -568,6 +570,14 @@ buffer_setup(struct videobuf_queue *vq, unsigned int *count, unsigned int *size)
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;
}

Expand Down

0 comments on commit d2d9fbf

Please sign in to comment.