Lines Matching refs:ioaddr
146 static int opl3_detect(int ioaddr) in opl3_detect() argument
179 if (!request_region(ioaddr, 4, devc->fm_info.name)) { in opl3_detect()
180 printk(KERN_WARNING "opl3: I/O port 0x%x already in use\n", ioaddr); in opl3_detect()
184 devc->base = ioaddr; in opl3_detect()
187 opl3_command(ioaddr, TIMER_CONTROL_REGISTER, TIMER1_MASK | TIMER2_MASK); in opl3_detect()
190 opl3_command(ioaddr, TIMER_CONTROL_REGISTER, IRQ_RESET); in opl3_detect()
192 signature = stat1 = inb(ioaddr); /* Status register */ in opl3_detect()
217 opl3_command(ioaddr + 2, OPL3_MODE_REGISTER, 0x00); in opl3_detect()
218 opl3_command(ioaddr + 2, OPL3_MODE_REGISTER, OPL3_ENABLE | OPL4_ENABLE); in opl3_detect()
220 if ((tmp = inb(ioaddr)) == 0x02) /* Have a OPL4 */ in opl3_detect()
225 if (request_region(ioaddr - 8, 2, "OPL4")) /* OPL4 port was free */ in opl3_detect()
229 outb((0x02), ioaddr - 8); /* Select OPL4 ID register */ in opl3_detect()
231 tmp = inb(ioaddr - 7); /* Read it */ in opl3_detect()
237 outb((0xF8), ioaddr - 8); /* Select OPL4 FM mixer control */ in opl3_detect()
239 outb((0x1B), ioaddr - 7); /* Write value */ in opl3_detect()
244 release_region(ioaddr - 8, 2); in opl3_detect()
248 opl3_command(ioaddr + 2, OPL3_MODE_REGISTER, 0); in opl3_detect()
251 opl3_command(ioaddr, KEYON_BLOCK + i, 0); /* in opl3_detect()
255 opl3_command(ioaddr, TEST_REGISTER, ENABLE_WAVE_SELECT); in opl3_detect()
256 opl3_command(ioaddr, PERCOSSION_REGISTER, 0x00); /* in opl3_detect()
261 release_region(ioaddr, 4); in opl3_detect()
282 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, devc->voc[voice].keyon_byte & ~0x20); in opl3_kill_note()
404 opl3_command(map->ioaddr, KSL_LEVEL + map->op[0], vol1); in set_voice_volume()
405 opl3_command(map->ioaddr, KSL_LEVEL + map->op[1], vol2); in set_voice_volume()
450 opl3_command(map->ioaddr, KSL_LEVEL + map->op[0], vol1); in set_voice_volume()
451 opl3_command(map->ioaddr, KSL_LEVEL + map->op[1], vol2); in set_voice_volume()
452 opl3_command(map->ioaddr, KSL_LEVEL + map->op[2], vol3); in set_voice_volume()
453 opl3_command(map->ioaddr, KSL_LEVEL + map->op[3], vol4); in set_voice_volume()
485 opl3_command(map->ioaddr, KSL_LEVEL + map->op[1], 0xff); /* in opl3_start_note()
490 opl3_command(map->ioaddr, KSL_LEVEL + map->op[0], 0xff); /* in opl3_start_note()
497 opl3_command(map->ioaddr, KSL_LEVEL + map->op[2], 0xff); in opl3_start_note()
498 opl3_command(map->ioaddr, KSL_LEVEL + map->op[3], 0xff); in opl3_start_note()
501 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, 0x00); /* in opl3_start_note()
528 voice_shift = (map->ioaddr == devc->left_io) ? 0 : 3; in opl3_start_note()
550 opl3_command(map->ioaddr, AM_VIB + map->op[0], instr->operators[0]); in opl3_start_note()
551 opl3_command(map->ioaddr, AM_VIB + map->op[1], instr->operators[1]); in opl3_start_note()
557 opl3_command(map->ioaddr, ATTACK_DECAY + map->op[0], instr->operators[4]); in opl3_start_note()
558 opl3_command(map->ioaddr, ATTACK_DECAY + map->op[1], instr->operators[5]); in opl3_start_note()
564 opl3_command(map->ioaddr, SUSTAIN_RELEASE + map->op[0], instr->operators[6]); in opl3_start_note()
565 opl3_command(map->ioaddr, SUSTAIN_RELEASE + map->op[1], instr->operators[7]); in opl3_start_note()
571 opl3_command(map->ioaddr, WAVE_SELECT + map->op[0], instr->operators[8]); in opl3_start_note()
572 opl3_command(map->ioaddr, WAVE_SELECT + map->op[1], instr->operators[9]); in opl3_start_note()
596 opl3_command(map->ioaddr, FEEDBACK_CONNECTION + map->voice_num, fpc); in opl3_start_note()
608 opl3_command(map->ioaddr, AM_VIB + map->op[2], instr->operators[OFFS_4OP + 0]); in opl3_start_note()
609 opl3_command(map->ioaddr, AM_VIB + map->op[3], instr->operators[OFFS_4OP + 1]); in opl3_start_note()
615 opl3_command(map->ioaddr, ATTACK_DECAY + map->op[2], instr->operators[OFFS_4OP + 4]); in opl3_start_note()
616 opl3_command(map->ioaddr, ATTACK_DECAY + map->op[3], instr->operators[OFFS_4OP + 5]); in opl3_start_note()
622 opl3_command(map->ioaddr, SUSTAIN_RELEASE + map->op[2], instr->operators[OFFS_4OP + 6]); in opl3_start_note()
623 opl3_command(map->ioaddr, SUSTAIN_RELEASE + map->op[3], instr->operators[OFFS_4OP + 7]); in opl3_start_note()
629 opl3_command(map->ioaddr, WAVE_SELECT + map->op[2], instr->operators[OFFS_4OP + 8]); in opl3_start_note()
630 opl3_command(map->ioaddr, WAVE_SELECT + map->op[3], instr->operators[OFFS_4OP + 9]); in opl3_start_note()
641 opl3_command(map->ioaddr, FEEDBACK_CONNECTION + map->voice_num + 3, fpc); in opl3_start_note()
666 opl3_command(map->ioaddr, FNUM_LOW + map->voice_num, data); in opl3_start_note()
670 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, data); in opl3_start_note()
672 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num + 3, data); in opl3_start_note()
753 opl3_command(pv_map[devc->lv_map[i]].ioaddr, in opl3_reset()
756 opl3_command(pv_map[devc->lv_map[i]].ioaddr, in opl3_reset()
761 opl3_command(pv_map[devc->lv_map[i]].ioaddr, in opl3_reset()
764 opl3_command(pv_map[devc->lv_map[i]].ioaddr, in opl3_reset()
862 opl3_command (map->ioaddr, AM_VIB + map->op[cell-1], tmp);}
958 opl3_command(map->ioaddr, FNUM_LOW + map->voice_num, data); in bend_pitch()
962 opl3_command(map->ioaddr, KEYON_BLOCK + map->voice_num, data); in bend_pitch()
1110 static int opl3_init(int ioaddr, struct module *owner) in opl3_init() argument
1137 devc->left_io = ioaddr; in opl3_init()
1138 devc->right_io = ioaddr + 2; in opl3_init()
1174 if (pv_map[i].ioaddr == USE_LEFT) in opl3_init()
1175 pv_map[i].ioaddr = devc->left_io; in opl3_init()
1177 pv_map[i].ioaddr = devc->right_io; in opl3_init()
1189 pv_map[i].ioaddr = devc->left_io; in opl3_init()
1191 conf_printf2(devc->fm_info.name, ioaddr, 0, -1, -1); in opl3_init()