linux/sound/pci/ymfpci/ymfpci.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __SOUND_YMFPCI_H
#define __SOUND_YMFPCI_H

/*
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *  Definitions for Yahama YMF724/740/744/754 chips
 */

#include <sound/pcm.h>
#include <sound/rawmidi.h>
#include <sound/ac97_codec.h>
#include <sound/timer.h>
#include <linux/gameport.h>

/*
 *  Direct registers
 */

#define YMFREG(chip, reg)

#define YDSXGR_INTFLAG
#define YDSXGR_ACTIVITY
#define YDSXGR_GLOBALCTRL
#define YDSXGR_ZVCTRL
#define YDSXGR_TIMERCTRL
#define YDSXGR_TIMERCOUNT
#define YDSXGR_SPDIFOUTCTRL
#define YDSXGR_SPDIFOUTSTATUS
#define YDSXGR_EEPROMCTRL
#define YDSXGR_SPDIFINCTRL
#define YDSXGR_SPDIFINSTATUS
#define YDSXGR_DSPPROGRAMDL
#define YDSXGR_DLCNTRL
#define YDSXGR_GPIOININTFLAG
#define YDSXGR_GPIOININTENABLE
#define YDSXGR_GPIOINSTATUS
#define YDSXGR_GPIOOUTCTRL
#define YDSXGR_GPIOFUNCENABLE
#define YDSXGR_GPIOTYPECONFIG
#define YDSXGR_AC97CMDDATA
#define YDSXGR_AC97CMDADR
#define YDSXGR_PRISTATUSDATA
#define YDSXGR_PRISTATUSADR
#define YDSXGR_SECSTATUSDATA
#define YDSXGR_SECSTATUSADR
#define YDSXGR_SECCONFIG
#define YDSXGR_LEGACYOUTVOL
#define YDSXGR_LEGACYOUTVOLL
#define YDSXGR_LEGACYOUTVOLR
#define YDSXGR_NATIVEDACOUTVOL
#define YDSXGR_NATIVEDACOUTVOLL
#define YDSXGR_NATIVEDACOUTVOLR
#define YDSXGR_ZVOUTVOL
#define YDSXGR_ZVOUTVOLL
#define YDSXGR_ZVOUTVOLR
#define YDSXGR_SECADCOUTVOL
#define YDSXGR_SECADCOUTVOLL
#define YDSXGR_SECADCOUTVOLR
#define YDSXGR_PRIADCOUTVOL
#define YDSXGR_PRIADCOUTVOLL
#define YDSXGR_PRIADCOUTVOLR
#define YDSXGR_LEGACYLOOPVOL
#define YDSXGR_LEGACYLOOPVOLL
#define YDSXGR_LEGACYLOOPVOLR
#define YDSXGR_NATIVEDACLOOPVOL
#define YDSXGR_NATIVEDACLOOPVOLL
#define YDSXGR_NATIVEDACLOOPVOLR
#define YDSXGR_ZVLOOPVOL
#define YDSXGR_ZVLOOPVOLL
#define YDSXGR_ZVLOOPVOLR
#define YDSXGR_SECADCLOOPVOL
#define YDSXGR_SECADCLOOPVOLL
#define YDSXGR_SECADCLOOPVOLR
#define YDSXGR_PRIADCLOOPVOL
#define YDSXGR_PRIADCLOOPVOLL
#define YDSXGR_PRIADCLOOPVOLR
#define YDSXGR_NATIVEADCINVOL
#define YDSXGR_NATIVEADCINVOLL
#define YDSXGR_NATIVEADCINVOLR
#define YDSXGR_NATIVEDACINVOL
#define YDSXGR_NATIVEDACINVOLL
#define YDSXGR_NATIVEDACINVOLR
#define YDSXGR_BUF441OUTVOL
#define YDSXGR_BUF441OUTVOLL
#define YDSXGR_BUF441OUTVOLR
#define YDSXGR_BUF441LOOPVOL
#define YDSXGR_BUF441LOOPVOLL
#define YDSXGR_BUF441LOOPVOLR
#define YDSXGR_SPDIFOUTVOL
#define YDSXGR_SPDIFOUTVOLL
#define YDSXGR_SPDIFOUTVOLR
#define YDSXGR_SPDIFLOOPVOL
#define YDSXGR_SPDIFLOOPVOLL
#define YDSXGR_SPDIFLOOPVOLR
#define YDSXGR_ADCSLOTSR
#define YDSXGR_RECSLOTSR
#define YDSXGR_ADCFORMAT
#define YDSXGR_RECFORMAT
#define YDSXGR_P44SLOTSR
#define YDSXGR_STATUS
#define YDSXGR_CTRLSELECT
#define YDSXGR_MODE
#define YDSXGR_SAMPLECOUNT
#define YDSXGR_NUMOFSAMPLES
#define YDSXGR_CONFIG
#define YDSXGR_PLAYCTRLSIZE
#define YDSXGR_RECCTRLSIZE
#define YDSXGR_EFFCTRLSIZE
#define YDSXGR_WORKSIZE
#define YDSXGR_MAPOFREC
#define YDSXGR_MAPOFEFFECT
#define YDSXGR_PLAYCTRLBASE
#define YDSXGR_RECCTRLBASE
#define YDSXGR_EFFCTRLBASE
#define YDSXGR_WORKBASE
#define YDSXGR_DSPINSTRAM
#define YDSXGR_CTRLINSTRAM

#define YDSXG_AC97READCMD
#define YDSXG_AC97WRITECMD

#define PCIR_DSXG_LEGACY
#define PCIR_DSXG_ELEGACY
#define PCIR_DSXG_CTRL
#define PCIR_DSXG_PWRCTRL1
#define PCIR_DSXG_PWRCTRL2
#define PCIR_DSXG_FMBASE
#define PCIR_DSXG_SBBASE
#define PCIR_DSXG_MPU401BASE
#define PCIR_DSXG_JOYBASE

#define YDSXG_DSPLENGTH
#define YDSXG_CTRLLENGTH

#define YDSXG_DEFAULT_WORK_SIZE

#define YDSXG_PLAYBACK_VOICES
#define YDSXG_CAPTURE_VOICES
#define YDSXG_EFFECT_VOICES

#define YMFPCI_LEGACY_SBEN
#define YMFPCI_LEGACY_FMEN
#define YMFPCI_LEGACY_JPEN
#define YMFPCI_LEGACY_MEN
#define YMFPCI_LEGACY_MIEN
#define YMFPCI_LEGACY_IOBITS
#define YMFPCI_LEGACY_SDMA
#define YMFPCI_LEGACY_SBIRQ
#define YMFPCI_LEGACY_MPUIRQ
#define YMFPCI_LEGACY_SIEN
#define YMFPCI_LEGACY_LAD

#define YMFPCI_LEGACY2_FMIO
#define YMFPCI_LEGACY2_SBIO
#define YMFPCI_LEGACY2_MPUIO
#define YMFPCI_LEGACY2_JSIO
#define YMFPCI_LEGACY2_MAIM
#define YMFPCI_LEGACY2_SMOD
#define YMFPCI_LEGACY2_SBVER
#define YMFPCI_LEGACY2_IMOD
/* SIEN:IMOD 0:0 = legacy irq, 0:1 = INTA, 1:0 = serialized IRQ */

#if IS_REACHABLE(CONFIG_GAMEPORT)
#define SUPPORT_JOYSTICK
#endif

/*
 *
 */

struct snd_ymfpci_playback_bank {};

struct snd_ymfpci_capture_bank {};

struct snd_ymfpci_effect_bank {};

struct snd_ymfpci_pcm;
struct snd_ymfpci;

enum snd_ymfpci_voice_type {};

struct snd_ymfpci_voice {};

enum snd_ymfpci_pcm_type {};

struct snd_ymfpci_pcm {};

static const int saved_regs_index[] =;
#define YDSXGR_NUM_SAVED_REGS

static const int pci_saved_regs_index[] =;
#define DSXG_PCI_NUM_SAVED_REGS
#define DSXG_PCI_NUM_SAVED_LEGACY_REGS
static_assert();

struct snd_ymfpci {};

int snd_ymfpci_create(struct snd_card *card,
		      struct pci_dev *pci,
		      u16 old_legacy_ctrl);
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);

extern const struct dev_pm_ops snd_ymfpci_pm;

int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device);
int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device);
int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device);
int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device);
int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);

#endif /* __SOUND_YMFPCI_H */