summaryrefslogtreecommitdiff
path: root/sound/pci/oxygen/oxygen.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r--sound/pci/oxygen/oxygen.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 268bff4f29d2..c500d48ea349 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -49,7 +49,13 @@ enum {
.subvendor = sv, \
.subdevice = sd
+#define BROKEN_EEPROM_DRIVER_DATA ((unsigned long)-1)
+#define OXYGEN_PCI_SUBID_BROKEN_EEPROM \
+ OXYGEN_PCI_SUBID(PCI_VENDOR_ID_CMEDIA, 0x8788), \
+ .driver_data = BROKEN_EEPROM_DRIVER_DATA
+
struct pci_dev;
+struct pci_device_id;
struct snd_card;
struct snd_pcm_substream;
struct snd_pcm_hardware;
@@ -62,7 +68,6 @@ struct oxygen_model {
const char *shortname;
const char *longname;
const char *chip;
- int (*probe)(struct oxygen *chip, unsigned long driver_data);
void (*init)(struct oxygen *chip);
int (*control_filter)(struct snd_kcontrol_new *template);
int (*mixer_init)(struct oxygen *chip);
@@ -82,6 +87,7 @@ struct oxygen_model {
void (*ac97_switch)(struct oxygen *chip,
unsigned int reg, unsigned int mute);
const unsigned int *dac_tlv;
+ unsigned long private_data;
size_t model_data_size;
unsigned int device_config;
u8 dac_channels;
@@ -134,8 +140,11 @@ struct oxygen {
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
struct module *owner,
- const struct oxygen_model *model,
- unsigned long driver_data);
+ 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);
#ifdef CONFIG_PM
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state);
@@ -180,6 +189,8 @@ 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);
+
static inline void oxygen_set_bits8(struct oxygen *chip,
unsigned int reg, u8 value)
{