From: Devin Heitmueller Date: Mon, 12 Jul 2010 19:50:30 +0000 (-0300) Subject: [media] cx231xx: set standard tune to last known frequency when switching inputs X-Git-Tag: v2.6.37-rc1~64^2~279 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c09d6695bd45bb5ac57d7766e2096fe03effd5cc;p=~shefty%2Frdma-dev.git [media] cx231xx: set standard tune to last known frequency when switching inputs If switching to a tuner input, reset the standard and tune to the last known frequency. We need to do this in particular for this bridge since the tuner gets powered down when captuing on the composite or s-video inputs. Signed-off-by: Devin Heitmueller Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/cx231xx/cx231xx-video.c b/drivers/media/video/cx231xx/cx231xx-video.c index 31097e40340..0880edd3a49 100644 --- a/drivers/media/video/cx231xx/cx231xx-video.c +++ b/drivers/media/video/cx231xx/cx231xx-video.c @@ -1246,6 +1246,14 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) video_mux(dev, i); + if (INPUT(i)->type == CX231XX_VMUX_TELEVISION || + INPUT(i)->type == CX231XX_VMUX_CABLE) { + /* There's a tuner, so reset the standard and put it on the + last known frequency (since it was probably powered down + until now */ + call_all(dev, core, s_std, dev->norm); + } + mutex_unlock(&dev->lock); return 0; }