aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc/pmac.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 09:09:46 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:20:00 -0500
commit65b29f5039b38a5854b5e12238b0688a33e235cc (patch)
treebcbb2986d8a6b247387c0f7516c8f43dddeaf07c /sound/ppc/pmac.h
parentbbe85bbd02b2220c819ad1e33c9d6327131ad281 (diff)
[ALSA] Remove xxx_t typedefs: PowerMac
Remove xxx_t typedefs from the PowerMac driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/ppc/pmac.h')
-rw-r--r--sound/ppc/pmac.h93
1 files changed, 42 insertions, 51 deletions
diff --git a/sound/ppc/pmac.h b/sound/ppc/pmac.h
index bfff788e9847..e223884ccb20 100644
--- a/sound/ppc/pmac.h
+++ b/sound/ppc/pmac.h
@@ -47,18 +47,9 @@
47#define PMAC_SUPPORT_AUTOMUTE 47#define PMAC_SUPPORT_AUTOMUTE
48 48
49/* 49/*
50 * typedefs
51 */
52typedef struct snd_pmac pmac_t;
53typedef struct snd_pmac_stream pmac_stream_t;
54typedef struct snd_pmac_beep pmac_beep_t;
55typedef struct snd_pmac_dbdma pmac_dbdma_t;
56
57
58/*
59 * DBDMA space 50 * DBDMA space
60 */ 51 */
61struct snd_pmac_dbdma { 52struct pmac_dbdma {
62 dma_addr_t dma_base; 53 dma_addr_t dma_base;
63 dma_addr_t addr; 54 dma_addr_t addr;
64 struct dbdma_cmd __iomem *cmds; 55 struct dbdma_cmd __iomem *cmds;
@@ -69,7 +60,7 @@ struct snd_pmac_dbdma {
69/* 60/*
70 * playback/capture stream 61 * playback/capture stream
71 */ 62 */
72struct snd_pmac_stream { 63struct pmac_stream {
73 int running; /* boolean */ 64 int running; /* boolean */
74 65
75 int stream; /* PLAYBACK/CAPTURE */ 66 int stream; /* PLAYBACK/CAPTURE */
@@ -79,10 +70,10 @@ struct snd_pmac_stream {
79 int buffer_size; /* in kbytes */ 70 int buffer_size; /* in kbytes */
80 int nperiods, cur_period; 71 int nperiods, cur_period;
81 72
82 pmac_dbdma_t cmd; 73 struct pmac_dbdma cmd;
83 volatile struct dbdma_regs __iomem *dma; 74 volatile struct dbdma_regs __iomem *dma;
84 75
85 snd_pcm_substream_t *substream; 76 struct snd_pcm_substream *substream;
86 77
87 unsigned int cur_freqs; /* currently available frequencies */ 78 unsigned int cur_freqs; /* currently available frequencies */
88 unsigned int cur_formats; /* currently available formats */ 79 unsigned int cur_formats; /* currently available formats */
@@ -98,7 +89,7 @@ enum snd_pmac_model {
98}; 89};
99 90
100struct snd_pmac { 91struct snd_pmac {
101 snd_card_t *card; 92 struct snd_card *card;
102 93
103 /* h/w info */ 94 /* h/w info */
104 struct device_node *node; 95 struct device_node *node;
@@ -140,75 +131,75 @@ struct snd_pmac {
140 unsigned char __iomem *latch_base; 131 unsigned char __iomem *latch_base;
141 unsigned char __iomem *macio_base; 132 unsigned char __iomem *macio_base;
142 133
143 pmac_stream_t playback; 134 struct pmac_stream playback;
144 pmac_stream_t capture; 135 struct pmac_stream capture;
145 136
146 pmac_dbdma_t extra_dma; 137 struct pmac_dbdma extra_dma;
147 138
148 int irq, tx_irq, rx_irq; 139 int irq, tx_irq, rx_irq;
149 140
150 snd_pcm_t *pcm; 141 struct snd_pcm *pcm;
151 142
152 pmac_beep_t *beep; 143 struct pmac_beep *beep;
153 144
154 unsigned int control_mask; /* control mask */ 145 unsigned int control_mask; /* control mask */
155 146
156 /* mixer stuffs */ 147 /* mixer stuffs */
157 void *mixer_data; 148 void *mixer_data;
158 void (*mixer_free)(pmac_t *); 149 void (*mixer_free)(struct snd_pmac *);
159 snd_kcontrol_t *master_sw_ctl; 150 struct snd_kcontrol *master_sw_ctl;
160 snd_kcontrol_t *speaker_sw_ctl; 151 struct snd_kcontrol *speaker_sw_ctl;
161 snd_kcontrol_t *drc_sw_ctl; /* only used for tumbler -ReneR */ 152 struct snd_kcontrol *drc_sw_ctl; /* only used for tumbler -ReneR */
162 snd_kcontrol_t *hp_detect_ctl; 153 struct snd_kcontrol *hp_detect_ctl;
163 snd_kcontrol_t *lineout_sw_ctl; 154 struct snd_kcontrol *lineout_sw_ctl;
164 155
165 /* lowlevel callbacks */ 156 /* lowlevel callbacks */
166 void (*set_format)(pmac_t *chip); 157 void (*set_format)(struct snd_pmac *chip);
167 void (*update_automute)(pmac_t *chip, int do_notify); 158 void (*update_automute)(struct snd_pmac *chip, int do_notify);
168 int (*detect_headphone)(pmac_t *chip); 159 int (*detect_headphone)(struct snd_pmac *chip);
169#ifdef CONFIG_PM 160#ifdef CONFIG_PM
170 void (*suspend)(pmac_t *chip); 161 void (*suspend)(struct snd_pmac *chip);
171 void (*resume)(pmac_t *chip); 162 void (*resume)(struct snd_pmac *chip);
172#endif 163#endif
173 164
174}; 165};
175 166
176 167
177/* exported functions */ 168/* exported functions */
178int snd_pmac_new(snd_card_t *card, pmac_t **chip_return); 169int snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return);
179int snd_pmac_pcm_new(pmac_t *chip); 170int snd_pmac_pcm_new(struct snd_pmac *chip);
180int snd_pmac_attach_beep(pmac_t *chip); 171int snd_pmac_attach_beep(struct snd_pmac *chip);
181void snd_pmac_detach_beep(pmac_t *chip); 172void snd_pmac_detach_beep(struct snd_pmac *chip);
182void snd_pmac_beep_stop(pmac_t *chip); 173void snd_pmac_beep_stop(struct snd_pmac *chip);
183unsigned int snd_pmac_rate_index(pmac_t *chip, pmac_stream_t *rec, unsigned int rate); 174unsigned int snd_pmac_rate_index(struct snd_pmac *chip, struct pmac_stream *rec, unsigned int rate);
184 175
185void snd_pmac_beep_dma_start(pmac_t *chip, int bytes, unsigned long addr, int speed); 176void snd_pmac_beep_dma_start(struct snd_pmac *chip, int bytes, unsigned long addr, int speed);
186void snd_pmac_beep_dma_stop(pmac_t *chip); 177void snd_pmac_beep_dma_stop(struct snd_pmac *chip);
187 178
188/* initialize mixer */ 179/* initialize mixer */
189int snd_pmac_awacs_init(pmac_t *chip); 180int snd_pmac_awacs_init(struct snd_pmac *chip);
190int snd_pmac_burgundy_init(pmac_t *chip); 181int snd_pmac_burgundy_init(struct snd_pmac *chip);
191int snd_pmac_daca_init(pmac_t *chip); 182int snd_pmac_daca_init(struct snd_pmac *chip);
192int snd_pmac_tumbler_init(pmac_t *chip); 183int snd_pmac_tumbler_init(struct snd_pmac *chip);
193int snd_pmac_tumbler_post_init(void); 184int snd_pmac_tumbler_post_init(void);
194int snd_pmac_toonie_init(pmac_t *chip); 185int snd_pmac_toonie_init(struct snd_pmac *chip);
195 186
196/* i2c functions */ 187/* i2c functions */
197typedef struct snd_pmac_keywest { 188struct pmac_keywest {
198 int addr; 189 int addr;
199 struct i2c_client *client; 190 struct i2c_client *client;
200 int id; 191 int id;
201 int (*init_client)(struct snd_pmac_keywest *i2c); 192 int (*init_client)(struct pmac_keywest *i2c);
202 char *name; 193 char *name;
203} pmac_keywest_t; 194};
204 195
205int snd_pmac_keywest_init(pmac_keywest_t *i2c); 196int snd_pmac_keywest_init(struct pmac_keywest *i2c);
206void snd_pmac_keywest_cleanup(pmac_keywest_t *i2c); 197void snd_pmac_keywest_cleanup(struct pmac_keywest *i2c);
207 198
208/* misc */ 199/* misc */
209int snd_pmac_boolean_stereo_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo); 200int snd_pmac_boolean_stereo_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
210int snd_pmac_boolean_mono_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *uinfo); 201int snd_pmac_boolean_mono_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo);
211 202
212int snd_pmac_add_automute(pmac_t *chip); 203int snd_pmac_add_automute(struct snd_pmac *chip);
213 204
214#endif /* __PMAC_H */ 205#endif /* __PMAC_H */