Hi,
You seem to be missing the codec related clock configuration in the machine driver
Please refer Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation as to how to update machine driver for supporting a codec
In your case, as can be inferred from below error,
[ 106.256075] wm8960 0-001a: No MCLK configured
you may have to make changes on below lines
int tegra_codecs_init(struct snd_soc_card *card)
{
struct snd_soc_dai_link *dai_links = card->dai_link;
int i;
...
for (i = 0; i < card->num_links; i++) {
if (strstr(dai_links[i].name, "rt565x-playback") ||
strstr(dai_links[i].name, "rt565x-codec-sysclk-bclk1"))
dai_links[i].init = tegra_machine_rt565x_init;
else if (strstr(dai_links[i].name, "fe-pi-audio-z-v2"))
dai_links[i].init = tegra_machine_fepi_init;
else if (strstr(dai_links[i].name, "wm8960-hifi"))
dai_links[i].init = tegra_machine_wm8960_init;
}
...
}
static int tegra_machine_wm8960_init(struct snd_soc_pcm_runtime *rtd)
{
struct device *dev = rtd->card->dev;
int err;
unsigned int pll_f2, freq_in = 24000000;
/*
* Per the wm8960 data-sheet the PLL performs best in the range of
* 90-100MHz, therefore set the PLL to operate as close to 100MHz
* as we can.
*/
pll_f2 = (100000000/freq_in) * freq_in;
if (pll_f2 < 90000000 || pll_f2 > 100000000)
dev_warn(card->dev, "PLL frequency is not optimal: %dHz\n", pll_f2);
err = snd_soc_dai_set_sysclk(rtd->codec_dai,
WM8960_SYSCLK_PLL, (pll_f2/4),
SND_SOC_CLOCK_IN);
if (err < 0) {
dev_err(card->dev, "codec_dai sysclk not set\n");
return err;
}
err = snd_soc_dai_set_pll(rtd->codec_dai,
WM8960_SYSCLK_PLL, WM8960_SYSCLK_MCLK,
freq_in, pll_f2/4);
if (err) {
dev_err(card->dev, "failed to configure codec PLL: %d\n", err);
return err;
}
return 0;
}
int tegra_codecs_runtime_setup(struct snd_soc_card *card,
unsigned int srate,
unsigned int channels,
unsigned int aud_mclk)
{
...
rtd = get_pcm_runtime(card, "wm8960-hifi");
struct device *dev = rtd->card->dev;
int err;
unsigned int pll_f2, freq_in = 24000000;
/*
* Per the wm8960 data-sheet the PLL performs best in the range of
* 90-100MHz, therefore set the PLL to operate as close to 100MHz
* as we can.
*/
pll_f2 = (100000000/freq_in) * freq_in;
if (pll_f2 < 90000000 || pll_f2 > 100000000)
dev_warn(card->dev, "PLL frequency is not optimal: %dHz\n", pll_f2);
err = snd_soc_dai_set_sysclk(rtd->codec_dai,
WM8960_SYSCLK_PLL, (pll_f2/4),
SND_SOC_CLOCK_IN);
if (err < 0) {
dev_err(card->dev, "codec_dai sysclk not set\n");
return err;
}
err = snd_soc_dai_set_pll(rtd->codec_dai,
WM8960_SYSCLK_PLL, WM8960_SYSCLK_MCLK,
freq_in, pll_f2/4);
if (err) {
dev_err(card->dev, "failed to configure codec PLL: %d\n", err);
return err;
}
}
I formed above code from Audio Codec WM8960 on TX2 where similar codec was used and similar issues were faced. Please refer it for any further issues from codec’s end. Be aware that this post was using an older BSP release, so paths may not be directly usable. Refer Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation for latest machine driver path.
For your further reference, refer below links
Custom codec integration guide is available at Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation
For troubleshooting, refer Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation
Feel free to get in touch if any further issues
Thanks