Skip to content

Commit

Permalink
V4L/DVB (3973): Cx88-blackbird: pause the encoder during frequency ch…
Browse files Browse the repository at this point in the history
…ange

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>
  • Loading branch information
Valentin Zagura authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 07f640f commit 2544bf2
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/media/video/cx88/cx88-blackbird.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,20 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
blackbird_set_params(dev, f);
return 0;
}
case VIDIOC_S_FREQUENCY:
{
blackbird_api_cmd(fh->dev, CX2341X_ENC_STOP_CAPTURE, 3, 0,
BLACKBIRD_END_NOW,
BLACKBIRD_MPEG_CAPTURE,
BLACKBIRD_RAW_BITS_NONE);

cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );

blackbird_initialize_codec(dev);
cx88_set_scale(dev->core, dev->width, dev->height,
fh->mpegq.field);
return 0;
}

default:
return cx88_do_ioctl( inode, file, 0, dev->core, cmd, arg, cx88_ioctl_hook );
Expand Down

0 comments on commit 2544bf2

Please sign in to comment.