aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValentin Zagura <puthre@gmail.com>2006-05-22 09:31:59 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-06-25 01:00:04 -0400
commit2544bf2d619d09b564fbdd451fe4b1ba798f9c03 (patch)
treed3c6f67a413db292e0a9bf93a1e2efcb25dfc491
parent07f640f0ddd72e6158fca7f0694dbaf95cee4d2c (diff)
V4L/DVB (3973): Cx88-blackbird: pause the encoder during frequency change
Added code to cx88-blackbird.c to treat the VIDIOC_S_FREQUENCY ioctl to stop mpeg stream before changing the frequency and restart it after. It seems that the mpeg stream needs to be paused while changing the channel frequency, otherwise the mpeg encoder enters into a bad state, producing artifacts. Signed-off-by: Valentin Zagura <puthre@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index 997b9b87b542..036f87643e13 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -1456,6 +1456,20 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
1456 blackbird_set_params(dev, f); 1456 blackbird_set_params(dev, f);
1457 return 0; 1457 return 0;
1458 } 1458 }
1459 case VIDIOC_S_FREQUENCY:
1460 {
1461 blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0,
1462 BLACKBIRD_END_NOW,
1463 BLACKBIRD_MPEG_CAPTURE,
1464 BLACKBIRD_RAW_BITS_NONE);
1465
1466 cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );
1467
1468 blackbird_initialize_codec(dev);
1469 cx88_set_scale(dev->core, dev->width, dev->height,
1470 fh->mpegq.field);
1471 return 0;
1472 }
1459 1473
1460 default: 1474 default:
1461 return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook ); 1475 return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );