162306a36Sopenharmony_ciNXP Audio Mixer (AUDMIX). 262306a36Sopenharmony_ci 362306a36Sopenharmony_ciThe Audio Mixer is a on-chip functional module that allows mixing of two 462306a36Sopenharmony_ciaudio streams into a single audio stream. Audio Mixer has two input serial 562306a36Sopenharmony_ciaudio interfaces. These are driven by two Synchronous Audio interface 662306a36Sopenharmony_cimodules (SAI). Each input serial interface carries 8 audio channels in its 762306a36Sopenharmony_ciframe in TDM manner. Mixer mixes audio samples of corresponding channels 862306a36Sopenharmony_cifrom two interfaces into a single sample. Before mixing, audio samples of 962306a36Sopenharmony_citwo inputs can be attenuated based on configuration. The output of the 1062306a36Sopenharmony_ciAudio Mixer is also a serial audio interface. Like input interfaces it has 1162306a36Sopenharmony_cithe same TDM frame format. This output is used to drive the serial DAC TDM 1262306a36Sopenharmony_ciinterface of audio codec and also sent to the external pins along with the 1362306a36Sopenharmony_cireceive path of normal audio SAI module for readback by the CPU. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ciThe output of Audio Mixer can be selected from any of the three streams 1662306a36Sopenharmony_ci - serial audio input 1 1762306a36Sopenharmony_ci - serial audio input 2 1862306a36Sopenharmony_ci - mixed audio 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ciMixing operation is independent of audio sample rate but the two audio 2162306a36Sopenharmony_ciinput streams must have same audio sample rate with same number of channels 2262306a36Sopenharmony_ciin TDM frame to be eligible for mixing. 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ciDevice driver required properties: 2562306a36Sopenharmony_ci================================= 2662306a36Sopenharmony_ci - compatible : Compatible list, contains "fsl,imx8qm-audmix" 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci - reg : Offset and length of the register set for the device. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci - clocks : Must contain an entry for each entry in clock-names. 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_ci - clock-names : Must include the "ipg" for register access. 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ci - power-domains : Must contain the phandle to AUDMIX power domain node 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci - dais : Must contain a list of phandles to AUDMIX connected 3762306a36Sopenharmony_ci DAIs. The current implementation requires two phandles 3862306a36Sopenharmony_ci to SAI interfaces to be provided, the first SAI in the 3962306a36Sopenharmony_ci list being used to route the AUDMIX output. 4062306a36Sopenharmony_ci 4162306a36Sopenharmony_ciDevice driver configuration example: 4262306a36Sopenharmony_ci====================================== 4362306a36Sopenharmony_ci audmix: audmix@59840000 { 4462306a36Sopenharmony_ci compatible = "fsl,imx8qm-audmix"; 4562306a36Sopenharmony_ci reg = <0x0 0x59840000 0x0 0x10000>; 4662306a36Sopenharmony_ci clocks = <&clk IMX8QXP_AUD_AUDMIX_IPG>; 4762306a36Sopenharmony_ci clock-names = "ipg"; 4862306a36Sopenharmony_ci power-domains = <&pd_audmix>; 4962306a36Sopenharmony_ci dais = <&sai4>, <&sai5>; 5062306a36Sopenharmony_ci }; 51