aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen.h
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-09-22 02:55:19 -0400
committerClemens Ladisch <clemens@ladisch.de>2008-09-22 02:55:19 -0400
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;
51struct snd_pcm_hw_params; 51struct snd_pcm_hw_params;
52struct snd_kcontrol_new; 52struct snd_kcontrol_new;
53struct snd_rawmidi; 53struct snd_rawmidi;
54struct oxygen_model; 54struct oxygen;
55
56struct oxygen {
57 unsigned long addr;
58 spinlock_t reg_lock;
59 struct mutex mutex;
60 struct snd_card *card;
61 struct pci_dev *pci;
62 struct snd_rawmidi *midi;
63 int irq;
64 const struct oxygen_model *model;
65 void *model_data;
66 unsigned int interrupt_mask;
67 u8 dac_volume[8];
68 u8 dac_mute;
69 u8 pcm_active;
70 u8 pcm_running;
71 u8 dac_routing;
72 u8 spdif_playback_enable;
73 u8 revision;
74 u8 has_ac97_0;
75 u8 has_ac97_1;
76 u32 spdif_bits;
77 u32 spdif_pcm_bits;
78 struct snd_pcm_substream *streams[PCM_COUNT];
79 struct snd_kcontrol *controls[CONTROL_COUNT];
80 struct work_struct spdif_input_bits_work;
81 struct work_struct gpio_work;
82 wait_queue_head_t ac97_waitqueue;
83 union {
84 u8 _8[OXYGEN_IO_SIZE];
85 __le16 _16[OXYGEN_IO_SIZE / 2];
86 __le32 _32[OXYGEN_IO_SIZE / 4];
87 } saved_registers;
88 u16 saved_ac97_registers[2][0x40];
89};
90 55
91struct oxygen_model { 56struct oxygen_model {
92 const char *shortname; 57 const char *shortname;
@@ -122,6 +87,41 @@ struct oxygen_model {
122 u16 adc_i2s_format; 87 u16 adc_i2s_format;
123}; 88};
124 89
90struct oxygen {
91 unsigned long addr;
92 spinlock_t reg_lock;
93 struct mutex mutex;
94 struct snd_card *card;
95 struct pci_dev *pci;
96 struct snd_rawmidi *midi;
97 int irq;
98 void *model_data;
99 unsigned int interrupt_mask;
100 u8 dac_volume[8];
101 u8 dac_mute;
102 u8 pcm_active;
103 u8 pcm_running;
104 u8 dac_routing;
105 u8 spdif_playback_enable;
106 u8 revision;
107 u8 has_ac97_0;
108 u8 has_ac97_1;
109 u32 spdif_bits;
110 u32 spdif_pcm_bits;
111 struct snd_pcm_substream *streams[PCM_COUNT];
112 struct snd_kcontrol *controls[CONTROL_COUNT];
113 struct work_struct spdif_input_bits_work;
114 struct work_struct gpio_work;
115 wait_queue_head_t ac97_waitqueue;
116 union {
117 u8 _8[OXYGEN_IO_SIZE];
118 __le16 _16[OXYGEN_IO_SIZE / 2];
119 __le32 _32[OXYGEN_IO_SIZE / 4];
120 } saved_registers;
121 u16 saved_ac97_registers[2][0x40];
122 struct oxygen_model model;
123};
124
125/* oxygen_lib.c */ 125/* oxygen_lib.c */
126 126
127int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, 127int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,