All of lore.kernel.org
 help / color / mirror / Atom feed
* simple-audio-card vs. platform question
@ 2015-01-27 12:01 Ricard Wanderlof
  2015-01-27 12:29 ` Lars-Peter Clausen
  0 siblings, 1 reply; 7+ messages in thread
From: Ricard Wanderlof @ 2015-01-27 12:01 UTC (permalink / raw)
  To: alsa-devel


I'm trying to set up a simple device tree framework so I can do some 
development on an I2S driver. I'm trying to use simple-audio-card, but I 
keep running into the problem that once soc_bind_dai_link() gets called,
dai_link->platform is set to NULL (because it is not initialized by 
simple-card.c when there is a DT node), while dai_link->platform_of_node 
has been set to dai_link->cpu_of_node in asoc_simple_card_parse_of().

This results in the following code in soc-core:soc_bind_dai_link() to set 
platform to NULL, 

        /* if there's no platform we match on the empty platform */
        platform_name = dai_link->platform_name;
        if (!platform_name && !dai_link->platform_of_node)
                platform_name = "snd-soc-dummy";

        /* find one from the set of registered platforms */
        list_for_each_entry(platform, &platform_list, list) {
                if (dai_link->platform_of_node) {
                        if (platform->dev->of_node !=
                            dai_link->platform_of_node)
                                continue;
                } else {
                        if (strcmp(platform->component.name, platform_name))
                                continue;
                }

                rtd->platform = platform;
        }
        if (!rtd->platform) {
                dev_err(card->dev, "ASoC: platform %s not registered\n",
                        dai_link->platform_name);
                return -EPROBE_DEFER;
        }

with -EPROBE_DEFER as a result.

I can't figure out either how to set up a platform (=DMA) driver in this 
environment. Perhaps the case of having a CPU DAI, DMA driver and codec 
DAI is not supported by simple-audio-card?

On other hand, the way it looks there is no way the resulting setup can 
get through soc_bind_dai_link() unless there is a platform and associated 
driver.

This indicates to me that I'm doing something seriously wrong in my setup, 
but having looked at various DT configurations in arch/arm/boot/dts in 
this case, as well as the documentation in 
Documentation/devicetree/bindings/sound/simple-card.txt I can't figure how
to set it up any other way.

/Ricard
-- 
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-01-29 17:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-27 12:01 simple-audio-card vs. platform question Ricard Wanderlof
2015-01-27 12:29 ` Lars-Peter Clausen
2015-01-27 16:31   ` Ricard Wanderlof
2015-01-27 18:11     ` Lars-Peter Clausen
2015-01-29  8:58       ` Ricard Wanderlof
2015-01-29 13:37         ` Lars-Peter Clausen
2015-01-29 17:05           ` Ricard Wanderlof

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.