summaryrefslogtreecommitdiffstats
path: root/include/media/dvb_frontend.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-07-06 00:59:35 +0200
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-08-02 22:14:50 +0200
commita3f90c75b833caeff123499e13e0e31cbecf7d5b (patch)
tree556af7a0bba42d51bf70c0d3e151bd440416f63b /include/media/dvb_frontend.h
parentmedia: dvb_ca_en50221: off by one in dvb_ca_en50221_io_do_ioctl() (diff)
downloadlinux-a3f90c75b833caeff123499e13e0e31cbecf7d5b.tar.xz
linux-a3f90c75b833caeff123499e13e0e31cbecf7d5b.zip
media: dvb: convert tuner_info frequencies to Hz
Right now, satellite tuner drivers specify frequencies in kHz, while terrestrial/cable ones specify in Hz. That's confusing for developers. However, the main problem is that universal tuners capable of handling both satellite and non-satelite delivery systems are appearing. We end by needing to hack the drivers in order to support such hybrid tuners. So, convert everything to specify tuner frequencies in Hz. Plese notice that a similar patch is also needed for frontends. Tested-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Acked-by: Michael Büsch <m@bues.ch> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media/dvb_frontend.h')
-rw-r--r--include/media/dvb_frontend.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/media/dvb_frontend.h b/include/media/dvb_frontend.h
index 331c8269c00e..aebaec2dc725 100644
--- a/include/media/dvb_frontend.h
+++ b/include/media/dvb_frontend.h
@@ -52,6 +52,10 @@
*/
#define MAX_DELSYS 8
+/* Helper definitions to be used at frontend drivers */
+#define kHz 1000UL
+#define MHz 1000000UL
+
/**
* struct dvb_frontend_tune_settings - parameters to adjust frontend tuning
*
@@ -73,22 +77,19 @@ struct dvb_frontend;
* struct dvb_tuner_info - Frontend name and min/max ranges/bandwidths
*
* @name: name of the Frontend
- * @frequency_min: minimal frequency supported
- * @frequency_max: maximum frequency supported
- * @frequency_step: frequency step
+ * @frequency_min_hz: minimal frequency supported in Hz
+ * @frequency_max_hz: maximum frequency supported in Hz
+ * @frequency_step_hz: frequency step in Hz
* @bandwidth_min: minimal frontend bandwidth supported
* @bandwidth_max: maximum frontend bandwidth supported
* @bandwidth_step: frontend bandwidth step
- *
- * NOTE: frequency parameters are in Hz, for terrestrial/cable or kHz for
- * satellite.
*/
struct dvb_tuner_info {
char name[128];
- u32 frequency_min;
- u32 frequency_max;
- u32 frequency_step;
+ u32 frequency_min_hz;
+ u32 frequency_max_hz;
+ u32 frequency_step_hz;
u32 bandwidth_min;
u32 bandwidth_max;