#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/module.h>
#include <sound/ac97_codec.h>
#include <sound/control.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/tlv.h>
#include "oxygen.h"
#include "xonar_dg.h"
#include "ak4396.h"
#include "wm8785.h"
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
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(…) …;
enum { … };
static const struct pci_device_id oxygen_ids[] = …;
MODULE_DEVICE_TABLE(pci, oxygen_ids);
#define GPIO_AK5385_DFS_MASK …
#define GPIO_AK5385_DFS_NORMAL …
#define GPIO_AK5385_DFS_DOUBLE …
#define GPIO_AK5385_DFS_QUAD …
#define GPIO_MERIDIAN_DIG_MASK …
#define GPIO_MERIDIAN_DIG_EXT …
#define GPIO_MERIDIAN_DIG_BOARD …
#define GPIO_CLARO_DIG_COAX …
#define GPIO_CLARO_HP …
struct generic_data { … };
static void ak4396_write(struct oxygen *chip, unsigned int codec,
u8 reg, u8 value)
{ … }
static void ak4396_write_cached(struct oxygen *chip, unsigned int codec,
u8 reg, u8 value)
{ … }
static void wm8785_write(struct oxygen *chip, u8 reg, unsigned int value)
{ … }
static void ak4396_registers_init(struct oxygen *chip)
{ … }
static void ak4396_init(struct oxygen *chip)
{ … }
static void ak5385_init(struct oxygen *chip)
{ … }
static void wm8785_registers_init(struct oxygen *chip)
{ … }
static void wm8785_init(struct oxygen *chip)
{ … }
static void generic_init(struct oxygen *chip)
{ … }
static void meridian_init(struct oxygen *chip)
{ … }
static void claro_enable_hp(struct oxygen *chip)
{ … }
static void claro_init(struct oxygen *chip)
{ … }
static void claro_halo_init(struct oxygen *chip)
{ … }
static void fantasia_init(struct oxygen *chip)
{ … }
static void stereo_output_init(struct oxygen *chip)
{ … }
static void generic_cleanup(struct oxygen *chip)
{ … }
static void claro_disable_hp(struct oxygen *chip)
{ … }
static void claro_cleanup(struct oxygen *chip)
{ … }
static void claro_suspend(struct oxygen *chip)
{ … }
static void generic_resume(struct oxygen *chip)
{ … }
static void meridian_resume(struct oxygen *chip)
{ … }
static void claro_resume(struct oxygen *chip)
{ … }
static void stereo_resume(struct oxygen *chip)
{ … }
static void set_ak4396_params(struct oxygen *chip,
struct snd_pcm_hw_params *params)
{ … }
static void update_ak4396_volume(struct oxygen *chip)
{ … }
static void update_ak4396_mute(struct oxygen *chip)
{ … }
static void set_wm8785_params(struct oxygen *chip,
struct snd_pcm_hw_params *params)
{ … }
static void set_ak5385_params(struct oxygen *chip,
struct snd_pcm_hw_params *params)
{ … }
static void set_no_params(struct oxygen *chip, struct snd_pcm_hw_params *params)
{ … }
static int rolloff_info(struct snd_kcontrol *ctl,
struct snd_ctl_elem_info *info)
{ … }
static int rolloff_get(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static int rolloff_put(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new rolloff_control = …;
static int hpf_info(struct snd_kcontrol *ctl, struct snd_ctl_elem_info *info)
{ … }
static int hpf_get(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value)
{ … }
static int hpf_put(struct snd_kcontrol *ctl, struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new hpf_control = …;
static int meridian_dig_source_info(struct snd_kcontrol *ctl,
struct snd_ctl_elem_info *info)
{ … }
static int claro_dig_source_info(struct snd_kcontrol *ctl,
struct snd_ctl_elem_info *info)
{ … }
static int meridian_dig_source_get(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static int claro_dig_source_get(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static int meridian_dig_source_put(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static int claro_dig_source_put(struct snd_kcontrol *ctl,
struct snd_ctl_elem_value *value)
{ … }
static const struct snd_kcontrol_new meridian_dig_source_control = …;
static const struct snd_kcontrol_new claro_dig_source_control = …;
static int generic_mixer_init(struct oxygen *chip)
{ … }
static int generic_wm8785_mixer_init(struct oxygen *chip)
{ … }
static int meridian_mixer_init(struct oxygen *chip)
{ … }
static int claro_mixer_init(struct oxygen *chip)
{ … }
static int claro_halo_mixer_init(struct oxygen *chip)
{ … }
static void dump_ak4396_registers(struct oxygen *chip,
struct snd_info_buffer *buffer)
{ … }
static void dump_wm8785_registers(struct oxygen *chip,
struct snd_info_buffer *buffer)
{ … }
static void dump_oxygen_registers(struct oxygen *chip,
struct snd_info_buffer *buffer)
{ … }
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
static const struct oxygen_model model_generic = …;
static int get_oxygen_model(struct oxygen *chip,
const struct pci_device_id *id)
{ … }
static int generic_oxygen_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id)
{ … }
static struct pci_driver oxygen_driver = …;
module_pci_driver(…) …;