Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
oxygen.h File Reference
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
#include "oxygen_regs.h"

Go to the source code of this file.

Data Structures

struct  oxygen_model
 
struct  oxygen
 

Macros

#define PCM_A   0
 
#define PCM_B   1
 
#define PCM_C   2
 
#define PCM_SPDIF   3
 
#define PCM_MULTICH   4
 
#define PCM_AC97   5
 
#define PCM_COUNT   6
 
#define OXYGEN_MCLKS(f_single, f_double, f_quad)
 
#define OXYGEN_IO_SIZE   0x100
 
#define OXYGEN_EEPROM_ID   0x434d /* "CM" */
 
#define PLAYBACK_0_TO_I2S   0x0001
 
#define PLAYBACK_1_TO_SPDIF   0x0004
 
#define PLAYBACK_2_TO_AC97_1   0x0008
 
#define CAPTURE_0_FROM_I2S_1   0x0010
 
#define CAPTURE_0_FROM_I2S_2   0x0020
 
#define CAPTURE_1_FROM_SPDIF   0x0080
 
#define CAPTURE_2_FROM_I2S_2   0x0100
 
#define CAPTURE_2_FROM_AC97_1   0x0200
 
#define MIDI_OUTPUT   0x0800
 
#define MIDI_INPUT   0x1000
 
#define AC97_CD_INPUT   0x2000
 
#define AC97_FMIC_SWITCH   0x4000
 
#define OXYGEN_PCI_SUBID(sv, sd)
 
#define BROKEN_EEPROM_DRIVER_DATA   ((unsigned long)-1)
 
#define OXYGEN_PCI_SUBID_BROKEN_EEPROM
 

Enumerations

enum  {
  CONTROL_SPDIF_PCM, CONTROL_SPDIF_INPUT_BITS, CONTROL_MIC_CAPTURE_SWITCH, CONTROL_LINE_CAPTURE_SWITCH,
  CONTROL_CD_CAPTURE_SWITCH, CONTROL_AUX_CAPTURE_SWITCH, CONTROL_COUNT
}
 

Functions

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))
 
void oxygen_pci_remove (struct pci_dev *pci)
 
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)
 
void 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)
 

Macro Definition Documentation

#define AC97_CD_INPUT   0x2000

Definition at line 41 of file oxygen.h.

#define AC97_FMIC_SWITCH   0x4000

Definition at line 42 of file oxygen.h.

#define BROKEN_EEPROM_DRIVER_DATA   ((unsigned long)-1)

Definition at line 60 of file oxygen.h.

#define CAPTURE_0_FROM_I2S_1   0x0010

Definition at line 32 of file oxygen.h.

#define CAPTURE_0_FROM_I2S_2   0x0020

Definition at line 33 of file oxygen.h.

#define CAPTURE_1_FROM_SPDIF   0x0080

Definition at line 35 of file oxygen.h.

#define CAPTURE_2_FROM_AC97_1   0x0200

Definition at line 37 of file oxygen.h.

#define CAPTURE_2_FROM_I2S_2   0x0100

Definition at line 36 of file oxygen.h.

#define MIDI_INPUT   0x1000

Definition at line 40 of file oxygen.h.

#define MIDI_OUTPUT   0x0800

Definition at line 39 of file oxygen.h.

#define OXYGEN_EEPROM_ID   0x434d /* "CM" */

Definition at line 25 of file oxygen.h.

#define OXYGEN_IO_SIZE   0x100

Definition at line 23 of file oxygen.h.

