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