#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/control.h>
#include <sound/initval.h>
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
static int index[SNDRV_CARDS] = …;
static char *id[SNDRV_CARDS] = …;
static bool enable[SNDRV_CARDS] = …;
static int digital_rate[SNDRV_CARDS];
static bool load_all;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param_array(…);
MODULE_PARM_DESC(…) …;
module_param(load_all, bool, 0444);
MODULE_PARM_DESC(…) …;
#define REG_INT_STAT …
#define REG_INT_MASK …
#define REG_GPIO_DMA_CTL …
#define REG_PACKET_LEN …
#define REG_RISC_STRT_ADD …
#define REG_RISC_COUNT …
#define INT_OFLOW …
#define INT_RISCI …
#define INT_FBUS …
#define INT_FTRGT …
#define INT_FDSR …
#define INT_PPERR …
#define INT_RIPERR …
#define INT_PABORT …
#define INT_OCERR …
#define INT_SCERR …
#define INT_RISC_EN …
#define INT_RISCS_SHIFT …
#define CTL_FIFO_ENABLE …
#define CTL_RISC_ENABLE …
#define CTL_PKTP_4 …
#define CTL_PKTP_8 …
#define CTL_PKTP_16 …
#define CTL_ACAP_EN …
#define CTL_DA_APP …
#define CTL_DA_IOM_AFE …
#define CTL_DA_IOM_DA …
#define CTL_DA_SDR_SHIFT …
#define CTL_DA_SDR_MASK …
#define CTL_DA_LMT …
#define CTL_DA_ES2 …
#define CTL_DA_SBR …
#define CTL_DA_DPM …
#define CTL_DA_LRD_SHIFT …
#define CTL_DA_MLB …
#define CTL_DA_LRI …
#define CTL_DA_SCE …
#define CTL_A_SEL_STV …
#define CTL_A_SEL_SFM …
#define CTL_A_SEL_SML …
#define CTL_A_SEL_SMXC …
#define CTL_A_SEL_SHIFT …
#define CTL_A_SEL_MASK …
#define CTL_A_PWRDN …
#define CTL_A_G2X …
#define CTL_A_GAIN_SHIFT …
#define CTL_A_GAIN_MASK …
#define RISC_WRITE …
#define RISC_WRITEC …
#define RISC_SKIP …
#define RISC_JUMP …
#define RISC_SYNC …
#define RISC_BYTES_ENABLE …
#define RISC_RESYNC …
#define RISC_SET_STATUS_SHIFT …
#define RISC_RESET_STATUS_SHIFT …
#define RISC_IRQ …
#define RISC_EOL …
#define RISC_SOL …
#define RISC_SYNC_FM1 …
#define RISC_SYNC_VRO …
#define ANALOG_CLOCK …
#ifdef CONFIG_SND_BT87X_OVERCLOCK
#define CLOCK_DIV_MIN …
#else
#define CLOCK_DIV_MIN …
#endif
#define CLOCK_DIV_MAX …
#define ERROR_INTERRUPTS …
#define MY_INTERRUPTS …
#define MAX_RISC_SIZE …
enum snd_bt87x_boardid { … };
struct snd_bt87x_board { … };
static const struct snd_bt87x_board snd_bt87x_boards[] = …;
struct snd_bt87x { … };
enum { … };
static inline u32 snd_bt87x_readl(struct snd_bt87x *chip, u32 reg)
{ … }
static inline void snd_bt87x_writel(struct snd_bt87x *chip, u32 reg, u32 value)
{ … }
static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substream *substream,
unsigned int periods, unsigned int period_bytes)
{ … }
static void snd_bt87x_free_risc(struct snd_bt87x *chip)
{ … }
static void snd_bt87x_pci_error(struct snd_bt87x *chip, unsigned int status)
{ … }
static irqreturn_t snd_bt87x_interrupt(int irq, void *dev_id)
{ … }
static const struct snd_pcm_hardware snd_bt87x_digital_hw = …;
static const struct snd_pcm_hardware snd_bt87x_analog_hw = …;
static int snd_bt87x_set_digital_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime)
{ … }
static int snd_bt87x_set_analog_hw(struct snd_bt87x *chip, struct snd_pcm_runtime *runtime)
{ … }
static int snd_bt87x_pcm_open(struct snd_pcm_substream *substream)
{ … }
static int snd_bt87x_close(struct snd_pcm_substream *substream)
{ … }
static int snd_bt87x_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params)
{ … }
static int snd_bt87x_hw_free(struct snd_pcm_substream *substream)
{ … }
static int snd_bt87x_prepare(struct snd_pcm_substream *substream)
{ … }
static int snd_bt87x_start(struct snd_bt87x *chip)
{ … }
static int snd_bt87x_stop(struct snd_bt87x *chip)
{ … }
static int snd_bt87x_trigger(struct snd_pcm_substream *substream, int cmd)
{ … }
static snd_pcm_uframes_t snd_bt87x_pointer(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_ops snd_bt87x_pcm_ops = …;
static int snd_bt87x_capture_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *info)
{ … }
static int snd_bt87x_capture_volume_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static int snd_bt87x_capture_volume_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new snd_bt87x_capture_volume = …;
#define snd_bt87x_capture_boost_info …
static int snd_bt87x_capture_boost_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static int snd_bt87x_capture_boost_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new snd_bt87x_capture_boost = …;
static int snd_bt87x_capture_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *info)
{ … }
static int snd_bt87x_capture_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static int snd_bt87x_capture_source_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new snd_bt87x_capture_source = …;
static void snd_bt87x_free(struct snd_card *card)
{ … }
static int snd_bt87x_pcm(struct snd_bt87x *chip, int device, char *name)
{ … }
static int snd_bt87x_create(struct snd_card *card,
struct pci_dev *pci)
{ … }
#define BT_DEVICE(chip, subvend, subdev, id) …
static const struct pci_device_id snd_bt87x_ids[] = …;
MODULE_DEVICE_TABLE(pci, snd_bt87x_ids);
static struct { … } denylist[] = …;
static struct pci_driver driver;
static int snd_bt87x_detect_card(struct pci_dev *pci)
{ … }
static int __snd_bt87x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{ … }
static int snd_bt87x_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{ … }
static const struct pci_device_id snd_bt87x_default_ids[] = …;
static struct pci_driver driver = …;
static int __init alsa_card_bt87x_init(void)
{ … }
static void __exit alsa_card_bt87x_exit(void)
{ … }
module_init(…) …
module_exit(…)