diff options
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r-- | sound/pci/oxygen/oxygen.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h index 19107c6307e5..bd615dbffadb 100644 --- a/sound/pci/oxygen/oxygen.h +++ b/sound/pci/oxygen/oxygen.h | |||
@@ -18,6 +18,8 @@ | |||
18 | 18 | ||
19 | #define OXYGEN_IO_SIZE 0x100 | 19 | #define OXYGEN_IO_SIZE 0x100 |
20 | 20 | ||
21 | #define OXYGEN_EEPROM_ID 0x434d /* "CM" */ | ||
22 | |||
21 | /* model-specific configuration of outputs/inputs */ | 23 | /* model-specific configuration of outputs/inputs */ |
22 | #define PLAYBACK_0_TO_I2S 0x0001 | 24 | #define PLAYBACK_0_TO_I2S 0x0001 |
23 | /* PLAYBACK_0_TO_AC97_0 not implemented */ | 25 | /* PLAYBACK_0_TO_AC97_0 not implemented */ |
@@ -49,7 +51,13 @@ enum { | |||
49 | .subvendor = sv, \ | 51 | .subvendor = sv, \ |
50 | .subdevice = sd | 52 | .subdevice = sd |
51 | 53 | ||
54 | #define BROKEN_EEPROM_DRIVER_DATA ((unsigned long)-1) | ||
55 | #define OXYGEN_PCI_SUBID_BROKEN_EEPROM \ | ||
56 | OXYGEN_PCI_SUBID(PCI_VENDOR_ID_CMEDIA, 0x8788), \ | ||
57 | .driver_data = BROKEN_EEPROM_DRIVER_DATA | ||
58 | |||
52 | struct pci_dev; | 59 | struct pci_dev; |
60 | struct pci_device_id; | ||
53 | struct snd_card; | 61 | struct snd_card; |
54 | struct snd_pcm_substream; | 62 | struct snd_pcm_substream; |
55 | struct snd_pcm_hardware; | 63 | struct snd_pcm_hardware; |
@@ -62,8 +70,6 @@ struct oxygen_model { | |||
62 | const char *shortname; | 70 | const char *shortname; |
63 | const char *longname; | 71 | const char *longname; |
64 | const char *chip; | 72 | const char *chip; |
65 | struct module *owner; | ||
66 | int (*probe)(struct oxygen *chip, unsigned long driver_data); | ||
67 | void (*init)(struct oxygen *chip); | 73 | void (*init)(struct oxygen *chip); |
68 | int (*control_filter)(struct snd_kcontrol_new *template); | 74 | int (*control_filter)(struct snd_kcontrol_new *template); |
69 | int (*mixer_init)(struct oxygen *chip); | 75 | int (*mixer_init)(struct oxygen *chip); |
@@ -83,6 +89,7 @@ struct oxygen_model { | |||
83 | void (*ac97_switch)(struct oxygen *chip, | 89 | void (*ac97_switch)(struct oxygen *chip, |
84 | unsigned int reg, unsigned int mute); | 90 | unsigned int reg, unsigned int mute); |
85 | const unsigned int *dac_tlv; | 91 | const unsigned int *dac_tlv; |
92 | unsigned long private_data; | ||
86 | size_t model_data_size; | 93 | size_t model_data_size; |
87 | unsigned int device_config; | 94 | unsigned int device_config; |
88 | u8 dac_channels; | 95 | u8 dac_channels; |
@@ -134,8 +141,12 @@ struct oxygen { | |||
134 | /* oxygen_lib.c */ | 141 | /* oxygen_lib.c */ |
135 | 142 | ||
136 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | 143 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
137 | const struct oxygen_model *model, | 144 | struct module *owner, |
138 | unsigned long driver_data); | 145 | const struct pci_device_id *ids, |
146 | int (*get_model)(struct oxygen *chip, | ||
147 | const struct pci_device_id *id | ||
148 | ) | ||
149 | ); | ||
139 | void oxygen_pci_remove(struct pci_dev *pci); | 150 | void oxygen_pci_remove(struct pci_dev *pci); |
140 | #ifdef CONFIG_PM | 151 | #ifdef CONFIG_PM |
141 | int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state); | 152 | int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state); |
@@ -180,6 +191,9 @@ void oxygen_write_i2c(struct oxygen *chip, u8 device, u8 map, u8 data); | |||
180 | void oxygen_reset_uart(struct oxygen *chip); | 191 | void oxygen_reset_uart(struct oxygen *chip); |
181 | void oxygen_write_uart(struct oxygen *chip, u8 data); | 192 | void oxygen_write_uart(struct oxygen *chip, u8 data); |
182 | 193 | ||
194 | u16 oxygen_read_eeprom(struct oxygen *chip, unsigned int index); | ||
195 | void oxygen_write_eeprom(struct oxygen *chip, unsigned int index, u16 value); | ||
196 | |||
183 | static inline void oxygen_set_bits8(struct oxygen *chip, | 197 | static inline void oxygen_set_bits8(struct oxygen *chip, |
184 | unsigned int reg, u8 value) | 198 | unsigned int reg, u8 value) |
185 | { | 199 | { |