* asoc multi-component: CPU DAI name is wrong @ 2010-07-22 21:57 Timur Tabi 2010-07-23 18:16 ` Liam Girdwood 0 siblings, 1 reply; 5+ messages in thread From: Timur Tabi @ 2010-07-22 21:57 UTC (permalink / raw) To: Liam Girdwood, Mark Brown, ALSA development Liam, I have this in my machine driver: machine_data->dai[0].cpu_dai_name = strrchr(np->full_name, '/') + 1; printk(KERN_INFO "%s:%u cpu_dai_name=%s\n", __func__, __LINE__, machine_data->dai[0].cpu_dai_name); ... platform_set_drvdata(sound_device, &machine_data->card); ret = platform_device_add(sound_device); which displays this message: mpc8610_hpcd_probe:316 cpu_dai_name=ssi@16000 So my machine driver says the CPU DAI name is "ssi@16000", and my CPU driver does the same thing. However, I put some printks in soc_bind_dai_link, and this is what I see: soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1159 codec->name=0-004f dai_link->codec_name=cs4270-codec.0-004f soc_bind_dai_link:1193 platform->name=e0021180.dma-channel dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 soc_bind_dai_link:1193 platform->name=e0021100.dma-channel dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1159 codec->name=0-004f dai_link->codec_name=cs4270-codec.0-004f soc_bind_dai_link:1193 platform->name=e0021180.dma-channel dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 soc_bind_dai_link:1193 platform->name=e0021100.dma-channel dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 Where in the world is "e0016000.ssi" coming from? Why is ASoC ignoring my .cpu_dai_name value? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: asoc multi-component: CPU DAI name is wrong 2010-07-22 21:57 asoc multi-component: CPU DAI name is wrong Timur Tabi @ 2010-07-23 18:16 ` Liam Girdwood 2010-07-23 18:56 ` Timur Tabi 0 siblings, 1 reply; 5+ messages in thread From: Liam Girdwood @ 2010-07-23 18:16 UTC (permalink / raw) To: Timur Tabi; +Cc: ALSA development, Mark Brown On Thu, 2010-07-22 at 16:57 -0500, Timur Tabi wrote: > Liam, > > I have this in my machine driver: > > machine_data->dai[0].cpu_dai_name = strrchr(np->full_name, '/') + 1; > printk(KERN_INFO "%s:%u cpu_dai_name=%s\n", __func__, __LINE__, > machine_data->dai[0].cpu_dai_name); > ... > platform_set_drvdata(sound_device, &machine_data->card); > ret = platform_device_add(sound_device); > > which displays this message: > > mpc8610_hpcd_probe:316 cpu_dai_name=ssi@16000 > > So my machine driver says the CPU DAI name is "ssi@16000", and my CPU driver > does the same thing. However, I put some printks in soc_bind_dai_link, and > this is what I see: > > soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi > dai_link->cpu_dai_name=ssi@16000 > soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi > dai_link->cpu_dai_name=ssi@16000 > soc_bind_dai_link:1159 codec->name=0-004f > dai_link->codec_name=cs4270-codec.0-004f > soc_bind_dai_link:1193 platform->name=e0021180.dma-channel > dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 > soc_bind_dai_link:1193 platform->name=e0021100.dma-channel > dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 > soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi > dai_link->cpu_dai_name=ssi@16000 > soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi > dai_link->cpu_dai_name=ssi@16000 > soc_bind_dai_link:1159 codec->name=0-004f > dai_link->codec_name=cs4270-codec.0-004f > soc_bind_dai_link:1193 platform->name=e0021180.dma-channel > dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 > soc_bind_dai_link:1193 platform->name=e0021100.dma-channel > dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 > > Where in the world is "e0016000.ssi" coming from? Why is ASoC ignoring my > .cpu_dai_name value? > My mistake, I'd missed something in the forward port. I've fixed the DAI naming problem and you should see your DAI use the correct name. Give kernel.org about 30 mins to sync before pulling. Thanks Liam -- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: asoc multi-component: CPU DAI name is wrong 2010-07-23 18:16 ` Liam Girdwood @ 2010-07-23 18:56 ` Timur Tabi 2010-07-24 9:42 ` Liam Girdwood 0 siblings, 1 reply; 5+ messages in thread From: Timur Tabi @ 2010-07-23 18:56 UTC (permalink / raw) To: Liam Girdwood; +Cc: ALSA development, Mark Brown Liam Girdwood wrote: > My mistake, I'd missed something in the forward port. I've fixed the DAI > naming problem and you should see your DAI use the correct name. Looks like you forgot something: CC sound/soc/soc-core.o sound/soc/soc-core.c: In function 'snd_soc_register_dai': sound/soc/soc-core.c:2872: error: 'struct snd_soc_dai' has no member named 'id' sound/soc/soc-core.c: In function 'snd_soc_register_dais': sound/soc/soc-core.c:2949: error: 'struct snd_soc_dai' has no member named 'id' sound/soc/soc-core.c: In function 'snd_soc_register_platform': sound/soc/soc-core.c:3004: error: 'struct snd_soc_platform' has no member named 'id' sound/soc/soc-core.c: In function 'snd_soc_register_codec': sound/soc/soc-core.c:3102: error: 'struct snd_soc_codec' has no member named 'id' make[2]: *** [sound/soc/soc-core.o] Error 1 make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: asoc multi-component: CPU DAI name is wrong 2010-07-23 18:56 ` Timur Tabi @ 2010-07-24 9:42 ` Liam Girdwood 2010-07-26 18:57 ` Timur Tabi 0 siblings, 1 reply; 5+ messages in thread From: Liam Girdwood @ 2010-07-24 9:42 UTC (permalink / raw) To: Timur Tabi; +Cc: ALSA development, Mark Brown On Fri, 2010-07-23 at 13:56 -0500, Timur Tabi wrote: > Liam Girdwood wrote: > > My mistake, I'd missed something in the forward port. I've fixed the DAI > > naming problem and you should see your DAI use the correct name. > > Looks like you forgot something: > > CC sound/soc/soc-core.o > sound/soc/soc-core.c: In function 'snd_soc_register_dai': > sound/soc/soc-core.c:2872: error: 'struct snd_soc_dai' has no member named 'id' > sound/soc/soc-core.c: In function 'snd_soc_register_dais': > sound/soc/soc-core.c:2949: error: 'struct snd_soc_dai' has no member named 'id' > sound/soc/soc-core.c: In function 'snd_soc_register_platform': > sound/soc/soc-core.c:3004: error: 'struct snd_soc_platform' has no member > named 'id' > sound/soc/soc-core.c: In function 'snd_soc_register_codec': > sound/soc/soc-core.c:3102: error: 'struct snd_soc_codec' has no member named > 'id' > make[2]: *** [sound/soc/soc-core.o] Error 1 > make[1]: *** [sound/soc] Error 2 > make: *** [sound] Error 2 > Sorry, now fixed. Sound had somehow been disabled in my upstream .config and hence would build kernels. Liam -- Freelance Developer, SlimLogic Ltd ASoC and Voltage Regulator Maintainer. http://www.slimlogic.co.uk ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: asoc multi-component: CPU DAI name is wrong 2010-07-24 9:42 ` Liam Girdwood @ 2010-07-26 18:57 ` Timur Tabi 0 siblings, 0 replies; 5+ messages in thread From: Timur Tabi @ 2010-07-26 18:57 UTC (permalink / raw) To: Liam Girdwood; +Cc: ALSA development, Mark Brown Liam Girdwood wrote: > On Fri, 2010-07-23 at 13:56 -0500, Timur Tabi wrote: >> Liam Girdwood wrote: >> > My mistake, I'd missed something in the forward port. I've fixed the DAI >> > naming problem and you should see your DAI use the correct name. >> >> Looks like you forgot something: >> >> CC sound/soc/soc-core.o >> sound/soc/soc-core.c: In function 'snd_soc_register_dai': >> sound/soc/soc-core.c:2872: error: 'struct snd_soc_dai' has no member > named 'id' >> sound/soc/soc-core.c: In function 'snd_soc_register_dais': >> sound/soc/soc-core.c:2949: error: 'struct snd_soc_dai' has no member > named 'id' >> sound/soc/soc-core.c: In function 'snd_soc_register_platform': >> sound/soc/soc-core.c:3004: error: 'struct snd_soc_platform' has no member >> named 'id' >> sound/soc/soc-core.c: In function 'snd_soc_register_codec': >> sound/soc/soc-core.c:3102: error: 'struct snd_soc_codec' has no member > named >> 'id' >> make[2]: *** [sound/soc/soc-core.o] Error 1 >> make[1]: *** [sound/soc] Error 2 >> make: *** [sound] Error 2 >> > > Sorry, now fixed. Sound had somehow been disabled in my upstream .config > and hence would build kernels. I'm still seeing the problem: fsl_ssi_probe:658 cpu_dai_drv.name=ssi@16000 fsl_ssi_probe:713 name=snd-soc-mpc8610hpcd mpc8610_hpcd_probe:312 cpu_dai_name=ssi@16000 soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi, dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi, dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1159 codec->name=cs4270-codec.0-004f, dai_link->codec_name=cs4270-codec soc_bind_dai_link:1194 platform->name=e0021180.dma-channel, dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 soc_bind_dai_link:1194 platform->name=e0021100.dma-channel, dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@0 soc_bind_dai_link:1136 cpu_dai->name=e0016000.ssi, dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1136 cpu_dai->name=cs4270-hifi, dai_link->cpu_dai_name=ssi@16000 soc_bind_dai_link:1159 codec->name=cs4270-codec.0-004f, dai_link->codec_name=cs4270-codec soc_bind_dai_link:1194 platform->name=e0021180.dma-channel, dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 soc_bind_dai_link:1194 platform->name=e0021100.dma-channel, dai_link->platform_name=/soc@e0000000/dma@21300/dma-channel@1 ALSA device list: No soundcards found. Here's the code that sets the CPU DAI name (in fsl_ssi.c): /* The DAI name is the last part of the full name of the node. */ p = strrchr(np->full_name, '/') + 1; ssi_private = kzalloc(sizeof(struct fsl_ssi_private) + strlen(p), GFP_KERNEL); if (!ssi_private) { dev_err(&of_dev->dev, "could not allocate DAI object\n"); return -ENOMEM; } strcpy(ssi_private->name, p); /* Initialize this copy of the CPU DAI driver structure */ memcpy(&ssi_private->cpu_dai_drv, &fsl_ssi_dai_template, sizeof(fsl_ssi_dai_template)); ssi_private->cpu_dai_drv.name = ssi_private->name; printk(KERN_INFO "%s:%u cpu_dai_drv.name=%s\n", __func__, __LINE__, ssi_private->cpu_dai_drv.name); ... ret = snd_soc_register_dai(&of_dev->dev, &ssi_private->cpu_dai_drv); You can see above that cpu_dai_drv.name is set to "ssi@16000", but when soc_bind_dai_link() looks for it, cpu_dai->name is set to "e0016000.ssi". I don't know where that string comes from, but it's not coming from my code. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-26 18:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-07-22 21:57 asoc multi-component: CPU DAI name is wrong Timur Tabi 2010-07-23 18:16 ` Liam Girdwood 2010-07-23 18:56 ` Timur Tabi 2010-07-24 9:42 ` Liam Girdwood 2010-07-26 18:57 ` Timur Tabi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox