aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-11 15:37:50 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:05:51 -0400
commit5a4f5da6552e6c55eff6fbddfee3eab908325c63 (patch)
tree552f8605c19733a36518a9f34f2b822d8796b38f /drivers/media/video/pvrusb2
parente9b59f6e2f6686016dfea7625e98fbef1e335c61 (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.c16
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 37364b072e7..584716e0c17 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");
67module_param_array(tolerance, int, NULL, 0444); 67module_param_array(tolerance, int, NULL, 0444);
68MODULE_PARM_DESC(tolerance,"specify stream error tolerance"); 68MODULE_PARM_DESC(tolerance,"specify stream error tolerance");
69 69
70/* US Broadcast channel 7 (175.25 MHz) */
71static int default_tv_freq = 175250000L;
72/* 104.3 MHz, a usable FM station for my area */
73static int default_radio_freq = 104300000L;
74
75module_param_named(tv_freq, default_tv_freq, int, 0444);
76MODULE_PARM_DESC(tv_freq, "specify initial television frequency");
77module_param_named(radio_freq, default_radio_freq, int, 0444);
78MODULE_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.