aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm_compat.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 07:59:38 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:43 -0500
commit877211f5e1b1196179ba1290e8e1a3dc00427c55 (patch)
tree9964e0e46043cee6c76a614ac35ab982faba7f99 /sound/core/pcm_compat.c
parent24c1f93188b4438c7f30df5b4cd78340cdb28daf (diff)
[ALSA] Remove xxx_t typedefs: PCM
Modules: PCM Midlevel Remove xxx_t typedefs from the core PCM codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm_compat.c')
-rw-r--r--sound/core/pcm_compat.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/sound/core/pcm_compat.c b/sound/core/pcm_compat.c
index 4b6307df846d..e5133033de5e 100644
--- a/sound/core/pcm_compat.c
+++ b/sound/core/pcm_compat.c
@@ -22,7 +22,7 @@
22 22
23#include <linux/compat.h> 23#include <linux/compat.h>
24 24
25static int snd_pcm_ioctl_delay_compat(snd_pcm_substream_t *substream, 25static int snd_pcm_ioctl_delay_compat(struct snd_pcm_substream *substream,
26 s32 __user *src) 26 s32 __user *src)
27{ 27{
28 snd_pcm_sframes_t delay; 28 snd_pcm_sframes_t delay;
@@ -39,7 +39,7 @@ static int snd_pcm_ioctl_delay_compat(snd_pcm_substream_t *substream,
39 return err; 39 return err;
40} 40}
41 41
42static int snd_pcm_ioctl_rewind_compat(snd_pcm_substream_t *substream, 42static int snd_pcm_ioctl_rewind_compat(struct snd_pcm_substream *substream,
43 u32 __user *src) 43 u32 __user *src)
44{ 44{
45 snd_pcm_uframes_t frames; 45 snd_pcm_uframes_t frames;
@@ -56,7 +56,7 @@ static int snd_pcm_ioctl_rewind_compat(snd_pcm_substream_t *substream,
56 return err < 0 ? err : 0; 56 return err < 0 ? err : 0;
57} 57}
58 58
59static int snd_pcm_ioctl_forward_compat(snd_pcm_substream_t *substream, 59static int snd_pcm_ioctl_forward_compat(struct snd_pcm_substream *substream,
60 u32 __user *src) 60 u32 __user *src)
61{ 61{
62 snd_pcm_uframes_t frames; 62 snd_pcm_uframes_t frames;
@@ -73,12 +73,12 @@ static int snd_pcm_ioctl_forward_compat(snd_pcm_substream_t *substream,
73 return err < 0 ? err : 0; 73 return err < 0 ? err : 0;
74} 74}
75 75
76struct sndrv_pcm_hw_params32 { 76struct snd_pcm_hw_params32 {
77 u32 flags; 77 u32 flags;
78 struct sndrv_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */ 78 struct snd_mask masks[SNDRV_PCM_HW_PARAM_LAST_MASK - SNDRV_PCM_HW_PARAM_FIRST_MASK + 1]; /* this must be identical */
79 struct sndrv_mask mres[5]; /* reserved masks */ 79 struct snd_mask mres[5]; /* reserved masks */
80 struct sndrv_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1]; 80 struct snd_interval intervals[SNDRV_PCM_HW_PARAM_LAST_INTERVAL - SNDRV_PCM_HW_PARAM_FIRST_INTERVAL + 1];
81 struct sndrv_interval ires[9]; /* reserved intervals */ 81 struct snd_interval ires[9]; /* reserved intervals */
82 u32 rmask; 82 u32 rmask;
83 u32 cmask; 83 u32 cmask;
84 u32 info; 84 u32 info;
@@ -89,7 +89,7 @@ struct sndrv_pcm_hw_params32 {
89 unsigned char reserved[64]; 89 unsigned char reserved[64];
90}; 90};
91 91
92struct sndrv_pcm_sw_params32 { 92struct snd_pcm_sw_params32 {
93 s32 tstamp_mode; 93 s32 tstamp_mode;
94 u32 period_step; 94 u32 period_step;
95 u32 sleep_min; 95 u32 sleep_min;
@@ -104,7 +104,7 @@ struct sndrv_pcm_sw_params32 {
104}; 104};
105 105
106/* recalcuate the boundary within 32bit */ 106/* recalcuate the boundary within 32bit */
107static snd_pcm_uframes_t recalculate_boundary(snd_pcm_runtime_t *runtime) 107static snd_pcm_uframes_t recalculate_boundary(struct snd_pcm_runtime *runtime)
108{ 108{
109 snd_pcm_uframes_t boundary; 109 snd_pcm_uframes_t boundary;
110 110
@@ -116,10 +116,10 @@ static snd_pcm_uframes_t recalculate_boundary(snd_pcm_runtime_t *runtime)
116 return boundary; 116 return boundary;
117} 117}
118 118
119static int snd_pcm_ioctl_sw_params_compat(snd_pcm_substream_t *substream, 119static int snd_pcm_ioctl_sw_params_compat(struct snd_pcm_substream *substream,
120 struct sndrv_pcm_sw_params32 __user *src) 120 struct snd_pcm_sw_params32 __user *src)
121{ 121{
122 snd_pcm_sw_params_t params; 122 struct snd_pcm_sw_params params;
123 snd_pcm_uframes_t boundary; 123 snd_pcm_uframes_t boundary;
124 int err; 124 int err;
125 125
@@ -149,17 +149,17 @@ static int snd_pcm_ioctl_sw_params_compat(snd_pcm_substream_t *substream,
149 return err; 149 return err;
150} 150}
151 151
152struct sndrv_pcm_channel_info32 { 152struct snd_pcm_channel_info32 {
153 u32 channel; 153 u32 channel;
154 u32 offset; 154 u32 offset;
155 u32 first; 155 u32 first;
156 u32 step; 156 u32 step;
157}; 157};
158 158
159static int snd_pcm_ioctl_channel_info_compat(snd_pcm_substream_t *substream, 159static int snd_pcm_ioctl_channel_info_compat(struct snd_pcm_substream *substream,
160 struct sndrv_pcm_channel_info32 __user *src) 160 struct snd_pcm_channel_info32 __user *src)
161{ 161{
162 snd_pcm_channel_info_t info; 162 struct snd_pcm_channel_info info;
163 int err; 163 int err;
164 164
165 if (get_user(info.channel, &src->channel) || 165 if (get_user(info.channel, &src->channel) ||
@@ -178,7 +178,7 @@ static int snd_pcm_ioctl_channel_info_compat(snd_pcm_substream_t *substream,
178 return err; 178 return err;
179} 179}
180 180
181struct sndrv_pcm_status32 { 181struct snd_pcm_status32 {
182 s32 state; 182 s32 state;
183 struct compat_timespec trigger_tstamp; 183 struct compat_timespec trigger_tstamp;
184 struct compat_timespec tstamp; 184 struct compat_timespec tstamp;
@@ -193,10 +193,10 @@ struct sndrv_pcm_status32 {
193} __attribute__((packed)); 193} __attribute__((packed));
194 194
195 195
196static int snd_pcm_status_user_compat(snd_pcm_substream_t *substream, 196static int snd_pcm_status_user_compat(struct snd_pcm_substream *substream,
197 struct sndrv_pcm_status32 __user *src) 197 struct snd_pcm_status32 __user *src)
198{ 198{
199 snd_pcm_status_t status; 199 struct snd_pcm_status status;
200 int err; 200 int err;
201 201
202 err = snd_pcm_status(substream, &status); 202 err = snd_pcm_status(substream, &status);
@@ -221,12 +221,12 @@ static int snd_pcm_status_user_compat(snd_pcm_substream_t *substream,
221} 221}
222 222
223/* both for HW_PARAMS and HW_REFINE */ 223/* both for HW_PARAMS and HW_REFINE */
224static int snd_pcm_ioctl_hw_params_compat(snd_pcm_substream_t *substream, 224static int snd_pcm_ioctl_hw_params_compat(struct snd_pcm_substream *substream,
225 int refine, 225 int refine,
226 struct sndrv_pcm_hw_params32 __user *data32) 226 struct snd_pcm_hw_params32 __user *data32)
227{ 227{
228 struct sndrv_pcm_hw_params *data; 228 struct snd_pcm_hw_params *data;
229 snd_pcm_runtime_t *runtime; 229 struct snd_pcm_runtime *runtime;
230 int err; 230 int err;
231 231
232 if (! (runtime = substream->runtime)) 232 if (! (runtime = substream->runtime))
@@ -265,14 +265,14 @@ static int snd_pcm_ioctl_hw_params_compat(snd_pcm_substream_t *substream,
265 265
266/* 266/*
267 */ 267 */
268struct sndrv_xferi32 { 268struct snd_xferi32 {
269 s32 result; 269 s32 result;
270 u32 buf; 270 u32 buf;
271 u32 frames; 271 u32 frames;
272}; 272};
273 273
274static int snd_pcm_ioctl_xferi_compat(snd_pcm_substream_t *substream, 274static int snd_pcm_ioctl_xferi_compat(struct snd_pcm_substream *substream,
275 int dir, struct sndrv_xferi32 __user *data32) 275 int dir, struct snd_xferi32 __user *data32)
276{ 276{
277 compat_caddr_t buf; 277 compat_caddr_t buf;
278 u32 frames; 278 u32 frames;
@@ -303,7 +303,7 @@ static int snd_pcm_ioctl_xferi_compat(snd_pcm_substream_t *substream,
303 303
304 304
305/* snd_xfern needs remapping of bufs */ 305/* snd_xfern needs remapping of bufs */
306struct sndrv_xfern32 { 306struct snd_xfern32 {
307 s32 result; 307 s32 result;
308 u32 bufs; /* this is void **; */ 308 u32 bufs; /* this is void **; */
309 u32 frames; 309 u32 frames;
@@ -315,8 +315,8 @@ struct sndrv_xfern32 {
315 * handler there expands again the same 128 pointers on stack, so it is better 315 * handler there expands again the same 128 pointers on stack, so it is better
316 * to handle the function (calling pcm_readv/writev) directly in this handler. 316 * to handle the function (calling pcm_readv/writev) directly in this handler.
317 */ 317 */
318static int snd_pcm_ioctl_xfern_compat(snd_pcm_substream_t *substream, 318static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,
319 int dir, struct sndrv_xfern32 __user *data32) 319 int dir, struct snd_xfern32 __user *data32)
320{ 320{
321 compat_caddr_t buf; 321 compat_caddr_t buf;
322 compat_caddr_t __user *bufptr; 322 compat_caddr_t __user *bufptr;
@@ -360,7 +360,7 @@ static int snd_pcm_ioctl_xfern_compat(snd_pcm_substream_t *substream,
360} 360}
361 361
362 362
363struct sndrv_pcm_mmap_status32 { 363struct snd_pcm_mmap_status32 {
364 s32 state; 364 s32 state;
365 s32 pad1; 365 s32 pad1;
366 u32 hw_ptr; 366 u32 hw_ptr;
@@ -368,32 +368,32 @@ struct sndrv_pcm_mmap_status32 {
368 s32 suspended_state; 368 s32 suspended_state;
369} __attribute__((packed)); 369} __attribute__((packed));
370 370
371struct sndrv_pcm_mmap_control32 { 371struct snd_pcm_mmap_control32 {
372 u32 appl_ptr; 372 u32 appl_ptr;
373 u32 avail_min; 373 u32 avail_min;
374}; 374};
375 375
376struct sndrv_pcm_sync_ptr32 { 376struct snd_pcm_sync_ptr32 {
377 u32 flags; 377 u32 flags;
378 union { 378 union {
379 struct sndrv_pcm_mmap_status32 status; 379 struct snd_pcm_mmap_status32 status;
380 unsigned char reserved[64]; 380 unsigned char reserved[64];
381 } s; 381 } s;
382 union { 382 union {
383 struct sndrv_pcm_mmap_control32 control; 383 struct snd_pcm_mmap_control32 control;
384 unsigned char reserved[64]; 384 unsigned char reserved[64];
385 } c; 385 } c;
386} __attribute__((packed)); 386} __attribute__((packed));
387 387
388static int snd_pcm_ioctl_sync_ptr_compat(snd_pcm_substream_t *substream, 388static int snd_pcm_ioctl_sync_ptr_compat(struct snd_pcm_substream *substream,
389 struct sndrv_pcm_sync_ptr32 __user *src) 389 struct snd_pcm_sync_ptr32 __user *src)
390{ 390{
391 snd_pcm_runtime_t *runtime = substream->runtime; 391 struct snd_pcm_runtime *runtime = substream->runtime;
392 volatile struct sndrv_pcm_mmap_status *status; 392 volatile struct snd_pcm_mmap_status *status;
393 volatile struct sndrv_pcm_mmap_control *control; 393 volatile struct snd_pcm_mmap_control *control;
394 u32 sflags; 394 u32 sflags;
395 struct sndrv_pcm_mmap_control scontrol; 395 struct snd_pcm_mmap_control scontrol;
396 struct sndrv_pcm_mmap_status sstatus; 396 struct snd_pcm_mmap_status sstatus;
397 snd_pcm_uframes_t boundary; 397 snd_pcm_uframes_t boundary;
398 int err; 398 int err;
399 399
@@ -444,26 +444,26 @@ static int snd_pcm_ioctl_sync_ptr_compat(snd_pcm_substream_t *substream,
444/* 444/*
445 */ 445 */
446enum { 446enum {
447 SNDRV_PCM_IOCTL_HW_REFINE32 = _IOWR('A', 0x10, struct sndrv_pcm_hw_params32), 447 SNDRV_PCM_IOCTL_HW_REFINE32 = _IOWR('A', 0x10, struct snd_pcm_hw_params32),
448 SNDRV_PCM_IOCTL_HW_PARAMS32 = _IOWR('A', 0x11, struct sndrv_pcm_hw_params32), 448 SNDRV_PCM_IOCTL_HW_PARAMS32 = _IOWR('A', 0x11, struct snd_pcm_hw_params32),
449 SNDRV_PCM_IOCTL_SW_PARAMS32 = _IOWR('A', 0x13, struct sndrv_pcm_sw_params32), 449 SNDRV_PCM_IOCTL_SW_PARAMS32 = _IOWR('A', 0x13, struct snd_pcm_sw_params32),
450 SNDRV_PCM_IOCTL_STATUS32 = _IOR('A', 0x20, struct sndrv_pcm_status32), 450 SNDRV_PCM_IOCTL_STATUS32 = _IOR('A', 0x20, struct snd_pcm_status32),
451 SNDRV_PCM_IOCTL_DELAY32 = _IOR('A', 0x21, s32), 451 SNDRV_PCM_IOCTL_DELAY32 = _IOR('A', 0x21, s32),
452 SNDRV_PCM_IOCTL_CHANNEL_INFO32 = _IOR('A', 0x32, struct sndrv_pcm_channel_info32), 452 SNDRV_PCM_IOCTL_CHANNEL_INFO32 = _IOR('A', 0x32, struct snd_pcm_channel_info32),
453 SNDRV_PCM_IOCTL_REWIND32 = _IOW('A', 0x46, u32), 453 SNDRV_PCM_IOCTL_REWIND32 = _IOW('A', 0x46, u32),
454 SNDRV_PCM_IOCTL_FORWARD32 = _IOW('A', 0x49, u32), 454 SNDRV_PCM_IOCTL_FORWARD32 = _IOW('A', 0x49, u32),
455 SNDRV_PCM_IOCTL_WRITEI_FRAMES32 = _IOW('A', 0x50, struct sndrv_xferi32), 455 SNDRV_PCM_IOCTL_WRITEI_FRAMES32 = _IOW('A', 0x50, struct snd_xferi32),
456 SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct sndrv_xferi32), 456 SNDRV_PCM_IOCTL_READI_FRAMES32 = _IOR('A', 0x51, struct snd_xferi32),
457 SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct sndrv_xfern32), 457 SNDRV_PCM_IOCTL_WRITEN_FRAMES32 = _IOW('A', 0x52, struct snd_xfern32),
458 SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct sndrv_xfern32), 458 SNDRV_PCM_IOCTL_READN_FRAMES32 = _IOR('A', 0x53, struct snd_xfern32),
459 SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct sndrv_pcm_sync_ptr32), 459 SNDRV_PCM_IOCTL_SYNC_PTR32 = _IOWR('A', 0x23, struct snd_pcm_sync_ptr32),
460 460
461}; 461};
462 462
463static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg) 463static long snd_pcm_ioctl_compat(struct file *file, unsigned int cmd, unsigned long arg)
464{ 464{
465 snd_pcm_file_t *pcm_file; 465 struct snd_pcm_file *pcm_file;
466 snd_pcm_substream_t *substream; 466 struct snd_pcm_substream *substream;
467 void __user *argp = compat_ptr(arg); 467 void __user *argp = compat_ptr(arg);
468 468
469 pcm_file = file->private_data; 469 pcm_file = file->private_data;