Lines Matching refs:icode
460 static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_write_op() argument
467 code = icode->code + (*ptr) * 2; in snd_emu10k1_write_op()
468 set_bit(*ptr, icode->code_valid); in snd_emu10k1_write_op()
474 #define OP(icode, ptr, op, r, a, x, y) \ argument
475 snd_emu10k1_write_op(icode, ptr, op, r, a, x, y)
477 static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_audigy_write_op() argument
484 code = icode->code + (*ptr) * 2; in snd_emu10k1_audigy_write_op()
485 set_bit(*ptr, icode->code_valid); in snd_emu10k1_audigy_write_op()
491 #define A_OP(icode, ptr, op, r, a, x, y) \ argument
492 snd_emu10k1_audigy_write_op(icode, ptr, op, r, a, x, y)
507 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_gpr_poke() argument
514 if (!test_bit(gpr, icode->gpr_valid)) in snd_emu10k1_gpr_poke()
517 val = icode->gpr_map[gpr]; in snd_emu10k1_gpr_poke()
518 else if (get_user(val, (__user u32 *)&icode->gpr_map[gpr])) in snd_emu10k1_gpr_poke()
526 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_gpr_peek() argument
532 set_bit(gpr, icode->gpr_valid); in snd_emu10k1_gpr_peek()
534 if (put_user(val, (__user u32 *)&icode->gpr_map[gpr])) in snd_emu10k1_gpr_peek()
541 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_tram_poke() argument
548 if (!test_bit(tram, icode->tram_valid)) in snd_emu10k1_tram_poke()
551 val = icode->tram_data_map[tram]; in snd_emu10k1_tram_poke()
552 addr = icode->tram_addr_map[tram]; in snd_emu10k1_tram_poke()
554 if (get_user(val, (__user __u32 *)&icode->tram_data_map[tram]) || in snd_emu10k1_tram_poke()
555 get_user(addr, (__user __u32 *)&icode->tram_addr_map[tram])) in snd_emu10k1_tram_poke()
570 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_tram_peek() argument
575 memset(icode->tram_valid, 0, sizeof(icode->tram_valid)); in snd_emu10k1_tram_peek()
577 set_bit(tram, icode->tram_valid); in snd_emu10k1_tram_peek()
585 if (put_user(val, (__user u32 *)&icode->tram_data_map[tram]) || in snd_emu10k1_tram_peek()
586 put_user(addr, (__user u32 *)&icode->tram_addr_map[tram])) in snd_emu10k1_tram_peek()
593 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_code_poke() argument
599 if (!test_bit(pc / 2, icode->code_valid)) in snd_emu10k1_code_poke()
602 lo = icode->code[pc + 0]; in snd_emu10k1_code_poke()
603 hi = icode->code[pc + 1]; in snd_emu10k1_code_poke()
605 if (get_user(lo, (__user u32 *)&icode->code[pc + 0]) || in snd_emu10k1_code_poke()
606 get_user(hi, (__user u32 *)&icode->code[pc + 1])) in snd_emu10k1_code_poke()
616 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_code_peek() argument
620 memset(icode->code_valid, 0, sizeof(icode->code_valid)); in snd_emu10k1_code_peek()
622 set_bit(pc / 2, icode->code_valid); in snd_emu10k1_code_peek()
624 (__user u32 *)&icode->code[pc + 0])) in snd_emu10k1_code_peek()
627 (__user u32 *)&icode->code[pc + 1])) in snd_emu10k1_code_peek()
737 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_verify_controls() argument
746 for (i = 0; i < icode->gpr_del_control_count; i++) { in snd_emu10k1_verify_controls()
747 err = copy_ctl_elem_id(icode->gpr_del_controls, i, &id, in snd_emu10k1_verify_controls()
758 for (i = 0; i < icode->gpr_add_control_count; i++) { in snd_emu10k1_verify_controls()
759 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_verify_controls()
780 for (i = 0; i < icode->gpr_list_control_count; i++) { in snd_emu10k1_verify_controls()
782 if (copy_gctl(emu, gctl, icode->gpr_list_controls, i, in snd_emu10k1_verify_controls()
805 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_add_controls() argument
825 for (i = 0; i < icode->gpr_add_control_count; i++) { in snd_emu10k1_add_controls()
826 if (copy_gctl(emu, gctl, icode->gpr_add_controls, i, in snd_emu10k1_add_controls()
903 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_del_controls() argument
912 for (i = 0; i < icode->gpr_del_control_count; i++) { in snd_emu10k1_del_controls()
913 err = copy_ctl_elem_id(icode->gpr_del_controls, i, &id, in snd_emu10k1_del_controls()
927 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_list_controls() argument
941 if (icode->gpr_list_controls && in snd_emu10k1_list_controls()
942 i < icode->gpr_list_control_count) { in snd_emu10k1_list_controls()
959 if (copy_gctl_to_user(emu, icode->gpr_list_controls, in snd_emu10k1_list_controls()
967 icode->gpr_list_control_total = total; in snd_emu10k1_list_controls()
973 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_icode_poke() argument
979 err = snd_emu10k1_verify_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
982 strscpy(emu->fx8010.name, icode->name, sizeof(emu->fx8010.name)); in snd_emu10k1_icode_poke()
990 err = snd_emu10k1_del_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
993 err = snd_emu10k1_gpr_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
996 err = snd_emu10k1_tram_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
999 err = snd_emu10k1_code_poke(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
1002 err = snd_emu10k1_add_controls(emu, icode, in_kernel); in snd_emu10k1_icode_poke()
1016 struct snd_emu10k1_fx8010_code *icode) in snd_emu10k1_icode_peek() argument
1021 strscpy(icode->name, emu->fx8010.name, sizeof(icode->name)); in snd_emu10k1_icode_peek()
1023 err = snd_emu10k1_gpr_peek(emu, icode); in snd_emu10k1_icode_peek()
1025 err = snd_emu10k1_tram_peek(emu, icode); in snd_emu10k1_icode_peek()
1027 err = snd_emu10k1_code_peek(emu, icode); in snd_emu10k1_icode_peek()
1029 err = snd_emu10k1_list_controls(emu, icode); in snd_emu10k1_icode_peek()
1195 struct snd_emu10k1_fx8010_code *icode, in snd_emu10k1_audigy_dsp_convert_32_to_2x16() argument
1199 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()
1200 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()
1201 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()
1202 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()
1203 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()
1204 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()
1205 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()
1206 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()
1223 struct snd_emu10k1_fx8010_code *icode = NULL; in _snd_emu10k1_audigy_init_efx() local
1228 icode = kzalloc(sizeof(*icode), GFP_KERNEL); in _snd_emu10k1_audigy_init_efx()
1229 if (!icode) in _snd_emu10k1_audigy_init_efx()
1232 icode->gpr_map = kcalloc(512 + 256 + 256 + 2 * 1024, in _snd_emu10k1_audigy_init_efx()
1234 if (!icode->gpr_map) in _snd_emu10k1_audigy_init_efx()
1241 gpr_map = icode->gpr_map; in _snd_emu10k1_audigy_init_efx()
1243 icode->tram_data_map = icode->gpr_map + 512; in _snd_emu10k1_audigy_init_efx()
1244 icode->tram_addr_map = icode->tram_data_map + 256; in _snd_emu10k1_audigy_init_efx()
1245 icode->code = icode->tram_addr_map + 256; in _snd_emu10k1_audigy_init_efx()
1249 set_bit(i, icode->gpr_valid); in _snd_emu10k1_audigy_init_efx()
1253 set_bit(i, icode->tram_valid); in _snd_emu10k1_audigy_init_efx()
1255 strcpy(icode->name, "Audigy DSP code for ALSA"); in _snd_emu10k1_audigy_init_efx()
1273 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()
1274 …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()
1279 …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()
1280 …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()
1286 …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()
1287 …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()
1293 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()
1298 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()
1306 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()
1307 …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()
1312 …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()
1313 …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()
1318 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()
1319 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()
1324 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()
1325 …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()
1333 A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input)) in _snd_emu10k1_audigy_init_efx()
1339 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1340 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()
1341 A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x1), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1342 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()
1344 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()
1345 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()
1362 …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()
1432 A_OP(icode, &ptr, iMAC0, A_GPR(playback), A_GPR(playback), A_GPR(gpr), A_GPR(stereo_mix)); in _snd_emu10k1_audigy_init_efx()
1433 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()
1438 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()
1439 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()
1445 A_OP(icode, &ptr, iINTERP, A_GPR(tmp), A_GPR(stereo_mix), 0xcd, A_GPR(stereo_mix+1)); in _snd_emu10k1_audigy_init_efx()
1446 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()
1451 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()
1457 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()
1458 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()
1466 #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()
1470 #define _A_SWITCH(icode, ptr, dst, src, sw) \ in _snd_emu10k1_audigy_init_efx() argument
1471 A_OP((icode), ptr, iMACINT0, dst, A_C_00000000, src, sw); in _snd_emu10k1_audigy_init_efx()
1472 #define A_SWITCH(icode, ptr, dst, src, sw) \ in _snd_emu10k1_audigy_init_efx() argument
1473 _A_SWITCH(icode, ptr, A_GPR(dst), A_GPR(src), A_GPR(sw)) in _snd_emu10k1_audigy_init_efx()
1474 #define _A_SWITCH_NEG(icode, ptr, dst, src) \ in _snd_emu10k1_audigy_init_efx() argument
1475 A_OP((icode), ptr, iANDXOR, dst, src, A_C_00000001, A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1476 #define A_SWITCH_NEG(icode, ptr, dst, src) \ in _snd_emu10k1_audigy_init_efx() argument
1477 _A_SWITCH_NEG(icode, ptr, A_GPR(dst), A_GPR(src)) in _snd_emu10k1_audigy_init_efx()
1483 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), A_GPR(playback + 0),… in _snd_emu10k1_audigy_init_efx()
1484 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), A_GPR(playback + 1),… in _snd_emu10k1_audigy_init_efx()
1485 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), A_GPR(playback + 2),… in _snd_emu10k1_audigy_init_efx()
1486 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), A_GPR(playback + 3),… in _snd_emu10k1_audigy_init_efx()
1487 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), A_GPR(playback + 4),… in _snd_emu10k1_audigy_init_efx()
1488 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), A_GPR(playback + 5),… in _snd_emu10k1_audigy_init_efx()
1490 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 6), A_GPR(playback + 6),… in _snd_emu10k1_audigy_init_efx()
1491 …A_OP(icode, &ptr, iACC3, A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 7), A_GPR(playback + 7),… in _snd_emu10k1_audigy_init_efx()
1531 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()
1532 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()
1533 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()
1534 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()
1535 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()
1536 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()
1538 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()
1539 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()
1540 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()
1541 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()
1542 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()
1543 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()
1545 A_OP(icode, &ptr, iACC3, A_GPR(d), A_GPR(l+2), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1557 A_SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); in _snd_emu10k1_audigy_init_efx()
1558 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); in _snd_emu10k1_audigy_init_efx()
1559 A_SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); in _snd_emu10k1_audigy_init_efx()
1560 …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()
1566 …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()
1567 …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()
1568 …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()
1569 …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()
1570 …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()
1571 …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()
1572 …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()
1573 …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()
1595 …A_OP(icode, &ptr, iACC3, A3_EMU32OUT(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_… in _snd_emu10k1_audigy_init_efx()
1597 …A_OP(icode, &ptr, iACC3, A_EMU32OUTL(z), A_GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), A_C_… in _snd_emu10k1_audigy_init_efx()
1607 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()
1608 A_OP(icode, &ptr, iSKIP, A_GPR_COND, A_GPR_COND, A_GPR(gpr - 2), A_C_00000001); in _snd_emu10k1_audigy_init_efx()
1609 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()
1610 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()
1611 A_SWITCH(icode, &ptr, tmp + 0, tmp + 2, gpr + z); in _snd_emu10k1_audigy_init_efx()
1612 A_SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); in _snd_emu10k1_audigy_init_efx()
1613 A_SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_audigy_init_efx()
1619 …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()
1620 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()
1622 …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()
1644 snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1662 …snd_emu10k1_audigy_dsp_convert_32_to_2x16( icode, &ptr, tmp, bit_shifter16, A_P16VIN(0x0), A_FXBUS… 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(0x1), 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(0x2), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1676 …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()
1677 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x3), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1681 …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()
1682 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x4), 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(0x5), 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(0x6), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1691 …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()
1692 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x7), A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1698 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1702 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x8), in _snd_emu10k1_audigy_init_efx()
1705 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1709 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0x9), in _snd_emu10k1_audigy_init_efx()
1712 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1716 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xa), in _snd_emu10k1_audigy_init_efx()
1719 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1723 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xb), in _snd_emu10k1_audigy_init_efx()
1726 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1730 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xc), in _snd_emu10k1_audigy_init_efx()
1733 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1737 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xd), in _snd_emu10k1_audigy_init_efx()
1740 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1744 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xe), in _snd_emu10k1_audigy_init_efx()
1747 snd_emu10k1_audigy_dsp_convert_32_to_2x16(icode, &ptr, tmp, in _snd_emu10k1_audigy_init_efx()
1751 A_OP(icode, &ptr, iACC3, A_GPR(gpr - 1), A_P16VIN(0xf), 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()
1760 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_C_00000000); in _snd_emu10k1_audigy_init_efx()
1767 A_OP(icode, &ptr, iACC3, A_FXBUS2(z), A_C_00000000, A_C_00000000, A_EXTIN(z)); in _snd_emu10k1_audigy_init_efx()
1783 A_OP(icode, &ptr, 0x0f, 0xc0, 0xc0, 0xcf, 0xc0); in _snd_emu10k1_audigy_init_efx()
1785 icode->gpr_add_control_count = nctl; in _snd_emu10k1_audigy_init_efx()
1786 icode->gpr_add_controls = controls; in _snd_emu10k1_audigy_init_efx()
1788 err = snd_emu10k1_icode_poke(emu, icode, true); in _snd_emu10k1_audigy_init_efx()
1794 kfree(icode->gpr_map); in _snd_emu10k1_audigy_init_efx()
1796 kfree(icode); in _snd_emu10k1_audigy_init_efx()
1807 static void _volume(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume() argument
1809 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); in _volume()
1810 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume()
1811 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000001); in _volume()
1812 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); in _volume()
1814 static void _volume_add(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume_add() argument
1816 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume_add()
1817 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _volume_add()
1818 OP(icode, ptr, iMACINT0, dst, dst, src, C_00000001); in _volume_add()
1819 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); in _volume_add()
1820 OP(icode, ptr, iMAC0, dst, dst, src, vol); in _volume_add()
1822 static void _volume_out(struct snd_emu10k1_fx8010_code *icode, u32 *ptr, u32 dst, u32 src, u32 vol) in _volume_out() argument
1824 OP(icode, ptr, iANDXOR, C_00000000, vol, C_ffffffff, C_7fffffff); in _volume_out()
1825 OP(icode, ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _volume_out()
1826 OP(icode, ptr, iACC3, dst, src, C_00000000, C_00000000); in _volume_out()
1827 OP(icode, ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000001); in _volume_out()
1828 OP(icode, ptr, iMAC0, dst, C_00000000, src, vol); in _volume_out()
1831 #define VOLUME(icode, ptr, dst, src, vol) \ argument
1832 _volume(icode, ptr, GPR(dst), GPR(src), GPR(vol))
1833 #define VOLUME_IN(icode, ptr, dst, src, vol) \ argument
1834 _volume(icode, ptr, GPR(dst), EXTIN(src), GPR(vol))
1835 #define VOLUME_ADD(icode, ptr, dst, src, vol) \ argument
1836 _volume_add(icode, ptr, GPR(dst), GPR(src), GPR(vol))
1837 #define VOLUME_ADDIN(icode, ptr, dst, src, vol) \ argument
1838 _volume_add(icode, ptr, GPR(dst), EXTIN(src), GPR(vol))
1839 #define VOLUME_OUT(icode, ptr, dst, src, vol) \ argument
1840 _volume_out(icode, ptr, EXTOUT(dst), GPR(src), GPR(vol))
1841 #define _SWITCH(icode, ptr, dst, src, sw) \ argument
1842 OP((icode), ptr, iMACINT0, dst, C_00000000, src, sw);
1843 #define SWITCH(icode, ptr, dst, src, sw) \ argument
1844 _SWITCH(icode, ptr, GPR(dst), GPR(src), GPR(sw))
1845 #define SWITCH_IN(icode, ptr, dst, src, sw) \ argument
1846 _SWITCH(icode, ptr, GPR(dst), EXTIN(src), GPR(sw))
1847 #define _SWITCH_NEG(icode, ptr, dst, src) \ argument
1848 OP((icode), ptr, iANDXOR, dst, src, C_00000001, C_00000001);
1849 #define SWITCH_NEG(icode, ptr, dst, src) \ argument
1850 _SWITCH_NEG(icode, ptr, GPR(dst), GPR(src))
1857 struct snd_emu10k1_fx8010_code *icode; in _snd_emu10k1_init_efx() local
1863 icode = kzalloc(sizeof(*icode), GFP_KERNEL); in _snd_emu10k1_init_efx()
1864 if (!icode) in _snd_emu10k1_init_efx()
1867 icode->gpr_map = kcalloc(256 + 160 + 160 + 2 * 512, in _snd_emu10k1_init_efx()
1869 if (!icode->gpr_map) in _snd_emu10k1_init_efx()
1882 gpr_map = icode->gpr_map; in _snd_emu10k1_init_efx()
1884 icode->tram_data_map = icode->gpr_map + 256; in _snd_emu10k1_init_efx()
1885 icode->tram_addr_map = icode->tram_data_map + 160; in _snd_emu10k1_init_efx()
1886 icode->code = icode->tram_addr_map + 160; in _snd_emu10k1_init_efx()
1890 set_bit(i, icode->gpr_valid); in _snd_emu10k1_init_efx()
1894 set_bit(i, icode->tram_valid); in _snd_emu10k1_init_efx()
1896 strcpy(icode->name, "SB Live! FX8010 code for ALSA v1.2 by Jaroslav Kysela"); in _snd_emu10k1_init_efx()
1912 OP(icode, &ptr, iMACINT0, GPR(0), C_00000000, FXBUS(FXBUS_PCM_LEFT), C_00000004); in _snd_emu10k1_init_efx()
1913 OP(icode, &ptr, iMACINT0, GPR(1), C_00000000, FXBUS(FXBUS_PCM_RIGHT), C_00000004); in _snd_emu10k1_init_efx()
1914 OP(icode, &ptr, iMACINT0, GPR(2), C_00000000, FXBUS(FXBUS_MIDI_LEFT), C_00000004); in _snd_emu10k1_init_efx()
1915 OP(icode, &ptr, iMACINT0, GPR(3), C_00000000, FXBUS(FXBUS_MIDI_RIGHT), C_00000004); in _snd_emu10k1_init_efx()
1916 OP(icode, &ptr, iMACINT0, GPR(4), C_00000000, FXBUS(FXBUS_PCM_LEFT_REAR), C_00000004); in _snd_emu10k1_init_efx()
1917 OP(icode, &ptr, iMACINT0, GPR(5), C_00000000, FXBUS(FXBUS_PCM_RIGHT_REAR), C_00000004); in _snd_emu10k1_init_efx()
1918 OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(FXBUS_PCM_CENTER), C_00000004); in _snd_emu10k1_init_efx()
1919 OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(FXBUS_PCM_LFE), C_00000004); in _snd_emu10k1_init_efx()
1920 OP(icode, &ptr, iMACINT0, GPR(8), C_00000000, C_00000000, C_00000000); /* S/PDIF left */ in _snd_emu10k1_init_efx()
1921 OP(icode, &ptr, iMACINT0, GPR(9), C_00000000, C_00000000, C_00000000); /* S/PDIF right */ in _snd_emu10k1_init_efx()
1922 OP(icode, &ptr, iMACINT0, GPR(10), C_00000000, FXBUS(FXBUS_PCM_LEFT_FRONT), C_00000004); in _snd_emu10k1_init_efx()
1923 OP(icode, &ptr, iMACINT0, GPR(11), C_00000000, FXBUS(FXBUS_PCM_RIGHT_FRONT), C_00000004); in _snd_emu10k1_init_efx()
1954 /* 00: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_trigger), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1955 /* 01: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_ZERO, GPR(gpr + 6)); in _snd_emu10k1_init_efx()
1957 /* 02: */ OP(icode, &ptr, iMAC0, C_00000000, GPR(ipcm->gpr_running), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1958 /* 03: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000004); in _snd_emu10k1_init_efx()
1960 /* 04: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), GPR_DBAC, GPR(gpr + 4), C_00000000); in _snd_emu10k1_init_efx()
1961 /* 05: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(gpr + 5)); in _snd_emu10k1_init_efx()
1962 /* 06: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 7)); in _snd_emu10k1_init_efx()
1963 /* 07: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000010, C_00000001, C_00000000); in _snd_emu10k1_init_efx()
1965 …/* 08: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000000, C_0… in _snd_emu10k1_init_efx()
1966 /* 09: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), GPR(gpr + 12), C_ffffffff, C_00000000); in _snd_emu10k1_init_efx()
1967 /* 0a: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, GPR(gpr + 11)); in _snd_emu10k1_init_efx()
1968 /* 0b: */ OP(icode, &ptr, iACC3, GPR(gpr + 12), C_00000001, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1970 …/* 0c: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[0]), GPR(gpr + 0), C_00000… in _snd_emu10k1_init_efx()
1971 /* 0d: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); in _snd_emu10k1_init_efx()
1972 /* 0e: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1973 /* 0f: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1974 /* 10: */ OP(icode, &ptr, iANDXOR, GPR(8), GPR(8), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1976 …/* 11: */ OP(icode, &ptr, iANDXOR, GPR(tmp + 0), ETRAM_DATA(ipcm->etram[1]), GPR(gpr + 0), C_00000… in _snd_emu10k1_init_efx()
1977 /* 12: */ OP(icode, &ptr, iLOG, GPR(tmp + 0), GPR(tmp + 0), GPR(gpr + 3), C_00000000); in _snd_emu10k1_init_efx()
1978 /* 13: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(tmp + 0), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1979 /* 14: */ OP(icode, &ptr, iSKIP, C_00000000, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1980 /* 15: */ OP(icode, &ptr, iANDXOR, GPR(9), GPR(9), GPR(gpr + 1), GPR(gpr + 2)); in _snd_emu10k1_init_efx()
1982 /* 16: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(ipcm->gpr_ptr), C_00000001, C_00000000); in _snd_emu10k1_init_efx()
1983 /* 17: */ OP(icode, &ptr, iMACINT0, C_00000000, GPR(tmp + 0), C_ffffffff, GPR(ipcm->gpr_size)); in _snd_emu10k1_init_efx()
1984 /* 18: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_MINUS, C_00000001); in _snd_emu10k1_init_efx()
1985 /* 19: */ OP(icode, &ptr, iACC3, GPR(tmp + 0), C_00000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1986 /* 1a: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_ptr), GPR(tmp + 0), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1988 …/* 1b: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_tmpcount), C_ffffffff, C_0… in _snd_emu10k1_init_efx()
1989 /* 1c: */ OP(icode, &ptr, iSKIP, GPR_COND, GPR_COND, CC_REG_NONZERO, C_00000002); in _snd_emu10k1_init_efx()
1990 …/* 1d: */ OP(icode, &ptr, iACC3, GPR(ipcm->gpr_tmpcount), GPR(ipcm->gpr_count), C_00000000, C_0000… in _snd_emu10k1_init_efx()
1991 /* 1e: */ OP(icode, &ptr, iACC3, GPR_IRQ, C_80000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
1992 …/* 1f: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00000001, C_0… in _snd_emu10k1_init_efx()
1994 …/* 20: */ OP(icode, &ptr, iANDXOR, GPR(ipcm->gpr_running), GPR(ipcm->gpr_running), C_00010000, C_0… in _snd_emu10k1_init_efx()
1995 /* 21: */ OP(icode, &ptr, iSKIP, C_00000000, C_7fffffff, C_7fffffff, C_00000002); in _snd_emu10k1_init_efx()
1997 …/* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]), GPR(gpr + 8), GPR_DBAC, C_ffffffff… in _snd_emu10k1_init_efx()
1998 …/* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]), GPR(gpr + 9), GPR_DBAC, C_ffffffff… in _snd_emu10k1_init_efx()
2005 VOLUME(icode, &ptr, playback + z, z, gpr + z); in _snd_emu10k1_init_efx()
2011 VOLUME(icode, &ptr, playback + 2 + z, z, gpr + z); in _snd_emu10k1_init_efx()
2016 OP(icode, &ptr, iACC3, GPR(tmp + 0), FXBUS(FXBUS_PCM_LEFT), FXBUS(FXBUS_PCM_RIGHT), C_00000000); in _snd_emu10k1_init_efx()
2017 OP(icode, &ptr, iMACINT0, GPR(tmp + 0), C_00000000, GPR(tmp + 0), C_00000002); in _snd_emu10k1_init_efx()
2018 VOLUME(icode, &ptr, playback + 4, tmp + 0, gpr); in _snd_emu10k1_init_efx()
2020 VOLUME(icode, &ptr, playback + 5, tmp + 0, gpr); in _snd_emu10k1_init_efx()
2025 SWITCH(icode, &ptr, tmp + 0, z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2026 VOLUME(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2034 VOLUME_ADD(icode, &ptr, playback + z, 2 + z, gpr + z); in _snd_emu10k1_init_efx()
2040 SWITCH(icode, &ptr, tmp + 0, 2 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2041 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2049 VOLUME_ADD(icode, &ptr, playback + 2 + z, 4 + z, gpr + z); in _snd_emu10k1_init_efx()
2055 SWITCH(icode, &ptr, tmp + 0, 4 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2056 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2063 VOLUME_ADD(icode, &ptr, playback + 4, 6, gpr); in _snd_emu10k1_init_efx()
2067 VOLUME_ADD(icode, &ptr, playback + 5, 7, gpr); in _snd_emu10k1_init_efx()
2072 VOLUME_ADD(icode, &ptr, playback + z, 10 + z, gpr + z); in _snd_emu10k1_init_efx()
2078 SWITCH(icode, &ptr, tmp + 0, 10 + z, gpr + 2); in _snd_emu10k1_init_efx()
2079 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2091 VOLUME_ADDIN(icode, &ptr, playback + 0, EXTIN_AC97_L, gpr); gpr++; in _snd_emu10k1_init_efx()
2092 VOLUME_ADDIN(icode, &ptr, playback + 1, EXTIN_AC97_R, gpr); gpr++; in _snd_emu10k1_init_efx()
2095 VOLUME_ADDIN(icode, &ptr, capture + 0, EXTIN_AC97_L, gpr); gpr++; in _snd_emu10k1_init_efx()
2096 VOLUME_ADDIN(icode, &ptr, capture + 1, EXTIN_AC97_R, gpr); gpr++; in _snd_emu10k1_init_efx()
2103 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_SPDIF_CD_L + z, gpr + z); in _snd_emu10k1_init_efx()
2109 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_SPDIF_CD_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2110 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2120 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_ZOOM_L + z, gpr + z); in _snd_emu10k1_init_efx()
2126 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_ZOOM_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2127 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2137 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_TOSLINK_L + z, gpr + z); in _snd_emu10k1_init_efx()
2143 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_TOSLINK_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2144 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2154 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE1_L + z, gpr + z); in _snd_emu10k1_init_efx()
2160 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE1_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2161 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2171 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_COAX_SPDIF_L + z, gpr + z); in _snd_emu10k1_init_efx()
2177 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_COAX_SPDIF_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2178 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2188 VOLUME_ADDIN(icode, &ptr, playback + z, EXTIN_LINE2_L + z, gpr + z); in _snd_emu10k1_init_efx()
2195 SWITCH_IN(icode, &ptr, tmp + 0, EXTIN_LINE2_L + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2196 VOLUME_ADD(icode, &ptr, capture + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2208 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), GPR(playback + 0), C_000… in _snd_emu10k1_init_efx()
2209 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), GPR(playback + 1), C_000… in _snd_emu10k1_init_efx()
2210 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2), GPR(playback + 2), C_000… in _snd_emu10k1_init_efx()
2211 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 3), GPR(playback + 3), C_000… in _snd_emu10k1_init_efx()
2212 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4), GPR(playback + 4), C_000… in _snd_emu10k1_init_efx()
2213 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), GPR(playback + 5), C_000… in _snd_emu10k1_init_efx()
2253 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(d), GPR(BASS_GPR + 0 + j)); in _snd_emu10k1_init_efx()
2254 OP(icode, &ptr, iMACMV, GPR(k+1), GPR(k), GPR(k+1), GPR(BASS_GPR + 4 + j)); in _snd_emu10k1_init_efx()
2255 OP(icode, &ptr, iMACMV, GPR(k), GPR(d), GPR(k), GPR(BASS_GPR + 2 + j)); in _snd_emu10k1_init_efx()
2256 OP(icode, &ptr, iMACMV, GPR(k+3), GPR(k+2), GPR(k+3), GPR(BASS_GPR + 8 + j)); in _snd_emu10k1_init_efx()
2257 OP(icode, &ptr, iMAC0, GPR(k+2), GPR_ACCU, GPR(k+2), GPR(BASS_GPR + 6 + j)); in _snd_emu10k1_init_efx()
2258 OP(icode, &ptr, iACC3, GPR(k+2), GPR(k+2), GPR(k+2), C_00000000); in _snd_emu10k1_init_efx()
2260 OP(icode, &ptr, iMAC0, C_00000000, C_00000000, GPR(k+2), GPR(TREBLE_GPR + 0 + j)); in _snd_emu10k1_init_efx()
2261 OP(icode, &ptr, iMACMV, GPR(l+1), GPR(l), GPR(l+1), GPR(TREBLE_GPR + 4 + j)); in _snd_emu10k1_init_efx()
2262 OP(icode, &ptr, iMACMV, GPR(l), GPR(k+2), GPR(l), GPR(TREBLE_GPR + 2 + j)); in _snd_emu10k1_init_efx()
2263 OP(icode, &ptr, iMACMV, GPR(l+3), GPR(l+2), GPR(l+3), GPR(TREBLE_GPR + 8 + j)); in _snd_emu10k1_init_efx()
2264 OP(icode, &ptr, iMAC0, GPR(l+2), GPR_ACCU, GPR(l+2), GPR(TREBLE_GPR + 6 + j)); in _snd_emu10k1_init_efx()
2265 OP(icode, &ptr, iMACINT0, GPR(l+2), C_00000000, GPR(l+2), C_00000010); in _snd_emu10k1_init_efx()
2267 OP(icode, &ptr, iACC3, GPR(d), GPR(l+2), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2279 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, gpr + 0); in _snd_emu10k1_init_efx()
2280 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 0); in _snd_emu10k1_init_efx()
2281 SWITCH(icode, &ptr, tmp + 1, playback + z, tmp + 1); in _snd_emu10k1_init_efx()
2282 …OP(icode, &ptr, iACC3, GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z), GPR(tmp + 0), GPR(tmp + … in _snd_emu10k1_init_efx()
2294 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + z… in _snd_emu10k1_init_efx()
2301 SWITCH(icode, &ptr, tmp + 0, 8 + z, gpr + z); in _snd_emu10k1_init_efx()
2302 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + z); in _snd_emu10k1_init_efx()
2303 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_init_efx()
2304 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_TOSLINK_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2306 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2318 SWITCH(icode, &ptr, tmp + 0, playback + SND_EMU10K1_PLAYBACK_CHANNELS + 4 + z, gpr + 2 + z); in _snd_emu10k1_init_efx()
2319 SWITCH_NEG(icode, &ptr, tmp + 1, gpr + 2 + z); in _snd_emu10k1_init_efx()
2320 SWITCH(icode, &ptr, tmp + 1, playback + SND_EMU10K1_PLAYBACK_CHANNELS + z, tmp + 1); in _snd_emu10k1_init_efx()
2321 OP(icode, &ptr, iACC3, GPR(tmp + 0), GPR(tmp + 0), GPR(tmp + 1), C_00000000); in _snd_emu10k1_init_efx()
2322 VOLUME_OUT(icode, &ptr, EXTOUT_HEADPHONE_L + z, tmp + 0, gpr + z); in _snd_emu10k1_init_efx()
2337 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 2… in _snd_emu10k1_init_efx()
2341 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_REAR_L + z), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNEL… 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 + 4), … in _snd_emu10k1_init_efx()
2348 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_CENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + … in _snd_emu10k1_init_efx()
2349 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ACENTER), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 0), … in _snd_emu10k1_init_efx()
2355 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5),… in _snd_emu10k1_init_efx()
2356 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 5), C_0… in _snd_emu10k1_init_efx()
2358 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_AC97_LFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1),… in _snd_emu10k1_init_efx()
2359 …OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ALFE), GPR(playback + SND_EMU10K1_PLAYBACK_CHANNELS + 1), C_0… in _snd_emu10k1_init_efx()
2365 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_ADC_CAP_L + z), GPR(capture + z), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2369 OP(icode, &ptr, iACC3, EXTOUT(EXTOUT_MIC_CAP), GPR(capture + 2), C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2382 OP(icode, &ptr, iACC3, FXBUS2(14), C_00000000, C_00000000, EXTIN(0)); in _snd_emu10k1_init_efx()
2383 OP(icode, &ptr, iACC3, FXBUS2(15), C_00000000, C_00000000, EXTIN(1)); in _snd_emu10k1_init_efx()
2384 OP(icode, &ptr, iACC3, FXBUS2(0), C_00000000, C_00000000, EXTIN(2)); in _snd_emu10k1_init_efx()
2385 OP(icode, &ptr, iACC3, FXBUS2(3), C_00000000, C_00000000, EXTIN(3)); in _snd_emu10k1_init_efx()
2387 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); in _snd_emu10k1_init_efx()
2390 OP(icode, &ptr, iACC3, FXBUS2(z), C_00000000, C_00000000, EXTIN(z)); in _snd_emu10k1_init_efx()
2407 OP(icode, &ptr, iACC3, C_00000000, C_00000000, C_00000000, C_00000000); in _snd_emu10k1_init_efx()
2412 icode->gpr_add_control_count = i; in _snd_emu10k1_init_efx()
2413 icode->gpr_add_controls = controls; in _snd_emu10k1_init_efx()
2415 err = snd_emu10k1_icode_poke(emu, icode, true); in _snd_emu10k1_init_efx()
2424 kfree(icode->gpr_map); in _snd_emu10k1_init_efx()
2426 kfree(icode); in _snd_emu10k1_init_efx()
2551 struct snd_emu10k1_fx8010_code *icode; in snd_emu10k1_fx8010_ioctl() local
2576 icode = memdup_user(argp, sizeof(*icode)); in snd_emu10k1_fx8010_ioctl()
2577 if (IS_ERR(icode)) in snd_emu10k1_fx8010_ioctl()
2578 return PTR_ERR(icode); in snd_emu10k1_fx8010_ioctl()
2579 res = snd_emu10k1_icode_poke(emu, icode, false); in snd_emu10k1_fx8010_ioctl()
2580 kfree(icode); in snd_emu10k1_fx8010_ioctl()
2583 icode = memdup_user(argp, sizeof(*icode)); in snd_emu10k1_fx8010_ioctl()
2584 if (IS_ERR(icode)) in snd_emu10k1_fx8010_ioctl()
2585 return PTR_ERR(icode); in snd_emu10k1_fx8010_ioctl()
2586 res = snd_emu10k1_icode_peek(emu, icode); in snd_emu10k1_fx8010_ioctl()
2587 if (res == 0 && copy_to_user(argp, icode, sizeof(*icode))) { in snd_emu10k1_fx8010_ioctl()
2588 kfree(icode); in snd_emu10k1_fx8010_ioctl()
2591 kfree(icode); in snd_emu10k1_fx8010_ioctl()