aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emuproc.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:50:13 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:47 -0500
commiteb4698f347ec908c365504c4edddadd1acd406ea (patch)
tree4962019c8bf4a52e35ab55137e17aa150edf9661 /sound/pci/emu10k1/emuproc.c
parent3d19f804ef5f1d15fe001fc8d1ed58fac9d591fb (diff)
[ALSA] Remove xxx_t typedefs: PCI emu10k1
Modules: EMU10K1/EMU10K2 driver Remove xxx_t typedefs from the PCI emu10k1 driver. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emuproc.c')
-rw-r--r--sound/pci/emu10k1/emuproc.c101
1 files changed, 51 insertions, 50 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 6cdee588d35d..b88137f91655 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -32,8 +32,8 @@
32#include <sound/emu10k1.h> 32#include <sound/emu10k1.h>
33#include "p16v.h" 33#include "p16v.h"
34 34
35static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu, 35static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu,
36 snd_info_buffer_t * buffer, 36 struct snd_info_buffer *buffer,
37 char *title, 37 char *title,
38 int status_reg, 38 int status_reg,
39 int rate_reg) 39 int rate_reg)
@@ -75,8 +75,8 @@ static void snd_emu10k1_proc_spdif_status(emu10k1_t * emu,
75 75
76} 76}
77 77
78static void snd_emu10k1_proc_read(snd_info_entry_t *entry, 78static void snd_emu10k1_proc_read(struct snd_info_entry *entry,
79 snd_info_buffer_t * buffer) 79 struct snd_info_buffer *buffer)
80{ 80{
81 /* FIXME - output names are in emufx.c too */ 81 /* FIXME - output names are in emufx.c too */
82 static char *creative_outs[32] = { 82 static char *creative_outs[32] = {
@@ -181,7 +181,7 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
181 /* 63 */ "FXBUS2_31" 181 /* 63 */ "FXBUS2_31"
182 }; 182 };
183 183
184 emu10k1_t *emu = entry->private_data; 184 struct snd_emu10k1 *emu = entry->private_data;
185 unsigned int val, val1; 185 unsigned int val, val1;
186 int nefx = emu->audigy ? 64 : 32; 186 int nefx = emu->audigy ? 64 : 32;
187 char **outputs = emu->audigy ? audigy_outs : creative_outs; 187 char **outputs = emu->audigy ? audigy_outs : creative_outs;
@@ -232,10 +232,10 @@ static void snd_emu10k1_proc_read(snd_info_entry_t *entry,
232 snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]); 232 snd_iprintf(buffer, " Output %02i [%s]\n", idx, outputs[idx]);
233} 233}
234 234
235static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry, 235static void snd_emu10k1_proc_spdif_read(struct snd_info_entry *entry,
236 snd_info_buffer_t * buffer) 236 struct snd_info_buffer *buffer)
237{ 237{
238 emu10k1_t *emu = entry->private_data; 238 struct snd_emu10k1 *emu = entry->private_data;
239 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); 239 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS);
240 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); 240 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS);
241#if 0 241#if 0
@@ -246,11 +246,11 @@ static void snd_emu10k1_proc_spdif_read(snd_info_entry_t *entry,
246#endif 246#endif
247} 247}
248 248
249static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry, 249static void snd_emu10k1_proc_rates_read(struct snd_info_entry *entry,
250 snd_info_buffer_t * buffer) 250 struct snd_info_buffer *buffer)
251{ 251{
252 static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 }; 252 static int samplerate[8] = { 44100, 48000, 96000, 192000, 4, 5, 6, 7 };
253 emu10k1_t *emu = entry->private_data; 253 struct snd_emu10k1 *emu = entry->private_data;
254 unsigned int val, tmp, n; 254 unsigned int val, tmp, n;
255 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); 255 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0);
256 tmp = (val >> 16) & 0x8; 256 tmp = (val >> 16) & 0x8;
@@ -261,11 +261,11 @@ static void snd_emu10k1_proc_rates_read(snd_info_entry_t *entry,
261 } 261 }
262} 262}
263 263
264static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry, 264static void snd_emu10k1_proc_acode_read(struct snd_info_entry *entry,
265 snd_info_buffer_t * buffer) 265 struct snd_info_buffer *buffer)
266{ 266{
267 u32 pc; 267 u32 pc;
268 emu10k1_t *emu = entry->private_data; 268 struct snd_emu10k1 *emu = entry->private_data;
269 269
270 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); 270 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name);
271 snd_iprintf(buffer, " Code dump :\n"); 271 snd_iprintf(buffer, " Code dump :\n");
@@ -304,12 +304,13 @@ static void snd_emu10k1_proc_acode_read(snd_info_entry_t *entry,
304#define TOTAL_SIZE_CODE (0x200*8) 304#define TOTAL_SIZE_CODE (0x200*8)
305#define A_TOTAL_SIZE_CODE (0x400*8) 305#define A_TOTAL_SIZE_CODE (0x400*8)
306 306
307static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_data, 307static long snd_emu10k1_fx8010_read(struct snd_info_entry *entry,
308 void *file_private_data,
308 struct file *file, char __user *buf, 309 struct file *file, char __user *buf,
309 unsigned long count, unsigned long pos) 310 unsigned long count, unsigned long pos)
310{ 311{
311 long size; 312 long size;
312 emu10k1_t *emu = entry->private_data; 313 struct snd_emu10k1 *emu = entry->private_data;
313 unsigned int offset; 314 unsigned int offset;
314 int tram_addr = 0; 315 int tram_addr = 0;
315 316
@@ -349,11 +350,11 @@ static long snd_emu10k1_fx8010_read(snd_info_entry_t *entry, void *file_private_
349 return 0; 350 return 0;
350} 351}
351 352
352static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry, 353static void snd_emu10k1_proc_voices_read(struct snd_info_entry *entry,
353 snd_info_buffer_t * buffer) 354 struct snd_info_buffer *buffer)
354{ 355{
355 emu10k1_t *emu = entry->private_data; 356 struct snd_emu10k1 *emu = entry->private_data;
356 emu10k1_voice_t *voice; 357 struct snd_emu10k1_voice *voice;
357 int idx; 358 int idx;
358 359
359 snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n"); 360 snd_iprintf(buffer, "ch\tuse\tpcm\tefx\tsynth\tmidi\n");
@@ -370,10 +371,10 @@ static void snd_emu10k1_proc_voices_read(snd_info_entry_t *entry,
370} 371}
371 372
372#ifdef CONFIG_SND_DEBUG 373#ifdef CONFIG_SND_DEBUG
373static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry, 374static void snd_emu_proc_io_reg_read(struct snd_info_entry *entry,
374 snd_info_buffer_t * buffer) 375 struct snd_info_buffer *buffer)
375{ 376{
376 emu10k1_t *emu = entry->private_data; 377 struct snd_emu10k1 *emu = entry->private_data;
377 unsigned long value; 378 unsigned long value;
378 unsigned long flags; 379 unsigned long flags;
379 int i; 380 int i;
@@ -386,10 +387,10 @@ static void snd_emu_proc_io_reg_read(snd_info_entry_t *entry,
386 } 387 }
387} 388}
388 389
389static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry, 390static void snd_emu_proc_io_reg_write(struct snd_info_entry *entry,
390 snd_info_buffer_t * buffer) 391 struct snd_info_buffer *buffer)
391{ 392{
392 emu10k1_t *emu = entry->private_data; 393 struct snd_emu10k1 *emu = entry->private_data;
393 unsigned long flags; 394 unsigned long flags;
394 char line[64]; 395 char line[64];
395 u32 reg, val; 396 u32 reg, val;
@@ -404,7 +405,7 @@ static void snd_emu_proc_io_reg_write(snd_info_entry_t *entry,
404 } 405 }
405} 406}
406 407
407static unsigned int snd_ptr_read(emu10k1_t * emu, 408static unsigned int snd_ptr_read(struct snd_emu10k1 * emu,
408 unsigned int iobase, 409 unsigned int iobase,
409 unsigned int reg, 410 unsigned int reg,
410 unsigned int chn) 411 unsigned int chn)
@@ -421,7 +422,7 @@ static unsigned int snd_ptr_read(emu10k1_t * emu,
421 return val; 422 return val;
422} 423}
423 424
424static void snd_ptr_write(emu10k1_t *emu, 425static void snd_ptr_write(struct snd_emu10k1 *emu,
425 unsigned int iobase, 426 unsigned int iobase,
426 unsigned int reg, 427 unsigned int reg,
427 unsigned int chn, 428 unsigned int chn,
@@ -439,10 +440,10 @@ static void snd_ptr_write(emu10k1_t *emu,
439} 440}
440 441
441 442
442static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry, 443static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry,
443 snd_info_buffer_t * buffer, int iobase, int offset, int length, int voices) 444 struct snd_info_buffer *buffer, int iobase, int offset, int length, int voices)
444{ 445{
445 emu10k1_t *emu = entry->private_data; 446 struct snd_emu10k1 *emu = entry->private_data;
446 unsigned long value; 447 unsigned long value;
447 int i,j; 448 int i,j;
448 if (offset+length > 0xa0) { 449 if (offset+length > 0xa0) {
@@ -463,10 +464,10 @@ static void snd_emu_proc_ptr_reg_read(snd_info_entry_t *entry,
463 } 464 }
464} 465}
465 466
466static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry, 467static void snd_emu_proc_ptr_reg_write(struct snd_info_entry *entry,
467 snd_info_buffer_t * buffer, int iobase) 468 struct snd_info_buffer *buffer, int iobase)
468{ 469{
469 emu10k1_t *emu = entry->private_data; 470 struct snd_emu10k1 *emu = entry->private_data;
470 char line[64]; 471 char line[64];
471 unsigned int reg, channel_id , val; 472 unsigned int reg, channel_id , val;
472 while (!snd_info_get_line(buffer, line, sizeof(line))) { 473 while (!snd_info_get_line(buffer, line, sizeof(line))) {
@@ -477,45 +478,45 @@ static void snd_emu_proc_ptr_reg_write(snd_info_entry_t *entry,
477 } 478 }
478} 479}
479 480
480static void snd_emu_proc_ptr_reg_write00(snd_info_entry_t *entry, 481static void snd_emu_proc_ptr_reg_write00(struct snd_info_entry *entry,
481 snd_info_buffer_t * buffer) 482 struct snd_info_buffer *buffer)
482{ 483{
483 snd_emu_proc_ptr_reg_write(entry, buffer, 0); 484 snd_emu_proc_ptr_reg_write(entry, buffer, 0);
484} 485}
485 486
486static void snd_emu_proc_ptr_reg_write20(snd_info_entry_t *entry, 487static void snd_emu_proc_ptr_reg_write20(struct snd_info_entry *entry,
487 snd_info_buffer_t * buffer) 488 struct snd_info_buffer *buffer)
488{ 489{
489 snd_emu_proc_ptr_reg_write(entry, buffer, 0x20); 490 snd_emu_proc_ptr_reg_write(entry, buffer, 0x20);
490} 491}
491 492
492 493
493static void snd_emu_proc_ptr_reg_read00a(snd_info_entry_t *entry, 494static void snd_emu_proc_ptr_reg_read00a(struct snd_info_entry *entry,
494 snd_info_buffer_t * buffer) 495 struct snd_info_buffer *buffer)
495{ 496{
496 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64); 497 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0, 0x40, 64);
497} 498}
498 499
499static void snd_emu_proc_ptr_reg_read00b(snd_info_entry_t *entry, 500static void snd_emu_proc_ptr_reg_read00b(struct snd_info_entry *entry,
500 snd_info_buffer_t * buffer) 501 struct snd_info_buffer *buffer)
501{ 502{
502 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64); 503 snd_emu_proc_ptr_reg_read(entry, buffer, 0, 0x40, 0x40, 64);
503} 504}
504 505
505static void snd_emu_proc_ptr_reg_read20a(snd_info_entry_t *entry, 506static void snd_emu_proc_ptr_reg_read20a(struct snd_info_entry *entry,
506 snd_info_buffer_t * buffer) 507 struct snd_info_buffer *buffer)
507{ 508{
508 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4); 509 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0, 0x40, 4);
509} 510}
510 511
511static void snd_emu_proc_ptr_reg_read20b(snd_info_entry_t *entry, 512static void snd_emu_proc_ptr_reg_read20b(struct snd_info_entry *entry,
512 snd_info_buffer_t * buffer) 513 struct snd_info_buffer *buffer)
513{ 514{
514 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4); 515 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x40, 0x40, 4);
515} 516}
516 517
517static void snd_emu_proc_ptr_reg_read20c(snd_info_entry_t *entry, 518static void snd_emu_proc_ptr_reg_read20c(struct snd_info_entry *entry,
518 snd_info_buffer_t * buffer) 519 struct snd_info_buffer * buffer)
519{ 520{
520 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4); 521 snd_emu_proc_ptr_reg_read(entry, buffer, 0x20, 0x80, 0x20, 4);
521} 522}
@@ -525,9 +526,9 @@ static struct snd_info_entry_ops snd_emu10k1_proc_ops_fx8010 = {
525 .read = snd_emu10k1_fx8010_read, 526 .read = snd_emu10k1_fx8010_read,
526}; 527};
527 528
528int __devinit snd_emu10k1_proc_init(emu10k1_t * emu) 529int __devinit snd_emu10k1_proc_init(struct snd_emu10k1 * emu)
529{ 530{
530 snd_info_entry_t *entry; 531 struct snd_info_entry *entry;
531#ifdef CONFIG_SND_DEBUG 532#ifdef CONFIG_SND_DEBUG
532 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { 533 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) {
533 snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read); 534 snd_info_set_text_ops(entry, emu, 1024, snd_emu_proc_io_reg_read);