diff options
author | Mike Isely <isely@pobox.com> | 2009-03-06 22:17:11 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:34 -0400 |
commit | 00e5f73607d1dea12bf0ccbba9832c26a611213f (patch) | |
tree | a6334d0bba8b1fc49a42fd8933a71bd5f37f2195 /drivers | |
parent | e3e76cbb4d42b2e429401b17c95969c47e2db464 (diff) |
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: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 1 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h index b3cb0bbd8cf5..c8192d8a6083 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | |||
@@ -299,6 +299,7 @@ struct pvr2_hdw { | |||
299 | int flag_tripped; /* Indicates overall failure to start */ | 299 | int flag_tripped; /* Indicates overall failure to start */ |
300 | 300 | ||
301 | struct pvr2_decoder_ctrl *decoder_ctrl; | 301 | struct pvr2_decoder_ctrl *decoder_ctrl; |
302 | unsigned int decoder_client_id; | ||
302 | 303 | ||
303 | // CPU firmware info (used to help find / save firmware data) | 304 | // CPU firmware info (used to help find / save firmware data) |
304 | char *fw_buffer; | 305 | char *fw_buffer; |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 8aeccb27019b..02db5d6ebb46 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -2041,6 +2041,34 @@ static void pvr2_hdw_load_subdev(struct pvr2_hdw *hdw, | |||
2041 | pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname); | 2041 | pvr2_trace(PVR2_TRACE_INIT, "Attached sub-driver %s", fname); |
2042 | 2042 | ||
2043 | 2043 | ||
2044 | /* client-specific setup... */ | ||
2045 | switch (mid) { | ||
2046 | case PVR2_CLIENT_ID_CX25840: | ||
2047 | hdw->decoder_client_id = mid; | ||
2048 | { | ||
2049 | /* | ||
2050 | Mike Isely <isely@pobox.com> 19-Nov-2006 - This | ||
2051 | bit of nuttiness for cx25840 causes that module | ||
2052 | to correctly set up its video scaling. This is | ||
2053 | really a problem in the cx25840 module itself, | ||
2054 | but we work around it here. The problem has not | ||
2055 | been seen in ivtv because there VBI is supported | ||
2056 | and set up. We don't do VBI here (at least not | ||
2057 | yet) and thus we never attempted to even set it | ||
2058 | up. | ||
2059 | */ | ||
2060 | struct v4l2_format fmt; | ||
2061 | memset(&fmt, 0, sizeof(fmt)); | ||
2062 | fmt.type = V4L2_BUF_TYPE_SLICED_VBI_CAPTURE; | ||
2063 | v4l2_device_call_all(&hdw->v4l2_dev, mid, | ||
2064 | video, s_fmt, &fmt); | ||
2065 | } | ||
2066 | break; | ||
2067 | case PVR2_CLIENT_ID_SAA7115: | ||
2068 | hdw->decoder_client_id = mid; | ||
2069 | break; | ||
2070 | default: break; | ||
2071 | } | ||
2044 | } | 2072 | } |
2045 | 2073 | ||
2046 | 2074 | ||