Lines Matching refs:emu
38 static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, in snd_emu10k1_proc_spdif_status() argument
50 status = snd_emu10k1_ptr_read(emu, status_reg, 0); in snd_emu10k1_proc_spdif_status()
68 rate = snd_emu10k1_ptr_read(emu, rate_reg, 0); in snd_emu10k1_proc_spdif_status()
187 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_read() local
189 int nefx = emu->audigy ? 64 : 32; in snd_emu10k1_proc_read()
190 char **outputs = emu->audigy ? audigy_outs : creative_outs; in snd_emu10k1_proc_read()
195 emu->audigy ? "Audigy" : (emu->card_capabilities->ecard ? "EMU APS" : "Creative")); in snd_emu10k1_proc_read()
196 snd_iprintf(buffer, "Internal TRAM (words) : 0x%x\n", emu->fx8010.itram_size); in snd_emu10k1_proc_read()
197 snd_iprintf(buffer, "External TRAM (words) : 0x%x\n", (int)emu->fx8010.etram_pages.bytes / 2); in snd_emu10k1_proc_read()
201 val = emu->audigy ? in snd_emu10k1_proc_read()
202 snd_emu10k1_ptr_read(emu, A_FXRT1, idx) : in snd_emu10k1_proc_read()
203 snd_emu10k1_ptr_read(emu, FXRT, idx); in snd_emu10k1_proc_read()
204 val1 = emu->audigy ? in snd_emu10k1_proc_read()
205 snd_emu10k1_ptr_read(emu, A_FXRT2, idx) : in snd_emu10k1_proc_read()
207 if (emu->audigy) { in snd_emu10k1_proc_read()
230 if (emu->efx_voices_mask[idx/32] & (1 << (idx%32))) in snd_emu10k1_proc_read()
234 for (idx = 0; idx < (emu->audigy ? 64 : 32); idx++) in snd_emu10k1_proc_read()
241 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_spdif_read() local
246 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_spdif_read()
247 snd_emu1010_fpga_read(emu, 0x38, &value); in snd_emu10k1_proc_spdif_read()
249 snd_emu1010_fpga_read(emu, 0x2a, &value); in snd_emu10k1_proc_spdif_read()
250 snd_emu1010_fpga_read(emu, 0x2b, &value2); in snd_emu10k1_proc_spdif_read()
256 snd_emu1010_fpga_read(emu, 0x20, &value); in snd_emu10k1_proc_spdif_read()
258 snd_emu1010_fpga_read(emu, 0x28, &value); in snd_emu10k1_proc_spdif_read()
259 snd_emu1010_fpga_read(emu, 0x29, &value2); in snd_emu10k1_proc_spdif_read()
266 snd_emu10k1_proc_spdif_status(emu, buffer, "CD-ROM S/PDIF In", CDCS, CDSRCS); in snd_emu10k1_proc_spdif_read()
267 snd_emu10k1_proc_spdif_status(emu, buffer, "Optical or Coax S/PDIF In", GPSCS, GPSRCS); in snd_emu10k1_proc_spdif_read()
270 val = snd_emu10k1_ptr_read(emu, ZVSRCS, 0); in snd_emu10k1_proc_spdif_read()
281 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_rates_read() local
283 val = snd_emu10k1_ptr20_read(emu, CAPTURE_RATE_STATUS, 0); in snd_emu10k1_proc_rates_read()
296 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_acode_read() local
298 snd_iprintf(buffer, "FX8010 Instruction List '%s'\n", emu->fx8010.name); in snd_emu10k1_proc_acode_read()
300 for (pc = 0; pc < (emu->audigy ? 1024 : 512); pc++) { in snd_emu10k1_proc_acode_read()
303 low = snd_emu10k1_efx_read(emu, pc * 2); in snd_emu10k1_proc_acode_read()
304 high = snd_emu10k1_efx_read(emu, pc * 2 + 1); in snd_emu10k1_proc_acode_read()
305 if (emu->audigy) in snd_emu10k1_proc_acode_read()
340 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_fx8010_read() local
353 offset = emu->audigy ? A_MICROCODEBASE : MICROCODEBASE; in snd_emu10k1_fx8010_read()
355 offset = emu->audigy ? A_FXGPREGBASE : FXGPREGBASE; in snd_emu10k1_fx8010_read()
363 val = snd_emu10k1_ptr_read(emu, offset + idx + (pos >> 2), 0); in snd_emu10k1_fx8010_read()
364 if (tram_addr && emu->audigy) { in snd_emu10k1_fx8010_read()
366 val |= snd_emu10k1_ptr_read(emu, 0x100 + idx + (pos >> 2), 0) << 20; in snd_emu10k1_fx8010_read()
381 struct snd_emu10k1 *emu = entry->private_data; in snd_emu10k1_proc_voices_read() local
387 voice = &emu->voices[idx]; in snd_emu10k1_proc_voices_read()
402 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_emu1010_reg_read() local
408 snd_emu1010_fpga_read(emu, i, &value); in snd_emu_proc_emu1010_reg_read()
416 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_read() local
422 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
423 value = inl(emu->port + i); in snd_emu_proc_io_reg_read()
424 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_read()
432 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_io_reg_write() local
440 spin_lock_irqsave(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
441 outl(val, emu->port + (reg & 0xfffffffc)); in snd_emu_proc_io_reg_write()
442 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_emu_proc_io_reg_write()
447 static unsigned int snd_ptr_read(struct snd_emu10k1 * emu, in snd_ptr_read() argument
457 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_read()
458 outl(regptr, emu->port + iobase + PTR); in snd_ptr_read()
459 val = inl(emu->port + iobase + DATA); in snd_ptr_read()
460 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_read()
464 static void snd_ptr_write(struct snd_emu10k1 *emu, in snd_ptr_write() argument
475 spin_lock_irqsave(&emu->emu_lock, flags); in snd_ptr_write()
476 outl(regptr, emu->port + iobase + PTR); in snd_ptr_write()
477 outl(data, emu->port + iobase + DATA); in snd_ptr_write()
478 spin_unlock_irqrestore(&emu->emu_lock, flags); in snd_ptr_write()
485 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_read() local
497 value = snd_ptr_read(emu, 0, i, j); in snd_emu_proc_ptr_reg_read()
499 value = snd_ptr_read(emu, 0x20, i, j); in snd_emu_proc_ptr_reg_read()
509 struct snd_emu10k1 *emu = entry->private_data; in snd_emu_proc_ptr_reg_write() local
516 snd_ptr_write(emu, iobase, reg, channel_id, val); in snd_emu_proc_ptr_reg_write()
568 int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) in snd_emu10k1_proc_init() argument
572 if (emu->card_capabilities->emu_model) { in snd_emu10k1_proc_init()
573 if (! snd_card_proc_new(emu->card, "emu1010_regs", &entry)) in snd_emu10k1_proc_init()
574 snd_info_set_text_ops(entry, emu, snd_emu_proc_emu1010_reg_read); in snd_emu10k1_proc_init()
576 if (! snd_card_proc_new(emu->card, "io_regs", &entry)) { in snd_emu10k1_proc_init()
577 snd_info_set_text_ops(entry, emu, snd_emu_proc_io_reg_read); in snd_emu10k1_proc_init()
581 if (! snd_card_proc_new(emu->card, "ptr_regs00a", &entry)) { in snd_emu10k1_proc_init()
582 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00a); in snd_emu10k1_proc_init()
586 if (! snd_card_proc_new(emu->card, "ptr_regs00b", &entry)) { in snd_emu10k1_proc_init()
587 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read00b); in snd_emu10k1_proc_init()
591 if (! snd_card_proc_new(emu->card, "ptr_regs20a", &entry)) { in snd_emu10k1_proc_init()
592 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20a); in snd_emu10k1_proc_init()
596 if (! snd_card_proc_new(emu->card, "ptr_regs20b", &entry)) { in snd_emu10k1_proc_init()
597 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20b); in snd_emu10k1_proc_init()
601 if (! snd_card_proc_new(emu->card, "ptr_regs20c", &entry)) { in snd_emu10k1_proc_init()
602 snd_info_set_text_ops(entry, emu, snd_emu_proc_ptr_reg_read20c); in snd_emu10k1_proc_init()
608 if (! snd_card_proc_new(emu->card, "emu10k1", &entry)) in snd_emu10k1_proc_init()
609 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_read); in snd_emu10k1_proc_init()
611 if (emu->card_capabilities->emu10k2_chip) { in snd_emu10k1_proc_init()
612 if (! snd_card_proc_new(emu->card, "spdif-in", &entry)) in snd_emu10k1_proc_init()
613 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_spdif_read); in snd_emu10k1_proc_init()
615 if (emu->card_capabilities->ca0151_chip) { in snd_emu10k1_proc_init()
616 if (! snd_card_proc_new(emu->card, "capture-rates", &entry)) in snd_emu10k1_proc_init()
617 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_rates_read); in snd_emu10k1_proc_init()
620 if (! snd_card_proc_new(emu->card, "voices", &entry)) in snd_emu10k1_proc_init()
621 snd_info_set_text_ops(entry, emu, snd_emu10k1_proc_voices_read); in snd_emu10k1_proc_init()
623 if (! snd_card_proc_new(emu->card, "fx8010_gpr", &entry)) { in snd_emu10k1_proc_init()
625 entry->private_data = emu; in snd_emu10k1_proc_init()
627 entry->size = emu->audigy ? A_TOTAL_SIZE_GPR : TOTAL_SIZE_GPR; in snd_emu10k1_proc_init()
630 if (! snd_card_proc_new(emu->card, "fx8010_tram_data", &entry)) { in snd_emu10k1_proc_init()
632 entry->private_data = emu; in snd_emu10k1_proc_init()
634 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_DATA : TOTAL_SIZE_TANKMEM_DATA ; in snd_emu10k1_proc_init()
637 if (! snd_card_proc_new(emu->card, "fx8010_tram_addr", &entry)) { in snd_emu10k1_proc_init()
639 entry->private_data = emu; in snd_emu10k1_proc_init()
641 entry->size = emu->audigy ? A_TOTAL_SIZE_TANKMEM_ADDR : TOTAL_SIZE_TANKMEM_ADDR ; in snd_emu10k1_proc_init()
644 if (! snd_card_proc_new(emu->card, "fx8010_code", &entry)) { in snd_emu10k1_proc_init()
646 entry->private_data = emu; in snd_emu10k1_proc_init()
648 entry->size = emu->audigy ? A_TOTAL_SIZE_CODE : TOTAL_SIZE_CODE; in snd_emu10k1_proc_init()
651 if (! snd_card_proc_new(emu->card, "fx8010_acode", &entry)) { in snd_emu10k1_proc_init()
653 entry->private_data = emu; in snd_emu10k1_proc_init()