Commit 24fb190e authored by Daniel W. S. Almeida's avatar Daniel W. S. Almeida Committed by Mauro Carvalho Chehab

media: vidtv: implement a 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.

This dummy tuner should support common TV standards such as DVB-T/T2/S/S2,
ISDB-T and ATSC when completed.
Signed-off-by: default avatarDaniel W. S. Almeida <dwlsalmeida@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 5e8db349
......@@ -18505,6 +18505,14 @@ W: https://linuxtv.org
T: git git://linuxtv.org/media_tree.git
F: drivers/media/test-drivers/vivid/*
VIDTV VIRTUAL DIGITAL TV DRIVER
M: Daniel W. S. Almeida <dwlsalmeida@gmail.com>
L: linux-media@vger.kernel.org
S: Maintained
W: https://linuxtv.org
T: git git://linuxtv.org/media_tree.git
F: drivers/media/test-drivers/vidtv/*
VLYNQ BUS
M: Florian Fainelli <f.fainelli@gmail.com>
L: openwrt-devel@lists.openwrt.org (subscribers-only)
......
......@@ -4,6 +4,16 @@ menuconfig V4L_TEST_DRIVERS
bool "V4L test drivers"
depends on VIDEO_DEV
menuconfig DVB_TEST_DRIVERS
bool "DVB test drivers"
depends on DVB_CORE && MEDIA_SUPPORT && I2C
help
Enables DVB test drivers.
This enables the DVB test drivers. They are meant as an aid for
DVB device driver writers and developers working on userspace
media applications.
if V4L_TEST_DRIVERS
source "drivers/media/test-drivers/vimc/Kconfig"
......@@ -24,3 +34,9 @@ config VIDEO_VIM2M
source "drivers/media/test-drivers/vicodec/Kconfig"
endif #V4L_TEST_DRIVERS
if DVB_TEST_DRIVERS
source "drivers/media/test-drivers/vidtv/Kconfig"
endif #DVB_TEST_DRIVERS
......@@ -7,3 +7,4 @@ obj-$(CONFIG_VIDEO_VIMC) += vimc/
obj-$(CONFIG_VIDEO_VIVID) += vivid/
obj-$(CONFIG_VIDEO_VIM2M) += vim2m.o
obj-$(CONFIG_VIDEO_VICODEC) += vicodec/
obj-$(CONFIG_DVB_VIDTV) += vidtv/
# SPDX-License-Identifier: GPL-2.0-only
config DVB_VIDTV
tristate "Virtual DVB Driver (vidtv)"
depends on DVB_CORE && MEDIA_SUPPORT && I2C
help
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.
When in doubt, say N.
# SPDX-License-Identifier: GPL-2.0
dvb-vidtv-tuner-objs := vidtv_tuner.o
obj-$(CONFIG_DVB_VIDTV) += dvb-vidtv-tuner.o
This diff is collapsed.
/* SPDX-License-Identifier: GPL-2.0 */
/*
* The Virtual DTV 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.
*
* Copyright (C) 2020 Daniel W. S. Almeida
*/
#ifndef VIDTV_TUNER_H
#define VIDTV_TUNER_H
#include <linux/types.h>
#include <media/dvb_frontend.h>
#define NUM_VALID_TUNER_FREQS 8
/**
* struct vidtv_tuner_config - Configuration used to init the tuner.
* @fe: A pointer to the dvb_frontend structure allocated by vidtv_demod.
* @mock_power_up_delay_msec: Simulate a power-up delay.
* @mock_tune_delay_msec: Simulate a tune delay.
* @vidtv_valid_dvb_t_freqs: The valid DVB-T frequencies to simulate.
* @vidtv_valid_dvb_c_freqs: The valid DVB-C frequencies to simulate.
* @vidtv_valid_dvb_s_freqs: The valid DVB-S frequencies to simulate.
* @max_frequency_shift_hz: The maximum frequency shift in HZ allowed when
* tuning in a channel
*
* The configuration used to init the tuner module, usually filled
* by a bridge driver. For vidtv, this is filled by vidtv_bridge before the
* tuner module is probed.
*/
struct vidtv_tuner_config {
struct dvb_frontend *fe;
u32 mock_power_up_delay_msec;
u32 mock_tune_delay_msec;
u32 vidtv_valid_dvb_t_freqs[NUM_VALID_TUNER_FREQS];
u32 vidtv_valid_dvb_c_freqs[NUM_VALID_TUNER_FREQS];
u32 vidtv_valid_dvb_s_freqs[NUM_VALID_TUNER_FREQS];
u8 max_frequency_shift_hz;
};
#endif //VIDTV_TUNER_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment