linux/sound/pci/intel8x0m.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *   ALSA modem driver for Intel ICH (i8x0) chipsets
 *
 *	Copyright (c) 2000 Jaroslav Kysela <[email protected]>
 *
 *   This is modified (by Sasha Khapyorsky <[email protected]>) version
 *   of ALSA ICH sound driver intel8x0.c .
 */      

#include <linux/io.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/info.h>
#include <sound/initval.h>

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

static int index =; /* Exclude the first card */
static char *id =;	/* ID for this card */
static int ac97_clock;

module_param(index, int, 0444);
MODULE_PARM_DESC();
module_param(id, charp, 0444);
MODULE_PARM_DESC();
module_param(ac97_clock, int, 0444);
MODULE_PARM_DESC();

/* just for backward compatibility */
static bool enable;
module_param(enable, bool, 0444);

/*
 *  Direct registers
 */
enum {};

#define ICHREG(x)

#define DEFINE_REGSET(name,base)

/* busmaster blocks */
DEFINE_REGSET(OFF, 0);		/* offset */

/* values for each busmaster block */

/* LVI */
#define ICH_REG_LVI_MASK

/* SR */
#define ICH_FIFOE
#define ICH_BCIS
#define ICH_LVBCI
#define ICH_CELV
#define ICH_DCH

/* PIV */
#define ICH_REG_PIV_MASK

/* CR */
#define ICH_IOCE
#define ICH_FEIE
#define ICH_LVBIE
#define ICH_RESETREGS
#define ICH_STARTBM


/* global block */
#define ICH_REG_GLOB_CNT
#define ICH_TRIE
#define ICH_SRIE
#define ICH_PRIE
#define ICH_ACLINK
#define ICH_AC97WARM
#define ICH_AC97COLD
#define ICH_GIE
#define ICH_REG_GLOB_STA
#define ICH_TRI
#define ICH_TCR
#define ICH_BCS
#define ICH_SPINT
#define ICH_P2INT
#define ICH_M2INT
#define ICH_SAMPLE_CAP
#define ICH_MULTICHAN_CAP
#define ICH_MD3
#define ICH_AD3
#define ICH_RCS
#define ICH_BIT3
#define ICH_BIT2
#define ICH_BIT1
#define ICH_SRI
#define ICH_PRI
#define ICH_SCR
#define ICH_PCR
#define ICH_MCINT
#define ICH_POINT
#define ICH_PIINT
#define ICH_NVSPINT
#define ICH_MOINT
#define ICH_MIINT
#define ICH_GSCI
#define ICH_REG_ACC_SEMA
#define ICH_CAS

#define ICH_MAX_FRAGS


/*
 *  
 */

enum {};
enum {};

#define get_ichdev(substream)

struct ichdev {};

struct intel8x0m {};

static const struct pci_device_id snd_intel8x0m_ids[] =;

MODULE_DEVICE_TABLE(pci, snd_intel8x0m_ids);

/*
 *  Lowlevel I/O - busmaster
 */

static inline u8 igetbyte(struct intel8x0m *chip, u32 offset)
{}

static inline u16 igetword(struct intel8x0m *chip, u32 offset)
{}

static inline u32 igetdword(struct intel8x0m *chip, u32 offset)
{}

static inline void iputbyte(struct intel8x0m *chip, u32 offset, u8 val)
{}

static inline void iputword(struct intel8x0m *chip, u32 offset, u16 val)
{}

static inline void iputdword(struct intel8x0m *chip, u32 offset, u32 val)
{}

/*
 *  Lowlevel I/O - AC'97 registers
 */

static inline u16 iagetword(struct intel8x0m *chip, u32 offset)
{}

static inline void iaputword(struct intel8x0m *chip, u32 offset, u16 val)
{}

/*
 *  Basic I/O
 */

/*
 * access to AC97 codec via normal i/o (for ICH and SIS7013)
 */

/* return the GLOB_STA bit for the corresponding codec */
static unsigned int get_ich_codec_bit(struct intel8x0m *chip, unsigned int codec)
{}

static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int codec)
{}
 
static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97,
				      unsigned short reg,
				      unsigned short val)
{}

static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97,
					       unsigned short reg)
{}


/*
 * DMA I/O
 */
static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev)
{}

/*
 *  Interrupt handler
 */

static inline void snd_intel8x0m_update(struct intel8x0m *chip, struct ichdev *ichdev)
{}

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

/*
 *  PCM part
 */

static int snd_intel8x0m_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{}

static snd_pcm_uframes_t snd_intel8x0m_pcm_pointer(struct snd_pcm_substream *substream)
{}

static int snd_intel8x0m_pcm_prepare(struct snd_pcm_substream *substream)
{}

static const struct snd_pcm_hardware snd_intel8x0m_stream =;


static int snd_intel8x0m_pcm_open(struct snd_pcm_substream *substream, struct ichdev *ichdev)
{}

static int snd_intel8x0m_playback_open(struct snd_pcm_substream *substream)
{}

static int snd_intel8x0m_playback_close(struct snd_pcm_substream *substream)
{}

static int snd_intel8x0m_capture_open(struct snd_pcm_substream *substream)
{}

static int snd_intel8x0m_capture_close(struct snd_pcm_substream *substream)
{}


static const struct snd_pcm_ops snd_intel8x0m_playback_ops =;

static const struct snd_pcm_ops snd_intel8x0m_capture_ops =;


struct ich_pcm_table {};

static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
			      const struct ich_pcm_table *rec)
{}

static const struct ich_pcm_table intel_pcms[] =;

static int snd_intel8x0m_pcm(struct intel8x0m *chip)
{}
	

/*
 *  Mixer part
 */

static void snd_intel8x0m_mixer_free_ac97_bus(struct snd_ac97_bus *bus)
{}

static void snd_intel8x0m_mixer_free_ac97(struct snd_ac97 *ac97)
{}


static int snd_intel8x0m_mixer(struct intel8x0m *chip, int ac97_clock)
{}


/*
 *
 */

static int snd_intel8x0m_ich_chip_init(struct intel8x0m *chip, int probing)
{}

static int snd_intel8x0m_chip_init(struct intel8x0m *chip, int probing)
{}

static void snd_intel8x0m_free(struct snd_card *card)
{}

/*
 * power management
 */
static int intel8x0m_suspend(struct device *dev)
{}

static int intel8x0m_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(intel8x0m_pm, intel8x0m_suspend, intel8x0m_resume);

static void snd_intel8x0m_proc_read(struct snd_info_entry * entry,
				   struct snd_info_buffer *buffer)
{}

static void snd_intel8x0m_proc_init(struct intel8x0m *chip)
{}

struct ich_reg_info {};

static int snd_intel8x0m_init(struct snd_card *card,
			      struct pci_dev *pci,
			      unsigned long device_type)
{}

static struct shortname_table {} shortnames[] =;

static int __snd_intel8x0m_probe(struct pci_dev *pci,
				 const struct pci_device_id *pci_id)
{}

static int snd_intel8x0m_probe(struct pci_dev *pci,
			       const struct pci_device_id *pci_id)
{}

static struct pci_driver intel8x0m_driver =;

module_pci_driver();