1*4882a593SmuzhiyunNXP Audio Mixer (AUDMIX). 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe Audio Mixer is a on-chip functional module that allows mixing of two 4*4882a593Smuzhiyunaudio streams into a single audio stream. Audio Mixer has two input serial 5*4882a593Smuzhiyunaudio interfaces. These are driven by two Synchronous Audio interface 6*4882a593Smuzhiyunmodules (SAI). Each input serial interface carries 8 audio channels in its 7*4882a593Smuzhiyunframe in TDM manner. Mixer mixes audio samples of corresponding channels 8*4882a593Smuzhiyunfrom two interfaces into a single sample. Before mixing, audio samples of 9*4882a593Smuzhiyuntwo inputs can be attenuated based on configuration. The output of the 10*4882a593SmuzhiyunAudio Mixer is also a serial audio interface. Like input interfaces it has 11*4882a593Smuzhiyunthe same TDM frame format. This output is used to drive the serial DAC TDM 12*4882a593Smuzhiyuninterface of audio codec and also sent to the external pins along with the 13*4882a593Smuzhiyunreceive path of normal audio SAI module for readback by the CPU. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunThe output of Audio Mixer can be selected from any of the three streams 16*4882a593Smuzhiyun - serial audio input 1 17*4882a593Smuzhiyun - serial audio input 2 18*4882a593Smuzhiyun - mixed audio 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunMixing operation is independent of audio sample rate but the two audio 21*4882a593Smuzhiyuninput streams must have same audio sample rate with same number of channels 22*4882a593Smuzhiyunin TDM frame to be eligible for mixing. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunDevice driver required properties: 25*4882a593Smuzhiyun================================= 26*4882a593Smuzhiyun - compatible : Compatible list, contains "fsl,imx8qm-audmix" 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun - reg : Offset and length of the register set for the device. 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun - clocks : Must contain an entry for each entry in clock-names. 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun - clock-names : Must include the "ipg" for register access. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun - power-domains : Must contain the phandle to AUDMIX power domain node 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun - dais : Must contain a list of phandles to AUDMIX connected 37*4882a593Smuzhiyun DAIs. The current implementation requires two phandles 38*4882a593Smuzhiyun to SAI interfaces to be provided, the first SAI in the 39*4882a593Smuzhiyun list being used to route the AUDMIX output. 40*4882a593Smuzhiyun 41*4882a593SmuzhiyunDevice driver configuration example: 42*4882a593Smuzhiyun====================================== 43*4882a593Smuzhiyun audmix: audmix@59840000 { 44*4882a593Smuzhiyun compatible = "fsl,imx8qm-audmix"; 45*4882a593Smuzhiyun reg = <0x0 0x59840000 0x0 0x10000>; 46*4882a593Smuzhiyun clocks = <&clk IMX8QXP_AUD_AUDMIX_IPG>; 47*4882a593Smuzhiyun clock-names = "ipg"; 48*4882a593Smuzhiyun power-domains = <&pd_audmix>; 49*4882a593Smuzhiyun dais = <&sai4>, <&sai5>; 50*4882a593Smuzhiyun }; 51