linux/sound/isa/sb/sb16_main.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) by Jaroslav Kysela <[email protected]>
 *  Routines for control of 16-bit SoundBlaster cards and clones
 *  Note: This is very ugly hardware which uses one 8-bit DMA channel and
 *        second 16-bit DMA channel. Unfortunately 8-bit DMA channel can't
 *        transfer 16-bit samples and 16-bit DMA channels can't transfer
 *        8-bit samples. This make full duplex more complicated than
 *        can be... People, don't buy these soundcards for full 16-bit
 *        duplex!!!
 *  Note: 16-bit wide is assigned to first direction which made request.
 *        With full duplex - playback is preferred with abstract layer.
 *
 *  Note: Some chip revisions have hardware bug. Changing capture
 *        channel from full-duplex 8bit DMA to 16bit DMA will block
 *        16bit DMA transfers from DSP chip (capture) until 8bit transfer
 *        to DSP chip (playback) starts. This bug can be avoided with
 *        "16bit DMA Allocation" setting set to Playback or Capture.
 */

#include <linux/io.h>
#include <asm/dma.h>
#include <linux/init.h>
#include <linux/time.h>
#include <linux/module.h>
#include <sound/core.h>
#include <sound/sb.h>
#include <sound/sb16_csp.h>
#include <sound/mpu401.h>
#include <sound/control.h>
#include <sound/info.h>

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

#define runtime_format_bits(runtime)

#ifdef CONFIG_SND_SB16_CSP
static void snd_sb16_csp_playback_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
{}

static void snd_sb16_csp_capture_prepare(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
{}

static void snd_sb16_csp_update(struct snd_sb *chip)
{}

static void snd_sb16_csp_playback_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
{}

static void snd_sb16_csp_playback_close(struct snd_sb *chip)
{}

static void snd_sb16_csp_capture_open(struct snd_sb *chip, struct snd_pcm_runtime *runtime)
{}

static void snd_sb16_csp_capture_close(struct snd_sb *chip)
{}
#else
#define snd_sb16_csp_playback_prepare
#define snd_sb16_csp_capture_prepare
#define snd_sb16_csp_update
#define snd_sb16_csp_playback_open
#define snd_sb16_csp_playback_close
#define snd_sb16_csp_capture_open
#define snd_sb16_csp_capture_close
#endif


static void snd_sb16_setup_rate(struct snd_sb *chip,
				unsigned short rate,
				int channel)
{}

static int snd_sb16_playback_prepare(struct snd_pcm_substream *substream)
{}

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

static int snd_sb16_capture_prepare(struct snd_pcm_substream *substream)
{}

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

irqreturn_t snd_sb16dsp_interrupt(int irq, void *dev_id)
{}

/*

 */

static snd_pcm_uframes_t snd_sb16_playback_pointer(struct snd_pcm_substream *substream)
{}

static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *substream)
{}

/*

 */

static const struct snd_pcm_hardware snd_sb16_playback =;

static const struct snd_pcm_hardware snd_sb16_capture =;

/*
 *  open/close
 */

static int snd_sb16_playback_open(struct snd_pcm_substream *substream)
{}

static int snd_sb16_playback_close(struct snd_pcm_substream *substream)
{}

static int snd_sb16_capture_open(struct snd_pcm_substream *substream)
{}

static int snd_sb16_capture_close(struct snd_pcm_substream *substream)
{}

/*
 *  DMA control interface
 */

static int snd_sb16_set_dma_mode(struct snd_sb *chip, int what)
{}

static int snd_sb16_get_dma_mode(struct snd_sb *chip)
{}

static int snd_sb16_dma_control_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo)
{}

static int snd_sb16_dma_control_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static int snd_sb16_dma_control_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{}

static const struct snd_kcontrol_new snd_sb16_dma_control =;

/*
 *  Initialization part
 */
 
int snd_sb16dsp_configure(struct snd_sb * chip)
{}

static const struct snd_pcm_ops snd_sb16_playback_ops =;

static const struct snd_pcm_ops snd_sb16_capture_ops =;

int snd_sb16dsp_pcm(struct snd_sb *chip, int device)
{}

const struct snd_pcm_ops *snd_sb16dsp_get_pcm_ops(int direction)
{}

EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();
EXPORT_SYMBOL();