Lines Matching refs:emu
23 static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, in snd_emu10k1_proc_spdif_status() argument
35 status = snd_emu10k1_ptr_read(emu, status_reg, 0); in snd_emu10k1_proc_spdif_status()
53 rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); in snd_emu10k1_proc_spdif_status()
172 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_read() local
174 int nefx = emu->audigy ? 64 : 32; in snd_emu10k1_proc_read()
175 const char * const *outputs = emu->audigy ? audigy_outs : creative_outs; in snd_emu10k1_proc_read()
180 emu->audigy ? "Audigy" : (emu->card_capabilities->ecard ? "EMU APS" : "Creative")); in snd_emu10k1_proc_read()
181 snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); in snd_emu10k1_proc_read()
182 snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2); in snd_emu10k1_proc_read()
186 val = emu->audigy ? in snd_emu10k1_proc_read()
187 snd_emu10k1_ptr_read(emu, A_FXRT1, idx) : in snd_emu10k1_proc_read()
188 snd_emu10k1_ptr_read(emu, FXRT, idx); in snd_emu10k1_proc_read()
189 val1 = emu->audigy ? in snd_emu10k1_proc_read()
190 snd_emu10k1_ptr_read(emu, A_FXRT2, idx) : in snd_emu10k1_proc_read()
192 if (emu->audigy) { in snd_emu10k1_proc_read()
215 if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) in snd_emu10k1_proc_read()
219 for (idx = 0; idx < (emu->audigy ? 64 : 32); idx++) in snd_emu10k1_proc_read()
226 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_spdif_read() local
231 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_spdif_read()
232 snd_emu1010_fpga_read(emu, 0x38, &value); in snd_emu10k1_proc_spdif_read()
234 snd_emu1010_fpga_read(emu, 0x2a, &value); in snd_emu10k1_proc_spdif_read()
235 snd_emu1010_fpga_read(emu, 0x2b, &value2); in snd_emu10k1_proc_spdif_read()
241 snd_emu1010_fpga_read(emu, 0x20, &value); in snd_emu10k1_proc_spdif_read()
243 snd_emu1010_fpga_read(emu, 0x28, &value); in snd_emu10k1_proc_spdif_read()
244 snd_emu1010_fpga_read(emu, 0x29, &value2); in snd_emu10k1_proc_spdif_read()
251 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); in snd_emu10k1_proc_spdif_read()
252 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); in snd_emu10k1_proc_spdif_read()
255 val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); in snd_emu10k1_proc_spdif_read()
266 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_rates_read() local
268 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); in snd_emu10k1_proc_rates_read()
280 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_acode_read() local
282 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); in snd_emu10k1_proc_acode_read()
284 for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) { in snd_emu10k1_proc_acode_read()
287 low = snd_emu10k1_efx_read(emu, pc * 2); in snd_emu10k1_proc_acode_read()
288 high = snd_emu10k1_efx_read(emu, pc * 2 + 1); in snd_emu10k1_proc_acode_read()
289 if (emu->audigy) in snd_emu10k1_proc_acode_read()
324 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_fx8010_read() local
337 offset = emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; in snd_emu10k1_fx8010_read()
339 offset = emu->audigy ? A_FXGPREGBASE : FXGPREGBASE; in snd_emu10k1_fx8010_read()
347 val = snd_emu10k1_ptr_read(emu, offset + idx + (pos >> 2), 0); in snd_emu10k1_fx8010_read()
348 if (tram_addr && emu->audigy) { in snd_emu10k1_fx8010_read()
350 val |= snd_emu10k1_ptr_read(emu, 0x100 + idx + (pos >> 2), 0) << 20; in snd_emu10k1_fx8010_read()
365 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_voices_read() local
371 voice = &emu->voices[idx]; in snd_emu10k1_proc_voices_read()
386 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_emu1010_reg_read() local
392 snd_emu1010_fpga_read(emu, i, &value); in snd_emu_proc_emu1010_reg_read()
400 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_read() local
406 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
407 value = inl(emu->port + i); in snd_emu_proc_io_reg_read()
408 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
416 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_write() local
424 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
425 outl(val, emu->port + (reg & 0xfffffffc)); in snd_emu_proc_io_reg_write()
426 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
431 static unsigned int snd_ptr_read(struct snd_emu10k1 * emu, in snd_ptr_read() argument
441 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_read()
442 outl(regptr, emu->port + iobase + PTR); in snd_ptr_read()
443 val = inl(emu->port + iobase + DATA); in snd_ptr_read()
444 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_read()
448 static void snd_ptr_write(struct snd_emu10k1 *emu, in snd_ptr_write() argument
459 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_write()
460 outl(regptr, emu->port + iobase + PTR); in snd_ptr_write()
461 outl(data, emu->port + iobase + DATA); in snd_ptr_write()
462 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_write()
469 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_read() local
481 value = snd_ptr_read(emu, 0, i, j); in snd_emu_proc_ptr_reg_read()
483 value = snd_ptr_read(emu, 0x20, i, j); in snd_emu_proc_ptr_reg_read()
493 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_write() local
500 snd_ptr_write(emu, iobase, reg, channel_id, val); in snd_emu_proc_ptr_reg_write()
552 int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) in snd_emu10k1_proc_init() argument
556 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_init()
557 snd_card_ro_proc_new(emu->card, "emu1010_regs", in snd_emu10k1_proc_init()
558 emu, snd_emu_proc_emu1010_reg_read); in snd_emu10k1_proc_init()
560 snd_card_rw_proc_new(emu->card, "io_regs", emu, in snd_emu10k1_proc_init()
563 snd_card_rw_proc_new(emu->card, "ptr_regs00a", emu, in snd_emu10k1_proc_init()
566 snd_card_rw_proc_new(emu->card, "ptr_regs00b", emu, in snd_emu10k1_proc_init()
569 snd_card_rw_proc_new(emu->card, "ptr_regs20a", emu, in snd_emu10k1_proc_init()
572 snd_card_rw_proc_new(emu->card, "ptr_regs20b", emu, in snd_emu10k1_proc_init()
575 snd_card_rw_proc_new(emu->card, "ptr_regs20c", emu, in snd_emu10k1_proc_init()
580 snd_card_ro_proc_new(emu->card, "emu10k1", emu, snd_emu10k1_proc_read); in snd_emu10k1_proc_init()
582 if (emu->card_capabilities->emu10k2_chip) in snd_emu10k1_proc_init()
583 snd_card_ro_proc_new(emu->card, "spdif-in", emu, in snd_emu10k1_proc_init()
585 if (emu->card_capabilities->ca0151_chip) in snd_emu10k1_proc_init()
586 snd_card_ro_proc_new(emu->card, "capture-rates", emu, in snd_emu10k1_proc_init()
589 snd_card_ro_proc_new(emu->card, "voices", emu, in snd_emu10k1_proc_init()
592 if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { in snd_emu10k1_proc_init()
594 entry->private_data = emu; in snd_emu10k1_proc_init()
596 entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR; in snd_emu10k1_proc_init()
599 if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) { in snd_emu10k1_proc_init()
601 entry->private_data = emu; in snd_emu10k1_proc_init()
603 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ; in snd_emu10k1_proc_init()
606 if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) { in snd_emu10k1_proc_init()
608 entry->private_data = emu; in snd_emu10k1_proc_init()
610 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ; in snd_emu10k1_proc_init()
613 if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) { in snd_emu10k1_proc_init()
615 entry->private_data = emu; in snd_emu10k1_proc_init()
617 entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; in snd_emu10k1_proc_init()
620 snd_card_ro_proc_new(emu->card, "fx8010_acode", emu, in snd_emu10k1_proc_init()