#define OXYGEN_MCLKS (   f_single,
  f_double,
  f_quad 
)
Value:
((MCLK_##f_single << 0) | \
(MCLK_##f_double << 2) | \
(MCLK_##f_quad << 4))

Definition at line 19 of file oxygen.h.

#define OXYGEN_PCI_SUBID (   sv,
  sd 
)
Value:
.device = 0x8788, \
.subvendor = sv, \
.subdevice = sd

Definition at line 54 of file oxygen.h.

#define OXYGEN_PCI_SUBID_BROKEN_EEPROM
Value:

Definition at line 61 of file oxygen.h.

#define PCM_A   0

Definition at line 11 of file oxygen.h.

#define PCM_AC97   5

Definition at line 16 of file oxygen.h.

#define PCM_B   1

Definition at line 12 of file oxygen.h.

#define PCM_C   2

Definition at line 13 of file oxygen.h.

#define PCM_COUNT   6

Definition at line 17 of file oxygen.h.

#define PCM_MULTICH   4

Definition at line 15 of file oxygen.h.

#define PCM_SPDIF   3

Definition at line 14 of file oxygen.h.

#define PLAYBACK_0_TO_I2S   0x0001

Definition at line 28 of file oxygen.h.

#define PLAYBACK_1_TO_SPDIF   0x0004

Definition at line 30 of file oxygen.h.

#define PLAYBACK_2_TO_AC97_1   0x0008

Definition at line 31 of file oxygen.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
CONTROL_SPDIF_PCM 
CONTROL_SPDIF_INPUT_BITS 
CONTROL_MIC_CAPTURE_SWITCH 
CONTROL_LINE_CAPTURE_SWITCH 
CONTROL_CD_CAPTURE_SWITCH 
CONTROL_AUX_CAPTURE_SWITCH 
CONTROL_COUNT 

Definition at line 44 of file oxygen.h.

Function Documentation

int oxygen_mixer_init ( struct oxygen chip)

Definition at line 1067 of file oxygen_mixer.c.

int oxygen_pci_probe ( struct pci_dev pci,
int  index,
char id,
struct module owner,
const struct pci_device_id ids,
int(*)(struct oxygen *chip, const struct pci_device_id *id get_model 
)

Definition at line 585 of file oxygen_lib.c.

void oxygen_pci_remove ( struct pci_dev pci)

Definition at line 722 of file oxygen_lib.c.

void oxygen_pci_shutdown ( struct pci_dev pci)

Definition at line 829 of file oxygen_lib.c.

int oxygen_pcm_init ( struct oxygen chip)

Definition at line 674 of file oxygen_pcm.c.

u16 oxygen_read16 ( struct oxygen chip,
unsigned int  reg 
)

Definition at line 34 of file oxygen_io.c.

u32 oxygen_read32 ( struct oxygen chip,
unsigned int  reg 
)

Definition at line 40 of file oxygen_io.c.

u8 oxygen_read8 ( struct oxygen chip,
unsigned int  reg 
)

Definition at line 28 of file oxygen_io.c.

u16 oxygen_read_ac97 ( struct oxygen chip,
unsigned int  codec,
unsigned int  index 
)

Definition at line 154 of file oxygen_io.c.

u16 oxygen_read_eeprom ( struct oxygen chip,
unsigned int  index 
)

Definition at line 250 of file oxygen_io.c.

void oxygen_reset_uart ( struct oxygen chip)

Definition at line 236 of file oxygen_io.c.

void oxygen_update_dac_routing ( struct oxygen chip)

Definition at line 135 of file oxygen_mixer.c.

void oxygen_update_spdif_source ( struct oxygen chip)

Definition at line 245 of file oxygen_mixer.c.

void oxygen_write16 ( struct oxygen chip,
unsigned int  reg,
u16  value 
)

Definition at line 53 of file oxygen_io.c.

void oxygen_write16_masked ( struct oxygen chip,
unsigned int  reg,
u16  value,
u16  mask 
)

Definition at line 78 of file oxygen_io.c.

void oxygen_write32 ( struct oxygen chip,
unsigned int  reg,
u32  value 
)

Definition at line 60 of file oxygen_io.c.

void oxygen_write32_masked ( struct oxygen chip,
unsigned int  reg,
u32  value,
u32  mask 
)

Definition at line 89 of file oxygen_io.c.

void oxygen_write8 ( struct oxygen chip,
unsigned int  reg,
u8  value 
)

Definition at line 46 of file oxygen_io.c.

void oxygen_write8_masked ( struct oxygen chip,
unsigned int  reg,
u8  value,
u8  mask 
)

Definition at line 67 of file oxygen_io.c.

void oxygen_write_ac97 ( struct oxygen chip,
unsigned int  codec,
unsigned int  index,
u16  data 
)

Definition at line 129 of file oxygen_io.c.

void oxygen_write_ac97_masked ( struct oxygen chip,
unsigned int  codec,
unsigned int  index,
u16  data,
u16  mask 
)

Definition at line 187 of file oxygen_io.c.

void oxygen_write_eeprom ( struct oxygen chip,
unsigned int  index,
u16  value 
)

Definition at line 265 of file oxygen_io.c.

void oxygen_write_i2c ( struct oxygen chip,
u8  device,
u8  map,
u8  data 
)

Definition at line 217 of file oxygen_io.c.

void oxygen_write_spi ( struct oxygen chip,
u8  control,
unsigned int  data 
)

Definition at line 197 of file oxygen_io.c.

void oxygen_write_uart ( struct oxygen chip,
u8  data 
)

Definition at line 244 of file oxygen_io.c.