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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Guillemot Maxi Radio FM 2000 PCI radio card driver for Linux
 * (C) 2001 Dimitromanolakis Apostolos <[email protected]>
 *
 * Based in the radio Maestro PCI driver. Actually it uses the same chip
 * for radio but different pci controller.
 *
 * I didn't have any specs I reversed engineered the protocol from
 * the windows driver (radio.dll).
 *
 * The card uses the TEA5757 chip that includes a search function but it
 * is useless as I haven't found any way to read back the frequency. If
 * anybody does please mail me.
 *
 * For the pdf file see:
 * http://www.nxp.com/acrobat_download2/expired_datasheets/TEA5757_5759_3.pdf
 *
 *
 * CHANGES:
 *   0.75b
 *     - better pci interface thanks to Francois Romieu <[email protected]>
 *
 *   0.75      Sun Feb  4 22:51:27 EET 2001
 *     - tiding up
 *     - removed support for multiple devices as it didn't work anyway
 *
 * BUGS:
 *   - card unmutes if you change frequency
 *
 * (c) 2006, 2007 by Mauro Carvalho Chehab <[email protected]>:
 *	- Conversion to V4L2 API
 *      - Uses video_ioctl2 for parsing and to add debug support
 */


#include <linux/module.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/videodev2.h>
#include <linux/io.h>
#include <linux/slab.h>
#include <media/drv-intf/tea575x.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-fh.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>

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

static int radio_nr =;
module_param(radio_nr, int, 0644);
MODULE_PARM_DESC();

/* TEA5757 pin mappings */
static const int clk =, data =, wren =, mo_st =, power =;

static atomic_t maxiradio_instance =;

#define PCI_VENDOR_ID_GUILLEMOT
#define PCI_DEVICE_ID_GUILLEMOT_MAXIRADIO

struct maxiradio
{};

static inline struct maxiradio *to_maxiradio(struct v4l2_device *v4l2_dev)
{}

static void maxiradio_tea575x_set_pins(struct snd_tea575x *tea, u8 pins)
{}

/* Note: this card cannot read out the data of the shift registers,
   only the mono/stereo pin works. */
static u8 maxiradio_tea575x_get_pins(struct snd_tea575x *tea)
{}

static void maxiradio_tea575x_set_direction(struct snd_tea575x *tea, bool output)
{}

static const struct snd_tea575x_ops maxiradio_tea_ops =;

static int maxiradio_probe(struct pci_dev *pdev,
			   const struct pci_device_id *ent)
{}

static void maxiradio_remove(struct pci_dev *pdev)
{}

static const struct pci_device_id maxiradio_pci_tbl[] =;

MODULE_DEVICE_TABLE(pci, maxiradio_pci_tbl);

static struct pci_driver maxiradio_driver =;

module_pci_driver();