#include <linux/delay.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/vmalloc.h>
#include <linux/moduleparam.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/ac97_codec.h>
#include <sound/info.h>
#include <sound/tlv.h>
#include <sound/emu10k1.h>
#include "p16v.h"
#define SET_CHANNEL …
#define PCM_FRONT_CHANNEL …
#define PCM_REAR_CHANNEL …
#define PCM_CENTER_LFE_CHANNEL …
#define PCM_SIDE_CHANNEL …
#define CONTROL_FRONT_CHANNEL …
#define CONTROL_REAR_CHANNEL …
#define CONTROL_CENTER_LFE_CHANNEL …
#define CONTROL_SIDE_CHANNEL …
static const struct snd_pcm_hardware snd_p16v_playback_hw = …;
static const struct snd_pcm_hardware snd_p16v_capture_hw = …;
static int snd_p16v_pcm_open_playback_channel(struct snd_pcm_substream *substream, int channel_id)
{ … }
static int snd_p16v_pcm_open_capture_channel(struct snd_pcm_substream *substream, int channel_id)
{ … }
static int snd_p16v_pcm_close_playback(struct snd_pcm_substream *substream)
{ … }
static int snd_p16v_pcm_close_capture(struct snd_pcm_substream *substream)
{ … }
static int snd_p16v_pcm_open_playback_front(struct snd_pcm_substream *substream)
{ … }
static int snd_p16v_pcm_open_capture(struct snd_pcm_substream *substream)
{ … }
static int snd_p16v_pcm_ioctl_playback(struct snd_pcm_substream *substream,
unsigned int cmd, void *arg)
{ … }
static int snd_p16v_pcm_prepare_playback(struct snd_pcm_substream *substream)
{ … }
static int snd_p16v_pcm_prepare_capture(struct snd_pcm_substream *substream)
{ … }
static void snd_p16v_intr_enable(struct snd_emu10k1 *emu, unsigned int intrenb)
{ … }
static void snd_p16v_intr_disable(struct snd_emu10k1 *emu, unsigned int intrenb)
{ … }
static void snd_p16v_interrupt(struct snd_emu10k1 *emu)
{ … }
static int snd_p16v_pcm_trigger_playback(struct snd_pcm_substream *substream,
int cmd)
{ … }
static int snd_p16v_pcm_trigger_capture(struct snd_pcm_substream *substream,
int cmd)
{ … }
static snd_pcm_uframes_t
snd_p16v_pcm_pointer_playback(struct snd_pcm_substream *substream)
{ … }
static snd_pcm_uframes_t
snd_p16v_pcm_pointer_capture(struct snd_pcm_substream *substream)
{ … }
static const struct snd_pcm_ops snd_p16v_playback_front_ops = …;
static const struct snd_pcm_ops snd_p16v_capture_ops = …;
int snd_p16v_pcm(struct snd_emu10k1 *emu, int device)
{ … }
static int snd_p16v_volume_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_p16v_volume_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_p16v_volume_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_p16v_capture_source_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_p16v_capture_source_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_p16v_capture_channel_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_p16v_capture_channel_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const DECLARE_TLV_DB_SCALE(snd_p16v_db_scale1, -5175, 25, 1);
#define P16V_VOL(xname,xreg,xhl) …
static const struct snd_kcontrol_new p16v_mixer_controls[] = …;
int snd_p16v_mixer(struct snd_emu10k1 *emu)
{ … }
#ifdef CONFIG_PM_SLEEP
#define NUM_CHS …
int snd_p16v_alloc_pm_buffer(struct snd_emu10k1 *emu)
{ … }
void snd_p16v_free_pm_buffer(struct snd_emu10k1 *emu)
{ … }
void snd_p16v_suspend(struct snd_emu10k1 *emu)
{ … }
void snd_p16v_resume(struct snd_emu10k1 *emu)
{ … }
#endif