linux/sound/pci/mixart/mixart.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for Digigram miXart soundcards
 *
 * main file with alsa callbacks
 *
 * Copyright (c) 2003 by Digigram <[email protected]>
 */


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

#include <sound/core.h>
#include <sound/initval.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include "mixart.h"
#include "mixart_hwdep.h"
#include "mixart_core.h"
#include "mixart_mixer.h"

#define CARD_NAME

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

static int index[SNDRV_CARDS] =;             /* Index 0-MAX */
static char *id[SNDRV_CARDS] =;              /* ID for this card */
static bool enable[SNDRV_CARDS] =;     /* Enable this card */

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

/*
 */

static const struct pci_device_id snd_mixart_ids[] =;

MODULE_DEVICE_TABLE(pci, snd_mixart_ids);


static int mixart_set_pipe_state(struct mixart_mgr *mgr,
				 struct mixart_pipe *pipe, int start)
{}


static int mixart_set_clock(struct mixart_mgr *mgr,
			    struct mixart_pipe *pipe, unsigned int rate)
{}


/*
 *  Allocate or reference output pipe for analog IOs (pcmp0/1)
 */
struct mixart_pipe *
snd_mixart_add_ref_pipe(struct snd_mixart *chip, int pcm_number, int capture,
			int monitoring)
{}


int snd_mixart_kill_ref_pipe(struct mixart_mgr *mgr,
			     struct mixart_pipe *pipe, int monitoring)
{}

static int mixart_set_stream_state(struct mixart_stream *stream, int start)
{}

/*
 *  Trigger callback
 */

static int snd_mixart_trigger(struct snd_pcm_substream *subs, int cmd)
{}

static int mixart_sync_nonblock_events(struct mixart_mgr *mgr)
{}

/*
 *  prepare callback for all pcms
 */
static int snd_mixart_prepare(struct snd_pcm_substream *subs)
{}


static int mixart_set_format(struct mixart_stream *stream, snd_pcm_format_t format)
{}


/*
 *  HW_PARAMS callback for all pcms
 */
static int snd_mixart_hw_params(struct snd_pcm_substream *subs,
                                struct snd_pcm_hw_params *hw)
{}

static int snd_mixart_hw_free(struct snd_pcm_substream *subs)
{}



/*
 *  TODO CONFIGURATION SPACE for all pcms, mono pcm must update channels_max
 */
static const struct snd_pcm_hardware snd_mixart_analog_caps =;

static const struct snd_pcm_hardware snd_mixart_digital_caps =;


static int snd_mixart_playback_open(struct snd_pcm_substream *subs)
{}


static int snd_mixart_capture_open(struct snd_pcm_substream *subs)
{}



static int snd_mixart_close(struct snd_pcm_substream *subs)
{}


static snd_pcm_uframes_t snd_mixart_stream_pointer(struct snd_pcm_substream *subs)
{}



static const struct snd_pcm_ops snd_mixart_playback_ops =;

static const struct snd_pcm_ops snd_mixart_capture_ops =;

static void preallocate_buffers(struct snd_mixart *chip, struct snd_pcm *pcm)
{}

/*
 */
static int snd_mixart_pcm_analog(struct snd_mixart *chip)
{}


/*
 */
static int snd_mixart_pcm_digital(struct snd_mixart *chip)
{}

static int snd_mixart_chip_free(struct snd_mixart *chip)
{}

static int snd_mixart_chip_dev_free(struct snd_device *device)
{}


/*
 */
static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int idx)
{}

int snd_mixart_create_pcm(struct snd_mixart* chip)
{}


/*
 * release all the cards assigned to a manager instance
 */
static int snd_mixart_free(struct mixart_mgr *mgr)
{}

/*
 * proc interface
 */

/*
  mixart_BA0 proc interface for BAR 0 - read callback
 */
static ssize_t snd_mixart_BA0_read(struct snd_info_entry *entry,
				   void *file_private_data,
				   struct file *file, char __user *buf,
				   size_t count, loff_t pos)
{}

/*
  mixart_BA1 proc interface for BAR 1 - read callback
 */
static ssize_t snd_mixart_BA1_read(struct snd_info_entry *entry,
				   void *file_private_data,
				   struct file *file, char __user *buf,
				   size_t count, loff_t pos)
{}

static const struct snd_info_entry_ops snd_mixart_proc_ops_BA0 =;

static const struct snd_info_entry_ops snd_mixart_proc_ops_BA1 =;


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

static void snd_mixart_proc_init(struct snd_mixart *chip)
{}
/* end of proc interface */


/*
 *    probe function - creates the card manager
 */
static int snd_mixart_probe(struct pci_dev *pci,
			    const struct pci_device_id *pci_id)
{}

static void snd_mixart_remove(struct pci_dev *pci)
{}

static struct pci_driver mixart_driver =;

module_pci_driver();