Lines Matching refs:emu
37 static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, in snd_emu10k1_proc_spdif_status() argument
49 status = snd_emu10k1_ptr_read(emu, status_reg, 0); in snd_emu10k1_proc_spdif_status()
67 rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); in snd_emu10k1_proc_spdif_status()
186 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_read() local
188 int nefx = emu->audigy ? 64 : 32; in snd_emu10k1_proc_read()
189 char **outputs = emu->audigy ? audigy_outs : creative_outs; in snd_emu10k1_proc_read()
194 emu->audigy ? "Audigy" : (emu->card_capabilities->ecard ? "EMU APS" : "Creative")); in snd_emu10k1_proc_read()
195 snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); in snd_emu10k1_proc_read()
196 snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2); in snd_emu10k1_proc_read()
200 val = emu->audigy ? in snd_emu10k1_proc_read()
201 snd_emu10k1_ptr_read(emu, A_FXRT1, idx) : in snd_emu10k1_proc_read()
202 snd_emu10k1_ptr_read(emu, FXRT, idx); in snd_emu10k1_proc_read()
203 val1 = emu->audigy ? in snd_emu10k1_proc_read()
204 snd_emu10k1_ptr_read(emu, A_FXRT2, idx) : in snd_emu10k1_proc_read()
206 if (emu->audigy) { in snd_emu10k1_proc_read()
229 if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) in snd_emu10k1_proc_read()
233 for (idx = 0; idx < (emu->audigy ? 64 : 32); idx++) in snd_emu10k1_proc_read()
240 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_spdif_read() local
245 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_spdif_read()
246 snd_emu1010_fpga_read(emu, 0x38, &value); in snd_emu10k1_proc_spdif_read()
248 snd_emu1010_fpga_read(emu, 0x2a, &value); in snd_emu10k1_proc_spdif_read()
249 snd_emu1010_fpga_read(emu, 0x2b, &value2); in snd_emu10k1_proc_spdif_read()
255 snd_emu1010_fpga_read(emu, 0x20, &value); in snd_emu10k1_proc_spdif_read()
257 snd_emu1010_fpga_read(emu, 0x28, &value); in snd_emu10k1_proc_spdif_read()
258 snd_emu1010_fpga_read(emu, 0x29, &value2); in snd_emu10k1_proc_spdif_read()
265 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); in snd_emu10k1_proc_spdif_read()
266 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); in snd_emu10k1_proc_spdif_read()
269 val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); in snd_emu10k1_proc_spdif_read()
280 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_rates_read() local
282 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); in snd_emu10k1_proc_rates_read()
295 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_acode_read() local
297 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); in snd_emu10k1_proc_acode_read()
299 for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) { in snd_emu10k1_proc_acode_read()
302 low = snd_emu10k1_efx_read(emu, pc * 2); in snd_emu10k1_proc_acode_read()
303 high = snd_emu10k1_efx_read(emu, pc * 2 + 1); in snd_emu10k1_proc_acode_read()
304 if (emu->audigy) in snd_emu10k1_proc_acode_read()
339 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_fx8010_read() local
352 offset = emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; in snd_emu10k1_fx8010_read()
354 offset = emu->audigy ? A_FXGPREGBASE : FXGPREGBASE; in snd_emu10k1_fx8010_read()
362 val = snd_emu10k1_ptr_read(emu, offset + idx + (pos >> 2), 0); in snd_emu10k1_fx8010_read()
363 if (tram_addr && emu->audigy) { in snd_emu10k1_fx8010_read()
365 val |= snd_emu10k1_ptr_read(emu, 0x100 + idx + (pos >> 2), 0) << 20; in snd_emu10k1_fx8010_read()
380 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_voices_read() local
386 voice = &emu->voices[idx]; in snd_emu10k1_proc_voices_read()
401 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_emu1010_reg_read() local
407 snd_emu1010_fpga_read(emu, i, &value); in snd_emu_proc_emu1010_reg_read()
415 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_read() local
421 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
422 value = inl(emu->port + i); in snd_emu_proc_io_reg_read()
423 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
431 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_write() local
439 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
440 outl(val, emu->port + (reg & 0xfffffffc)); in snd_emu_proc_io_reg_write()
441 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
446 static unsigned int snd_ptr_read(struct snd_emu10k1 * emu, in snd_ptr_read() argument
456 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_read()
457 outl(regptr, emu->port + iobase + PTR); in snd_ptr_read()
458 val = inl(emu->port + iobase + DATA); in snd_ptr_read()
459 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_read()
463 static void snd_ptr_write(struct snd_emu10k1 *emu, in snd_ptr_write() argument
474 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_write()
475 outl(regptr, emu->port + iobase + PTR); in snd_ptr_write()
476 outl(data, emu->port + iobase + DATA); in snd_ptr_write()
477 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_write()
484 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_read() local
496 value = snd_ptr_read(emu, 0, i, j); in snd_emu_proc_ptr_reg_read()
498 value = snd_ptr_read(emu, 0x20, i, j); in snd_emu_proc_ptr_reg_read()
508 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_write() local
515 snd_ptr_write(emu, iobase, reg, channel_id, val); in snd_emu_proc_ptr_reg_write()
567 int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) in snd_emu10k1_proc_init() argument
571 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_init()
572 if (! snd_card_proc_new(emu->card, "emu1010_regs", &entry)) in snd_emu10k1_proc_init()
573 snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read); in snd_emu10k1_proc_init()
575 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { in snd_emu10k1_proc_init()
576 snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); in snd_emu10k1_proc_init()
580 if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { in snd_emu10k1_proc_init()
581 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); in snd_emu10k1_proc_init()
585 if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { in snd_emu10k1_proc_init()
586 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); in snd_emu10k1_proc_init()
590 if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { in snd_emu10k1_proc_init()
591 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); in snd_emu10k1_proc_init()
595 if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { in snd_emu10k1_proc_init()
596 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); in snd_emu10k1_proc_init()
600 if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { in snd_emu10k1_proc_init()
601 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); in snd_emu10k1_proc_init()
607 if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) in snd_emu10k1_proc_init()
608 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_read); in snd_emu10k1_proc_init()
610 if (emu->card_capabilities->emu10k2_chip) { in snd_emu10k1_proc_init()
611 if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) in snd_emu10k1_proc_init()
612 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_spdif_read); in snd_emu10k1_proc_init()
614 if (emu->card_capabilities->ca0151_chip) { in snd_emu10k1_proc_init()
615 if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) in snd_emu10k1_proc_init()
616 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_rates_read); in snd_emu10k1_proc_init()
619 if (! snd_card_proc_new(emu->card, "voices", &entry)) in snd_emu10k1_proc_init()
620 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_voices_read); in snd_emu10k1_proc_init()
622 if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { in snd_emu10k1_proc_init()
624 entry->private_data = emu; in snd_emu10k1_proc_init()
626 entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR; in snd_emu10k1_proc_init()
629 if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) { in snd_emu10k1_proc_init()
631 entry->private_data = emu; in snd_emu10k1_proc_init()
633 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ; in snd_emu10k1_proc_init()
636 if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) { in snd_emu10k1_proc_init()
638 entry->private_data = emu; in snd_emu10k1_proc_init()
640 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ; in snd_emu10k1_proc_init()
643 if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) { in snd_emu10k1_proc_init()
645 entry->private_data = emu; in snd_emu10k1_proc_init()
647 entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; in snd_emu10k1_proc_init()
650 if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) { in snd_emu10k1_proc_init()
652 entry->private_data = emu; in snd_emu10k1_proc_init()