Hello,
I have a custom board that has two different codecs (AK4458 & AK5558) that are fed into the imx8mp evk board. They are dac and adc respectively.
I am able to record or play these chips with the evk board individually (loading a device tree that only has 1 codec enabled) but NOT simultaneously on the sai3.
I want to be able to simultaneously run both chips on the SAI3.
I have setup my own device tree that includes imx8mp-evk.dts as shown:
/dts-v1/;
#include "imx8mp-evk.dts"
/ {
/delete-node/sound-wm8960;
sound-ak4458 {
compatible = "fsl,imx-audio-ak4458";
model = "ak4458-audio";
audio-cpu = <&sai3>;
audio-codec = <&ak4458>;
fsl,tdm;
};
sound-ak5558_1 {
compatible = "fsl,imx-audio-ak5558";
model = "ak5558-mic1";
audio-cpu = <&sai3>;
audio-codec = <&ak5558_1>;
status = "okay";
fsl,tdm;
};
};
&i2c3 {
ak5558_1: ak5558@10 {
model = "ak5558-aif";
compatible = "asahi-kasei,ak5558";
reg = <0x10>;
};
ak4458: ak4458@12 {
compatible = "asahi-kasei,ak4458";
reg = <0x12>;
};
};
I've commented out these lines in the soc-core.c driver in order to load the codecs simultaneously. if i didn't comment out the code, it wont accept the second chip driver and would say the sound card is already in use.
static int soc_probe_component(struct snd_soc_card *card,
struct snd_soc_component *component)
{
struct snd_soc_dapm_context *dapm =
snd_soc_component_get_dapm(component);
struct snd_soc_dai *dai;
int ret;
if (!strcmp(component->name, "snd-soc-dummy"))
return 0;
/*
if (component->card) {
if (component->card != card) {
dev_err(component->dev,
"Trying to bind component to card \"%s\" but is already bound to card \"%s\"\n",
card->name, component->card->name);
return -ENODEV;
}
return 0;
}
*/
While the two are shown in alsa (arecord -l and aplay -l) simultaneously, im only able to play out the ak4458 chip, however, when i record with the ak5558 chip, it runs but it hangs the system.
Is it possible to run these two different codecs on 1 sai?
**I have attempted to do a simple-audio-card setup in the device tree but so far the driver fails (coredump) if a second codec is loaded.
Thank you!
Hello,
Sorry, you can't use two codecs on the same SAI, the dtb is ok but you are using the same SAI you can probe with different SAI.
Regards