H A D | emufx.c | 494 static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode, snd_emu10k1_write_op() argument 501 code = (u_int32_t __force *)icode->code + (*ptr) * 2; snd_emu10k1_write_op() 502 set_bit(*ptr, icode->code_valid); snd_emu10k1_write_op() 508 #define OP(icode, ptr, op, r, a, x, y) \ 509 snd_emu10k1_write_op(icode, ptr, op, r, a, x, y) 511 static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, snd_emu10k1_audigy_write_op() argument 518 code = (u_int32_t __force *)icode->code + (*ptr) * 2; snd_emu10k1_audigy_write_op() 519 set_bit(*ptr, icode->code_valid); snd_emu10k1_audigy_write_op() 525 #define A_OP(icode, ptr, op, r, a, x, y) \ 526 snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y) 541 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_gpr_poke() 547 if (!test_bit(gpr, icode->gpr_valid)) snd_emu10k1_gpr_poke() 549 if (get_user(val, &icode->gpr_map[gpr])) snd_emu10k1_gpr_poke() 557 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_gpr_peek() 563 set_bit(gpr, icode->gpr_valid); snd_emu10k1_gpr_peek() 565 if (put_user(val, &icode->gpr_map[gpr])) snd_emu10k1_gpr_peek() 572 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_tram_poke() 578 if (!test_bit(tram, icode->tram_valid)) snd_emu10k1_tram_poke() 580 if (get_user(val, &icode->tram_data_map[tram]) || snd_emu10k1_tram_poke() 581 get_user(addr, &icode->tram_addr_map[tram])) snd_emu10k1_tram_poke() 595 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_tram_peek() 600 memset(icode->tram_valid, 0, sizeof(icode->tram_valid)); snd_emu10k1_tram_peek() 602 set_bit(tram, icode->tram_valid); snd_emu10k1_tram_peek() 610 if (put_user(val, &icode->tram_data_map[tram]) || snd_emu10k1_tram_peek() 611 put_user(addr, &icode->tram_addr_map[tram])) snd_emu10k1_tram_peek() 618 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_code_poke() 623 if (!test_bit(pc / 2, icode->code_valid)) snd_emu10k1_code_poke() 625 if (get_user(lo, &icode->code[pc + 0]) || snd_emu10k1_code_poke() 626 get_user(hi, &icode->code[pc + 1])) snd_emu10k1_code_poke() 635 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_code_peek() 639 memset(icode->code_valid, 0, sizeof(icode->code_valid)); snd_emu10k1_code_peek() 641 set_bit(pc / 2, icode->code_valid); snd_emu10k1_code_peek() 642 if (put_user(snd_emu10k1_efx_read(emu, pc + 0), &icode->code[pc + 0])) snd_emu10k1_code_peek() 644 if (put_user(snd_emu10k1_efx_read(emu, pc + 1), &icode->code[pc + 1])) snd_emu10k1_code_peek() 721 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_verify_controls() 729 for (i = 0, _id = icode->gpr_del_controls; snd_emu10k1_verify_controls() 730 i < icode->gpr_del_control_count; i++, _id++) { snd_emu10k1_verify_controls() 740 for (i = 0; i < icode->gpr_add_control_count; i++) { snd_emu10k1_verify_controls() 741 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i)) { snd_emu10k1_verify_controls() 760 for (i = 0; i < icode->gpr_list_control_count; i++) { snd_emu10k1_verify_controls() 762 if (copy_gctl(emu, gctl, icode->gpr_list_controls, i)) { snd_emu10k1_verify_controls() 784 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_add_controls() 802 for (i = 0; i < icode->gpr_add_control_count; i++) { snd_emu10k1_add_controls() 803 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i)) { snd_emu10k1_add_controls() 876 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_del_controls() 884 for (i = 0, _id = icode->gpr_del_controls; snd_emu10k1_del_controls() 885 i < icode->gpr_del_control_count; i++, _id++) { snd_emu10k1_del_controls() 898 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_list_controls() 912 if (icode->gpr_list_controls && snd_emu10k1_list_controls() 913 i < icode->gpr_list_control_count) { snd_emu10k1_list_controls() 930 if (copy_gctl_to_user(emu, icode->gpr_list_controls, snd_emu10k1_list_controls() 938 icode->gpr_list_control_total = total; snd_emu10k1_list_controls() 944 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_icode_poke() 949 if ((err = snd_emu10k1_verify_controls(emu, icode)) < 0) snd_emu10k1_icode_poke() 951 strlcpy(emu->fx8010.name, icode->name, sizeof(emu->fx8010.name)); snd_emu10k1_icode_poke() 959 if ((err = snd_emu10k1_del_controls(emu, icode)) < 0 || snd_emu10k1_icode_poke() 960 (err = snd_emu10k1_gpr_poke(emu, icode)) < 0 || snd_emu10k1_icode_poke() 961 (err = snd_emu10k1_tram_poke(emu, icode)) < 0 || snd_emu10k1_icode_poke() 962 (err = snd_emu10k1_code_poke(emu, icode)) < 0 || snd_emu10k1_icode_poke() 963 (err = snd_emu10k1_add_controls(emu, icode)) < 0) snd_emu10k1_icode_poke() 976 struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_icode_peek() 981 strlcpy(icode->name, emu->fx8010.name, sizeof(icode->name)); snd_emu10k1_icode_peek() 983 err = snd_emu10k1_gpr_peek(emu, icode); snd_emu10k1_icode_peek() 985 err = snd_emu10k1_tram_peek(emu, icode); snd_emu10k1_icode_peek() 987 err = snd_emu10k1_code_peek(emu, icode); snd_emu10k1_icode_peek() 989 err = snd_emu10k1_list_controls(emu, icode); snd_emu10k1_icode_peek() 1151 struct snd_emu10k1_fx8010_code *icode, snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1155 A_OP(icode, ptr, iACC3, A_GPR(tmp + 1), reg_in, A_C_00000000, A_C_00000000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1156 A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp + 1), A_GPR(bit_shifter16 - 1), A_C_00000000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1157 A_OP(icode, ptr, iTSTNEG, A_GPR(tmp + 2), A_GPR(tmp), A_C_80000000, A_GPR(bit_shifter16 - 2)); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1158 A_OP(icode, ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_C_80000000, A_C_00000000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1159 A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp), A_GPR(bit_shifter16 - 3), A_C_00000000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1160 A_OP(icode, ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A_GPR(tmp), A_C_00010000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1161 A_OP(icode, ptr, iANDXOR, reg_out, A_GPR(tmp), A_C_ffffffff, A_GPR(tmp + 2)); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1162 A_OP(icode, ptr, iACC3, reg_out + 1, A_GPR(tmp + 1), A_C_00000000, A_C_00000000); snd_emu10k1_audigy_dsp_convert_32_to_2x16() 1179 struct snd_emu10k1_fx8010_code *icode = NULL; _snd_emu10k1_audigy_init_efx() local 1185 icode = kzalloc(sizeof(*icode), GFP_KERNEL); _snd_emu10k1_audigy_init_efx() 1186 if (!icode) _snd_emu10k1_audigy_init_efx() 1189 icode->gpr_map = (u_int32_t __user *) kcalloc(512 + 256 + 256 + 2 * 1024, _snd_emu10k1_audigy_init_efx() 1191 if (!icode->gpr_map) _snd_emu10k1_audigy_init_efx() 1198 gpr_map = (u32 __force *)icode->gpr_map; _snd_emu10k1_audigy_init_efx() 1200 icode->tram_data_map = icode->gpr_map + 512; _snd_emu10k1_audigy_init_efx() 1201 icode->tram_addr_map = icode->tram_data_map + 256; _snd_emu10k1_audigy_init_efx() 1202 icode->code = icode->tram_addr_map + 256; _snd_emu10k1_audigy_init_efx() 1206 set_bit(i, icode->gpr_valid); _snd_emu10k1_audigy_init_efx() 1210 set_bit(i, icode->tram_valid); _snd_emu10k1_audigy_init_efx() 1212 strcpy(icode->name, "Audigy DSP code for ALSA"); _snd_emu10k1_audigy_init_efx() 1230 A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_FRONT)); _snd_emu10k1_audigy_init_efx() 1231 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FRONT)); _snd_emu10k1_audigy_init_efx() 1236 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_REAR)); _snd_emu10k1_audigy_init_efx() 1237 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_REAR)); _snd_emu10k1_audigy_init_efx() 1243 A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_SIDE)); _snd_emu10k1_audigy_init_efx() 1244 A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_SIDE)); _snd_emu10k1_audigy_init_efx() 1250 A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_CENTER)); _snd_emu10k1_audigy_init_efx() 1255 A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LFE)); _snd_emu10k1_audigy_init_efx() 1263 A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); _snd_emu10k1_audigy_init_efx() 1264 A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)); _snd_emu10k1_audigy_init_efx() 1269 A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+0), A_GPR(stereo_mix+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_LEFT)); _snd_emu10k1_audigy_init_efx() 1270 A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_GPR(stereo_mix+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MIDI_RIGHT)); _snd_emu10k1_audigy_init_efx() 1275 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); _snd_emu10k1_audigy_init_efx() 1276 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)); _snd_emu10k1_audigy_init_efx() 1281 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_LEFT)); _snd_emu10k1_audigy_init_efx() 1282 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MIDI_RIGHT)); _snd_emu10k1_audigy_init_efx() 1290 A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) _snd_emu10k1_audigy_init_efx() 1296 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001); _snd_emu10k1_audigy_init_efx() 1297 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_GPR(tmp)); _snd_emu10k1_audigy_init_efx() 1298 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x1), A_C_00000001); _snd_emu10k1_audigy_init_efx() 1299 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr), A_GPR(tmp)); _snd_emu10k1_audigy_init_efx() 1301 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_P16VIN(0x0)); _snd_emu10k1_audigy_init_efx() 1302 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_P16VIN(0x1)); _snd_emu10k1_audigy_init_efx() 1319 A_OP(icode, &ptr, iINTERP, A_EXTOUT(A_EXTOUT_MIC_CAP), A_EXTIN(A_EXTIN_AC97_L), 0xcd, A_EXTIN(A_EXTIN_AC97_R)); _snd_emu10k1_audigy_init_efx() 1389 A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_GPR(playback), A_GPR(gpr), A_GPR(stereo_mix)); _snd_emu10k1_audigy_init_efx() 1390 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_GPR(playback+1), A_GPR(gpr+1), A_GPR(stereo_mix+1)); _snd_emu10k1_audigy_init_efx() 1395 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_GPR(playback+2), A_GPR(gpr), A_GPR(stereo_mix)); _snd_emu10k1_audigy_init_efx() 1396 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_GPR(playback+3), A_GPR(gpr+1), A_GPR(stereo_mix+1)); _snd_emu10k1_audigy_init_efx() 1402 A_OP(icode, &ptr, iINTERP, A_GPR(tmp), A_GPR(stereo_mix), 0xcd, A_GPR(stereo_mix+1)); _snd_emu10k1_audigy_init_efx() 1403 A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_GPR(playback+4), A_GPR(gpr), A_GPR(tmp)); _snd_emu10k1_audigy_init_efx() 1408 A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_GPR(playback+5), A_GPR(gpr), A_GPR(tmp)); _snd_emu10k1_audigy_init_efx() 1414 A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_GPR(playback+6), A_GPR(gpr), A_GPR(stereo_mix)); _snd_emu10k1_audigy_init_efx() 1415 A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_GPR(playback+7), A_GPR(gpr+1), A_GPR(stereo_mix+1)); _snd_emu10k1_audigy_init_efx() 1423 #define A_PUT_OUTPUT(out,src) A_OP(icode, &ptr, iACC3, A_EXTOUT(out), A_C_00000000, A_C_00000000, A_GPR(src)) _snd_emu10k1_audigy_init_efx() 1427 #define _A_SWITCH(icode, ptr, dst, src, sw) \ _snd_emu10k1_audigy_init_efx() 1428 A_OP((icode), ptr, iMACINT0, dst, A_C_00000000, src, sw); _snd_emu10k1_audigy_init_efx() 1429 #define A_SWITCH(icode, ptr, dst, src, sw) \ _snd_emu10k1_audigy_init_efx() 1430 _A_SWITCH(icode, ptr, A_GPR(dst), A_GPR(src), A_GPR(sw)) _snd_emu10k1_audigy_init_efx() 1431 #define _A_SWITCH_NEG(icode, ptr, dst, src) \ _snd_emu10k1_audigy_init_efx() 1432 A_OP((icode), ptr, iANDXOR, dst, src, A_C_00000001, A_C_00000001); _snd_emu10k1_audigy_init_efx() 1433 #define A_SWITCH_NEG(icode, ptr, dst, src) \ _snd_emu10k1_audigy_init_efx() 1434 _A_SWITCH_NEG(icode, ptr, A_GPR(dst), A_GPR(src)) _snd_emu10k1_audigy_init_efx() 1440 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), A_GPR(playback + 0), A_C_00000000, A_C_00000000); /* left */ _snd_emu10k1_audigy_init_efx() 1441 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), A_GPR(playback + 1), A_C_00000000, A_C_00000000); /* right */ _snd_emu10k1_audigy_init_efx() 1442 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), A_GPR(playback + 2), A_C_00000000, A_C_00000000); /* rear left */ _snd_emu10k1_audigy_init_efx() 1443 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), A_GPR(playback + 3), A_C_00000000, A_C_00000000); /* rear right */ _snd_emu10k1_audigy_init_efx() 1444 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), A_GPR(playback + 4), A_C_00000000, A_C_00000000); /* center */ _snd_emu10k1_audigy_init_efx() 1445 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), A_GPR(playback + 5), A_C_00000000, A_C_00000000); /* LFE */ _snd_emu10k1_audigy_init_efx() 1447 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 6), A_GPR(playback + 6), A_C_00000000, A_C_00000000); /* side left */ _snd_emu10k1_audigy_init_efx() 1448 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 7), A_GPR(playback + 7), A_C_00000000, A_C_00000000); /* side right */ _snd_emu10k1_audigy_init_efx() 1488 A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(d), A_GPR(BASS_GPR + 0 + j)); _snd_emu10k1_audigy_init_efx() 1489 A_OP(icode, &ptr, iMACMV, A_GPR(k+1), A_GPR(k), A_GPR(k+1), A_GPR(BASS_GPR + 4 + j)); _snd_emu10k1_audigy_init_efx() 1490 A_OP(icode, &ptr, iMACMV, A_GPR(k), A_GPR(d), A_GPR(k), A_GPR(BASS_GPR + 2 + j)); _snd_emu10k1_audigy_init_efx() 1491 A_OP(icode, &ptr, iMACMV, A_GPR(k+3), A_GPR(k+2), A_GPR(k+3), A_GPR(BASS_GPR + 8 + j)); _snd_emu10k1_audigy_init_efx() 1492 A_OP(icode, &ptr, iMAC0, A_GPR(k+2), A_GPR_ACCU, A_GPR(k+2), A_GPR(BASS_GPR + 6 + j)); _snd_emu10k1_audigy_init_efx() 1493 A_OP(icode, &ptr, iACC3, A_GPR(k+2), A_GPR(k+2), A_GPR(k+2), A_C_00000000); _snd_emu10k1_audigy_init_efx() 1495 A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(k+2), A_GPR(TREBLE_GPR + 0 + j)); _snd_emu10k1_audigy_init_efx() 1496 A_OP(icode, &ptr, iMACMV, A_GPR(l+1), A_GPR(l), A_GPR(l+1), A_GPR(TREBLE_GPR + 4 + j)); _snd_emu10k1_audigy_init_efx() 1497 A_OP(icode, &ptr, iMACMV, A_GPR(l), A_GPR(k+2), A_GPR(l), A_GPR(TREBLE_GPR + 2 + j)); _snd_emu10k1_audigy_init_efx() 1498 A_OP(icode, &ptr, iMACMV, A_GPR(l+3), A_GPR(l+2), A_GPR(l+3), A_GPR(TREBLE_GPR + 8 + j)); _snd_emu10k1_audigy_init_efx() 1499 A_OP(icode, &ptr, iMAC0, A_GPR(l+2), A_GPR_ACCU, A_GPR(l+2), A_GPR(TREBLE_GPR + 6 + j)); _snd_emu10k1_audigy_init_efx() 1500 A_OP(icode, &ptr, iMACINT0, A_GPR(l+2), A_C_00000000, A_GPR(l+2), A_C_00000010); _snd_emu10k1_audigy_init_efx() 1502 A_OP(icode, &ptr, iACC3, A_GPR(d), A_GPR(l+2), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1514 A_SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); _snd_emu10k1_audigy_init_efx() 1515 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); _snd_emu10k1_audigy_init_efx() 1516 A_SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); _snd_emu10k1_audigy_init_efx() 1517 A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); _snd_emu10k1_audigy_init_efx() 1523 A_OP(icode, &ptr, iMAC0, A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1524 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1525 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1526 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1527 A_OP(icode, &ptr, iMAC0, A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1528 A_OP(icode, &ptr, iMAC0, A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1529 A_OP(icode, &ptr, iMAC0, A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1530 A_OP(icode, &ptr, iMAC0, A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr), A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS)); _snd_emu10k1_audigy_init_efx() 1552 A_OP(icode, &ptr, iACC3, A3_EMU32OUT(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1554 A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1564 A_OP(icode, &ptr, iMAC0, A_GPR(tmp + 2), A_FXBUS(FXBUS_PT_LEFT + z), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1565 A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001); _snd_emu10k1_audigy_init_efx() 1566 A_OP(icode, &ptr, iACC3, A_GPR(tmp + 2), A_C_00000000, A_C_00010000, A_GPR(tmp + 2)); _snd_emu10k1_audigy_init_efx() 1567 A_OP(icode, &ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_GPR(gpr - 1), A_C_00000000); _snd_emu10k1_audigy_init_efx() 1568 A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z); _snd_emu10k1_audigy_init_efx() 1569 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); _snd_emu10k1_audigy_init_efx() 1570 A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); _snd_emu10k1_audigy_init_efx() 1576 A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(gpr - 3), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1577 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 3), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); _snd_emu10k1_audigy_init_efx() 1579 A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); _snd_emu10k1_audigy_init_efx() 1601 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1619 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS2(0) ); _snd_emu10k1_audigy_init_efx() 1627 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(2) ); _snd_emu10k1_audigy_init_efx() 1628 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x1), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1630 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(4) ); _snd_emu10k1_audigy_init_efx() 1631 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x2), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1633 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(6) ); _snd_emu10k1_audigy_init_efx() 1634 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1638 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0x8) ); _snd_emu10k1_audigy_init_efx() 1639 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1642 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xa) ); _snd_emu10k1_audigy_init_efx() 1643 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x5), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1645 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xc) ); _snd_emu10k1_audigy_init_efx() 1646 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x6), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1648 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBUS2(0xe) ); _snd_emu10k1_audigy_init_efx() 1649 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1655 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1659 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8), _snd_emu10k1_audigy_init_efx() 1662 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1666 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9), _snd_emu10k1_audigy_init_efx() 1669 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1673 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa), _snd_emu10k1_audigy_init_efx() 1676 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1680 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb), _snd_emu10k1_audigy_init_efx() 1683 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1687 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc), _snd_emu10k1_audigy_init_efx() 1690 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1694 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd), _snd_emu10k1_audigy_init_efx() 1697 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1701 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe), _snd_emu10k1_audigy_init_efx() 1704 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, _snd_emu10k1_audigy_init_efx() 1708 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf), _snd_emu10k1_audigy_init_efx() 1714 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1717 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); _snd_emu10k1_audigy_init_efx() 1724 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_EXTIN(z)); _snd_emu10k1_audigy_init_efx() 1740 A_OP(icode, &ptr, 0x0f, 0xc0, 0xc0, 0xcf, 0xc0); _snd_emu10k1_audigy_init_efx() 1743 icode->gpr_add_control_count = nctl; _snd_emu10k1_audigy_init_efx() 1744 icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; _snd_emu10k1_audigy_init_efx() 1746 err = snd_emu10k1_icode_poke(emu, icode); _snd_emu10k1_audigy_init_efx() 1753 kfree((void __force *)icode->gpr_map); _snd_emu10k1_audigy_init_efx() 1755 kfree(icode); _snd_emu10k1_audigy_init_efx() 1766 static void _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) _volume() argument 1768 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); _volume() 1769 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); _volume() 1770 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001); _volume() 1771 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); _volume() 1773 static void _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) _volume_add() argument 1775 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); _volume_add() 1776 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); _volume_add() 1777 OP(icode, ptr, iMACINT0, dst, dst, src, C_00000001); _volume_add() 1778 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); _volume_add() 1779 OP(icode, ptr, iMAC0, dst, dst, src, vol); _volume_add() 1781 static void _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) _volume_out() argument 1783 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); _volume_out() 1784 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); _volume_out() 1785 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); _volume_out() 1786 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); _volume_out() 1787 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); _volume_out() 1790 #define VOLUME(icode, ptr, dst, src, vol) \ 1791 _volume(icode, ptr, GPR(dst), GPR(src), GPR(vol)) 1792 #define VOLUME_IN(icode, ptr, dst, src, vol) \ 1793 _volume(icode, ptr, GPR(dst), EXTIN(src), GPR(vol)) 1794 #define VOLUME_ADD(icode, ptr, dst, src, vol) \ 1795 _volume_add(icode, ptr, GPR(dst), GPR(src), GPR(vol)) 1796 #define VOLUME_ADDIN(icode, ptr, dst, src, vol) \ 1797 _volume_add(icode, ptr, GPR(dst), EXTIN(src), GPR(vol)) 1798 #define VOLUME_OUT(icode, ptr, dst, src, vol) \ 1799 _volume_out(icode, ptr, EXTOUT(dst), GPR(src), GPR(vol)) 1800 #define _SWITCH(icode, ptr, dst, src, sw) \ 1801 OP((icode), ptr, iMACINT0, dst, C_00000000, src, sw); 1802 #define SWITCH(icode, ptr, dst, src, sw) \ 1803 _SWITCH(icode, ptr, GPR(dst), GPR(src), GPR(sw)) 1804 #define SWITCH_IN(icode, ptr, dst, src, sw) \ 1805 _SWITCH(icode, ptr, GPR(dst), EXTIN(src), GPR(sw)) 1806 #define _SWITCH_NEG(icode, ptr, dst, src) \ 1807 OP((icode), ptr, iANDXOR, dst, src, C_00000001, C_00000001); 1808 #define SWITCH_NEG(icode, ptr, dst, src) \ 1809 _SWITCH_NEG(icode, ptr, GPR(dst), GPR(src)) 1816 struct snd_emu10k1_fx8010_code *icode; _snd_emu10k1_init_efx() local 1823 icode = kzalloc(sizeof(*icode), GFP_KERNEL); _snd_emu10k1_init_efx() 1824 if (!icode) _snd_emu10k1_init_efx() 1827 icode->gpr_map = (u_int32_t __user *) kcalloc(256 + 160 + 160 + 2 * 512, _snd_emu10k1_init_efx() 1829 if (!icode->gpr_map) _snd_emu10k1_init_efx() 1842 gpr_map = (u32 __force *)icode->gpr_map; _snd_emu10k1_init_efx() 1844 icode->tram_data_map = icode->gpr_map + 256; _snd_emu10k1_init_efx() 1845 icode->tram_addr_map = icode->tram_data_map + 160; _snd_emu10k1_init_efx() 1846 icode->code = icode->tram_addr_map + 160; _snd_emu10k1_init_efx() 1850 set_bit(i, icode->gpr_valid); _snd_emu10k1_init_efx() 1854 set_bit(i, icode->tram_valid); _snd_emu10k1_init_efx() 1856 strcpy(icode->name, "SB Live! FX8010 code for ALSA v1.2 by Jaroslav Kysela"); _snd_emu10k1_init_efx() 1872 OP(icode, &ptr, iMACINT0, GPR(0), C_00000000, FXBUS(FXBUS_PCM_LEFT), C_00000004); _snd_emu10k1_init_efx() 1873 OP(icode, &ptr, iMACINT0, GPR(1), C_00000000, FXBUS(FXBUS_PCM_RIGHT), C_00000004); _snd_emu10k1_init_efx() 1874 OP(icode, &ptr, iMACINT0, GPR(2), C_00000000, FXBUS(FXBUS_MIDI_LEFT), C_00000004); _snd_emu10k1_init_efx() 1875 OP(icode, &ptr, iMACINT0, GPR(3), C_00000000, FXBUS(FXBUS_MIDI_RIGHT), C_00000004); _snd_emu10k1_init_efx() 1876 OP(icode, &ptr, iMACINT0, GPR(4), C_00000000, FXBUS(FXBUS_PCM_LEFT_REAR), C_00000004); _snd_emu10k1_init_efx() 1877 OP(icode, &ptr, iMACINT0, GPR(5), C_00000000, FXBUS(FXBUS_PCM_RIGHT_REAR), C_00000004); _snd_emu10k1_init_efx() 1878 OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(FXBUS_PCM_CENTER), C_00000004); _snd_emu10k1_init_efx() 1879 OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(FXBUS_PCM_LFE), C_00000004); _snd_emu10k1_init_efx() 1880 OP(icode, &ptr, iMACINT0, GPR(8), C_00000000, C_00000000, C_00000000); /* S/PDIF left */ _snd_emu10k1_init_efx() 1881 OP(icode, &ptr, iMACINT0, GPR(9), C_00000000, C_00000000, C_00000000); /* S/PDIF right */ _snd_emu10k1_init_efx() 1882 OP(icode, &ptr, iMACINT0, GPR(10), C_00000000, FXBUS(FXBUS_PCM_LEFT_FRONT), C_00000004); _snd_emu10k1_init_efx() 1883 OP(icode, &ptr, iMACINT0, GPR(11), C_00000000, FXBUS(FXBUS_PCM_RIGHT_FRONT), C_00000004); _snd_emu10k1_init_efx() 1914 /* 00: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_trigger), C_00000000, C_00000000); _snd_emu10k1_init_efx() 1915 /* 01: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_ZERO, GPR(gpr + 6)); _snd_emu10k1_init_efx() 1917 /* 02: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_running), C_00000000, C_00000000); _snd_emu10k1_init_efx() 1918 /* 03: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000004); _snd_emu10k1_init_efx() 1920 /* 04: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), GPR_DBAC, GPR(gpr + 4), C_00000000); _snd_emu10k1_init_efx() 1921 /* 05: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(gpr + 5)); _snd_emu10k1_init_efx() 1922 /* 06: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 7)); _snd_emu10k1_init_efx() 1923 /* 07: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000010, C_00000001, C_00000000); _snd_emu10k1_init_efx() 1925 /* 08: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000000, C_00000001); _snd_emu10k1_init_efx() 1926 /* 09: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), GPR(gpr + 12), C_ffffffff, C_00000000); _snd_emu10k1_init_efx() 1927 /* 0a: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 11)); _snd_emu10k1_init_efx() 1928 /* 0b: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000001, C_00000000, C_00000000); _snd_emu10k1_init_efx() 1930 /* 0c: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[0]), GPR(gpr + 0), C_00000000); _snd_emu10k1_init_efx() 1931 /* 0d: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); _snd_emu10k1_init_efx() 1932 /* 0e: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); _snd_emu10k1_init_efx() 1933 /* 0f: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); _snd_emu10k1_init_efx() 1934 /* 10: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(8), GPR(gpr + 1), GPR(gpr + 2)); _snd_emu10k1_init_efx() 1936 /* 11: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[1]), GPR(gpr + 0), C_00000000); _snd_emu10k1_init_efx() 1937 /* 12: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); _snd_emu10k1_init_efx() 1938 /* 13: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); _snd_emu10k1_init_efx() 1939 /* 14: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); _snd_emu10k1_init_efx() 1940 /* 15: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(9), GPR(gpr + 1), GPR(gpr + 2)); _snd_emu10k1_init_efx() 1942 /* 16: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(ipcm->gpr_ptr), C_00000001, C_00000000); _snd_emu10k1_init_efx() 1943 /* 17: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(ipcm->gpr_size)); _snd_emu10k1_init_efx() 1944 /* 18: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_MINUS, C_00000001); _snd_emu10k1_init_efx() 1945 /* 19: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), C_00000000, C_00000000, C_00000000); _snd_emu10k1_init_efx() 1946 /* 1a: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_ptr), GPR(tmp + 0), C_00000000, C_00000000); _snd_emu10k1_init_efx() 1948 /* 1b: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_tmpcount), C_ffffffff, C_00000000); _snd_emu10k1_init_efx() 1949 /* 1c: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); _snd_emu10k1_init_efx() 1950 /* 1d: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_count), C_00000000, C_00000000); _snd_emu10k1_init_efx() 1951 /* 1e: */ OP(icode, &ptr, iACC3, GPR_IRQ, C_80000000, C_00000000, C_00000000); _snd_emu10k1_init_efx() 1952 /* 1f: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000001, C_00010000); _snd_emu10k1_init_efx() 1954 /* 20: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00010000, C_00000001); _snd_emu10k1_init_efx() 1955 /* 21: */ OP(icode, &ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000002); _snd_emu10k1_init_efx() 1957 /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]), GPR(gpr + 8), GPR_DBAC, C_ffffffff); _snd_emu10k1_init_efx() 1958 /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]), GPR(gpr + 9), GPR_DBAC, C_ffffffff); _snd_emu10k1_init_efx() 1965 VOLUME(icode, &ptr, playback + z, z, gpr + z); _snd_emu10k1_init_efx() 1971 VOLUME(icode, &ptr, playback + 2 + z, z, gpr + z); _snd_emu10k1_init_efx() 1976 OP(icode, &ptr, iACC3, GPR(tmp + 0), FXBUS(FXBUS_PCM_LEFT), FXBUS(FXBUS_PCM_RIGHT), C_00000000); _snd_emu10k1_init_efx() 1977 OP(icode, &ptr, iMACINT0, GPR(tmp + 0), C_00000000, GPR(tmp + 0), C_00000002); _snd_emu10k1_init_efx() 1978 VOLUME(icode, &ptr, playback + 4, tmp + 0, gpr); _snd_emu10k1_init_efx() 1980 VOLUME(icode, &ptr, playback + 5, tmp + 0, gpr); _snd_emu10k1_init_efx() 1985 SWITCH(icode, &ptr, tmp + 0, z, gpr + 2 + z); _snd_emu10k1_init_efx() 1986 VOLUME(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 1994 VOLUME_ADD(icode, &ptr, playback + z, 2 + z, gpr + z); _snd_emu10k1_init_efx() 2000 SWITCH(icode, &ptr, tmp + 0, 2 + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2001 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2009 VOLUME_ADD(icode, &ptr, playback + 2 + z, 4 + z, gpr + z); _snd_emu10k1_init_efx() 2015 SWITCH(icode, &ptr, tmp + 0, 4 + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2016 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2023 VOLUME_ADD(icode, &ptr, playback + 4, 6, gpr); _snd_emu10k1_init_efx() 2027 VOLUME_ADD(icode, &ptr, playback + 5, 7, gpr); _snd_emu10k1_init_efx() 2032 VOLUME_ADD(icode, &ptr, playback + z, 10 + z, gpr + z); _snd_emu10k1_init_efx() 2038 SWITCH(icode, &ptr, tmp + 0, 10 + z, gpr + 2); _snd_emu10k1_init_efx() 2039 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2051 VOLUME_ADDIN(icode, &ptr, playback + 0, EXTIN_AC97_L, gpr); gpr++; _snd_emu10k1_init_efx() 2052 VOLUME_ADDIN(icode, &ptr, playback + 1, EXTIN_AC97_R, gpr); gpr++; _snd_emu10k1_init_efx() 2055 VOLUME_ADDIN(icode, &ptr, capture + 0, EXTIN_AC97_L, gpr); gpr++; _snd_emu10k1_init_efx() 2056 VOLUME_ADDIN(icode, &ptr, capture + 1, EXTIN_AC97_R, gpr); gpr++; _snd_emu10k1_init_efx() 2063 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_SPDIF_CD_L + z, gpr + z); _snd_emu10k1_init_efx() 2069 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_SPDIF_CD_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2070 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2080 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_ZOOM_L + z, gpr + z); _snd_emu10k1_init_efx() 2086 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_ZOOM_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2087 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2097 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_TOSLINK_L + z, gpr + z); _snd_emu10k1_init_efx() 2103 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_TOSLINK_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2104 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2114 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE1_L + z, gpr + z); _snd_emu10k1_init_efx() 2120 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE1_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2121 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2131 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_COAX_SPDIF_L + z, gpr + z); _snd_emu10k1_init_efx() 2137 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_COAX_SPDIF_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2138 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2148 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE2_L + z, gpr + z); _snd_emu10k1_init_efx() 2155 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE2_L + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2156 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2168 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), GPR(playback + 0), C_00000000, C_00000000); /* left */ _snd_emu10k1_init_efx() 2169 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), GPR(playback + 1), C_00000000, C_00000000); /* right */ _snd_emu10k1_init_efx() 2170 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), GPR(playback + 2), C_00000000, C_00000000); /* rear left */ _snd_emu10k1_init_efx() 2171 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), GPR(playback + 3), C_00000000, C_00000000); /* rear right */ _snd_emu10k1_init_efx() 2172 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), GPR(playback + 4), C_00000000, C_00000000); /* center */ _snd_emu10k1_init_efx() 2173 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), GPR(playback + 5), C_00000000, C_00000000); /* LFE */ _snd_emu10k1_init_efx() 2213 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(d), GPR(BASS_GPR + 0 + j)); _snd_emu10k1_init_efx() 2214 OP(icode, &ptr, iMACMV, GPR(k+1), GPR(k), GPR(k+1), GPR(BASS_GPR + 4 + j)); _snd_emu10k1_init_efx() 2215 OP(icode, &ptr, iMACMV, GPR(k), GPR(d), GPR(k), GPR(BASS_GPR + 2 + j)); _snd_emu10k1_init_efx() 2216 OP(icode, &ptr, iMACMV, GPR(k+3), GPR(k+2), GPR(k+3), GPR(BASS_GPR + 8 + j)); _snd_emu10k1_init_efx() 2217 OP(icode, &ptr, iMAC0, GPR(k+2), GPR_ACCU, GPR(k+2), GPR(BASS_GPR + 6 + j)); _snd_emu10k1_init_efx() 2218 OP(icode, &ptr, iACC3, GPR(k+2), GPR(k+2), GPR(k+2), C_00000000); _snd_emu10k1_init_efx() 2220 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(k+2), GPR(TREBLE_GPR + 0 + j)); _snd_emu10k1_init_efx() 2221 OP(icode, &ptr, iMACMV, GPR(l+1), GPR(l), GPR(l+1), GPR(TREBLE_GPR + 4 + j)); _snd_emu10k1_init_efx() 2222 OP(icode, &ptr, iMACMV, GPR(l), GPR(k+2), GPR(l), GPR(TREBLE_GPR + 2 + j)); _snd_emu10k1_init_efx() 2223 OP(icode, &ptr, iMACMV, GPR(l+3), GPR(l+2), GPR(l+3), GPR(TREBLE_GPR + 8 + j)); _snd_emu10k1_init_efx() 2224 OP(icode, &ptr, iMAC0, GPR(l+2), GPR_ACCU, GPR(l+2), GPR(TREBLE_GPR + 6 + j)); _snd_emu10k1_init_efx() 2225 OP(icode, &ptr, iMACINT0, GPR(l+2), C_00000000, GPR(l+2), C_00000010); _snd_emu10k1_init_efx() 2227 OP(icode, &ptr, iACC3, GPR(d), GPR(l+2), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2239 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); _snd_emu10k1_init_efx() 2240 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); _snd_emu10k1_init_efx() 2241 SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); _snd_emu10k1_init_efx() 2242 OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); _snd_emu10k1_init_efx() 2254 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2261 SWITCH(icode, &ptr, tmp + 0, 8 + z, gpr + z); _snd_emu10k1_init_efx() 2262 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); _snd_emu10k1_init_efx() 2263 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); _snd_emu10k1_init_efx() 2264 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_TOSLINK_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); _snd_emu10k1_init_efx() 2266 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); _snd_emu10k1_init_efx() 2278 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4 + z, gpr + 2 + z); _snd_emu10k1_init_efx() 2279 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 2 + z); _snd_emu10k1_init_efx() 2280 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); _snd_emu10k1_init_efx() 2281 OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(tmp + 0), GPR(tmp + 1), C_00000000); _snd_emu10k1_init_efx() 2282 VOLUME_OUT(icode, &ptr, EXTOUT_HEADPHONE_L + z, tmp + 0, gpr + z); _snd_emu10k1_init_efx() 2297 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2 + z), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2301 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2 + z), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2305 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2306 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2308 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2309 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2315 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2316 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2318 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2319 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2325 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(capture + z), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2329 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_MIC_CAP), GPR(capture + 2), C_00000000, C_00000000); _snd_emu10k1_init_efx() 2342 OP(icode, &ptr, iACC3, FXBUS2(14), C_00000000, C_00000000, EXTIN(0)); _snd_emu10k1_init_efx() 2343 OP(icode, &ptr, iACC3, FXBUS2(15), C_00000000, C_00000000, EXTIN(1)); _snd_emu10k1_init_efx() 2344 OP(icode, &ptr, iACC3, FXBUS2(0), C_00000000, C_00000000, EXTIN(2)); _snd_emu10k1_init_efx() 2345 OP(icode, &ptr, iACC3, FXBUS2(3), C_00000000, C_00000000, EXTIN(3)); _snd_emu10k1_init_efx() 2347 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); _snd_emu10k1_init_efx() 2350 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); _snd_emu10k1_init_efx() 2367 OP(icode, &ptr, iACC3, C_00000000, C_00000000, C_00000000, C_00000000); _snd_emu10k1_init_efx() 2372 icode->gpr_add_control_count = i; _snd_emu10k1_init_efx() 2373 icode->gpr_add_controls = (struct snd_emu10k1_fx8010_control_gpr __user *)controls; _snd_emu10k1_init_efx() 2375 err = snd_emu10k1_icode_poke(emu, icode); _snd_emu10k1_init_efx() 2385 kfree((void __force *)icode->gpr_map); _snd_emu10k1_init_efx() 2387 kfree(icode); _snd_emu10k1_init_efx() 2512 struct snd_emu10k1_fx8010_code *icode; snd_emu10k1_fx8010_ioctl() local 2537 icode = memdup_user(argp, sizeof(*icode)); snd_emu10k1_fx8010_ioctl() 2538 if (IS_ERR(icode)) snd_emu10k1_fx8010_ioctl() 2539 return PTR_ERR(icode); snd_emu10k1_fx8010_ioctl() 2540 res = snd_emu10k1_icode_poke(emu, icode); snd_emu10k1_fx8010_ioctl() 2541 kfree(icode); snd_emu10k1_fx8010_ioctl() 2544 icode = memdup_user(argp, sizeof(*icode)); snd_emu10k1_fx8010_ioctl() 2545 if (IS_ERR(icode)) snd_emu10k1_fx8010_ioctl() 2546 return PTR_ERR(icode); snd_emu10k1_fx8010_ioctl() 2547 res = snd_emu10k1_icode_peek(emu, icode); snd_emu10k1_fx8010_ioctl() 2548 if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) { snd_emu10k1_fx8010_ioctl() 2549 kfree(icode); snd_emu10k1_fx8010_ioctl() 2552 kfree(icode); snd_emu10k1_fx8010_ioctl() 540 snd_emu10k1_gpr_poke(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_gpr_poke() argument 556 snd_emu10k1_gpr_peek(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_gpr_peek() argument 571 snd_emu10k1_tram_poke(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_tram_poke() argument 594 snd_emu10k1_tram_peek(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_tram_peek() argument 617 snd_emu10k1_code_poke(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_code_poke() argument 634 snd_emu10k1_code_peek(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_code_peek() argument 720 snd_emu10k1_verify_controls(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_verify_controls() argument 783 snd_emu10k1_add_controls(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_add_controls() argument 875 snd_emu10k1_del_controls(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_del_controls() argument 897 snd_emu10k1_list_controls(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_list_controls() argument 943 snd_emu10k1_icode_poke(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_icode_poke() argument 975 snd_emu10k1_icode_peek(struct snd_emu10k1 *emu, struct snd_emu10k1_fx8010_code *icode) snd_emu10k1_icode_peek() argument 1150 snd_emu10k1_audigy_dsp_convert_32_to_2x16( struct snd_emu10k1_fx8010_code *icode, u32 *ptr, int tmp, int bit_shifter16, int reg_in, int reg_out) snd_emu10k1_audigy_dsp_convert_32_to_2x16() argument
|