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