ADAU7118
ADAU7118 8 Channel, PDM to I2S or TDM Conversion IC Linux Driver.
Supported Devices
Evaluation Boards
Description
The ADAU7118 converts four stereo pulse density modulation (PDM) bitstreams into one pulse code modulation (PCM) output stream. The source for the PDM data can be eight microphones or other PDM sources. The PCM audio data is output on a serial audio interface port in either inter-IC serial (I2S) or time domain multiplexed (TDM) format. The ADAU7118 has an I2C interface which can be used to fully configure the device. It can set the device to operate either in stereo or TDM mode, disable/enable inputs, etc… Furthermore, the device can also operate in HW only mode where the I2C interface is disabled. In this mode, only TDM mode is supported.
Status
Files
Function |
File |
|
|---|---|---|
core driver |
||
core include |
||
driver |
||
driver |
||
devicetree |
Devicetree bindings
The ADAU7118 driver is fully devicetree compatible.
Required properties:
compatible: Must be
adi,adau7118#sound-dai-cells: Must be 0
Optional properties:
reg: I2C address when the device is used with I2C support.
IOVDD-supply: Phandle and specifier for the power supply providing the IOVDD supply as covered in Documentation/devicetree/bindings/regulator/regulator.txt. If this property is not present it is assumed that the supply pin is hardwired to always on.
DVDD-supply: Phandle and specifier for the power supply providing the DVDD supply as covered in Documentation/devicetree/bindings/regulator/regulator.txt. If this property is not present it is assumed that the supply pin is hardwired to always on.
adi,decimation-ratio: Set’s the decimation ratio of PDM to PCM audio data.
adi,pdm-clk-map: The ADAU7118 has two PDM clocks for the four Inputs. Each input must be assigned to one of these two clocks. This property set’s the mapping between the clocks and the inputs.
Example device initialization
The ADAU7118 supports I2C interface and can operate in HW only mode (no communications with the device). Currently, the devices can only be instantiated via device tree.
I2C mode
i2c0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
adau7118_codec: adau7118-codec@14 {
compatible = "adi,adau7118";
reg = <0x14>;
status = "okay";
adi,pdm-clk-map = <1 1 0 0>;
adi,decimation-ratio = <16>;
};
};
HW mode
/ {
adau7118_codec: adau7118-codec@14 {
compatible = "adi,adau7118";
reg = <0x14>;
status = "okay";
IOVDD-supply = <&supply>;
DVDD-supply = <&supply2>;
};
};
Kernel configuration
Device Drivers --->
<*> Sound card support --->
<*> Advanced Linux Sound Architecture --->
<*> ALSA for SoC audio support --->
<*> CODEC drivers --->
<*> Analog Devices ADAU7118 8 Channel PDM-to-I2S/TDM Converter - HW Mode
<*> Analog Devices ADAU7118 8 Channel PDM-to-I2S/TDM Converter - I2C
ASoC DAPM widgets (HW Mode)
Name |
Description |
|---|---|
PDM_DAT0 |
PDM0 signal input |
PDM_DAT1 |
PDM1 signal input |
PDM_DAT2 |
PDM2 signal input |
PDM_DAT3 |
PDM3 signal input |
AIF1TX |
Audio Interface Output |
ASoC DAPM widgets (I2C)
Name |
Description |
|---|---|
PDM_DAT0 |
PDM0 signal input |
PDM_DAT1 |
PDM1 signal input |
PDM_DAT2 |
PDM2 signal input |
PDM_DAT3 |
PDM3 signal input |
PDM0 |
PDM0 switch control |
PDM1 |
PDM1 switch control |
PDM2 |
PDM2 switch control |
PDM3 |
PDM3 switch control |
PDM_CLK0 |
Clock0 supply widget |
PDM_CLK1 |
Clock1 supply widget |
AIF1TX1 |
Audio Interface Output - Channel 1 |
AIF1TX2 |
Audio Interface Output - Channel 2 |
AIF1TX3 |
Audio Interface Output - Channel 3 |
AIF1TX4 |
Audio Interface Output - Channel 4 |
AIF1TX5 |
Audio Interface Output - Channel 5 |
AIF1TX6 |
Audio Interface Output - Channel 6 |
AIF1TX7 |
Audio Interface Output - Channel 7 |
AIF1TX8 |
Audio Interface Output - Channel 8 |
ALSA controls
Name |
Description |
|---|---|
Capture Switch |
PDM0 input enable |
Capture Switch |
PDM1 input enable |
Capture Switch |
PDM2 input enable |
Capture Switch |
PDM3 input enable |
DAI Configuration
The driver registers one DAI called ``adau7118-hifi-capture``.
Supported DAI formats
Name |
Supported by driver |
Description |
|---|---|---|
SND_SOC_DAIFMT_I2S |
yes* |
I2S mode |
SND_SOC_DAIFMT_RIGHT_J |
yes* |
Right Justified mode |
SND_SOC_DAIFMT_LEFT_J |
yes* |
Left Justified mode |
SND_SOC_DAIFMT_DSP_A |
no |
data MSB after FRM LRC |
SND_SOC_DAIFMT_DSP_B |
no |
data MSB during FRM LRC |
SND_SOC_DAIFMT_AC97 |
no |
AC97 mode |
SND_SOC_DAIFMT_PDM |
no |
Pulse density modulation |
SND_SOC_DAIFMT_NB_NF |
yes* |
Normal bit- and frameclock |
SND_SOC_DAIFMT_NB_IF |
yes* |
Normal bitclock, inverted frameclock |
SND_SOC_DAIFMT_IB_NF |
yes* |
Inverted frameclock, normal bitclock |
SND_SOC_DAIFMT_IB_IF |
yes* |
Inverted bit- and frameclock |
SND_SOC_DAIFMT_CBM_CFM |
no |
Codec bit- and frameclock master |
SND_SOC_DAIFMT_CBS_CFM |
no |
Codec bitclock slave, frameclock master |
SND_SOC_DAIFMT_CBM_CFS |
no |
Codec bitclock master, frameclock slave |
SND_SOC_DAIFMT_CBS_CFS |
yes |
Codec bit- and frameclock slave |
* The supported DAI format are limited for HW only mode (only I2S and Normal bit- and frameclock is supported). In this mode, the I2C SCL and SDA pins are used to select different functionality. Check table 11 of the datasheet for more details.
More information
Need Help?