// SPDX-License-Identifier: GPL-2.0 /* * 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. * * The vidtv tuner should support common TV standards such as * DVB-T/T2/S/S2, ISDB-T and ATSC when completed. * * Copyright (C) 2020 Daniel W. S. Almeida
*/
/** * struct vidtv_tuner_hardware_state - Simulate the tuner hardware status * @asleep: whether the tuner is asleep, i.e whether _sleep() or _suspend() was * called. * @lock_status: Whether the tuner has managed to lock on the requested * frequency. * @if_frequency: The tuner's intermediate frequency. Hardcoded for the purposes * of simulation. * @tuned_frequency: The actual tuned frequency. * @bandwidth: The actual bandwidth. * * This structure is meant to simulate the status of the tuner hardware, as if * we had a physical tuner hardware.
*/ struct vidtv_tuner_hardware_state { bool asleep;
u32 lock_status;
u32 if_frequency;
u32 tuned_frequency;
u32 bandwidth;
};
/** * struct vidtv_tuner_dev - The tuner struct * @fe: A pointer to the dvb_frontend structure allocated by vidtv_demod * @hw_state: A struct to simulate the tuner's hardware state as if we had a * physical tuner hardware. * @config: The configuration used to start 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_dev { struct dvb_frontend *fe; struct vidtv_tuner_hardware_state hw_state; struct vidtv_tuner_config config;
};
for (i = 0; i < array_sz; i++) { if (!valid_freqs[i]) break;
shift = abs(c->frequency - valid_freqs[i]);
if (!shift) return0;
/* * This will provide a value from 0 to 100 that would * indicate how far is the tuned frequency from the * right one.
*/ if (shift < config.max_frequency_shift_hz) return shift * 100 / config.max_frequency_shift_hz;
}
for (i = 0; i < array_size; i++) { if (cnr2qual[i].modulation != c->modulation ||
cnr2qual[i].fec != c->fec_inner) continue;
if (!shift) {
*strength = cnr2qual[i].cnr_good; return0;
} /* * Channel tuned at wrong frequency. Simulate that the * Carrier S/N ratio is not too good.
*/
MODULE_DESCRIPTION("Virtual DVB Tuner");
MODULE_AUTHOR("Daniel W. S. Almeida");
MODULE_LICENSE("GPL");
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.1Bemerkung:
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.