summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2008-02-03 15:03:08 -0600
committerMike Isely <isely@pobox.com>2008-02-03 15:03:08 -0600
commit2e09fd71120e1f11684d02c958c3b01614052280 (patch)
tree3466b293695bad7748b4035e11d7001f83f3bd74 /linux/drivers/media/video/pvrusb2
parentbd81d76cdf00c8c75f0a9cd3cd92e201c83abc23 (diff)
downloadmediapointer-dvb-s2-2e09fd71120e1f11684d02c958c3b01614052280.tar.gz
mediapointer-dvb-s2-2e09fd71120e1f11684d02c958c3b01614052280.tar.bz2
pvrusb2: Define device attributes for all input modes
From: Mike Isely <isely@pobox.com> Different devices support different input types. Up until now we've really been assuming that everyone has an analog tuner, an FM radio, composite, and s-video inputs. But as we add other devices, these assumptions are no longer true. The way to deal with this is to define the available inputs as additional device attributes, so that the driver can adjust its internal behavior accordingly. 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-devattr.c18
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-devattr.h12
2 files changed, 24 insertions, 6 deletions
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c
index 6532e28d0..e9bf2f4c5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.c
@@ -56,7 +56,10 @@ static const struct pvr2_device_desc pvr2_device_29xxx = {
.fx2_firmware.lst = pvr2_fw1_names_29xxx,
.fx2_firmware.cnt = ARRAY_SIZE(pvr2_fw1_names_29xxx),
.flag_has_hauppauge_rom = !0,
+ .flag_has_analogtuner = !0,
.flag_has_fmradio = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
};
@@ -86,7 +89,10 @@ static const struct pvr2_device_desc pvr2_device_24xxx = {
.flag_has_wm8775 = !0,
.flag_has_hauppauge_rom = !0,
.flag_has_hauppauge_custom_ir = !0,
+ .flag_has_analogtuner = !0,
.flag_has_fmradio = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
};
@@ -107,6 +113,9 @@ static const struct pvr2_device_desc pvr2_device_gotview_2 = {
.client_modules.cnt = ARRAY_SIZE(pvr2_client_gotview_2),
.flag_has_cx25840 = !0,
.default_tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
+ .flag_has_analogtuner = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_GOTVIEW,
};
@@ -129,6 +138,9 @@ static const struct pvr2_device_desc pvr2_device_onair_creator = {
.client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_creator),
.default_tuner_type = TUNER_LG_TDVS_H06XF,
.flag_has_digitaltuner = !0,
+ .flag_has_analogtuner = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
};
#endif
@@ -152,6 +164,9 @@ static const struct pvr2_device_desc pvr2_device_onair_usb2 = {
.client_modules.cnt = ARRAY_SIZE(pvr2_client_onair_usb2),
.default_tuner_type = TUNER_PHILIPS_ATSC,
.flag_has_digitaltuner = !0,
+ .flag_has_analogtuner = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
};
#endif
@@ -180,6 +195,9 @@ static const struct pvr2_device_desc pvr2_device_75xxx = {
.flag_has_cx25840 = !0,
.flag_has_hauppauge_rom = !0,
.flag_has_digitaltuner = !0,
+ .flag_has_analogtuner = !0,
+ .flag_has_composite = !0,
+ .flag_has_svideo = !0,
.signal_routing_scheme = PVR2_ROUTING_SCHEME_HAUPPAUGE,
.default_std_mask = V4L2_STD_NTSC_M,
};
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.h
index d89a44071..b56412180 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-devattr.h
@@ -103,12 +103,12 @@ struct pvr2_device_desc {
commands. */
char flag_has_hauppauge_custom_ir;
- /* Device has FM radio capability. */
- char flag_has_fmradio;
-
- /* Device has a digital tuner; if this is set then we enable extra
- functionality to switch between analog and digital modes. */
- char flag_has_digitaltuner;
+ /* These bits define which kinds of sources the device can handle. */
+ char flag_has_fmradio; /* Has FM radio receiver */
+ char flag_has_analogtuner; /* Has analog tuner */
+ char flag_has_digitaltuner; /* Has digital tuner */
+ char flag_has_composite; /* Has composite input */
+ char flag_has_svideo; /* Has s-video input */
};
extern struct usb_device_id pvr2_device_table[];