Issues using simple-audio-card driver with Xilinx Audio Formatter
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Wed Jul 7 03:19:09 CEST 2021
Hi Robert
Thank you for your reporting
> asoc-simple-card irxs-audio: parse error -22
> asoc-simple-card: probe of irxs-audio failed with error -22
(snip)
> Inside snd_soc_get_dai_name, snd_soc_component_of_xlate_dai_name is called and
> returns -ENOTSUPP, so we fall into the if block and end up failing out here:
>
> if (id < 0 || id >= pos->num_dai) {
> ret = -EINVAL;
> continue;
> }
Platform support was added to simple-audio-card by someone (I forgot detail),
and I have never use it unfortunately.
But in my quick check, the purpose of asoc_simple_parse_platform() is
setup dlc->of_node
asoc_simple_parse_dai(...)
{
...
=> dlc->of_node = args.np;
...
}
and it will be checked at asoc_simple_canonicalize_platform()
asoc_simple_canonicalize_platform(...)
{
/* Assumes platform == cpu */
=> if (!dai_link->platforms->of_node)
=> dai_link->platforms->of_node = dai_link->cpus->of_node;
...
}
and will be used at soc-core
(A) soc_dai_link_sanity_check(...)
{
...
for_each_link_platforms(link, i, platform) {
=> if (!!platform->name == !!platform->of_node) {
...
}
snd_soc_add_pcm_runtime(...)
{
...
(A) ret = soc_dai_link_sanity_check();
...
for_each_link_cpus(dai_link, i, cpu) {
(X) asoc_rtd_to_cpu(rtd, i) = snd_soc_find_dai(cpu);
...
}
for_each_link_codecs(dai_link, i, codec) {
(X) asoc_rtd_to_codec(rtd, i) = snd_soc_find_dai(codec);
...
}
for_each_link_platforms(dai_link, i, platform) {
(Y) for_each_component(component) {
=> if (!snd_soc_is_matching_component(platform, component))
...
}
But, at snd_soc_add_pcm_runtime(),
CPU/Codec needs of_node and DAI name (= X)
Platform needs of_node (= Y)
So maybe (I didn't confirm) for platform,
asoc_simple_parse_dai() don't need to call snd_soc_of_get_dai_name() ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the Alsa-devel
mailing list