media: dvb_dummy_tuner: implement driver skeleton
PATCH v5 1/1 media: dvb_dummy_tuner: implement driver skeleton
From: "Daniel W. S. Almeida" <[email protected]>
The virtual DVB test driver serves as a reference DVB driver and helps validate the existing APIs in the media subsystem. It can also aid developers working on userspace applications.
This dummy tuner should support common TV standards such as DVB-T/T2/S/S2, ISDB-T and ATSC when completed.
-----------------------------------------------------------
Changes in v5:
use the signal strength measurement to tell the virtual demod if the signal is good enough by comparing 'frequency' against a table of valid frequencies. The returned SNR value is taken from libdvbv5.
Changes in v4:
dvb_dummy_tuner.c:
implement the remaining functions for the tuner
remove #include "dvb_dummy_tuner.h"
remove "release" callback, since this driver does not use dvb_attach()
Changes in v3:
KConfig:
change config name to "Dummy DVB Media Tuner" remove useless 'default n'
add module name on help, same as other drivers
dvb_dummy_tuner.c:
change license from GPL2+ to GPLv2.
Remove LKMP reference from the source file Move the copyright notice to the top
remove useless goto in dvb_tuner_i2c_probe only call i2c_set_clientdata after the pointer is ready
remove dvb_dummy_tuner.h as it was not needed
Fix this error:
WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line) #15:
validate the existing APIs in the media subsystem. It can also aid developers
Remove LKMP reference from commit message
Changes in v2:
Commit message was rewritten
Added better description in KConfig Added better description in .h and .c Added copyright notice in .h and .c Kconfig dummy tuner option now defaults to 'n' Removed calls to pr_err, pr_debug
---------------------------------------------------------
drivers/media/tuners/Kconfig | 9 + drivers/media/tuners/Makefile | 1 + drivers/media/tuners/dvb_dummy_tuner.c | 421 +++++++++++++++++++++++++ 3 files changed, 431 insertions(+) create mode 100644 drivers/media/tuners/dvb_dummy_tuner.c
drivers/media/tuners/Kconfig +9 -0
@@ -296,4 +296,13 @@ config MEDIA_TUNER_QM1D1B0004 default m if !MEDIA_SUBDRV_AUTOSELECT help Sharp QM1D1B0004 ISDB-S tuner driver. + +config MEDIA_TUNER_DVB_DUMMY_TUNER + tristate "Dummy DVB Media Tuner" + depends on MEDIA_SUPPORT && I2C + help + Dummy DVB media tuner driver + The virtual DVB test driver serves as a reference DVB driver and helps + validate the existing APIs in the media subsystem. It can also aid + developers working on userspace applications. endmenu
drivers/media/tuners/Makefile +1 -0
@@ -44,5 +44,6 @@ obj-$(CONFIG_MEDIA_TUNER_QM1D1C0042) += qm1d1c0042.o obj-$(CONFIG_MEDIA_TUNER_QM1D1B0004) += qm1d1b0004.o obj-$(CONFIG_MEDIA_TUNER_M88RS6000T) += m88rs6000t.o obj-$(CONFIG_MEDIA_TUNER_TDA18250) += tda18250.o +obj-$(CONFIG_MEDIA_TUNER_DVB_DUMMY_TUNER) += dvb_dummy_tuner.o ccflags-y += -I$(srctree)/drivers/media/dvb-frontends
drivers/media/tuners/dvb_dummy_tuner.c new file +421 -0
421 lines not on this page · raw message
Signature · 1 line
2.25.0
Hi Daniel,
Quoted 10 lines · Daniel W. S. Almeida
From: "Daniel W. S. Almeida" <[email protected]>
The virtual DVB test driver serves as a reference DVB driver and helps validate the existing APIs in the media subsystem. It can also aid developers working on userspace applications.
This dummy tuner should support common TV standards such as DVB-T/T2/S/S2, ISDB-T and ATSC when completed.
Signed-off-by Daniel W. S. Almeida <[email protected]>
This patch and another one that you have [1] cause a ton of build warnings with clang, as reported by the 0day bot, because of the implicit conversions from floating points to integer. Is this intentional? Would you mind taking a look at them and addressing them if you do another revision?
You can view the reports here:
https://groups.google.com/d/msg/clang-built-linux/54FdauqEgTY/EjYzpdgxBgAJ
https://groups.google.com/d/msg/clang-built-linux/VY02Ju2AHrk/Hu8lxhdCBgAJ
[1]: https://lore.kernel.org/lkml/[email protected]/
Cheers,
Nathan
Hi Nathan,
Quoted 5 lines
This patch and another one that you have [1] cause a ton of build warnings with clang, as reported by the 0day bot, because of the implicit conversions from floating points to integer. Is this intentional? Would you mind taking a look at them and addressing them if you do another revision?
Sorry I did not catch that back then. I'll fix it in a future revision.
Thank you for letting me know.
- Daniel.