diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 09:07:38 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:19:52 -0500 |
commit | db13154843cb2c99a93e9feed575e906f6e0e455 (patch) | |
tree | 8249fdd690638c3ea7f3865b1889ccafd8a7a7ae | |
parent | e437e3d7c7fb656010f8f767d20215e67b847685 (diff) |
[ALSA] Remove xxx_t typedefs: PCMCIA PDaudioCF
Modules: PDAudioCF driver
Remove xxx_t typedefs from the PCMCIA PDaudioCF driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.c | 24 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf.h | 30 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf_core.c | 42 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf_irq.c | 6 | ||||
-rw-r--r-- | sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 52 |
5 files changed, 77 insertions, 77 deletions
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c index d6918b453f28..0ba335d045f8 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c | |||
@@ -53,7 +53,7 @@ MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard."); | |||
53 | */ | 53 | */ |
54 | 54 | ||
55 | static dev_info_t dev_info = "snd-pdaudiocf"; | 55 | static dev_info_t dev_info = "snd-pdaudiocf"; |
56 | static snd_card_t *card_list[SNDRV_CARDS]; | 56 | static struct snd_card *card_list[SNDRV_CARDS]; |
57 | static dev_link_t *dev_list; | 57 | static dev_link_t *dev_list; |
58 | 58 | ||
59 | /* | 59 | /* |
@@ -77,7 +77,7 @@ static void pdacf_release(dev_link_t *link) | |||
77 | /* | 77 | /* |
78 | * destructor | 78 | * destructor |
79 | */ | 79 | */ |
80 | static int snd_pdacf_free(pdacf_t *pdacf) | 80 | static int snd_pdacf_free(struct snd_pdacf *pdacf) |
81 | { | 81 | { |
82 | dev_link_t *link = &pdacf->link; | 82 | dev_link_t *link = &pdacf->link; |
83 | 83 | ||
@@ -94,9 +94,9 @@ static int snd_pdacf_free(pdacf_t *pdacf) | |||
94 | return 0; | 94 | return 0; |
95 | } | 95 | } |
96 | 96 | ||
97 | static int snd_pdacf_dev_free(snd_device_t *device) | 97 | static int snd_pdacf_dev_free(struct snd_device *device) |
98 | { | 98 | { |
99 | pdacf_t *chip = device->device_data; | 99 | struct snd_pdacf *chip = device->device_data; |
100 | return snd_pdacf_free(chip); | 100 | return snd_pdacf_free(chip); |
101 | } | 101 | } |
102 | 102 | ||
@@ -108,9 +108,9 @@ static dev_link_t *snd_pdacf_attach(void) | |||
108 | client_reg_t client_reg; /* Register with cardmgr */ | 108 | client_reg_t client_reg; /* Register with cardmgr */ |
109 | dev_link_t *link; /* Info for cardmgr */ | 109 | dev_link_t *link; /* Info for cardmgr */ |
110 | int i, ret; | 110 | int i, ret; |
111 | pdacf_t *pdacf; | 111 | struct snd_pdacf *pdacf; |
112 | snd_card_t *card; | 112 | struct snd_card *card; |
113 | static snd_device_ops_t ops = { | 113 | static struct snd_device_ops ops = { |
114 | .dev_free = snd_pdacf_dev_free, | 114 | .dev_free = snd_pdacf_dev_free, |
115 | }; | 115 | }; |
116 | 116 | ||
@@ -194,10 +194,10 @@ static dev_link_t *snd_pdacf_attach(void) | |||
194 | * | 194 | * |
195 | * returns 0 if successful, or a negative error code. | 195 | * returns 0 if successful, or a negative error code. |
196 | */ | 196 | */ |
197 | static int snd_pdacf_assign_resources(pdacf_t *pdacf, int port, int irq) | 197 | static int snd_pdacf_assign_resources(struct snd_pdacf *pdacf, int port, int irq) |
198 | { | 198 | { |
199 | int err; | 199 | int err; |
200 | snd_card_t *card = pdacf->card; | 200 | struct snd_card *card = pdacf->card; |
201 | 201 | ||
202 | snd_printdd(KERN_DEBUG "pdacf assign resources: port = 0x%x, irq = %d\n", port, irq); | 202 | snd_printdd(KERN_DEBUG "pdacf assign resources: port = 0x%x, irq = %d\n", port, irq); |
203 | pdacf->port = port; | 203 | pdacf->port = port; |
@@ -231,7 +231,7 @@ static int snd_pdacf_assign_resources(pdacf_t *pdacf, int port, int irq) | |||
231 | */ | 231 | */ |
232 | static void snd_pdacf_detach(dev_link_t *link) | 232 | static void snd_pdacf_detach(dev_link_t *link) |
233 | { | 233 | { |
234 | pdacf_t *chip = link->priv; | 234 | struct snd_pdacf *chip = link->priv; |
235 | 235 | ||
236 | snd_printdd(KERN_DEBUG "pdacf_detach called\n"); | 236 | snd_printdd(KERN_DEBUG "pdacf_detach called\n"); |
237 | /* Remove the interface data from the linked list */ | 237 | /* Remove the interface data from the linked list */ |
@@ -261,7 +261,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | |||
261 | static void pdacf_config(dev_link_t *link) | 261 | static void pdacf_config(dev_link_t *link) |
262 | { | 262 | { |
263 | client_handle_t handle = link->handle; | 263 | client_handle_t handle = link->handle; |
264 | pdacf_t *pdacf = link->priv; | 264 | struct snd_pdacf *pdacf = link->priv; |
265 | tuple_t tuple; | 265 | tuple_t tuple; |
266 | cisparse_t *parse = NULL; | 266 | cisparse_t *parse = NULL; |
267 | config_info_t conf; | 267 | config_info_t conf; |
@@ -318,7 +318,7 @@ failed: | |||
318 | static int pdacf_event(event_t event, int priority, event_callback_args_t *args) | 318 | static int pdacf_event(event_t event, int priority, event_callback_args_t *args) |
319 | { | 319 | { |
320 | dev_link_t *link = args->client_data; | 320 | dev_link_t *link = args->client_data; |
321 | pdacf_t *chip = link->priv; | 321 | struct snd_pdacf *chip = link->priv; |
322 | 322 | ||
323 | switch (event) { | 323 | switch (event) { |
324 | case CS_EVENT_CARD_REMOVAL: | 324 | case CS_EVENT_CARD_REMOVAL: |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.h b/sound/pcmcia/pdaudiocf/pdaudiocf.h index c7a9628256ee..ad8f32eedce5 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf.h +++ b/sound/pcmcia/pdaudiocf/pdaudiocf.h | |||
@@ -83,8 +83,8 @@ | |||
83 | #define PDAUDIOCF_STAT_IS_CONFIGURED (1<<1) | 83 | #define PDAUDIOCF_STAT_IS_CONFIGURED (1<<1) |
84 | #define PDAUDIOCF_STAT_IS_SUSPENDED (1<<2) | 84 | #define PDAUDIOCF_STAT_IS_SUSPENDED (1<<2) |
85 | 85 | ||
86 | typedef struct { | 86 | struct snd_pdacf { |
87 | snd_card_t *card; | 87 | struct snd_card *card; |
88 | int index; | 88 | int index; |
89 | 89 | ||
90 | unsigned long port; | 90 | unsigned long port; |
@@ -96,12 +96,12 @@ typedef struct { | |||
96 | struct tasklet_struct tq; | 96 | struct tasklet_struct tq; |
97 | 97 | ||
98 | spinlock_t ak4117_lock; | 98 | spinlock_t ak4117_lock; |
99 | ak4117_t *ak4117; | 99 | struct ak4117 *ak4117; |
100 | 100 | ||
101 | unsigned int chip_status; | 101 | unsigned int chip_status; |
102 | 102 | ||
103 | snd_pcm_t *pcm; | 103 | struct snd_pcm *pcm; |
104 | snd_pcm_substream_t *pcm_substream; | 104 | struct snd_pcm_substream *pcm_substream; |
105 | unsigned int pcm_running: 1; | 105 | unsigned int pcm_running: 1; |
106 | unsigned int pcm_channels; | 106 | unsigned int pcm_channels; |
107 | unsigned int pcm_swab; | 107 | unsigned int pcm_swab; |
@@ -118,28 +118,28 @@ typedef struct { | |||
118 | /* pcmcia stuff */ | 118 | /* pcmcia stuff */ |
119 | dev_link_t link; | 119 | dev_link_t link; |
120 | dev_node_t node; | 120 | dev_node_t node; |
121 | } pdacf_t; | 121 | }; |
122 | 122 | ||
123 | static inline void pdacf_reg_write(pdacf_t *chip, unsigned char reg, unsigned short val) | 123 | static inline void pdacf_reg_write(struct snd_pdacf *chip, unsigned char reg, unsigned short val) |
124 | { | 124 | { |
125 | outw(chip->regmap[reg>>1] = val, chip->port + reg); | 125 | outw(chip->regmap[reg>>1] = val, chip->port + reg); |
126 | } | 126 | } |
127 | 127 | ||
128 | static inline unsigned short pdacf_reg_read(pdacf_t *chip, unsigned char reg) | 128 | static inline unsigned short pdacf_reg_read(struct snd_pdacf *chip, unsigned char reg) |
129 | { | 129 | { |
130 | return inw(chip->port + reg); | 130 | return inw(chip->port + reg); |
131 | } | 131 | } |
132 | 132 | ||
133 | pdacf_t *snd_pdacf_create(snd_card_t *card); | 133 | struct snd_pdacf *snd_pdacf_create(struct snd_card *card); |
134 | int snd_pdacf_ak4117_create(pdacf_t *pdacf); | 134 | int snd_pdacf_ak4117_create(struct snd_pdacf *pdacf); |
135 | void snd_pdacf_powerdown(pdacf_t *chip); | 135 | void snd_pdacf_powerdown(struct snd_pdacf *chip); |
136 | #ifdef CONFIG_PM | 136 | #ifdef CONFIG_PM |
137 | int snd_pdacf_suspend(snd_card_t *card, pm_message_t state); | 137 | int snd_pdacf_suspend(struct snd_card *card, pm_message_t state); |
138 | int snd_pdacf_resume(snd_card_t *card); | 138 | int snd_pdacf_resume(struct snd_card *card); |
139 | #endif | 139 | #endif |
140 | int snd_pdacf_pcm_new(pdacf_t *chip); | 140 | int snd_pdacf_pcm_new(struct snd_pdacf *chip); |
141 | irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs); | 141 | irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs); |
142 | void pdacf_tasklet(unsigned long private_data); | 142 | void pdacf_tasklet(unsigned long private_data); |
143 | void pdacf_reinit(pdacf_t *chip, int resume); | 143 | void pdacf_reinit(struct snd_pdacf *chip, int resume); |
144 | 144 | ||
145 | #endif /* __PDAUDIOCF_H */ | 145 | #endif /* __PDAUDIOCF_H */ |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c index 0208c54896b3..4f898238e0aa 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_core.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_core.c | |||
@@ -30,7 +30,7 @@ | |||
30 | */ | 30 | */ |
31 | static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg) | 31 | static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg) |
32 | { | 32 | { |
33 | pdacf_t *chip = private_data; | 33 | struct snd_pdacf *chip = private_data; |
34 | unsigned long timeout; | 34 | unsigned long timeout; |
35 | unsigned long flags; | 35 | unsigned long flags; |
36 | unsigned char res; | 36 | unsigned char res; |
@@ -62,7 +62,7 @@ static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg) | |||
62 | 62 | ||
63 | static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val) | 63 | static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val) |
64 | { | 64 | { |
65 | pdacf_t *chip = private_data; | 65 | struct snd_pdacf *chip = private_data; |
66 | unsigned long timeout; | 66 | unsigned long timeout; |
67 | unsigned long flags; | 67 | unsigned long flags; |
68 | 68 | ||
@@ -81,7 +81,7 @@ static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned c | |||
81 | } | 81 | } |
82 | 82 | ||
83 | #if 0 | 83 | #if 0 |
84 | void pdacf_dump(pdacf_t *chip) | 84 | void pdacf_dump(struct snd_pdacf *chip) |
85 | { | 85 | { |
86 | printk("PDAUDIOCF DUMP (0x%lx):\n", chip->port); | 86 | printk("PDAUDIOCF DUMP (0x%lx):\n", chip->port); |
87 | printk("WPD : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_WDP)); | 87 | printk("WPD : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_WDP)); |
@@ -94,7 +94,7 @@ void pdacf_dump(pdacf_t *chip) | |||
94 | } | 94 | } |
95 | #endif | 95 | #endif |
96 | 96 | ||
97 | static int pdacf_reset(pdacf_t *chip, int powerdown) | 97 | static int pdacf_reset(struct snd_pdacf *chip, int powerdown) |
98 | { | 98 | { |
99 | u16 val; | 99 | u16 val; |
100 | 100 | ||
@@ -117,7 +117,7 @@ static int pdacf_reset(pdacf_t *chip, int powerdown) | |||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
119 | 119 | ||
120 | void pdacf_reinit(pdacf_t *chip, int resume) | 120 | void pdacf_reinit(struct snd_pdacf *chip, int resume) |
121 | { | 121 | { |
122 | pdacf_reset(chip, 0); | 122 | pdacf_reset(chip, 0); |
123 | if (resume) | 123 | if (resume) |
@@ -127,10 +127,10 @@ void pdacf_reinit(pdacf_t *chip, int resume) | |||
127 | pdacf_reg_write(chip, PDAUDIOCF_REG_IER, chip->regmap[PDAUDIOCF_REG_IER>>1]); | 127 | pdacf_reg_write(chip, PDAUDIOCF_REG_IER, chip->regmap[PDAUDIOCF_REG_IER>>1]); |
128 | } | 128 | } |
129 | 129 | ||
130 | static void pdacf_proc_read(snd_info_entry_t * entry, | 130 | static void pdacf_proc_read(struct snd_info_entry * entry, |
131 | snd_info_buffer_t * buffer) | 131 | struct snd_info_buffer *buffer) |
132 | { | 132 | { |
133 | pdacf_t *chip = entry->private_data; | 133 | struct snd_pdacf *chip = entry->private_data; |
134 | u16 tmp; | 134 | u16 tmp; |
135 | 135 | ||
136 | snd_iprintf(buffer, "PDAudioCF\n\n"); | 136 | snd_iprintf(buffer, "PDAudioCF\n\n"); |
@@ -139,17 +139,17 @@ static void pdacf_proc_read(snd_info_entry_t * entry, | |||
139 | 139 | ||
140 | } | 140 | } |
141 | 141 | ||
142 | static void pdacf_proc_init(pdacf_t *chip) | 142 | static void pdacf_proc_init(struct snd_pdacf *chip) |
143 | { | 143 | { |
144 | snd_info_entry_t *entry; | 144 | struct snd_info_entry *entry; |
145 | 145 | ||
146 | if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry)) | 146 | if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry)) |
147 | snd_info_set_text_ops(entry, chip, 1024, pdacf_proc_read); | 147 | snd_info_set_text_ops(entry, chip, 1024, pdacf_proc_read); |
148 | } | 148 | } |
149 | 149 | ||
150 | pdacf_t *snd_pdacf_create(snd_card_t *card) | 150 | struct snd_pdacf *snd_pdacf_create(struct snd_card *card) |
151 | { | 151 | { |
152 | pdacf_t *chip; | 152 | struct snd_pdacf *chip; |
153 | 153 | ||
154 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 154 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
155 | if (chip == NULL) | 155 | if (chip == NULL) |
@@ -164,9 +164,9 @@ pdacf_t *snd_pdacf_create(snd_card_t *card) | |||
164 | return chip; | 164 | return chip; |
165 | } | 165 | } |
166 | 166 | ||
167 | static void snd_pdacf_ak4117_change(ak4117_t *ak4117, unsigned char c0, unsigned char c1) | 167 | static void snd_pdacf_ak4117_change(struct ak4117 *ak4117, unsigned char c0, unsigned char c1) |
168 | { | 168 | { |
169 | pdacf_t *chip = ak4117->change_callback_private; | 169 | struct snd_pdacf *chip = ak4117->change_callback_private; |
170 | unsigned long flags; | 170 | unsigned long flags; |
171 | u16 val; | 171 | u16 val; |
172 | 172 | ||
@@ -182,7 +182,7 @@ static void snd_pdacf_ak4117_change(ak4117_t *ak4117, unsigned char c0, unsigned | |||
182 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 182 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
183 | } | 183 | } |
184 | 184 | ||
185 | int snd_pdacf_ak4117_create(pdacf_t *chip) | 185 | int snd_pdacf_ak4117_create(struct snd_pdacf *chip) |
186 | { | 186 | { |
187 | int err; | 187 | int err; |
188 | u16 val; | 188 | u16 val; |
@@ -238,7 +238,7 @@ int snd_pdacf_ak4117_create(pdacf_t *chip) | |||
238 | return 0; | 238 | return 0; |
239 | } | 239 | } |
240 | 240 | ||
241 | void snd_pdacf_powerdown(pdacf_t *chip) | 241 | void snd_pdacf_powerdown(struct snd_pdacf *chip) |
242 | { | 242 | { |
243 | u16 val; | 243 | u16 val; |
244 | 244 | ||
@@ -255,9 +255,9 @@ void snd_pdacf_powerdown(pdacf_t *chip) | |||
255 | 255 | ||
256 | #ifdef CONFIG_PM | 256 | #ifdef CONFIG_PM |
257 | 257 | ||
258 | int snd_pdacf_suspend(snd_card_t *card, pm_message_t state) | 258 | int snd_pdacf_suspend(struct snd_card *card, pm_message_t state) |
259 | { | 259 | { |
260 | pdacf_t *chip = card->pm_private_data; | 260 | struct snd_pdacf *chip = card->pm_private_data; |
261 | u16 val; | 261 | u16 val; |
262 | 262 | ||
263 | snd_pcm_suspend_all(chip->pcm); | 263 | snd_pcm_suspend_all(chip->pcm); |
@@ -270,14 +270,14 @@ int snd_pdacf_suspend(snd_card_t *card, pm_message_t state) | |||
270 | return 0; | 270 | return 0; |
271 | } | 271 | } |
272 | 272 | ||
273 | static inline int check_signal(pdacf_t *chip) | 273 | static inline int check_signal(struct snd_pdacf *chip) |
274 | { | 274 | { |
275 | return (chip->ak4117->rcs0 & AK4117_UNLCK) == 0; | 275 | return (chip->ak4117->rcs0 & AK4117_UNLCK) == 0; |
276 | } | 276 | } |
277 | 277 | ||
278 | int snd_pdacf_resume(snd_card_t *card) | 278 | int snd_pdacf_resume(struct snd_card *card) |
279 | { | 279 | { |
280 | pdacf_t *chip = card->pm_private_data; | 280 | struct snd_pdacf *chip = card->pm_private_data; |
281 | int timeout = 40; | 281 | int timeout = 40; |
282 | 282 | ||
283 | pdacf_reinit(chip, 1); | 283 | pdacf_reinit(chip, 1); |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c index 255b63444b5d..7c5f21e45cb4 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c | |||
@@ -28,7 +28,7 @@ | |||
28 | */ | 28 | */ |
29 | irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs) | 29 | irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs) |
30 | { | 30 | { |
31 | pdacf_t *chip = dev; | 31 | struct snd_pdacf *chip = dev; |
32 | unsigned short stat; | 32 | unsigned short stat; |
33 | 33 | ||
34 | if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE| | 34 | if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE| |
@@ -204,7 +204,7 @@ static inline void pdacf_transfer_stereo24be(u8 *dst, u32 xor, unsigned int size | |||
204 | } | 204 | } |
205 | } | 205 | } |
206 | 206 | ||
207 | static void pdacf_transfer(pdacf_t *chip, unsigned int size, unsigned int off) | 207 | static void pdacf_transfer(struct snd_pdacf *chip, unsigned int size, unsigned int off) |
208 | { | 208 | { |
209 | unsigned long rdp_port = chip->port + PDAUDIOCF_REG_MD; | 209 | unsigned long rdp_port = chip->port + PDAUDIOCF_REG_MD; |
210 | unsigned int xor = chip->pcm_xor; | 210 | unsigned int xor = chip->pcm_xor; |
@@ -258,7 +258,7 @@ static void pdacf_transfer(pdacf_t *chip, unsigned int size, unsigned int off) | |||
258 | 258 | ||
259 | void pdacf_tasklet(unsigned long private_data) | 259 | void pdacf_tasklet(unsigned long private_data) |
260 | { | 260 | { |
261 | pdacf_t *chip = (pdacf_t *) private_data; | 261 | struct snd_pdacf *chip = (struct snd_pdacf *) private_data; |
262 | int size, off, cont, rdp, wdp; | 262 | int size, off, cont, rdp, wdp; |
263 | 263 | ||
264 | if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE|PDAUDIOCF_STAT_IS_CONFIGURED)) != PDAUDIOCF_STAT_IS_CONFIGURED) | 264 | if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE|PDAUDIOCF_STAT_IS_CONFIGURED)) != PDAUDIOCF_STAT_IS_CONFIGURED) |
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c index d54033ebd5e9..09cb250d5827 100644 --- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c +++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | |||
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | /* get the physical page pointer on the given offset */ | 36 | /* get the physical page pointer on the given offset */ |
37 | static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned long offset) | 37 | static struct page *snd_pcm_get_vmalloc_page(struct snd_pcm_substream *subs, unsigned long offset) |
38 | { | 38 | { |
39 | void *pageptr = subs->runtime->dma_area + offset; | 39 | void *pageptr = subs->runtime->dma_area + offset; |
40 | return vmalloc_to_page(pageptr); | 40 | return vmalloc_to_page(pageptr); |
@@ -44,9 +44,9 @@ static struct page *snd_pcm_get_vmalloc_page(snd_pcm_substream_t *subs, unsigned | |||
44 | * hw_params callback | 44 | * hw_params callback |
45 | * NOTE: this may be called not only once per pcm open! | 45 | * NOTE: this may be called not only once per pcm open! |
46 | */ | 46 | */ |
47 | static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) | 47 | static int snd_pcm_alloc_vmalloc_buffer(struct snd_pcm_substream *subs, size_t size) |
48 | { | 48 | { |
49 | snd_pcm_runtime_t *runtime = subs->runtime; | 49 | struct snd_pcm_runtime *runtime = subs->runtime; |
50 | if (runtime->dma_area) { | 50 | if (runtime->dma_area) { |
51 | if (runtime->dma_bytes >= size) | 51 | if (runtime->dma_bytes >= size) |
52 | return 0; /* already enough large */ | 52 | return 0; /* already enough large */ |
@@ -63,9 +63,9 @@ static int snd_pcm_alloc_vmalloc_buffer(snd_pcm_substream_t *subs, size_t size) | |||
63 | * hw_free callback | 63 | * hw_free callback |
64 | * NOTE: this may be called not only once per pcm open! | 64 | * NOTE: this may be called not only once per pcm open! |
65 | */ | 65 | */ |
66 | static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) | 66 | static int snd_pcm_free_vmalloc_buffer(struct snd_pcm_substream *subs) |
67 | { | 67 | { |
68 | snd_pcm_runtime_t *runtime = subs->runtime; | 68 | struct snd_pcm_runtime *runtime = subs->runtime; |
69 | if (runtime->dma_area) { | 69 | if (runtime->dma_area) { |
70 | vfree(runtime->dma_area); | 70 | vfree(runtime->dma_area); |
71 | runtime->dma_area = NULL; | 71 | runtime->dma_area = NULL; |
@@ -76,7 +76,7 @@ static int snd_pcm_free_vmalloc_buffer(snd_pcm_substream_t *subs) | |||
76 | /* | 76 | /* |
77 | * clear the SRAM contents | 77 | * clear the SRAM contents |
78 | */ | 78 | */ |
79 | static int pdacf_pcm_clear_sram(pdacf_t *chip) | 79 | static int pdacf_pcm_clear_sram(struct snd_pdacf *chip) |
80 | { | 80 | { |
81 | int max_loop = 64 * 1024; | 81 | int max_loop = 64 * 1024; |
82 | 82 | ||
@@ -91,10 +91,10 @@ static int pdacf_pcm_clear_sram(pdacf_t *chip) | |||
91 | /* | 91 | /* |
92 | * pdacf_pcm_trigger - trigger callback for capture | 92 | * pdacf_pcm_trigger - trigger callback for capture |
93 | */ | 93 | */ |
94 | static int pdacf_pcm_trigger(snd_pcm_substream_t *subs, int cmd) | 94 | static int pdacf_pcm_trigger(struct snd_pcm_substream *subs, int cmd) |
95 | { | 95 | { |
96 | pdacf_t *chip = snd_pcm_substream_chip(subs); | 96 | struct snd_pdacf *chip = snd_pcm_substream_chip(subs); |
97 | snd_pcm_runtime_t *runtime = subs->runtime; | 97 | struct snd_pcm_runtime *runtime = subs->runtime; |
98 | int inc, ret = 0, rate; | 98 | int inc, ret = 0, rate; |
99 | unsigned short mask, val, tmp; | 99 | unsigned short mask, val, tmp; |
100 | 100 | ||
@@ -146,8 +146,8 @@ static int pdacf_pcm_trigger(snd_pcm_substream_t *subs, int cmd) | |||
146 | /* | 146 | /* |
147 | * pdacf_pcm_hw_params - hw_params callback for playback and capture | 147 | * pdacf_pcm_hw_params - hw_params callback for playback and capture |
148 | */ | 148 | */ |
149 | static int pdacf_pcm_hw_params(snd_pcm_substream_t *subs, | 149 | static int pdacf_pcm_hw_params(struct snd_pcm_substream *subs, |
150 | snd_pcm_hw_params_t *hw_params) | 150 | struct snd_pcm_hw_params *hw_params) |
151 | { | 151 | { |
152 | return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); | 152 | return snd_pcm_alloc_vmalloc_buffer(subs, params_buffer_bytes(hw_params)); |
153 | } | 153 | } |
@@ -155,7 +155,7 @@ static int pdacf_pcm_hw_params(snd_pcm_substream_t *subs, | |||
155 | /* | 155 | /* |
156 | * pdacf_pcm_hw_free - hw_free callback for playback and capture | 156 | * pdacf_pcm_hw_free - hw_free callback for playback and capture |
157 | */ | 157 | */ |
158 | static int pdacf_pcm_hw_free(snd_pcm_substream_t *subs) | 158 | static int pdacf_pcm_hw_free(struct snd_pcm_substream *subs) |
159 | { | 159 | { |
160 | return snd_pcm_free_vmalloc_buffer(subs); | 160 | return snd_pcm_free_vmalloc_buffer(subs); |
161 | } | 161 | } |
@@ -163,10 +163,10 @@ static int pdacf_pcm_hw_free(snd_pcm_substream_t *subs) | |||
163 | /* | 163 | /* |
164 | * pdacf_pcm_prepare - prepare callback for playback and capture | 164 | * pdacf_pcm_prepare - prepare callback for playback and capture |
165 | */ | 165 | */ |
166 | static int pdacf_pcm_prepare(snd_pcm_substream_t *subs) | 166 | static int pdacf_pcm_prepare(struct snd_pcm_substream *subs) |
167 | { | 167 | { |
168 | pdacf_t *chip = snd_pcm_substream_chip(subs); | 168 | struct snd_pdacf *chip = snd_pcm_substream_chip(subs); |
169 | snd_pcm_runtime_t *runtime = subs->runtime; | 169 | struct snd_pcm_runtime *runtime = subs->runtime; |
170 | u16 val, nval, aval; | 170 | u16 val, nval, aval; |
171 | 171 | ||
172 | if (chip->chip_status & PDAUDIOCF_STAT_IS_STALE) | 172 | if (chip->chip_status & PDAUDIOCF_STAT_IS_STALE) |
@@ -239,7 +239,7 @@ static int pdacf_pcm_prepare(snd_pcm_substream_t *subs) | |||
239 | * capture hw information | 239 | * capture hw information |
240 | */ | 240 | */ |
241 | 241 | ||
242 | static snd_pcm_hardware_t pdacf_pcm_capture_hw = { | 242 | static struct snd_pcm_hardware pdacf_pcm_capture_hw = { |
243 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | | 243 | .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | |
244 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | | 244 | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | |
245 | SNDRV_PCM_INFO_MMAP_VALID), | 245 | SNDRV_PCM_INFO_MMAP_VALID), |
@@ -269,10 +269,10 @@ static snd_pcm_hardware_t pdacf_pcm_capture_hw = { | |||
269 | /* | 269 | /* |
270 | * pdacf_pcm_capture_open - open callback for capture | 270 | * pdacf_pcm_capture_open - open callback for capture |
271 | */ | 271 | */ |
272 | static int pdacf_pcm_capture_open(snd_pcm_substream_t *subs) | 272 | static int pdacf_pcm_capture_open(struct snd_pcm_substream *subs) |
273 | { | 273 | { |
274 | snd_pcm_runtime_t *runtime = subs->runtime; | 274 | struct snd_pcm_runtime *runtime = subs->runtime; |
275 | pdacf_t *chip = snd_pcm_substream_chip(subs); | 275 | struct snd_pdacf *chip = snd_pcm_substream_chip(subs); |
276 | 276 | ||
277 | if (chip->chip_status & PDAUDIOCF_STAT_IS_STALE) | 277 | if (chip->chip_status & PDAUDIOCF_STAT_IS_STALE) |
278 | return -EBUSY; | 278 | return -EBUSY; |
@@ -287,9 +287,9 @@ static int pdacf_pcm_capture_open(snd_pcm_substream_t *subs) | |||
287 | /* | 287 | /* |
288 | * pdacf_pcm_capture_close - close callback for capture | 288 | * pdacf_pcm_capture_close - close callback for capture |
289 | */ | 289 | */ |
290 | static int pdacf_pcm_capture_close(snd_pcm_substream_t *subs) | 290 | static int pdacf_pcm_capture_close(struct snd_pcm_substream *subs) |
291 | { | 291 | { |
292 | pdacf_t *chip = snd_pcm_substream_chip(subs); | 292 | struct snd_pdacf *chip = snd_pcm_substream_chip(subs); |
293 | 293 | ||
294 | if (!chip) | 294 | if (!chip) |
295 | return -EINVAL; | 295 | return -EINVAL; |
@@ -302,16 +302,16 @@ static int pdacf_pcm_capture_close(snd_pcm_substream_t *subs) | |||
302 | /* | 302 | /* |
303 | * pdacf_pcm_capture_pointer - pointer callback for capture | 303 | * pdacf_pcm_capture_pointer - pointer callback for capture |
304 | */ | 304 | */ |
305 | static snd_pcm_uframes_t pdacf_pcm_capture_pointer(snd_pcm_substream_t *subs) | 305 | static snd_pcm_uframes_t pdacf_pcm_capture_pointer(struct snd_pcm_substream *subs) |
306 | { | 306 | { |
307 | pdacf_t *chip = snd_pcm_substream_chip(subs); | 307 | struct snd_pdacf *chip = snd_pcm_substream_chip(subs); |
308 | return chip->pcm_hwptr; | 308 | return chip->pcm_hwptr; |
309 | } | 309 | } |
310 | 310 | ||
311 | /* | 311 | /* |
312 | * operators for PCM capture | 312 | * operators for PCM capture |
313 | */ | 313 | */ |
314 | static snd_pcm_ops_t pdacf_pcm_capture_ops = { | 314 | static struct snd_pcm_ops pdacf_pcm_capture_ops = { |
315 | .open = pdacf_pcm_capture_open, | 315 | .open = pdacf_pcm_capture_open, |
316 | .close = pdacf_pcm_capture_close, | 316 | .close = pdacf_pcm_capture_close, |
317 | .ioctl = snd_pcm_lib_ioctl, | 317 | .ioctl = snd_pcm_lib_ioctl, |
@@ -327,9 +327,9 @@ static snd_pcm_ops_t pdacf_pcm_capture_ops = { | |||
327 | /* | 327 | /* |
328 | * snd_pdacf_pcm_new - create and initialize a pcm | 328 | * snd_pdacf_pcm_new - create and initialize a pcm |
329 | */ | 329 | */ |
330 | int snd_pdacf_pcm_new(pdacf_t *chip) | 330 | int snd_pdacf_pcm_new(struct snd_pdacf *chip) |
331 | { | 331 | { |
332 | snd_pcm_t *pcm; | 332 | struct snd_pcm *pcm; |
333 | int err; | 333 | int err; |
334 | 334 | ||
335 | err = snd_pcm_new(chip->card, "PDAudioCF", 0, 0, 1, &pcm); | 335 | err = snd_pcm_new(chip->card, "PDAudioCF", 0, 0, 1, &pcm); |