提交 00e5f736 编写于 作者: M Mike Isely 提交者: Mauro Carvalho Chehab

V4L/DVB (11169): pvrusb2: Note who our video decoder sub-device is, and set it up

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.
Signed-off-by: NMike Isely <isely@pobox.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 e3e76cbb
无相关合并请求
...@@ -299,6 +299,7 @@ struct pvr2_hdw { ...@@ -299,6 +299,7 @@ struct pvr2_hdw {
int flag_tripped; /* Indicates overall failure to start */ int flag_tripped; /* Indicates overall failure to start */
struct pvr2_decoder_ctrl *decoder_ctrl; struct pvr2_decoder_ctrl *decoder_ctrl;
unsigned int decoder_client_id;
// CPU firmware info (used to help find / save firmware data) // CPU firmware info (used to help find / save firmware data)
char *fw_buffer; char *fw_buffer;
......
...@@ -2041,6 +2041,34 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, ...@@ -2041,6 +2041,34 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw,
pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname); 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;
}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部