diff options
author | Mike Isely <isely@pobox.com> | 2007-12-02 21:51:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:03:06 -0500 |
commit | 6a540254966f8a01de0f7c78a27db17458c2d8f5 (patch) | |
tree | a18a62aa65b78b8fcbdfdbb3c3ce94a3a8bfa794 /drivers/media/video/pvrusb2 | |
parent | ea2562d94fade3d6ee9b22ed5addbbdba697d22a (diff) |
V4L/DVB (6705): pvrusb2: Implement default standard selection based on device type
This adds a default video standard setting to the pvr2_device_desc
structure for describing device types. With this change it is
possible to set a reasonable default standard based on device type.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-devattr.c | 3 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-devattr.h | 7 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 6 |
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.c b/drivers/media/video/pvrusb2/pvrusb2-devattr.c index e4a311a81000..eed64571ca0b 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.c +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.c | |||
@@ -29,9 +29,8 @@ pvr2_device_desc structures. | |||
29 | 29 | ||
30 | #include "pvrusb2-devattr.h" | 30 | #include "pvrusb2-devattr.h" |
31 | #include <linux/usb.h> | 31 | #include <linux/usb.h> |
32 | /* All this is needed in order to pull in tuner type ids... */ | 32 | /* This is needed in order to pull in tuner type ids... */ |
33 | #include <linux/i2c.h> | 33 | #include <linux/i2c.h> |
34 | #include <linux/videodev2.h> | ||
35 | #include <media/tuner.h> | 34 | #include <media/tuner.h> |
36 | 35 | ||
37 | /* Known major hardware variants, keyed from device ID */ | 36 | /* Known major hardware variants, keyed from device ID */ |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-devattr.h b/drivers/media/video/pvrusb2/pvrusb2-devattr.h index b9517e1cac08..830f27961e1e 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-devattr.h +++ b/drivers/media/video/pvrusb2/pvrusb2-devattr.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #define __PVRUSB2_DEVATTR_H | 22 | #define __PVRUSB2_DEVATTR_H |
23 | 23 | ||
24 | #include <linux/mod_devicetable.h> | 24 | #include <linux/mod_devicetable.h> |
25 | #include <linux/videodev2.h> | ||
25 | 26 | ||
26 | /* | 27 | /* |
27 | 28 | ||
@@ -69,6 +70,12 @@ struct pvr2_device_desc { | |||
69 | driver could not discover the type any other way). */ | 70 | driver could not discover the type any other way). */ |
70 | int default_tuner_type; | 71 | int default_tuner_type; |
71 | 72 | ||
73 | /* Initial standard bits to use for this device, if not zero. | ||
74 | Anything set here is also implied as an available standard. | ||
75 | Note: This is ignored if overridden on the module load line via | ||
76 | the video_std module option. */ | ||
77 | v4l2_std_id default_std_mask; | ||
78 | |||
72 | /* If set, we don't bother trying to load cx23416 firmware. */ | 79 | /* If set, we don't bother trying to load cx23416 firmware. */ |
73 | char flag_skip_cx23416_firmware; | 80 | char flag_skip_cx23416_firmware; |
74 | 81 | ||
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index a45721f78848..08b513b6014f 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -1439,8 +1439,12 @@ static v4l2_std_id get_default_standard(struct pvr2_hdw *hdw) | |||
1439 | int tp = 0; | 1439 | int tp = 0; |
1440 | if ((unit_number >= 0) && (unit_number < PVR_NUM)) { | 1440 | if ((unit_number >= 0) && (unit_number < PVR_NUM)) { |
1441 | tp = video_std[unit_number]; | 1441 | tp = video_std[unit_number]; |
1442 | if (tp) return tp; | ||
1442 | } | 1443 | } |
1443 | return tp; | 1444 | if (hdw->hdw_desc->default_std_mask) { |
1445 | return hdw->hdw_desc->default_std_mask; | ||
1446 | } | ||
1447 | return 0; | ||
1444 | } | 1448 | } |
1445 | 1449 | ||
1446 | 1450 | ||