The Mixer driver provides APIs to configure the audio mixer.
The functions and other declarations used in this driver are in cy_mixer.h. You can include cy_pdl.h (ModusToolbox only) to get access to all functions and declarations in the PDL.
Features:
To set up an audio mixer, initialize the mixer destination and one or more source streams.
The mixer destination can be configured by providing all of the parameters in the cy_stc_mixer_dst_config_t structure. Then call the Cy_Mixer_DestinationInit function to initialize the mixer destination. Additional APIs are provided to configure and control the mixer destination after initialization.
A mixer source can be configured by providing all of the parameters in the cy_stc_mixer_src_config_t structure. Then call the Cy_Mixer_SourceInit function to initialize the mixer source. Additional APIs are provided to configure and control the mixer source after initialization.
For the mixer to operate, the destination and one or more sources must be enabled and activated. Typically, enabling a source is done at mixer initialization time and activating/deactivating a source is done at a finer grain, based on system events that activate (start) and/or deactivate (end) PCM source streams.
Destination initialization example:
Source initialization example:
Mixer sources and destinations may be written and read by the MCU (via the provided APIs: Cy_Mixer_Src_FifoWriteData, Cy_Mixer_Dst_FifoReadData) or by DMA. If using DMA, the DMA channel should be previously configured. Triggers generated by the Mixer can be used to initiate DMA transfers to and from the mixer source and destination FIFOs.
See the Mixer chapter of the device technical reference manual (TRM).
Version | Changes | Reason for Change |
---|---|---|
1.0 | The initial version. |
API Reference | |
Macros | |
Functions | |
Data Structures | |
Enumerated Types | |