diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-05-11 15:37:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:05:51 -0400 |
commit | 5a4f5da6552e6c55eff6fbddfee3eab908325c63 (patch) | |
tree | 552f8605c19733a36518a9f34f2b822d8796b38f /drivers/media/video/pvrusb2 | |
parent | e9b59f6e2f6686016dfea7625e98fbef1e335c61 (diff) |
V4L/DVB (7883): pvrusb2: make default frequency configurable via modprobe option
The pvrusb2 driver initially sets the tuner to known broadcast frequencies
in the Chicago area, to ease driver testing for the maintainer.
This patch keeps those default frequencies, but allows them to be altered
via modprobe option. This allows the same ease and convenience for testing
multiple pvrusb2 devices one after another under other conditions and areas.
For instance, the default initial frequency, 175.25 MHz, might not
necessarily be valid on all cable television networks, but usually will be a
valid NTSC broadcast channel.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
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-hdw.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 37364b072e7b..584716e0c171 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -67,6 +67,16 @@ MODULE_PARM_DESC(video_std,"specify initial video standard"); | |||
67 | module_param_array(tolerance, int, NULL, 0444); | 67 | module_param_array(tolerance, int, NULL, 0444); |
68 | MODULE_PARM_DESC(tolerance,"specify stream error tolerance"); | 68 | MODULE_PARM_DESC(tolerance,"specify stream error tolerance"); |
69 | 69 | ||
70 | /* US Broadcast channel 7 (175.25 MHz) */ | ||
71 | static int default_tv_freq = 175250000L; | ||
72 | /* 104.3 MHz, a usable FM station for my area */ | ||
73 | static int default_radio_freq = 104300000L; | ||
74 | |||
75 | module_param_named(tv_freq, default_tv_freq, int, 0444); | ||
76 | MODULE_PARM_DESC(tv_freq, "specify initial television frequency"); | ||
77 | module_param_named(radio_freq, default_radio_freq, int, 0444); | ||
78 | MODULE_PARM_DESC(radio_freq, "specify initial radio frequency"); | ||
79 | |||
70 | #define PVR2_CTL_WRITE_ENDPOINT 0x01 | 80 | #define PVR2_CTL_WRITE_ENDPOINT 0x01 |
71 | #define PVR2_CTL_READ_ENDPOINT 0x81 | 81 | #define PVR2_CTL_READ_ENDPOINT 0x81 |
72 | 82 | ||
@@ -1701,10 +1711,8 @@ static void pvr2_hdw_setup_low(struct pvr2_hdw *hdw) | |||
1701 | are, but I set them to something usable in the Chicago area just | 1711 | are, but I set them to something usable in the Chicago area just |
1702 | to make driver testing a little easier. */ | 1712 | to make driver testing a little easier. */ |
1703 | 1713 | ||
1704 | /* US Broadcast channel 7 (175.25 MHz) */ | 1714 | hdw->freqValTelevision = default_tv_freq; |
1705 | hdw->freqValTelevision = 175250000L; | 1715 | hdw->freqValRadio = default_radio_freq; |
1706 | /* 104.3 MHz, a usable FM station for my area */ | ||
1707 | hdw->freqValRadio = 104300000L; | ||
1708 | 1716 | ||
1709 | // Do not use pvr2_reset_ctl_endpoints() here. It is not | 1717 | // Do not use pvr2_reset_ctl_endpoints() here. It is not |
1710 | // thread-safe against the normal pvr2_send_request() mechanism. | 1718 | // thread-safe against the normal pvr2_send_request() mechanism. |