ADAU1860
ADAU1860 Sound CODEC Linux Driver.
Supported Devices
Evaluation Boards
Source Code
Status
Source |
Mainlined? |
|
|---|---|---|
No |
Files
Function |
File |
|
|---|---|---|
driver |
||
driver |
||
driver |
||
include |
||
include |
Adding Linux driver support
Devicetree configuration
Example device initialization
YAML example Placeholder
I2C
The I2C device id depends on the ADDR0 and ADDR1 pin settings and needs to be set according to your board setup.
ADDR1 |
ADDR0 |
I2C device id |
|---|---|---|
0 |
0 |
0x64 |
0 |
1 |
0x65 |
1 |
0 |
0x66 |
1 |
1 |
0x67 |
In this example we assume ADDR0=0 and ADDR1=0.
Driver testing
Routing and DAPM
ASoC DAPM Widgets
Name |
Description |
Configuration |
|---|---|---|
AINP0 |
ADC0 Differential Positive Input |
Differential Input |
AINN0 |
ADC0 Differential Negative Input |
Differential Input |
AINP1 |
ADC1 Differential Positive Input |
Differential Input |
AINN1 |
ADC1 Differential Negative Input |
Differential Input |
AINP2 |
ADC2 Differential Positive Input |
Differential Input |
AINN2 |
ADC2 Differential Negative Input |
Differential Input |
HPOUTP |
Left Headphone Output |
|
HPOUTN |
Right Headphone Output |
|
DMIC01 |
Digital Microphone 0 and 1 Input |
Digital Microphone |
DMIC23 |
Digital Microphone 2 and 3 Input |
Digital Microphone |
DMIC45 |
Digital Microphone 4 and 5 Input |
Digital Microphone |
DMIC67 |
Digital Microphone 6 and 7 Input |
Digital Microphone |
ALSA controls
Name |
Description |
Configuration |
|---|---|---|
ADC0 Capture Volume |
ADC Channel 0 digital gain control |
|
ADC1 Capture Volume |
ADC Channel 1 digital gain control |
|
ADC2 Capture Volume |
ADC Channel 2 digital gain control |
|
ADC0 Capture Switch |
ADC Channel 0 Mute/Unmute |
|
ADC1 Capture Switch |
ADC Channel 1 Mute/Unmute |
|
ADC2 Capture Switch |
ADC Channel 2 Mute/Unmute |
|
ADC0 HPF Capture Switch |
ADC Channel 0 High pass filter control |
Values: ‘Off’ ‘1Hz’ ‘4Hz’ ‘8Hz’ |
ADC1 HPF Capture Switch |
ADC Channel 1 High pass filter control |
Values: ‘Off’ ‘1Hz’ ‘4Hz’ ‘8Hz’ |
ADC2 HPF Capture Switch |
ADC Channel 2 High pass filter control |
Values: ‘Off’ ‘1Hz’ ‘4Hz’ ‘8Hz’ |
DMIC0 Capture Volume |
Digital Microphone 0 gain control |
|
DMIC1 Capture Volume |
Digital Microphone 1 gain control |
|
DMIC2 Capture Volume |
Digital Microphone 2 gain control |
|
DMIC3 Capture Volume |
Digital Microphone 3 gain control |
|
DMIC4 Capture Volume |
Digital Microphone 4 gain control |
|
DMIC5 Capture Volume |
Digital Microphone 5 gain control |
|
DMIC6 Capture Volume |
Digital Microphone 6 gain control |
|
DMIC7 Capture Volume |
Digital Microphone 7 gain control |
|
DMIC0 Capture Switch |
Digital Microphone 0 Mute/Unmute |
|
DMIC1 Capture Switch |
Digital Microphone 1 Mute/Unmute |
|
DMIC2 Capture Switch |
Digital Microphone 2 Mute/Unmute |
|
DMIC3 Capture Switch |
Digital Microphone 3 Mute/Unmute |
|
DMIC4 Capture Switch |
Digital Microphone 4 Mute/Unmute |
|
DMIC5 Capture Switch |
Digital Microphone 5 Mute/Unmute |
|
DMIC6 Capture Switch |
Digital Microphone 6 Mute/Unmute |
|
DMIC7 Capture Switch |
Digital Microphone 7 Mute/Unmute |
|
DAC Mux |
Selects the source for the DAC |
|
DAC Playback Volume |
Digital volume attenuation for output from the DAC |
|
DAC Playback Switch |
Mute/Unmute DAC out signal |
|
ASRCI 0 Mux |
Mux to select Input ASRC Channel 0 source |
|
ASRCI 1 Mux |
Mux to select Input ASRC Channel 1 source |
|
ASRCI 2 Mux |
Mux to select Input ASRC Channel 2 source |
|
ASRCI 3 Mux |
Mux to select Input ASRC Channel 3 source |
|
ASRCI OUT FS |
Input ASRC output sample rate selector |
|
ASRCI SAI SEL |
Input ASRC source serial audio interface selector |
|
ASRCO 0 Mux |
Mux to select Output ASRC Channel 0 source |
|
ASRCO 1 Mux |
Mux to select Output ASRC Channel 1 source |
|
ASRCO 2 Mux |
Mux to select Output ASRC Channel 2 source |
|
ASRCO 3 Mux |
Mux to select Output ASRC Channel 3 source |
|
ASRCO IN FS |
Output ASRC input sample rate selector |
|
ASRCO SAI SEL |
Output ASRC sink serial audio interface selector |
|
SPTx_OUT_SLOTy Data Mux |
Output SAI x slot y data source mux |
Example: SPT0_OUT_SLOT3 Data Mux |
ALSA controls can be modified easily using alsa-tools utilities. For example to read the current state of DMIC0 Capture Volume control one can use:
amixer -c ADAU1860 cget name=‘DMIC0 Capture Volume’
To set one control value the following command can be executed:
amixer -c ADAU1860 cset name=‘DMIC0 Capture Volume’ 191
DAI formats and clocks
DAI configuration
The codec driver registers two DAIs:
adau1860-sai0
adau1860-sai1
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 |
yes |
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 |
yes |
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 |
SNDRV_PCM_FMTBIT_S16_LE |
yes |
Signed 16 bit per channel, Little Endian |
SNDRV_PCM_FMTBIT_S20_LE |
yes |
Signed 20 bit per channel, Little Endian |
SNDRV_PCM_FMTBIT_S24_LE |
yes |
Signed 24 bit per channel, Little Endian |
SNDRV_PCM_FMTBIT_S32_LE |
yes |
Signed 32 bit per channel, Little Endian |