linux/sound/pci/lola/lola.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Support for Digigram Lola PCI-e boards
 *
 *  Copyright (c) 2011 Takashi Iwai <[email protected]>
 */

#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/initval.h>
#include "lola.h"

/* Standard options */
static int index[SNDRV_CARDS] =;
static char *id[SNDRV_CARDS] =;
static bool enable[SNDRV_CARDS] =;

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

/* Lola-specific options */

/* for instance use always max granularity which is compatible
 * with all sample rates
 */
static int granularity[SNDRV_CARDS] =;

/* below a sample_rate of 16kHz the analogue audio quality is NOT excellent */
static int sample_rate_min[SNDRV_CARDS] =;

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

/*
 */

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

#ifdef CONFIG_SND_DEBUG_VERBOSE
static int debug;
module_param(debug, int, 0644);
#define verbose_debug(fmt, args...)
#else
#define verbose_debug
#endif

/*
 * pseudo-codec read/write via CORB/RIRB
 */

static int corb_send_verb(struct lola *chip, unsigned int nid,
			  unsigned int verb, unsigned int data,
			  unsigned int extdata)
{}

static void lola_queue_unsol_event(struct lola *chip, unsigned int res,
				   unsigned int res_ex)
{}

/* retrieve RIRB entry - called from interrupt handler */
static void lola_update_rirb(struct lola *chip)
{}

static int rirb_get_response(struct lola *chip, unsigned int *val,
			     unsigned int *extval)
{}

/* aynchronous write of a codec verb with data */
int lola_codec_write(struct lola *chip, unsigned int nid, unsigned int verb,
		     unsigned int data, unsigned int extdata)
{}

/* write a codec verb with data and read the returned status */
int lola_codec_read(struct lola *chip, unsigned int nid, unsigned int verb,
		    unsigned int data, unsigned int extdata,
		    unsigned int *val, unsigned int *extval)
{}

/* flush all pending codec writes */
int lola_codec_flush(struct lola *chip)
{}

/*
 * interrupt handler
 */
static irqreturn_t lola_interrupt(int irq, void *dev_id)
{}


/*
 * controller
 */
static int reset_controller(struct lola *chip)
{}

static void lola_irq_enable(struct lola *chip)
{}

static void lola_irq_disable(struct lola *chip)
{}

static int setup_corb_rirb(struct lola *chip)
{}

static void stop_corb_rirb(struct lola *chip)
{}

static void lola_reset_setups(struct lola *chip)
{}

static int lola_parse_tree(struct lola *chip)
{}

static void lola_stop_hw(struct lola *chip)
{}

static void lola_free(struct snd_card *card)
{}

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

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

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

/* PCI IDs */
static const struct pci_device_id lola_ids[] =;
MODULE_DEVICE_TABLE(pci, lola_ids);

/* pci_driver definition */
static struct pci_driver lola_driver =;

module_pci_driver();