#define AX_SYNC_NONEWPARAMS 0x00000000 #define AX_SYNC_USER_SRCSELECT 0x00000001 #define AX_SYNC_USER_MIXCTRL 0x00000002 #define AX_SYNC_USER_STATE 0x00000004 #define AX_SYNC_USER_TYPE 0x00000008 #define AX_SYNC_USER_MIX 0x00000010 #define AX_SYNC_USER_ITD 0x00000020 #define AX_SYNC_USER_ITDTARGET 0x00000040 #define AX_SYNC_USER_UPDATE 0x00000080 #define AX_SYNC_USER_DPOP 0x00000100 #define AX_SYNC_USER_VE 0x00000200 #define AX_SYNC_USER_VEDELTA 0x00000400 #define AX_SYNC_USER_ADDR 0x00000800 #define AX_SYNC_USER_LOOP 0x00001000 #define AX_SYNC_USER_LOOPADDR 0x00002000 #define AX_SYNC_USER_ENDADDR 0x00004000 #define AX_SYNC_USER_CURRADDR 0x00008000 #define AX_SYNC_USER_ADPCM 0x00010000 #define AX_SYNC_USER_SRC 0x00020000 #define AX_SYNC_USER_SRCRATIO 0x00040000 #define AX_SYNC_USER_ADPCMLOOP 0x00080000 #define AX_SYNC_USER_LPF 0x00100000 #define AX_SYNC_USER_LPF_COEF 0x00200000 #define AX_SYNC_USER_HPF 0x00400000 #define AX_SYNC_USER_HPF_COEF 0x00800000 #define AX_SYNC_USER_REMOTE 0x01000000 #define AX_SYNC_USER_RMTMIXCTRL 0x02000000 #define AX_SYNC_USER_RMTMIX 0x04000000 #define AX_SYNC_USER_RMTDPOP 0x08000000 #define AX_SYNC_USER_RMTSRC 0x10000000 #define AX_SYNC_USER_ALLPARAMS 0x80000000 u32 sync;
The sync parameter controls synchronization between an application and the DSP parameter blocks. When calling the AXSetVoice*() functions, the appropriate sync flags are asserted automatically. If the application modifies the parameter block values directly, the application is responsible for setting the appropriate sync flags, manually. Note: Interrupts must be disabled while modifying the sync flags. AX will reset the sync flags for each audio frame.
Synchronization flags exist as bits which are OR'd into a single 32-bit word. The flags are defined as follows:
AX_SYNC_NONEWPARAMS - No parameters have changed. No bits are asserted.
AX_SYNC_USER_SRCSELECT - User changed axvpb.pb.srcSelect or axvpb.pb.coefSelect or both.
AX_SYNC_USER_MIXCTRL - User changed axvpb.pb.mixerCtrl.
AX_SYNC_USER_STATE - User changed axvpb.pb.state.
AX_SYNC_USER_TYPE - User changed axvpb.pb.type.
AX_SYNC_USER_MIX - User changed axvpb.pb.mix.*.
AX_SYNC_USER_ITD - User changed axvpb.pb.itd.*.
AX_SYNC_USER_ITDTARGET - User changed only axvpb.pb.itd.targetShiftL or axvpb.pb.itd.targetShiftR.
AX_SYNC_USER_UPDATE - User changed axvpb.pb.update.*.
AX_SYNC_USER_DPOP - User changed axvpb.pb.depop.*.
AX_SYNC_USER_VE - User changed axvpb.pb.ve.*.
AX_SYNC_USER_VEDELTA - User changed only axvpb.pb.ve.currentDelta.
AX_SYNC_USER_ADDR- User changed axvpb.pb.addr.*.
AX_SYNC_USER_LOOP - User changed the loopFlag parameter only.
AX_SYNC_USER_LOOPADDR - User changed the loop address.
AX_SYNC_USER_ENDADDR- User changed the end address.
AX_SYNC_USER_CURRADDR - User changed the current address.
AX_SYNC_USER_ADPCM - User changed axvpb.pb.adpcm.*.
AX_SYNC_USER_SRC - User changed axvpb.pb.src.*.
AX_SYNC_USER_SRCRATIO - User changed the SRC ratio only.
AX_SYNC_USER_ADPCMLOOP - User changed axvpb.pb.adpcmLoop.*.
AX_SYNC_USER_LPF - User changed axvpb.pb.lpf.*.
AX_SYNC_USER_LPF_COEF - User changed the low-pass filter coefficients only.
AX_SYNC_USER_HPF - User changed axvpb.pb.hpf.*.
AX_SYNC_USER_HPF_COEF - User changed the high-pass filter coefficients only.
AX_SYNC_USER_REMOTE - User changed axvpb.pb.remote.
AX_SYNC_USER_RMTMIXCTRL - User changed axvpb.pb.rmtMixerCtrl.
AX_SYNC_USER_RMTMIX - User changed axvpb.pb.rmtMix.*.
AX_SYNC_USER_RMTDPOP - User changed axvpb.pb.rmtDpop.*.
AX_SYNC_USER_RMTSRC - User changed axvpb.pb.rmtSrc.*.
AX_SYNC_USER_ALLPARAMS - Update all parameters from the user parameter block to the DSP parameter block.
Some synchronization flags take precedence over others:
AX_SYNC_USER_ALLPARAMS will synchronize all parameters.
AX_SYNC_USER_ITDTARGET takes precedence over AX_SYNC_USER_ITD.
AX_SYNC_USER_VEDELTA takes precedence over AX_SYNC_USER_VE.
AX_SYNC_USER_LOOPADDR | AX_SYNC_USER_ENDADDR | AX_SYNC_USER_CURRADDR | AX_SYNC_USER_LOOP take precedence over AX_SYNC_USER_ADDR.
AX_SYNC_USER_SRCRATIO takes precedence over AX_SYNC_USER_SRC.
AX_SYNC_USER_LPF_COEF takes precedence over AX_SYNC_USER_LPF.
AX_SYNC_USER_HPF_COEF takes precedence over AX_SYNC_USER_HPF.
Some parameters are synchronized from the DSP parameter block to the user parameter block:
axvpb.pb.state is updated from the DSP parameter block, unless the AX_SYNC_USER_ALLPARAMS or AX_SYNC_USER_STATE flags are asserted. The DSP normally sets state to AX_PB_STATE_STOP when 'one-shot' voices have reached the end address. The state parameter can be polled to determine when a 'one-shot' sound has finished playing.
axvpb.pb.ve.currentVolume is updated from the DSP parameter block, unless the AX_SYNC_USER_ALLPARAMS or AX_SYNC_USER_VE flags are asserted.MIX library. This synchronization may be removed from future releases of AX.
axvpb.pb.addr.currentAddressHi and axvpb.pb.addr.currentAddressLo are updated from the DSP parameter block, unless the AX_SYNC_USER_ALLPARAMS, AX_SYNC_USER_LOOPADDR, AX_SYNC_USER_ENDADDR, AX_SYNC_USER_CURRADDR, AX_SYNC_USER_LOOP, or AX_SYNC_USER_ADDR flags are asserted. Modifying or polling the currentAddress parameter is useful for implementing software streams.
03/01/2006 Initial version.
2006/7/27 Added AX_SYNC_USER_REMOTE, AX_SYNC_USER_RMTMIXCTRL, AX_SYNC_USER_RMTMIX, AX_SYNC_USER_RMTDPOP, and AX_SYNC_USER_RMTSRC. Changed AX_SYNC_USER_ALLPARAMS.
CONFIDENTIAL