summaryrefslogtreecommitdiff
path: root/sound/pci/oxygen/oxygen.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-09-22 08:55:19 +0200
committerClemens Ladisch <clemens@ladisch.de>2008-09-22 08:55:19 +0200
commit9bd6a73aef955216816fd6e28f371a868ed073d5 (patch)
tree4a416d4f4ed5308a83195f47f498b946bfb9062e /sound/pci/oxygen/oxygen.h
parent6627bea10e8b31cdedd3a59a311d9ad1e010059a (diff)
ALSA: oxygen: use a copy of the model struct
Put a copy of the model structure into the chip structure so that model- specific drivers can modify it depending on a particular device instance. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen.h')
-rw-r--r--sound/pci/oxygen/oxygen.h72
1 files changed, 36 insertions, 36 deletions
diff --git a/sound/pci/oxygen/oxygen.h b/sound/pci/oxygen/oxygen.h
index 74a644880074..5f3fbf802222 100644
--- a/sound/pci/oxygen/oxygen.h
+++ b/sound/pci/oxygen/oxygen.h
@@ -51,42 +51,7 @@ struct snd_pcm_hardware;
struct snd_pcm_hw_params;
struct snd_kcontrol_new;
struct snd_rawmidi;
-struct oxygen_model;
-
-struct oxygen {
- unsigned long addr;
- spinlock_t reg_lock;
- struct mutex mutex;
- struct snd_card *card;
- struct pci_dev *pci;
- struct snd_rawmidi *midi;
- int irq;
- const struct oxygen_model *model;
- void *model_data;
- unsigned int interrupt_mask;
- u8 dac_volume[8];
- u8 dac_mute;
- u8 pcm_active;
- u8 pcm_running;
- u8 dac_routing;
- u8 spdif_playback_enable;
- u8 revision;
- u8 has_ac97_0;
- u8 has_ac97_1;
- u32 spdif_bits;
- u32 spdif_pcm_bits;
- struct snd_pcm_substream *streams[PCM_COUNT];
- struct snd_kcontrol *controls[CONTROL_COUNT];
- struct work_struct spdif_input_bits_work;
- struct work_struct gpio_work;
- wait_queue_head_t ac97_waitqueue;
- union {
- u8 _8[OXYGEN_IO_SIZE];
- __le16 _16[OXYGEN_IO_SIZE / 2];
- __le32 _32[OXYGEN_IO_SIZE / 4];
- } saved_registers;
- u16 saved_ac97_registers[2][0x40];
-};
+struct oxygen;
struct oxygen_model {
const char *shortname;
@@ -122,6 +87,41 @@ struct oxygen_model {
u16 adc_i2s_format;
};
+struct oxygen {
+ unsigned long addr;
+ spinlock_t reg_lock;
+ struct mutex mutex;
+ struct snd_card *card;
+ struct pci_dev *pci;
+ struct snd_rawmidi *midi;
+ int irq;
+ void *model_data;
+ unsigned int interrupt_mask;
+ u8 dac_volume[8];
+ u8 dac_mute;
+ u8 pcm_active;
+ u8 pcm_running;
+ u8 dac_routing;
+ u8 spdif_playback_enable;
+ u8 revision;
+ u8 has_ac97_0;
+ u8 has_ac97_1;
+ u32 spdif_bits;
+ u32 spdif_pcm_bits;
+ struct snd_pcm_substream *streams[PCM_COUNT];
+ struct snd_kcontrol *controls[CONTROL_COUNT];
+ struct work_struct spdif_input_bits_work;
+ struct work_struct gpio_work;
+ wait_queue_head_t ac97_waitqueue;
+ union {
+ u8 _8[OXYGEN_IO_SIZE];
+ __le16 _16[OXYGEN_IO_SIZE / 2];
+ __le32 _32[OXYGEN_IO_SIZE / 4];
+ } saved_registers;
+ u16 saved_ac97_registers[2][0x40];
+ struct oxygen_model model;
+};
+
/* oxygen_lib.c */
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,