summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-03-06 21:17:11 -0600
committerMike Isely <isely@pobox.com>2009-03-06 21:17:11 -0600
commite7f9662a72fd63a0b8a7fc4b1b7b178fba9c7a93 (patch)
tree97e1fa050bc5582f3d59107f63ddf960f42ab247 /linux/drivers/media/video/pvrusb2
parent6f3588fa9e45a2ffce4509d03d7f00754cccd8c6 (diff)
downloadmediapointer-dvb-s2-e7f9662a72fd63a0b8a7fc4b1b7b178fba9c7a93.tar.gz
mediapointer-dvb-s2-e7f9662a72fd63a0b8a7fc4b1b7b178fba9c7a93.tar.bz2
pvrusb2: Note who our video decoder sub-device is, and set it up
From: Mike Isely <isely@pobox.com> Other code may need to treat the video decoder sub-device in a special manner, so this change implements code to recognize when such a sub-device is connected to the driver, does any special processing for it, and notes who the device is for future reference. Priority: normal Signed-off-by: Mike Isely <isely@pobox.com>
Diffstat (limited to 'linux/drivers/media/video/pvrusb2')
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c28
2 files changed, 29 insertions, 0 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index b3cb0bbd8..c8192d8a6 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -299,6 +299,7 @@ struct pvr2_hdw {
int flag_tripped; /* Indicates overall failure to start */
struct pvr2_decoder_ctrl *decoder_ctrl;
+ unsigned int decoder_client_id;
// CPU firmware info (used to help find / save firmware data)
char *fw_buffer;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 2050ce208..34412db68 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -2058,6 +2058,34 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname);
+ /* client-specific setup... */
+ switch (mid) {
+ case PVR2_CLIENT_ID_CX25840:
+ hdw->decoder_client_id = mid;
+ {
+ /*
+ Mike Isely <isely@pobox.com> 19-Nov-2006 - This
+ bit of nuttiness for cx25840 causes that module
+ to correctly set up its video scaling. This is
+ really a problem in the cx25840 module itself,
+ but we work around it here. The problem has not
+ been seen in ivtv because there VBI is supported
+ and set up. We don't do VBI here (at least not
+ yet) and thus we never attempted to even set it
+ up.
+ */
+ struct v4l2_format fmt;
+ memset(&fmt, 0, sizeof(fmt));
+ fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE;
+ v4l2_device_call_all(&hdw->v4l2_dev, mid,
+ video, s_fmt, &fmt);
+ }
+ break;
+ case PVR2_CLIENT_ID_SAA7115:
+ hdw->decoder_client_id = mid;
+ break;
+ default: break;
+ }
}