Hello Experts,
I have interfaced the CX20721 codec into my imx6 board.
Codec driver used:
rpi-linux/cx2072x.c at cnxt-rpi-4.4.y · conexant/rpi-linux · GitHub
And I have used the following ASoC machine driver (raspberry pi ASoC machine driver) for my imx6 platform.
Attached the modified machine driver (two types).
1. Based on Raspberry pi ASoC machine driver.
2. Based on imx-sgtl5000.c machine driver.
Getting the following errors:
[ 2.636502] cx2072x 2-0033: cx2072x_i2c_probe: Register codec.
[ 2.641330] cxsmtspk-audio-i2s sound: ASoC: CODEC DAI cx2072x-dsp not registered
[ 2.647532] cxsmtspk-audio-i2s sound: snd_soc_register_card failed (-517)
[ 2.738449] cxsmtspk-audio-i2s sound: ASoC: CODEC DAI cx2072x-dsp not registered
[ 2.744680] cxsmtspk-audio-i2s sound: snd_soc_register_card failed (-517)
[ 2.761795] cxsmtspk-audio-i2s sound: ASoC: CODEC DAI cx2072x-dsp not registered
[ 2.768713] cxsmtspk-audio-i2s sound: snd_soc_register_card failed (-517)
imx-cx20721.c -> Based on Raspberry pi ASoC machine driver.
imx-cx20721_type2.c -> Based on imx-sgtl5000.c
Here is the reference:
CX2072X/doc at master · CNXT-Jerry/CX2072X · GitHub
Original Attachment has been moved to: imx-cx20721_type2.c.zip
Original Attachment has been moved to: imx-cx20721.c.zip
Hi Titus
please check if correct clocks are produced after probing,
sect.Table 7-1. Stereo Codec SoC Driver Files attached Linux Manual
shows ALSA SoC structure and one can further debug it using
AN4553 Using Open Source Debugging Tools for Linux on i.MX Processors
http://www.nxp.com/assets/documents/data/en/application-notes/AN4553.pdf
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks for the reply.
I will look into this.
Quick questions below, can you help ?
How 'mux-int-port' and 'mux-ext-port' are used and how can I use & configure it for my codec ?
mux-int-port = <1>;
mux-ext-port = <3>
I've referred the following links, SGTL5000 codec configured in different internal and external AUDMUX ports. Why and how? we should change this based on the HW connection ?
linux-imx6/imx-audio-sgtl5000.txt at master · samnazarko/linux-imx6 · GitHub
And when I can decide to configure my codec as master or slave ? based on the clock generation alone or any other reason behind ?
sound {
compatible = "fsl,imx-audio-sgtl5000";
model = "sgtl5000-audio";
cpu-dai = <&ssi2>;
audio-codec = <&sgtl5000>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
mux-int-port = <2>;
mux-ext-port = <3>;
hp-det-gpios = <&gpio2 0 0>;
hp-det-debounce = <250>;
};
sound {
compatible = "fsl,imx51-babbage-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "imx51-babbage-sgtl5000";
ssi-controller = <&ssi1>;
audio-codec = <&sgtl5000>;
audio-routing =
"MIC_IN", "Mic Jack",
"Mic Jack", "Mic Bias",
"Headphone Jack", "HP_OUT";
mux-int-port = <1>;
mux-ext-port = <3>;
};
Hi Titus
for understanding AUDMUX operation one can look at
AN2628 Programming Audio Applications
http://www.nxp.com/docs/en/application-note/AN2628.pdf
Chapter 20 Porting Audio Codecs to a Custom Board i.MX53 UG
https://www.nxp.com/docs/en/user-guide/MX53UG.pdf
Best regards
igor