linux/sound/isa/msnd/msnd_pinnacle.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*********************************************************************
 *
 * Linux multisound pinnacle/fiji driver for ALSA.
 *
 * 2002/06/30 Karsten Wiese:
 *	for now this is only used to build a pinnacle / fiji driver.
 *	the OSS parent of this code is designed to also support
 *	the multisound classic via the file msnd_classic.c.
 *	to make it easier for some brave heart to implemt classic
 *	support in alsa, i left all the MSND_CLASSIC tokens in this file.
 *	but for now this untested & undone.
 *
 * ripped from linux kernel 2.4.18 by Karsten Wiese.
 *
 * the following is a copy of the 2.4.18 OSS FREE file-heading comment:
 *
 * Turtle Beach MultiSound Sound Card Driver for Linux
 * msnd_pinnacle.c / msnd_classic.c
 *
 * -- If MSND_CLASSIC is defined:
 *
 *     -> driver for Turtle Beach Classic/Monterey/Tahiti
 *
 * -- Else
 *
 *     -> driver for Turtle Beach Pinnacle/Fiji
 *
 * 12-3-2000  Modified IO port validation  Steve Sycamore
 *
 * Copyright (C) 1998 Andrew Veliath
 *
 ********************************************************************/

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/ioport.h>
#include <linux/firmware.h>
#include <linux/isa.h>
#include <linux/isapnp.h>
#include <linux/irq.h>
#include <linux/io.h>

#include <sound/core.h>
#include <sound/initval.h>
#include <sound/asound.h>
#include <sound/pcm.h>
#include <sound/mpu401.h>

#ifdef MSND_CLASSIC
# ifndef __alpha__
#define SLOWIO
# endif
#endif
#include "msnd.h"
#ifdef MSND_CLASSIC
#  include "msnd_classic.h"
#define LOGNAME
#define DEV_NAME
#else
#  include "msnd_pinnacle.h"
#define LOGNAME
#define DEV_NAME
#endif

static void set_default_audio_parameters(struct snd_msnd *chip)
{}

static void snd_msnd_eval_dsp_msg(struct snd_msnd *chip, u16 wMessage)
{}

static irqreturn_t snd_msnd_interrupt(int irq, void *dev_id)
{}


static int snd_msnd_reset_dsp(long io, unsigned char *info)
{}

static int snd_msnd_probe(struct snd_card *card)
{}

static int snd_msnd_init_sma(struct snd_msnd *chip)
{}


static int upload_dsp_code(struct snd_card *card)
{}

#ifdef MSND_CLASSIC
static void reset_proteus(struct snd_msnd *chip)
{
	outb(HPPRORESET_ON, chip->io + HP_PROR);
	msleep(TIME_PRO_RESET);
	outb(HPPRORESET_OFF, chip->io + HP_PROR);
	msleep(TIME_PRO_RESET_DONE);
}
#endif

static int snd_msnd_initialize(struct snd_card *card)
{}

static int snd_msnd_dsp_full_reset(struct snd_card *card)
{}


static int snd_msnd_send_dsp_cmd_chk(struct snd_msnd *chip, u8 cmd)
{}

static int snd_msnd_calibrate_adc(struct snd_msnd *chip, u16 srate)
{}

/*
 * ALSA callback function, called when attempting to open the MIDI device.
 */
static int snd_msnd_mpu401_open(struct snd_mpu401 *mpu)
{}

static void snd_msnd_mpu401_close(struct snd_mpu401 *mpu)
{}

static long mpu_io[SNDRV_CARDS] =;
static int mpu_irq[SNDRV_CARDS] =;

static int snd_msnd_attach(struct snd_card *card)
{}


#ifndef MSND_CLASSIC

/* Pinnacle/Fiji Logical Device Configuration */

static int snd_msnd_write_cfg(int cfg, int reg, int value)
{}

static int snd_msnd_write_cfg_io0(int cfg, int num, u16 io)
{}

static int snd_msnd_write_cfg_io1(int cfg, int num, u16 io)
{}

static int snd_msnd_write_cfg_irq(int cfg, int num, u16 irq)
{}

static int snd_msnd_write_cfg_mem(int cfg, int num, int mem)
{}

static int snd_msnd_activate_logical(int cfg, int num)
{}

static int snd_msnd_write_cfg_logical(int cfg, int num, u16 io0,
				      u16 io1, u16 irq, int mem)
{}

static int snd_msnd_pinnacle_cfg_reset(int cfg)
{}
#endif

static int index[SNDRV_CARDS] =;	/* Index 0-MAX */
static char *id[SNDRV_CARDS] =;	/* ID for this card */

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

static long io[SNDRV_CARDS] =;
static int irq[SNDRV_CARDS] =;
static long mem[SNDRV_CARDS] =;

#ifndef MSND_CLASSIC
static long cfg[SNDRV_CARDS] =;

/* Extra Peripheral Configuration (Default: Disable) */
static long ide_io0[SNDRV_CARDS] =;
static long ide_io1[SNDRV_CARDS] =;
static int ide_irq[SNDRV_CARDS] =;

static long joystick_io[SNDRV_CARDS] =;
/* If we have the digital daugherboard... */
static int digital[SNDRV_CARDS];

/* Extra Peripheral Configuration */
static int reset[SNDRV_CARDS];
#endif

static int write_ndelay[SNDRV_CARDS] =;

static int calibrate_signal;

#ifdef CONFIG_PNP
static bool isapnp[SNDRV_CARDS] =;
module_param_array();
MODULE_PARM_DESC();
#define has_isapnp(x)
#else
#define has_isapnp
#endif

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

module_param_hw_array(io, long, ioport, NULL, 0444);
MODULE_PARM_DESC();
module_param_hw_array(irq, int, irq, NULL, 0444);
module_param_hw_array(mem, long, iomem, NULL, 0444);
module_param_array();
module_param(calibrate_signal, int, 0444);
#ifndef MSND_CLASSIC
module_param_array();
module_param_hw_array(cfg, long, ioport, NULL, 0444);
module_param_array();
module_param_hw_array(mpu_io, long, ioport, NULL, 0444);
module_param_hw_array(mpu_irq, int, irq, NULL, 0444);
module_param_hw_array(ide_io0, long, ioport, NULL, 0444);
module_param_hw_array(ide_io1, long, ioport, NULL, 0444);
module_param_hw_array(ide_irq, int, irq, NULL, 0444);
module_param_hw_array(joystick_io, long, ioport, NULL, 0444);
#endif


static int snd_msnd_isa_match(struct device *pdev, unsigned int i)
{}

static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
{}

static struct isa_driver snd_msnd_driver =;

#ifdef CONFIG_PNP
static int snd_msnd_pnp_detect(struct pnp_card_link *pcard,
			       const struct pnp_card_device_id *pid)
{}

static int isa_registered;
static int pnp_registered;

static const struct pnp_card_device_id msnd_pnpids[] =;

MODULE_DEVICE_TABLE(pnp_card, msnd_pnpids);

static struct pnp_card_driver msnd_pnpc_driver =;
#endif /* CONFIG_PNP */

static int __init snd_msnd_init(void)
{}

static void __exit snd_msnd_exit(void)
{}

module_init();
module_exit(snd_msnd_exit);