Skip to contentSkip to conversation

media: dvb_dummy_tuner: implement driver skeleton

PATCH Superseded Daniel W. S. Almeida 1 participant 2 messages Jan 13, 2020 – Jan 22, 2020 Media (V4L/DVB)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 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.

For now, only a basic skeleton is available, most functions do nothing whatsoever.

-----------------------------------------------------------
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 | 153 +++++++++++++++++++++++++
 3 files changed, 163 insertions(+)
 create mode 100644 drivers/media/tuners/dvb_dummy_tuner.c
drivers/media/tuners/Kconfig +9 -0
index e104bb7766e1..8ad54339ceee 100644
@@ -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
index 7b4f8423501e..f98de1cf2e19 100644
@@ -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 +153 -0

153 lines not on this page · raw message

Signature · 1 line
2.24.1
#1 lore raw

PATCH v4 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 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 | 241 +++++++++++++++++++++++++
 3 files changed, 251 insertions(+)
 create mode 100644 drivers/media/tuners/dvb_dummy_tuner.c
drivers/media/tuners/Kconfig +9 -0
index e104bb7766e1..8ad54339ceee 100644
@@ -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
index 7b4f8423501e..f98de1cf2e19 100644
@@ -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 +241 -0

241 lines not on this page · raw message

Signature · 1 line
2.24.1