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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * AimsLab RadioTrack (aka RadioVeveal) driver
 *
 * Copyright 1997 M. Kirkwood
 *
 * Converted to the radio-isa framework by Hans Verkuil <[email protected]>
 * Converted to V4L2 API by Mauro Carvalho Chehab <[email protected]>
 * Converted to new API by Alan Cox <[email protected]>
 * Various bugfixes and enhancements by Russell Kroll <[email protected]>
 *
 * Notes on the hardware (reverse engineered from other peoples'
 * reverse engineering of AIMS' code :-)
 *
 *  Frequency control is done digitally -- ie out(port,encodefreq(95.8));
 *
 *  The signal strength query is unsurprisingly inaccurate.  And it seems
 *  to indicate that (on my card, at least) the frequency setting isn't
 *  too great.  (I have to tune up .025MHz from what the freq should be
 *  to get a report that the thing is tuned.)
 *
 *  Volume control is (ugh) analogue:
 *   out(port, start_increasing_volume);
 *   wait(a_wee_while);
 *   out(port, stop_changing_the_volume);
 *
 * Fully tested with the Keene USB FM Transmitter and the v4l2-compliance tool.
 */

#include <linux/module.h>	/* Modules			*/
#include <linux/init.h>		/* Initdata			*/
#include <linux/ioport.h>	/* request_region		*/
#include <linux/delay.h>	/* msleep			*/
#include <linux/videodev2.h>	/* kernel radio structs		*/
#include <linux/io.h>		/* outb, outb_p			*/
#include <linux/slab.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include "radio-isa.h"
#include "lm7000.h"

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

#ifndef CONFIG_RADIO_RTRACK_PORT
#define CONFIG_RADIO_RTRACK_PORT
#endif

#define RTRACK_MAX

static int io[RTRACK_MAX] =;
static int radio_nr[RTRACK_MAX]	=;

module_param_array();
MODULE_PARM_DESC();
module_param_array();
MODULE_PARM_DESC();

struct rtrack {};

static struct radio_isa_card *rtrack_alloc(void)
{}

#define AIMS_BIT_TUN_CE
#define AIMS_BIT_TUN_CLK
#define AIMS_BIT_TUN_DATA
#define AIMS_BIT_VOL_CE
#define AIMS_BIT_TUN_STRQ
/* bit 5 is not connected */
#define AIMS_BIT_VOL_UP
#define AIMS_BIT_VOL_DN

static void rtrack_set_pins(void *handle, u8 pins)
{}

static int rtrack_s_frequency(struct radio_isa_card *isa, u32 freq)
{}

static u32 rtrack_g_signal(struct radio_isa_card *isa)
{}

static int rtrack_s_mute_volume(struct radio_isa_card *isa, bool mute, int vol)
{}

/* Mute card - prevents noisy bootups */
static int rtrack_initialize(struct radio_isa_card *isa)
{}

static const struct radio_isa_ops rtrack_ops =;

static const int rtrack_ioports[] =;

static struct radio_isa_driver rtrack_driver =;

static int __init rtrack_init(void)
{}

static void __exit rtrack_exit(void)
{}

module_init();
module_exit(rtrack_exit);