Other Parts Discussed in Thread: PCM3168
We are the facing issues while integrating pcm3168a codec driver.
Target device and version details as follows:
Kernel version : - 4.19.35
CPU : - i.MX6Q
Based on https://bootlin.com/blog/eight-channels-audio-on-i-mx7-with-pcm3168/, we configured the device tree as follows
sound-pcm3168a {
compatible = "simple-audio-card";
simple-audio-card,name = "pcm3168a-audio";
simple-audio-card,widgets = "Speaker", "Channel1out",
"Speaker", "Channel2out",
"Speaker", "Channel3out",
"Speaker", "Channel4out",
"Speaker", "Channel5out",
"Speaker", "Channel6out",
"Microphone", "Channel1in",
"Microphone", "Channel2in",
"Microphone", "Channel3in",
"Microphone", "Channel4in",
"Microphone", "Channel5in",
"Microphone", "Channel6in";
simple-audio-card,routing = "Channel1out", "AOUT1L",
"Channel2out", "AOUT1R",
"Channel3out", "AOUT2L",
"Channel4out", "AOUT2R",
"Channel5out", "AOUT3L",
"Channel6out", "AOUT3R",
"Channel1in", "AIN1L",
"Channel2in", "AIN1R",
"Channel3in", "AIN2L",
"Channel4in", "AIN2R",
"Channel5in", "AIN3L",
"Channel6in", "AIN3R";
simple-audio-card,dai-link@0 {
format = "left_j";
bitclock-master = <&pcm3168a_dac>;
frame-master = <&pcm3168a_dac>;
sai_dai: cpu {
sound-dai = <&esai>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
};
pcm3168a_dac: codec {
sound-dai = <&pcm3168a 0>;
clocks = <&codec_osc>;
};
};
simple-audio-card,dai-link@1 {
format = "left_j";
bitclock-master = <&pcm3168a_adc>;
frame-master = <&pcm3168a_adc>;
cpu {
sound-dai = <&esai>;
dai-tdm-slot-num = <8>;
dai-tdm-slot-width = <32>;
};
pcm3168a_adc: codec {
sound-dai = <&pcm3168a 1>;
clocks = <&codec_osc>;
};
};
};
// I2c
pcm3168a: audio-codec@44 {
compatible = "ti,pcm3168a";
reg = <0x44>;
#sound-dai-cells = <1>;
clocks = <&codec_osc>;
clock-names = "scki";
VDD1-supply = <®_audio>;
VDD2-supply = <®_audio>;
VCCAD1-supply = <®_audio_5v0>;
VCCAD2-supply = <®_audio_5v0>;
VCCDA1-supply = <®_audio_5v0>;
VCCDA2-supply = <®_audio_5v0>;
};
// clock
clocks {
codec_osc: anaclk2 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <24576000>;
};
};
- External 24.58MHz oscillator is connected to SCKI/MCLK.
- Codec devices list
- When I play sound with “S24_LE” format at 48000 sample rate, I’m getting the following error.
- As per above error, I changed the mode to slave and right justified format. After that I’m getting the below error.