linux/drivers/media/radio/radio-cadet.c

// SPDX-License-Identifier: GPL-2.0-only
/* radio-cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card
 *
 * by Fred Gleason <[email protected]>
 * Version 0.3.3
 *
 * (Loosely) based on code for the Aztech radio card by
 *
 * Russell Kroll    ([email protected])
 * Quay Ly
 * Donald Song
 * Jason Lewis      ([email protected])
 * Scott McGrath    ([email protected])
 * William McGrath  ([email protected])
 *
 * History:
 * 2000-04-29	Russell Kroll <[email protected]>
 *		Added ISAPnP detection for Linux 2.3/2.4
 *
 * 2001-01-10	Russell Kroll <[email protected]>
 *		Removed dead CONFIG_RADIO_CADET_PORT code
 *		PnP detection on load is now default (no args necessary)
 *
 * 2002-01-17	Adam Belay <[email protected]>
 *		Updated to latest pnp code
 *
 * 2003-01-31	Alan Cox <[email protected]>
 *		Cleaned up locking, delay code, general odds and ends
 *
 * 2006-07-30	Hans J. Koch <[email protected]>
 *		Changed API to V4L2
 */

#include <linux/module.h>	/* Modules			*/
#include <linux/init.h>		/* Initdata			*/
#include <linux/ioport.h>	/* request_region		*/
#include <linux/delay.h>	/* udelay			*/
#include <linux/videodev2.h>	/* V4L2 API defs		*/
#include <linux/param.h>
#include <linux/pnp.h>
#include <linux/sched.h>
#include <linux/io.h>		/* outb, outb_p			*/
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-event.h>

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

static int io =;		/* default to isapnp activation */
static int radio_nr =;

module_param(io, int, 0);
MODULE_PARM_DESC();
module_param(radio_nr, int, 0);

#define RDS_BUFFER
#define RDS_RX_FLAG
#define MBS_RX_FLAG

struct cadet {};

static struct cadet cadet_card;

/*
 * Signal Strength Threshold Values
 * The V4L API spec does not define any particular unit for the signal
 * strength value.  These values are in microvolts of RF at the tuner's input.
 */
static u16 sigtable[2][4] =;

static const struct v4l2_frequency_band bands[] =;


static int cadet_getstereo(struct cadet *dev)
{}

static unsigned cadet_gettune(struct cadet *dev)
{}

static unsigned cadet_getfreq(struct cadet *dev)
{}

static void cadet_settune(struct cadet *dev, unsigned fifo)
{}

static void cadet_setfreq(struct cadet *dev, unsigned freq)
{}

static bool cadet_has_rds_data(struct cadet *dev)
{}


static void cadet_handler(struct timer_list *t)
{}

static void cadet_start_rds(struct cadet *dev)
{}

static ssize_t cadet_read(struct file *file, char __user *data, size_t count, loff_t *ppos)
{}


static int vidioc_querycap(struct file *file, void *priv,
				struct v4l2_capability *v)
{}

static int vidioc_g_tuner(struct file *file, void *priv,
				struct v4l2_tuner *v)
{}

static int vidioc_s_tuner(struct file *file, void *priv,
				const struct v4l2_tuner *v)
{}

static int vidioc_enum_freq_bands(struct file *file, void *priv,
				struct v4l2_frequency_band *band)
{}

static int vidioc_g_frequency(struct file *file, void *priv,
				struct v4l2_frequency *f)
{}


static int vidioc_s_frequency(struct file *file, void *priv,
				const struct v4l2_frequency *f)
{}

static int cadet_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static int cadet_open(struct file *file)
{}

static int cadet_release(struct file *file)
{}

static __poll_t cadet_poll(struct file *file, struct poll_table_struct *wait)
{}


static const struct v4l2_file_operations cadet_fops =;

static const struct v4l2_ioctl_ops cadet_ioctl_ops =;

static const struct v4l2_ctrl_ops cadet_ctrl_ops =;

#ifdef CONFIG_PNP

static const struct pnp_device_id cadet_pnp_devices[] =;

MODULE_DEVICE_TABLE(pnp, cadet_pnp_devices);

static int cadet_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id)
{}

static struct pnp_driver cadet_pnp_driver =;

#else
static struct pnp_driver cadet_pnp_driver;
#endif

static void cadet_probe(struct cadet *dev)
{}

/*
 * io should only be set if the user has used something like
 * isapnp (the userspace program) to initialize this card for us
 */

static int __init cadet_init(void)
{}

static void __exit cadet_exit(void)
{}

module_init();
module_exit(cadet_exit);