linux/drivers/media/radio/dsbr100.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* A driver for the D-Link DSB-R100 USB radio and Gemtek USB Radio 21.
 * The device plugs into both the USB and an analog audio input, so this thing
 * only deals with initialisation and frequency setting, the
 * audio data has to be handled by a sound driver.
 *
 * Major issue: I can't find out where the device reports the signal
 * strength, and indeed the windows software appearantly just looks
 * at the stereo indicator as well.  So, scanning will only find
 * stereo stations.  Sad, but I can't help it.
 *
 * Also, the windows program sends oodles of messages over to the
 * device, and I couldn't figure out their meaning.  My suspicion
 * is that they don't have any:-)
 *
 * You might find some interesting stuff about this module at
 * http://unimut.fsk.uni-heidelberg.de/unimut/demi/dsbr
 *
 * Fully tested with the Keene USB FM Transmitter and the v4l2-compliance tool.
 *
 * Copyright (c) 2000 Markus Demleitner <[email protected]>
*/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/videodev2.h>
#include <linux/usb.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>

/*
 * Version Information
 */
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();
MODULE_VERSION();

#define DSB100_VENDOR
#define DSB100_PRODUCT

/* Commands the device appears to understand */
#define DSB100_TUNE
#define DSB100_ONOFF

#define TB_LEN

/* Frequency limits in MHz -- these are European values.  For Japanese
devices, that would be 76 and 91.  */
#define FREQ_MIN
#define FREQ_MAX
#define FREQ_MUL

#define v4l2_dev_to_radio(d)

static int radio_nr =;
module_param(radio_nr, int, 0);

/* Data for one (physical) device */
struct dsbr100_device {};

/* Low-level device interface begins here */

/* set a frequency, freq is defined by v4l's TUNER_LOW, i.e. 1/16th kHz */
static int dsbr100_setfreq(struct dsbr100_device *radio, unsigned freq)
{}

/* switch on radio */
static int dsbr100_start(struct dsbr100_device *radio)
{}

/* switch off radio */
static int dsbr100_stop(struct dsbr100_device *radio)
{}

/* return the device status.  This is, in effect, just whether it
sees a stereo signal or not.  Pity. */
static void dsbr100_getstat(struct dsbr100_device *radio)
{}

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_s_frequency(struct file *file, void *priv,
				const struct v4l2_frequency *f)
{}

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

static int usb_dsbr100_s_ctrl(struct v4l2_ctrl *ctrl)
{}


/* USB subsystem interface begins here */

/*
 * Handle unplugging of the device.
 * We call video_unregister_device in any case.
 * The last function called in this procedure is
 * usb_dsbr100_video_device_release
 */
static void usb_dsbr100_disconnect(struct usb_interface *intf)
{}


/* Suspend device - stop device. */
static int usb_dsbr100_suspend(struct usb_interface *intf, pm_message_t message)
{}

/* Resume device - start device. */
static int usb_dsbr100_resume(struct usb_interface *intf)
{}

/* free data structures */
static void usb_dsbr100_release(struct v4l2_device *v4l2_dev)
{}

static const struct v4l2_ctrl_ops usb_dsbr100_ctrl_ops =;

/* File system interface */
static const struct v4l2_file_operations usb_dsbr100_fops =;

static const struct v4l2_ioctl_ops usb_dsbr100_ioctl_ops =;

/* check if the device is present and register with v4l and usb if it is */
static int usb_dsbr100_probe(struct usb_interface *intf,
				const struct usb_device_id *id)
{}

static const struct usb_device_id usb_dsbr100_device_table[] =;

MODULE_DEVICE_TABLE(usb, usb_dsbr100_device_table);

/* USB subsystem interface */
static struct usb_driver usb_dsbr100_driver =;

module_usb_driver();