Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * The Virtual DTV test driver serves as a reference DVB driver and helps
0004  * validate the existing APIs in the media subsystem. It can also aid
0005  * developers working on userspace applications.
0006  *
0007  * Copyright (C) 2020 Daniel W. S. Almeida
0008  */
0009 
0010 #ifndef VIDTV_TUNER_H
0011 #define VIDTV_TUNER_H
0012 
0013 #include <linux/types.h>
0014 
0015 #include <media/dvb_frontend.h>
0016 
0017 #define NUM_VALID_TUNER_FREQS 8
0018 
0019 /**
0020  * struct vidtv_tuner_config - Configuration used to init the tuner.
0021  * @fe: A pointer to the dvb_frontend structure allocated by vidtv_demod.
0022  * @mock_power_up_delay_msec: Simulate a power-up delay.
0023  * @mock_tune_delay_msec: Simulate a tune delay.
0024  * @vidtv_valid_dvb_t_freqs: The valid DVB-T frequencies to simulate.
0025  * @vidtv_valid_dvb_c_freqs: The valid DVB-C frequencies to simulate.
0026  * @vidtv_valid_dvb_s_freqs: The valid DVB-S frequencies to simulate.
0027  * @max_frequency_shift_hz: The maximum frequency shift in HZ allowed when
0028  * tuning in a channel
0029  *
0030  * The configuration used to init the tuner module, usually filled
0031  * by a bridge driver. For vidtv, this is filled by vidtv_bridge before the
0032  * tuner module is probed.
0033  */
0034 struct vidtv_tuner_config {
0035     struct dvb_frontend *fe;
0036     u32 mock_power_up_delay_msec;
0037     u32 mock_tune_delay_msec;
0038     u32 vidtv_valid_dvb_t_freqs[NUM_VALID_TUNER_FREQS];
0039     u32 vidtv_valid_dvb_c_freqs[NUM_VALID_TUNER_FREQS];
0040     u32 vidtv_valid_dvb_s_freqs[NUM_VALID_TUNER_FREQS];
0041     u8  max_frequency_shift_hz;
0042 };
0043 
0044 #endif //VIDTV_TUNER_H