1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * The Virtual DTV test driver serves as a reference DVB driver and helps 4 * validate the existing APIs in the media subsystem. It can also aid 5 * developers working on userspace applications. 6 * 7 * Copyright (C) 2020 Daniel W. S. Almeida 8 */ 9 10 #ifndef VIDTV_TUNER_H 11 #define VIDTV_TUNER_H 12 13 #include <linux/types.h> 14 #include <media/dvb_frontend.h> 15 16 #define NUM_VALID_TUNER_FREQS 8 17 18 /** 19 * struct vidtv_tuner_config - Configuration used to init the tuner. 20 * @fe: A pointer to the dvb_frontend structure allocated by vidtv_demod. 21 * @mock_power_up_delay_msec: Simulate a power-up delay. 22 * @mock_tune_delay_msec: Simulate a tune delay. 23 * @vidtv_valid_dvb_t_freqs: The valid DVB-T frequencies to simulate. 24 * @vidtv_valid_dvb_c_freqs: The valid DVB-C frequencies to simulate. 25 * @vidtv_valid_dvb_s_freqs: The valid DVB-S frequencies to simulate. 26 * @max_frequency_shift_hz: The maximum frequency shift in HZ allowed when 27 * tuning in a channel 28 * 29 * The configuration used to init the tuner module, usually filled 30 * by a bridge driver. For vidtv, this is filled by vidtv_bridge before the 31 * tuner module is probed. 32 */ 33 struct vidtv_tuner_config { 34 struct dvb_frontend *fe; 35 u32 mock_power_up_delay_msec; 36 u32 mock_tune_delay_msec; 37 u32 vidtv_valid_dvb_t_freqs[NUM_VALID_TUNER_FREQS]; 38 u32 vidtv_valid_dvb_c_freqs[NUM_VALID_TUNER_FREQS]; 39 u32 vidtv_valid_dvb_s_freqs[NUM_VALID_TUNER_FREQS]; 40 u8 max_frequency_shift_hz; 41 }; 42 43 #endif //VIDTV_TUNER_H 44