linux/sound/pci/ad1889.c

// SPDX-License-Identifier: GPL-2.0-only
/* Analog Devices 1889 audio driver
 *
 * This is a driver for the AD1889 PCI audio chipset found
 * on the HP PA-RISC [BCJ]-xxx0 workstations.
 *
 * Copyright (C) 2004-2005, Kyle McMartin <[email protected]>
 * Copyright (C) 2005, Thibaut Varene <[email protected]>
 *   Based on the OSS AD1889 driver by Randolph Chung <[email protected]>
 *
 * TODO:
 *	Do we need to take care of CCS register?
 *	Maybe we could use finer grained locking (separate locks for pb/cap)?
 * Wishlist:
 *	Control Interface (mixer) support
 *	Better AC97 support (VSR...)?
 *	PM support
 *	MIDI support
 *	Game Port support
 *	SG DMA support (this will need *a lot* of work)
 */

#include <linux/init.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/io.h>

#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#include <sound/ac97_codec.h>

#include "ad1889.h"
#include "ac97/ac97_id.h"

#define AD1889_DRVVER

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

static int index[SNDRV_CARDS] =;
module_param_array();
MODULE_PARM_DESC();

static char *id[SNDRV_CARDS] =;
module_param_array();
MODULE_PARM_DESC();

static bool enable[SNDRV_CARDS] =;
module_param_array();
MODULE_PARM_DESC();

static char *ac97_quirk[SNDRV_CARDS];
module_param_array();
MODULE_PARM_DESC();

#define DEVNAME
#define PFX

/* keep track of some hw registers */
struct ad1889_register_state {};

struct snd_ad1889 {};

static inline u16
ad1889_readw(struct snd_ad1889 *chip, unsigned reg)
{}

static inline void
ad1889_writew(struct snd_ad1889 *chip, unsigned reg, u16 val)
{}

static inline u32
ad1889_readl(struct snd_ad1889 *chip, unsigned reg)
{}

static inline void
ad1889_writel(struct snd_ad1889 *chip, unsigned reg, u32 val)
{}

static inline void
ad1889_unmute(struct snd_ad1889 *chip)
{}

static inline void
ad1889_mute(struct snd_ad1889 *chip)
{}

static inline void
ad1889_load_adc_buffer_address(struct snd_ad1889 *chip, u32 address)
{}

static inline void
ad1889_load_adc_buffer_count(struct snd_ad1889 *chip, u32 count)
{}

static inline void
ad1889_load_adc_interrupt_count(struct snd_ad1889 *chip, u32 count)
{}

static inline void
ad1889_load_wave_buffer_address(struct snd_ad1889 *chip, u32 address)
{}

static inline void
ad1889_load_wave_buffer_count(struct snd_ad1889 *chip, u32 count)
{}

static inline void
ad1889_load_wave_interrupt_count(struct snd_ad1889 *chip, u32 count)
{}

static void
ad1889_channel_reset(struct snd_ad1889 *chip, unsigned int channel)
{}

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

static void
snd_ad1889_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned short val)
{}

static int
snd_ad1889_ac97_ready(struct snd_ad1889 *chip)
{}

static const struct snd_pcm_hardware snd_ad1889_playback_hw =;

static const struct snd_pcm_hardware snd_ad1889_capture_hw =;

static int
snd_ad1889_playback_open(struct snd_pcm_substream *ss)
{}

static int
snd_ad1889_capture_open(struct snd_pcm_substream *ss)
{}

static int
snd_ad1889_playback_close(struct snd_pcm_substream *ss)
{}

static int
snd_ad1889_capture_close(struct snd_pcm_substream *ss)
{}

static int
snd_ad1889_playback_prepare(struct snd_pcm_substream *ss)
{}

static int
snd_ad1889_capture_prepare(struct snd_pcm_substream *ss)
{}

/* this is called in atomic context with IRQ disabled.
   Must be as fast as possible and not sleep.
   DMA should be *triggered* by this call.
   The WSMC "WAEN" bit triggers DMA Wave On/Off */
static int
snd_ad1889_playback_trigger(struct snd_pcm_substream *ss, int cmd)
{}

/* this is called in atomic context with IRQ disabled.
   Must be as fast as possible and not sleep.
   DMA should be *triggered* by this call.
   The RAMC "ADEN" bit triggers DMA ADC On/Off */
static int
snd_ad1889_capture_trigger(struct snd_pcm_substream *ss, int cmd)
{}

/* Called in atomic context with IRQ disabled */
static snd_pcm_uframes_t
snd_ad1889_playback_pointer(struct snd_pcm_substream *ss)
{}

/* Called in atomic context with IRQ disabled */
static snd_pcm_uframes_t
snd_ad1889_capture_pointer(struct snd_pcm_substream *ss)
{}

static const struct snd_pcm_ops snd_ad1889_playback_ops =;

static const struct snd_pcm_ops snd_ad1889_capture_ops =;

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

static int
snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
{}

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

static void
snd_ad1889_proc_init(struct snd_ad1889 *chip)
{}

static const struct ac97_quirk ac97_quirks[] =;

static void
snd_ad1889_ac97_xinit(struct snd_ad1889 *chip)
{}

static int
snd_ad1889_ac97_init(struct snd_ad1889 *chip, const char *quirk_override)
{}

static void
snd_ad1889_free(struct snd_card *card)
{}

static int
snd_ad1889_create(struct snd_card *card, struct pci_dev *pci)
{}

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

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

static const struct pci_device_id snd_ad1889_ids[] =;
MODULE_DEVICE_TABLE(pci, snd_ad1889_ids);

static struct pci_driver ad1889_pci_driver =;

module_pci_driver();