#ifndef OXYGEN_H_INCLUDED
#define OXYGEN_H_INCLUDED
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include "oxygen_regs.h"
#define PCM_A …
#define PCM_B …
#define PCM_C …
#define PCM_SPDIF …
#define PCM_MULTICH …
#define PCM_AC97 …
#define PCM_COUNT …
#define OXYGEN_MCLKS(f_single, f_double, f_quad) …
#define OXYGEN_IO_SIZE …
#define OXYGEN_EEPROM_ID …
#define PLAYBACK_0_TO_I2S …
#define PLAYBACK_1_TO_SPDIF …
#define PLAYBACK_2_TO_AC97_1 …
#define CAPTURE_0_FROM_I2S_1 …
#define CAPTURE_0_FROM_I2S_2 …
#define CAPTURE_1_FROM_SPDIF …
#define CAPTURE_2_FROM_I2S_2 …
#define CAPTURE_2_FROM_AC97_1 …
#define CAPTURE_3_FROM_I2S_3 …
#define MIDI_OUTPUT …
#define MIDI_INPUT …
#define AC97_CD_INPUT …
#define AC97_FMIC_SWITCH …
enum { … };
#define OXYGEN_PCI_SUBID(sv, sd) …
#define BROKEN_EEPROM_DRIVER_DATA …
#define OXYGEN_PCI_SUBID_BROKEN_EEPROM …
struct pci_dev;
struct pci_device_id;
struct snd_card;
struct snd_pcm_substream;
struct snd_pcm_hardware;
struct snd_pcm_hw_params;
struct snd_kcontrol_new;
struct snd_rawmidi;
struct snd_info_buffer;
struct oxygen;
struct oxygen_model { … };
struct oxygen { … };
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
struct module *owner,
const struct pci_device_id *ids,
int (*get_model)(struct oxygen *chip,
const struct pci_device_id *id
)
);
#ifdef CONFIG_PM_SLEEP
extern const struct dev_pm_ops oxygen_pci_pm;
#endif
void oxygen_pci_shutdown(struct pci_dev *pci);
int oxygen_mixer_init(struct oxygen *chip);
void oxygen_update_dac_routing(struct oxygen *chip);
void oxygen_update_spdif_source(struct oxygen *chip);
int oxygen_pcm_init(struct oxygen *chip);
u8 oxygen_read8(struct oxygen *chip, unsigned int reg);
u16 oxygen_read16(struct oxygen *chip, unsigned int reg);
u32 oxygen_read32(struct oxygen *chip, unsigned int reg);
void oxygen_write8(struct oxygen *chip, unsigned int reg, u8 value);
void oxygen_write16(struct oxygen *chip, unsigned int reg, u16 value);
void oxygen_write32(struct oxygen *chip, unsigned int reg, u32 value);
void oxygen_write8_masked(struct oxygen *chip, unsigned int reg,
u8 value, u8 mask);
void oxygen_write16_masked(struct oxygen *chip, unsigned int reg,
u16 value, u16 mask);
void oxygen_write32_masked(struct oxygen *chip, unsigned int reg,
u32 value, u32 mask);
u16 oxygen_read_ac97(struct oxygen *chip, unsigned int codec,
unsigned int index);
void oxygen_write_ac97(struct oxygen *chip, unsigned int codec,
unsigned int index, u16 data);
void oxygen_write_ac97_masked(struct oxygen *chip, unsigned int codec,
unsigned int index, u16 data, u16 mask);
int oxygen_write_spi(struct oxygen *chip, u8 control, unsigned int data);
void oxygen_write_i2c(struct oxygen *chip, u8 device, u8 map, u8 data);
void oxygen_reset_uart(struct oxygen *chip);
void oxygen_write_uart(struct oxygen *chip, u8 data);
u16 oxygen_read_eeprom(struct oxygen *chip, unsigned int index);
void oxygen_write_eeprom(struct oxygen *chip, unsigned int index, u16 value);
static inline void oxygen_set_bits8(struct oxygen *chip,
unsigned int reg, u8 value)
{ … }
static inline void oxygen_set_bits16(struct oxygen *chip,
unsigned int reg, u16 value)
{ … }
static inline void oxygen_set_bits32(struct oxygen *chip,
unsigned int reg, u32 value)
{ … }
static inline void oxygen_clear_bits8(struct oxygen *chip,
unsigned int reg, u8 value)
{ … }
static inline void oxygen_clear_bits16(struct oxygen *chip,
unsigned int reg, u16 value)
{ … }
static inline void oxygen_clear_bits32(struct oxygen *chip,
unsigned int reg, u32 value)
{ … }
static inline void oxygen_ac97_set_bits(struct oxygen *chip, unsigned int codec,
unsigned int index, u16 value)
{ … }
static inline void oxygen_ac97_clear_bits(struct oxygen *chip,
unsigned int codec,
unsigned int index, u16 value)
{ … }
#endif