Lines Matching refs:icode
459 static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_write_op() argument
466 code = icode->code + (*ptr) * 2; in snd_emu10k1_write_op()
467 set_bit(*ptr, icode->code_valid); in snd_emu10k1_write_op()
473 #define OP(icode, ptr, op, r, a, x, y) \ argument
474 snd_emu10k1_write_op(icode, ptr, op, r, a, x, y)
476 static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_audigy_write_op() argument
483 code = icode->code + (*ptr) * 2; in snd_emu10k1_audigy_write_op()
484 set_bit(*ptr, icode->code_valid); in snd_emu10k1_audigy_write_op()
490 #define A_OP(icode, ptr, op, r, a, x, y) \ argument
491 snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y)
506 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_gpr_poke() argument
513 if (!test_bit(gpr, icode->gpr_valid)) in snd_emu10k1_gpr_poke()
516 val = icode->gpr_map[gpr]; in snd_emu10k1_gpr_poke()
517 else if (get_user(val, (__user u32 *)&icode->gpr_map[gpr])) in snd_emu10k1_gpr_poke()
525 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_gpr_peek() argument
531 set_bit(gpr, icode->gpr_valid); in snd_emu10k1_gpr_peek()
533 if (put_user(val, (__user u32 *)&icode->gpr_map[gpr])) in snd_emu10k1_gpr_peek()
540 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_tram_poke() argument
547 if (!test_bit(tram, icode->tram_valid)) in snd_emu10k1_tram_poke()
550 val = icode->tram_data_map[tram]; in snd_emu10k1_tram_poke()
551 addr = icode->tram_addr_map[tram]; in snd_emu10k1_tram_poke()
553 if (get_user(val, (__user __u32 *)&icode->tram_data_map[tram]) || in snd_emu10k1_tram_poke()
554 get_user(addr, (__user __u32 *)&icode->tram_addr_map[tram])) in snd_emu10k1_tram_poke()
569 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_tram_peek() argument
574 memset(icode->tram_valid, 0, sizeof(icode->tram_valid)); in snd_emu10k1_tram_peek()
576 set_bit(tram, icode->tram_valid); in snd_emu10k1_tram_peek()
584 if (put_user(val, (__user u32 *)&icode->tram_data_map[tram]) || in snd_emu10k1_tram_peek()
585 put_user(addr, (__user u32 *)&icode->tram_addr_map[tram])) in snd_emu10k1_tram_peek()
592 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_code_poke() argument
598 if (!test_bit(pc / 2, icode->code_valid)) in snd_emu10k1_code_poke()
601 lo = icode->code[pc + 0]; in snd_emu10k1_code_poke()
602 hi = icode->code[pc + 1]; in snd_emu10k1_code_poke()
604 if (get_user(lo, (__user u32 *)&icode->code[pc + 0]) || in snd_emu10k1_code_poke()
605 get_user(hi, (__user u32 *)&icode->code[pc + 1])) in snd_emu10k1_code_poke()
615 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_code_peek() argument
619 memset(icode->code_valid, 0, sizeof(icode->code_valid)); in snd_emu10k1_code_peek()
621 set_bit(pc / 2, icode->code_valid); in snd_emu10k1_code_peek()
623 (__user u32 *)&icode->code[pc + 0])) in snd_emu10k1_code_peek()
626 (__user u32 *)&icode->code[pc + 1])) in snd_emu10k1_code_peek()
736 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_verify_controls() argument
745 for (i = 0; i < icode->gpr_del_control_count; i++) { in snd_emu10k1_verify_controls()
746 err = copy_ctl_elem_id(icode->gpr_del_controls, i, &id, in snd_emu10k1_verify_controls()
757 for (i = 0; i < icode->gpr_add_control_count; i++) { in snd_emu10k1_verify_controls()
758 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_verify_controls()
779 for (i = 0; i < icode->gpr_list_control_count; i++) { in snd_emu10k1_verify_controls()
781 if (copy_gctl(emu, gctl, icode->gpr_list_controls, i, in snd_emu10k1_verify_controls()
804 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_add_controls() argument
824 for (i = 0; i < icode->gpr_add_control_count; i++) { in snd_emu10k1_add_controls()
825 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_add_controls()
900 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_del_controls() argument
909 for (i = 0; i < icode->gpr_del_control_count; i++) { in snd_emu10k1_del_controls()
910 err = copy_ctl_elem_id(icode->gpr_del_controls, i, &id, in snd_emu10k1_del_controls()
924 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_list_controls() argument
938 if (icode->gpr_list_controls && in snd_emu10k1_list_controls()
939 i < icode->gpr_list_control_count) { in snd_emu10k1_list_controls()
956 if (copy_gctl_to_user(emu, icode->gpr_list_controls, in snd_emu10k1_list_controls()
964 icode->gpr_list_control_total = total; in snd_emu10k1_list_controls()
970 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_icode_poke() argument
976 err = snd_emu10k1_verify_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
979 strlcpy(emu->fx8010.name, icode->name, sizeof(emu->fx8010.name)); in snd_emu10k1_icode_poke()
987 err = snd_emu10k1_del_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
990 err = snd_emu10k1_gpr_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
993 err = snd_emu10k1_tram_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
996 err = snd_emu10k1_code_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
999 err = snd_emu10k1_add_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
1013 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_icode_peek() argument
1018 strlcpy(icode->name, emu->fx8010.name, sizeof(icode->name)); in snd_emu10k1_icode_peek()
1020 err = snd_emu10k1_gpr_peek(emu, icode); in snd_emu10k1_icode_peek()
1022 err = snd_emu10k1_tram_peek(emu, icode); in snd_emu10k1_icode_peek()
1024 err = snd_emu10k1_code_peek(emu, icode); in snd_emu10k1_icode_peek()
1026 err = snd_emu10k1_list_controls(emu, icode); in snd_emu10k1_icode_peek()
1192 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_audigy_dsp_convert_32_to_2x16() argument
1196 A_OP(icode, ptr, iACC3, A_GPR(tmp + 1), reg_in, A_C_00000000, A_C_00000000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1197 A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp + 1), A_GPR(bit_shifter16 - 1), A_C_00000000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1198 A_OP(icode, ptr, iTSTNEG, A_GPR(tmp + 2), A_GPR(tmp), A_C_80000000, A_GPR(bit_shifter16 - 2)); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1199 A_OP(icode, ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_C_80000000, A_C_00000000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1200 A_OP(icode, ptr, iANDXOR, A_GPR(tmp), A_GPR(tmp), A_GPR(bit_shifter16 - 3), A_C_00000000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1201 A_OP(icode, ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A_GPR(tmp), A_C_00010000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1202 A_OP(icode, ptr, iANDXOR, reg_out, A_GPR(tmp), A_C_ffffffff, A_GPR(tmp + 2)); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1203 A_OP(icode, ptr, iACC3, reg_out + 1, A_GPR(tmp + 1), A_C_00000000, A_C_00000000); in snd_emu10k1_audigy_dsp_convert_32_to_2x16()
1220 struct snd_emu10k1_fx8010_code *icode = NULL; in _snd_emu10k1_audigy_init_efx() local
1225 icode = kzalloc(sizeof(*icode), GFP_KERNEL); in _snd_emu10k1_audigy_init_efx()
1226 if (!icode) in _snd_emu10k1_audigy_init_efx()
1229 icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, in _snd_emu10k1_audigy_init_efx()
1231 if (!icode->gpr_map) in _snd_emu10k1_audigy_init_efx()
1238 gpr_map = icode->gpr_map; in _snd_emu10k1_audigy_init_efx()
1240 icode->tram_data_map = icode->gpr_map + 512; in _snd_emu10k1_audigy_init_efx()
1241 icode->tram_addr_map = icode->tram_data_map + 256; in _snd_emu10k1_audigy_init_efx()
1242 icode->code = icode->tram_addr_map + 256; in _snd_emu10k1_audigy_init_efx()
1246 set_bit(i, icode->gpr_valid); in _snd_emu10k1_audigy_init_efx()
1250 set_bit(i, icode->tram_valid); in _snd_emu10k1_audigy_init_efx()
1252 strcpy(icode->name, "Audigy DSP code for ALSA"); in _snd_emu10k1_audigy_init_efx()
1270 A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_FRONT)); in _snd_emu10k1_audigy_init_efx()
1271 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_FR… in _snd_emu10k1_audigy_init_efx()
1276 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_REAR)… in _snd_emu10k1_audigy_init_efx()
1277 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_RE… in _snd_emu10k1_audigy_init_efx()
1283 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT_SIDE)… in _snd_emu10k1_audigy_init_efx()
1284 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT_SI… in _snd_emu10k1_audigy_init_efx()
1290 A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_CENTER)); in _snd_emu10k1_audigy_init_efx()
1295 A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LFE)); in _snd_emu10k1_audigy_init_efx()
1303 A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); in _snd_emu10k1_audigy_init_efx()
1304 …A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)… in _snd_emu10k1_audigy_init_efx()
1309 …A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+0), A_GPR(stereo_mix+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_… in _snd_emu10k1_audigy_init_efx()
1310 …A_OP(icode, &ptr, iMAC0, A_GPR(stereo_mix+1), A_GPR(stereo_mix+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MID… in _snd_emu10k1_audigy_init_efx()
1315 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_C_00000000, A_GPR(gpr), A_FXBUS(FXBUS_PCM_LEFT)); in _snd_emu10k1_audigy_init_efx()
1316 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_C_00000000, A_GPR(gpr+1), A_FXBUS(FXBUS_PCM_RIGHT)); in _snd_emu10k1_audigy_init_efx()
1321 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_FXBUS(FXBUS_MIDI_LEFT)); in _snd_emu10k1_audigy_init_efx()
1322 …A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_FXBUS(FXBUS_MIDI_RIGH… in _snd_emu10k1_audigy_init_efx()
1330 A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) in _snd_emu10k1_audigy_init_efx()
1336 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1337 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_GPR(tmp)); in _snd_emu10k1_audigy_init_efx()
1338 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x1), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1339 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr), A_GPR(tmp)); in _snd_emu10k1_audigy_init_efx()
1341 A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_GPR(capture+0), A_GPR(gpr), A_P16VIN(0x0)); in _snd_emu10k1_audigy_init_efx()
1342 A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_GPR(capture+1), A_GPR(gpr+1), A_P16VIN(0x1)); in _snd_emu10k1_audigy_init_efx()
1359 …A_OP(icode, &ptr, iINTERP, A_EXTOUT(A_EXTOUT_MIC_CAP), A_EXTIN(A_EXTIN_AC97_L), 0xcd, A_EXTIN(A_EX… in _snd_emu10k1_audigy_init_efx()
1429 A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_GPR(playback), A_GPR(gpr), A_GPR(stereo_mix)); in _snd_emu10k1_audigy_init_efx()
1430 A_OP(icode, &ptr, iMAC0, A_GPR(playback+1), A_GPR(playback+1), A_GPR(gpr+1), A_GPR(stereo_mix+1)); in _snd_emu10k1_audigy_init_efx()
1435 A_OP(icode, &ptr, iMAC0, A_GPR(playback+2), A_GPR(playback+2), A_GPR(gpr), A_GPR(stereo_mix)); in _snd_emu10k1_audigy_init_efx()
1436 A_OP(icode, &ptr, iMAC0, A_GPR(playback+3), A_GPR(playback+3), A_GPR(gpr+1), A_GPR(stereo_mix+1)); in _snd_emu10k1_audigy_init_efx()
1442 A_OP(icode, &ptr, iINTERP, A_GPR(tmp), A_GPR(stereo_mix), 0xcd, A_GPR(stereo_mix+1)); in _snd_emu10k1_audigy_init_efx()
1443 A_OP(icode, &ptr, iMAC0, A_GPR(playback+4), A_GPR(playback+4), A_GPR(gpr), A_GPR(tmp)); in _snd_emu10k1_audigy_init_efx()
1448 A_OP(icode, &ptr, iMAC0, A_GPR(playback+5), A_GPR(playback+5), A_GPR(gpr), A_GPR(tmp)); in _snd_emu10k1_audigy_init_efx()
1454 A_OP(icode, &ptr, iMAC0, A_GPR(playback+6), A_GPR(playback+6), A_GPR(gpr), A_GPR(stereo_mix)); in _snd_emu10k1_audigy_init_efx()
1455 A_OP(icode, &ptr, iMAC0, A_GPR(playback+7), A_GPR(playback+7), A_GPR(gpr+1), A_GPR(stereo_mix+1)); in _snd_emu10k1_audigy_init_efx()
1463 #define A_PUT_OUTPUT(out,src) A_OP(icode, &ptr, iACC3, A_EXTOUT(out), A_C_00000000, A_C_00000000, A… in _snd_emu10k1_audigy_init_efx()
1467 #define _A_SWITCH(icode, ptr, dst, src, sw) \ in _snd_emu10k1_audigy_init_efx() argument
1468 A_OP((icode), ptr, iMACINT0, dst, A_C_00000000, src, sw); in _snd_emu10k1_audigy_init_efx()
1469 #define A_SWITCH(icode, ptr, dst, src, sw) \ in _snd_emu10k1_audigy_init_efx() argument
1470 _A_SWITCH(icode, ptr, A_GPR(dst), A_GPR(src), A_GPR(sw)) in _snd_emu10k1_audigy_init_efx()
1471 #define _A_SWITCH_NEG(icode, ptr, dst, src) \ in _snd_emu10k1_audigy_init_efx() argument
1472 A_OP((icode), ptr, iANDXOR, dst, src, A_C_00000001, A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1473 #define A_SWITCH_NEG(icode, ptr, dst, src) \ in _snd_emu10k1_audigy_init_efx() argument
1474 _A_SWITCH_NEG(icode, ptr, A_GPR(dst), A_GPR(src)) in _snd_emu10k1_audigy_init_efx()
1480 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), A_GPR(playback + 0),… in _snd_emu10k1_audigy_init_efx()
1481 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), A_GPR(playback + 1),… in _snd_emu10k1_audigy_init_efx()
1482 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), A_GPR(playback + 2),… in _snd_emu10k1_audigy_init_efx()
1483 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), A_GPR(playback + 3),… in _snd_emu10k1_audigy_init_efx()
1484 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), A_GPR(playback + 4),… in _snd_emu10k1_audigy_init_efx()
1485 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), A_GPR(playback + 5),… in _snd_emu10k1_audigy_init_efx()
1487 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 6), A_GPR(playback + 6),… in _snd_emu10k1_audigy_init_efx()
1488 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 7), A_GPR(playback + 7),… in _snd_emu10k1_audigy_init_efx()
1528 A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(d), A_GPR(BASS_GPR + 0 + j)); in _snd_emu10k1_audigy_init_efx()
1529 A_OP(icode, &ptr, iMACMV, A_GPR(k+1), A_GPR(k), A_GPR(k+1), A_GPR(BASS_GPR + 4 + j)); in _snd_emu10k1_audigy_init_efx()
1530 A_OP(icode, &ptr, iMACMV, A_GPR(k), A_GPR(d), A_GPR(k), A_GPR(BASS_GPR + 2 + j)); in _snd_emu10k1_audigy_init_efx()
1531 A_OP(icode, &ptr, iMACMV, A_GPR(k+3), A_GPR(k+2), A_GPR(k+3), A_GPR(BASS_GPR + 8 + j)); in _snd_emu10k1_audigy_init_efx()
1532 A_OP(icode, &ptr, iMAC0, A_GPR(k+2), A_GPR_ACCU, A_GPR(k+2), A_GPR(BASS_GPR + 6 + j)); in _snd_emu10k1_audigy_init_efx()
1533 A_OP(icode, &ptr, iACC3, A_GPR(k+2), A_GPR(k+2), A_GPR(k+2), A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1535 A_OP(icode, &ptr, iMAC0, A_C_00000000, A_C_00000000, A_GPR(k+2), A_GPR(TREBLE_GPR + 0 + j)); in _snd_emu10k1_audigy_init_efx()
1536 A_OP(icode, &ptr, iMACMV, A_GPR(l+1), A_GPR(l), A_GPR(l+1), A_GPR(TREBLE_GPR + 4 + j)); in _snd_emu10k1_audigy_init_efx()
1537 A_OP(icode, &ptr, iMACMV, A_GPR(l), A_GPR(k+2), A_GPR(l), A_GPR(TREBLE_GPR + 2 + j)); in _snd_emu10k1_audigy_init_efx()
1538 A_OP(icode, &ptr, iMACMV, A_GPR(l+3), A_GPR(l+2), A_GPR(l+3), A_GPR(TREBLE_GPR + 8 + j)); in _snd_emu10k1_audigy_init_efx()
1539 A_OP(icode, &ptr, iMAC0, A_GPR(l+2), A_GPR_ACCU, A_GPR(l+2), A_GPR(TREBLE_GPR + 6 + j)); in _snd_emu10k1_audigy_init_efx()
1540 A_OP(icode, &ptr, iMACINT0, A_GPR(l+2), A_C_00000000, A_GPR(l+2), A_C_00000010); in _snd_emu10k1_audigy_init_efx()
1542 A_OP(icode, &ptr, iACC3, A_GPR(d), A_GPR(l+2), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1554 A_SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); in _snd_emu10k1_audigy_init_efx()
1555 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); in _snd_emu10k1_audigy_init_efx()
1556 A_SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); in _snd_emu10k1_audigy_init_efx()
1557 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_GPR(tmp + 0), A_GP… in _snd_emu10k1_audigy_init_efx()
1563 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+0+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1564 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+1+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1565 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+2+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1566 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+3+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1567 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+4+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1568 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+5+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1569 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+6+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1570 …A_OP(icode, &ptr, iMAC0, A_GPR(playback+7+SND_EMU10K1_PLAYBACK_CHANNELS), A_C_00000000, A_GPR(gpr)… in _snd_emu10k1_audigy_init_efx()
1592 …A_OP(icode, &ptr, iACC3, A3_EMU32OUT(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_… in _snd_emu10k1_audigy_init_efx()
1594 …A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_… in _snd_emu10k1_audigy_init_efx()
1604 A_OP(icode, &ptr, iMAC0, A_GPR(tmp + 2), A_FXBUS(FXBUS_PT_LEFT + z), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1605 A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1606 A_OP(icode, &ptr, iACC3, A_GPR(tmp + 2), A_C_00000000, A_C_00010000, A_GPR(tmp + 2)); in _snd_emu10k1_audigy_init_efx()
1607 A_OP(icode, &ptr, iANDXOR, A_GPR(tmp + 2), A_GPR(tmp + 2), A_GPR(gpr - 1), A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1608 A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z); in _snd_emu10k1_audigy_init_efx()
1609 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); in _snd_emu10k1_audigy_init_efx()
1610 A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_audigy_init_efx()
1616 …A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(gpr - 3), A_C_00000000, A_C_0000000… in _snd_emu10k1_audigy_init_efx()
1617 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 3), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1619 …A_OP(icode, &ptr, iACC3, A_EXTOUT(A_EXTOUT_FRONT_L + z), A_GPR(tmp + 0), A_GPR(tmp + 1), A_C_00000… in _snd_emu10k1_audigy_init_efx()
1641 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1659 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS… in _snd_emu10k1_audigy_init_efx()
1667 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1668 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x1), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1670 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1671 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x2), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1673 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1674 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1678 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1679 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1682 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1683 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x5), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1685 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1686 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x6), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1688 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_GPR(gpr - 1), A_FXBU… in _snd_emu10k1_audigy_init_efx()
1689 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1695 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1699 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8), in _snd_emu10k1_audigy_init_efx()
1702 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1706 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9), in _snd_emu10k1_audigy_init_efx()
1709 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1713 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa), in _snd_emu10k1_audigy_init_efx()
1716 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1720 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb), in _snd_emu10k1_audigy_init_efx()
1723 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1727 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc), in _snd_emu10k1_audigy_init_efx()
1730 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1734 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd), in _snd_emu10k1_audigy_init_efx()
1737 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1741 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe), in _snd_emu10k1_audigy_init_efx()
1744 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1748 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf), in _snd_emu10k1_audigy_init_efx()
1754 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1757 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1764 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_EXTIN(z)); in _snd_emu10k1_audigy_init_efx()
1780 A_OP(icode, &ptr, 0x0f, 0xc0, 0xc0, 0xcf, 0xc0); in _snd_emu10k1_audigy_init_efx()
1782 icode->gpr_add_control_count = nctl; in _snd_emu10k1_audigy_init_efx()
1783 icode->gpr_add_controls = controls; in _snd_emu10k1_audigy_init_efx()
1785 err = snd_emu10k1_icode_poke(emu, icode, true); in _snd_emu10k1_audigy_init_efx()
1791 kfree(icode->gpr_map); in _snd_emu10k1_audigy_init_efx()
1793 kfree(icode); in _snd_emu10k1_audigy_init_efx()
1804 static void _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume() argument
1806 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); in _volume()
1807 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume()
1808 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001); in _volume()
1809 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); in _volume()
1811 static void _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume_add() argument
1813 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume_add()
1814 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _volume_add()
1815 OP(icode, ptr, iMACINT0, dst, dst, src, C_00000001); in _volume_add()
1816 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); in _volume_add()
1817 OP(icode, ptr, iMAC0, dst, dst, src, vol); in _volume_add()
1819 static void _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume_out() argument
1821 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume_out()
1822 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _volume_out()
1823 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); in _volume_out()
1824 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); in _volume_out()
1825 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); in _volume_out()
1828 #define VOLUME(icode, ptr, dst, src, vol) \ argument
1829 _volume(icode, ptr, GPR(dst), GPR(src), GPR(vol))
1830 #define VOLUME_IN(icode, ptr, dst, src, vol) \ argument
1831 _volume(icode, ptr, GPR(dst), EXTIN(src), GPR(vol))
1832 #define VOLUME_ADD(icode, ptr, dst, src, vol) \ argument
1833 _volume_add(icode, ptr, GPR(dst), GPR(src), GPR(vol))
1834 #define VOLUME_ADDIN(icode, ptr, dst, src, vol) \ argument
1835 _volume_add(icode, ptr, GPR(dst), EXTIN(src), GPR(vol))
1836 #define VOLUME_OUT(icode, ptr, dst, src, vol) \ argument
1837 _volume_out(icode, ptr, EXTOUT(dst), GPR(src), GPR(vol))
1838 #define _SWITCH(icode, ptr, dst, src, sw) \ argument
1839 OP((icode), ptr, iMACINT0, dst, C_00000000, src, sw);
1840 #define SWITCH(icode, ptr, dst, src, sw) \ argument
1841 _SWITCH(icode, ptr, GPR(dst), GPR(src), GPR(sw))
1842 #define SWITCH_IN(icode, ptr, dst, src, sw) \ argument
1843 _SWITCH(icode, ptr, GPR(dst), EXTIN(src), GPR(sw))
1844 #define _SWITCH_NEG(icode, ptr, dst, src) \ argument
1845 OP((icode), ptr, iANDXOR, dst, src, C_00000001, C_00000001);
1846 #define SWITCH_NEG(icode, ptr, dst, src) \ argument
1847 _SWITCH_NEG(icode, ptr, GPR(dst), GPR(src))
1854 struct snd_emu10k1_fx8010_code *icode; in _snd_emu10k1_init_efx() local
1860 icode = kzalloc(sizeof(*icode), GFP_KERNEL); in _snd_emu10k1_init_efx()
1861 if (!icode) in _snd_emu10k1_init_efx()
1864 icode->gpr_map = kcalloc(256 + 160 + 160 + 2 * 512, in _snd_emu10k1_init_efx()
1866 if (!icode->gpr_map) in _snd_emu10k1_init_efx()
1879 gpr_map = icode->gpr_map; in _snd_emu10k1_init_efx()
1881 icode->tram_data_map = icode->gpr_map + 256; in _snd_emu10k1_init_efx()
1882 icode->tram_addr_map = icode->tram_data_map + 160; in _snd_emu10k1_init_efx()
1883 icode->code = icode->tram_addr_map + 160; in _snd_emu10k1_init_efx()
1887 set_bit(i, icode->gpr_valid); in _snd_emu10k1_init_efx()
1891 set_bit(i, icode->tram_valid); in _snd_emu10k1_init_efx()
1893 strcpy(icode->name, "SB Live! FX8010 code for ALSA v1.2 by Jaroslav Kysela"); in _snd_emu10k1_init_efx()
1909 OP(icode, &ptr, iMACINT0, GPR(0), C_00000000, FXBUS(FXBUS_PCM_LEFT), C_00000004); in _snd_emu10k1_init_efx()
1910 OP(icode, &ptr, iMACINT0, GPR(1), C_00000000, FXBUS(FXBUS_PCM_RIGHT), C_00000004); in _snd_emu10k1_init_efx()
1911 OP(icode, &ptr, iMACINT0, GPR(2), C_00000000, FXBUS(FXBUS_MIDI_LEFT), C_00000004); in _snd_emu10k1_init_efx()
1912 OP(icode, &ptr, iMACINT0, GPR(3), C_00000000, FXBUS(FXBUS_MIDI_RIGHT), C_00000004); in _snd_emu10k1_init_efx()
1913 OP(icode, &ptr, iMACINT0, GPR(4), C_00000000, FXBUS(FXBUS_PCM_LEFT_REAR), C_00000004); in _snd_emu10k1_init_efx()
1914 OP(icode, &ptr, iMACINT0, GPR(5), C_00000000, FXBUS(FXBUS_PCM_RIGHT_REAR), C_00000004); in _snd_emu10k1_init_efx()
1915 OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(FXBUS_PCM_CENTER), C_00000004); in _snd_emu10k1_init_efx()
1916 OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(FXBUS_PCM_LFE), C_00000004); in _snd_emu10k1_init_efx()
1917 OP(icode, &ptr, iMACINT0, GPR(8), C_00000000, C_00000000, C_00000000); /* S/PDIF left */ in _snd_emu10k1_init_efx()
1918 OP(icode, &ptr, iMACINT0, GPR(9), C_00000000, C_00000000, C_00000000); /* S/PDIF right */ in _snd_emu10k1_init_efx()
1919 OP(icode, &ptr, iMACINT0, GPR(10), C_00000000, FXBUS(FXBUS_PCM_LEFT_FRONT), C_00000004); in _snd_emu10k1_init_efx()
1920 OP(icode, &ptr, iMACINT0, GPR(11), C_00000000, FXBUS(FXBUS_PCM_RIGHT_FRONT), C_00000004); in _snd_emu10k1_init_efx()
1951 /* 00: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_trigger), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1952 /* 01: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_ZERO, GPR(gpr + 6)); in _snd_emu10k1_init_efx()
1954 /* 02: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_running), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1955 /* 03: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000004); in _snd_emu10k1_init_efx()
1957 /* 04: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), GPR_DBAC, GPR(gpr + 4), C_00000000); in _snd_emu10k1_init_efx()
1958 /* 05: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(gpr + 5)); in _snd_emu10k1_init_efx()
1959 /* 06: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 7)); in _snd_emu10k1_init_efx()
1960 /* 07: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000010, C_00000001, C_00000000); in _snd_emu10k1_init_efx()
1962 …/* 08: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000000, C_0… in _snd_emu10k1_init_efx()
1963 /* 09: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), GPR(gpr + 12), C_ffffffff, C_00000000); in _snd_emu10k1_init_efx()
1964 /* 0a: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 11)); in _snd_emu10k1_init_efx()
1965 /* 0b: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000001, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1967 …/* 0c: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[0]), GPR(gpr + 0), C_00000… in _snd_emu10k1_init_efx()
1968 /* 0d: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); in _snd_emu10k1_init_efx()
1969 /* 0e: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1970 /* 0f: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1971 /* 10: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(8), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1973 …/* 11: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[1]), GPR(gpr + 0), C_00000… in _snd_emu10k1_init_efx()
1974 /* 12: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); in _snd_emu10k1_init_efx()
1975 /* 13: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1976 /* 14: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1977 /* 15: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(9), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1979 /* 16: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(ipcm->gpr_ptr), C_00000001, C_00000000); in _snd_emu10k1_init_efx()
1980 /* 17: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(ipcm->gpr_size)); in _snd_emu10k1_init_efx()
1981 /* 18: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1982 /* 19: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), C_00000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1983 /* 1a: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_ptr), GPR(tmp + 0), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1985 …/* 1b: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_tmpcount), C_ffffffff, C_0… in _snd_emu10k1_init_efx()
1986 /* 1c: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _snd_emu10k1_init_efx()
1987 …/* 1d: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_count), C_00000000, C_0000… in _snd_emu10k1_init_efx()
1988 /* 1e: */ OP(icode, &ptr, iACC3, GPR_IRQ, C_80000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1989 …/* 1f: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000001, C_0… in _snd_emu10k1_init_efx()
1991 …/* 20: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00010000, C_0… in _snd_emu10k1_init_efx()
1992 /* 21: */ OP(icode, &ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000002); in _snd_emu10k1_init_efx()
1994 …/* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]), GPR(gpr + 8), GPR_DBAC, C_ffffffff… in _snd_emu10k1_init_efx()
1995 …/* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]), GPR(gpr + 9), GPR_DBAC, C_ffffffff… in _snd_emu10k1_init_efx()
2002 VOLUME(icode, &ptr, playback + z, z, gpr + z); in _snd_emu10k1_init_efx()
2008 VOLUME(icode, &ptr, playback + 2 + z, z, gpr + z); in _snd_emu10k1_init_efx()
2013 OP(icode, &ptr, iACC3, GPR(tmp + 0), FXBUS(FXBUS_PCM_LEFT), FXBUS(FXBUS_PCM_RIGHT), C_00000000); in _snd_emu10k1_init_efx()
2014 OP(icode, &ptr, iMACINT0, GPR(tmp + 0), C_00000000, GPR(tmp + 0), C_00000002); in _snd_emu10k1_init_efx()
2015 VOLUME(icode, &ptr, playback + 4, tmp + 0, gpr); in _snd_emu10k1_init_efx()
2017 VOLUME(icode, &ptr, playback + 5, tmp + 0, gpr); in _snd_emu10k1_init_efx()
2022 SWITCH(icode, &ptr, tmp + 0, z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2023 VOLUME(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2031 VOLUME_ADD(icode, &ptr, playback + z, 2 + z, gpr + z); in _snd_emu10k1_init_efx()
2037 SWITCH(icode, &ptr, tmp + 0, 2 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2038 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2046 VOLUME_ADD(icode, &ptr, playback + 2 + z, 4 + z, gpr + z); in _snd_emu10k1_init_efx()
2052 SWITCH(icode, &ptr, tmp + 0, 4 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2053 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2060 VOLUME_ADD(icode, &ptr, playback + 4, 6, gpr); in _snd_emu10k1_init_efx()
2064 VOLUME_ADD(icode, &ptr, playback + 5, 7, gpr); in _snd_emu10k1_init_efx()
2069 VOLUME_ADD(icode, &ptr, playback + z, 10 + z, gpr + z); in _snd_emu10k1_init_efx()
2075 SWITCH(icode, &ptr, tmp + 0, 10 + z, gpr + 2); in _snd_emu10k1_init_efx()
2076 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2088 VOLUME_ADDIN(icode, &ptr, playback + 0, EXTIN_AC97_L, gpr); gpr++; in _snd_emu10k1_init_efx()
2089 VOLUME_ADDIN(icode, &ptr, playback + 1, EXTIN_AC97_R, gpr); gpr++; in _snd_emu10k1_init_efx()
2092 VOLUME_ADDIN(icode, &ptr, capture + 0, EXTIN_AC97_L, gpr); gpr++; in _snd_emu10k1_init_efx()
2093 VOLUME_ADDIN(icode, &ptr, capture + 1, EXTIN_AC97_R, gpr); gpr++; in _snd_emu10k1_init_efx()
2100 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_SPDIF_CD_L + z, gpr + z); in _snd_emu10k1_init_efx()
2106 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_SPDIF_CD_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2107 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2117 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_ZOOM_L + z, gpr + z); in _snd_emu10k1_init_efx()
2123 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_ZOOM_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2124 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2134 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_TOSLINK_L + z, gpr + z); in _snd_emu10k1_init_efx()
2140 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_TOSLINK_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2141 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2151 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE1_L + z, gpr + z); in _snd_emu10k1_init_efx()
2157 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE1_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2158 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2168 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_COAX_SPDIF_L + z, gpr + z); in _snd_emu10k1_init_efx()
2174 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_COAX_SPDIF_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2175 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2185 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE2_L + z, gpr + z); in _snd_emu10k1_init_efx()
2192 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE2_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2193 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2205 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), GPR(playback + 0), C_000… in _snd_emu10k1_init_efx()
2206 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), GPR(playback + 1), C_000… in _snd_emu10k1_init_efx()
2207 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), GPR(playback + 2), C_000… in _snd_emu10k1_init_efx()
2208 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), GPR(playback + 3), C_000… in _snd_emu10k1_init_efx()
2209 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), GPR(playback + 4), C_000… in _snd_emu10k1_init_efx()
2210 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), GPR(playback + 5), C_000… in _snd_emu10k1_init_efx()
2250 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(d), GPR(BASS_GPR + 0 + j)); in _snd_emu10k1_init_efx()
2251 OP(icode, &ptr, iMACMV, GPR(k+1), GPR(k), GPR(k+1), GPR(BASS_GPR + 4 + j)); in _snd_emu10k1_init_efx()
2252 OP(icode, &ptr, iMACMV, GPR(k), GPR(d), GPR(k), GPR(BASS_GPR + 2 + j)); in _snd_emu10k1_init_efx()
2253 OP(icode, &ptr, iMACMV, GPR(k+3), GPR(k+2), GPR(k+3), GPR(BASS_GPR + 8 + j)); in _snd_emu10k1_init_efx()
2254 OP(icode, &ptr, iMAC0, GPR(k+2), GPR_ACCU, GPR(k+2), GPR(BASS_GPR + 6 + j)); in _snd_emu10k1_init_efx()
2255 OP(icode, &ptr, iACC3, GPR(k+2), GPR(k+2), GPR(k+2), C_00000000); in _snd_emu10k1_init_efx()
2257 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(k+2), GPR(TREBLE_GPR + 0 + j)); in _snd_emu10k1_init_efx()
2258 OP(icode, &ptr, iMACMV, GPR(l+1), GPR(l), GPR(l+1), GPR(TREBLE_GPR + 4 + j)); in _snd_emu10k1_init_efx()
2259 OP(icode, &ptr, iMACMV, GPR(l), GPR(k+2), GPR(l), GPR(TREBLE_GPR + 2 + j)); in _snd_emu10k1_init_efx()
2260 OP(icode, &ptr, iMACMV, GPR(l+3), GPR(l+2), GPR(l+3), GPR(TREBLE_GPR + 8 + j)); in _snd_emu10k1_init_efx()
2261 OP(icode, &ptr, iMAC0, GPR(l+2), GPR_ACCU, GPR(l+2), GPR(TREBLE_GPR + 6 + j)); in _snd_emu10k1_init_efx()
2262 OP(icode, &ptr, iMACINT0, GPR(l+2), C_00000000, GPR(l+2), C_00000010); in _snd_emu10k1_init_efx()
2264 OP(icode, &ptr, iACC3, GPR(d), GPR(l+2), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2276 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); in _snd_emu10k1_init_efx()
2277 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); in _snd_emu10k1_init_efx()
2278 SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); in _snd_emu10k1_init_efx()
2279 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), GPR(tmp + 0), GPR(tmp + … in _snd_emu10k1_init_efx()
2291 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z… in _snd_emu10k1_init_efx()
2298 SWITCH(icode, &ptr, tmp + 0, 8 + z, gpr + z); in _snd_emu10k1_init_efx()
2299 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); in _snd_emu10k1_init_efx()
2300 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_init_efx()
2301 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_TOSLINK_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2303 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2315 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2316 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 2 + z); in _snd_emu10k1_init_efx()
2317 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_init_efx()
2318 OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2319 VOLUME_OUT(icode, &ptr, EXTOUT_HEADPHONE_L + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2334 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2… in _snd_emu10k1_init_efx()
2338 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNEL… in _snd_emu10k1_init_efx()
2342 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + … in _snd_emu10k1_init_efx()
2343 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), … in _snd_emu10k1_init_efx()
2345 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + … in _snd_emu10k1_init_efx()
2346 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), … in _snd_emu10k1_init_efx()
2352 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5),… in _snd_emu10k1_init_efx()
2353 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_0… in _snd_emu10k1_init_efx()
2355 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1),… in _snd_emu10k1_init_efx()
2356 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_0… in _snd_emu10k1_init_efx()
2362 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(capture + z), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2366 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_MIC_CAP), GPR(capture + 2), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2379 OP(icode, &ptr, iACC3, FXBUS2(14), C_00000000, C_00000000, EXTIN(0)); in _snd_emu10k1_init_efx()
2380 OP(icode, &ptr, iACC3, FXBUS2(15), C_00000000, C_00000000, EXTIN(1)); in _snd_emu10k1_init_efx()
2381 OP(icode, &ptr, iACC3, FXBUS2(0), C_00000000, C_00000000, EXTIN(2)); in _snd_emu10k1_init_efx()
2382 OP(icode, &ptr, iACC3, FXBUS2(3), C_00000000, C_00000000, EXTIN(3)); in _snd_emu10k1_init_efx()
2384 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); in _snd_emu10k1_init_efx()
2387 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); in _snd_emu10k1_init_efx()
2404 OP(icode, &ptr, iACC3, C_00000000, C_00000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2408 icode->gpr_add_control_count = i; in _snd_emu10k1_init_efx()
2409 icode->gpr_add_controls = controls; in _snd_emu10k1_init_efx()
2411 err = snd_emu10k1_icode_poke(emu, icode, true); in _snd_emu10k1_init_efx()
2420 kfree(icode->gpr_map); in _snd_emu10k1_init_efx()
2422 kfree(icode); in _snd_emu10k1_init_efx()
2547 struct snd_emu10k1_fx8010_code *icode; in snd_emu10k1_fx8010_ioctl() local
2572 icode = memdup_user(argp, sizeof(*icode)); in snd_emu10k1_fx8010_ioctl()
2573 if (IS_ERR(icode)) in snd_emu10k1_fx8010_ioctl()
2574 return PTR_ERR(icode); in snd_emu10k1_fx8010_ioctl()
2575 res = snd_emu10k1_icode_poke(emu, icode, false); in snd_emu10k1_fx8010_ioctl()
2576 kfree(icode); in snd_emu10k1_fx8010_ioctl()
2579 icode = memdup_user(argp, sizeof(*icode)); in snd_emu10k1_fx8010_ioctl()
2580 if (IS_ERR(icode)) in snd_emu10k1_fx8010_ioctl()
2581 return PTR_ERR(icode); in snd_emu10k1_fx8010_ioctl()
2582 res = snd_emu10k1_icode_peek(emu, icode); in snd_emu10k1_fx8010_ioctl()
2583 if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) { in snd_emu10k1_fx8010_ioctl()
2584 kfree(icode); in snd_emu10k1_fx8010_ioctl()
2587 kfree(icode); in snd_emu10k1_fx8010_ioctl()