18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * The Virtual DTV test driver serves as a reference DVB driver and helps 48c2ecf20Sopenharmony_ci * validate the existing APIs in the media subsystem. It can also aid 58c2ecf20Sopenharmony_ci * developers working on userspace applications. 68c2ecf20Sopenharmony_ci * 78c2ecf20Sopenharmony_ci * Copyright (C) 2020 Daniel W. S. Almeida 88c2ecf20Sopenharmony_ci */ 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci#ifndef VIDTV_TUNER_H 118c2ecf20Sopenharmony_ci#define VIDTV_TUNER_H 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/types.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include <media/dvb_frontend.h> 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define NUM_VALID_TUNER_FREQS 8 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci/** 208c2ecf20Sopenharmony_ci * struct vidtv_tuner_config - Configuration used to init the tuner. 218c2ecf20Sopenharmony_ci * @fe: A pointer to the dvb_frontend structure allocated by vidtv_demod. 228c2ecf20Sopenharmony_ci * @mock_power_up_delay_msec: Simulate a power-up delay. 238c2ecf20Sopenharmony_ci * @mock_tune_delay_msec: Simulate a tune delay. 248c2ecf20Sopenharmony_ci * @vidtv_valid_dvb_t_freqs: The valid DVB-T frequencies to simulate. 258c2ecf20Sopenharmony_ci * @vidtv_valid_dvb_c_freqs: The valid DVB-C frequencies to simulate. 268c2ecf20Sopenharmony_ci * @vidtv_valid_dvb_s_freqs: The valid DVB-S frequencies to simulate. 278c2ecf20Sopenharmony_ci * @max_frequency_shift_hz: The maximum frequency shift in HZ allowed when 288c2ecf20Sopenharmony_ci * tuning in a channel 298c2ecf20Sopenharmony_ci * 308c2ecf20Sopenharmony_ci * The configuration used to init the tuner module, usually filled 318c2ecf20Sopenharmony_ci * by a bridge driver. For vidtv, this is filled by vidtv_bridge before the 328c2ecf20Sopenharmony_ci * tuner module is probed. 338c2ecf20Sopenharmony_ci */ 348c2ecf20Sopenharmony_cistruct vidtv_tuner_config { 358c2ecf20Sopenharmony_ci struct dvb_frontend *fe; 368c2ecf20Sopenharmony_ci u32 mock_power_up_delay_msec; 378c2ecf20Sopenharmony_ci u32 mock_tune_delay_msec; 388c2ecf20Sopenharmony_ci u32 vidtv_valid_dvb_t_freqs[NUM_VALID_TUNER_FREQS]; 398c2ecf20Sopenharmony_ci u32 vidtv_valid_dvb_c_freqs[NUM_VALID_TUNER_FREQS]; 408c2ecf20Sopenharmony_ci u32 vidtv_valid_dvb_s_freqs[NUM_VALID_TUNER_FREQS]; 418c2ecf20Sopenharmony_ci u8 max_frequency_shift_hz; 428c2ecf20Sopenharmony_ci}; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci#endif //VIDTV_TUNER_H 45