linux/drivers/media/test-drivers/vidtv/vidtv_tuner.c

// 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
 */

#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/module.h>
#include <linux/printk.h>
#include <linux/ratelimit.h>
#include <linux/slab.h>
#include <linux/types.h>

#include <media/dvb_frontend.h>

#include "vidtv_tuner.h"

struct vidtv_tuner_cnr_to_qual_s {};

static const struct vidtv_tuner_cnr_to_qual_s vidtv_tuner_c_cnr_2_qual[] =;

static const struct vidtv_tuner_cnr_to_qual_s vidtv_tuner_s_cnr_2_qual[] =;

static const struct vidtv_tuner_cnr_to_qual_s vidtv_tuner_s2_cnr_2_qual[] =;

static const struct vidtv_tuner_cnr_to_qual_s vidtv_tuner_t_cnr_2_qual[] =;

/**
 * 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 {};

/**
 * 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 {};

static struct vidtv_tuner_dev*
vidtv_tuner_get_dev(struct dvb_frontend *fe)
{}

static int vidtv_tuner_check_frequency_shift(struct dvb_frontend *fe)
{}

static int
vidtv_tuner_get_signal_strength(struct dvb_frontend *fe, u16 *strength)
{}

static int vidtv_tuner_init(struct dvb_frontend *fe)
{}

static int vidtv_tuner_sleep(struct dvb_frontend *fe)
{}

static int vidtv_tuner_suspend(struct dvb_frontend *fe)
{}

static int vidtv_tuner_resume(struct dvb_frontend *fe)
{}

static int vidtv_tuner_set_params(struct dvb_frontend *fe)
{}

static int vidtv_tuner_set_config(struct dvb_frontend *fe,
				  void *priv_cfg)
{}

static int vidtv_tuner_get_frequency(struct dvb_frontend *fe,
				     u32 *frequency)
{}

static int vidtv_tuner_get_bandwidth(struct dvb_frontend *fe,
				     u32 *bandwidth)
{}

static int vidtv_tuner_get_if_frequency(struct dvb_frontend *fe,
					u32 *frequency)
{}

static int vidtv_tuner_get_status(struct dvb_frontend *fe, u32 *status)
{}

static const struct dvb_tuner_ops vidtv_tuner_ops =;

static const struct i2c_device_id vidtv_tuner_i2c_id_table[] =;
MODULE_DEVICE_TABLE(i2c, vidtv_tuner_i2c_id_table);

static int vidtv_tuner_i2c_probe(struct i2c_client *client)
{}

static void vidtv_tuner_i2c_remove(struct i2c_client *client)
{}

static struct i2c_driver vidtv_tuner_i2c_driver =;
module_i2c_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();