On Thu, 2010-10-28 at 09:07 -0500, Victor Rodriguez wrote:
O ret = snd_soc_register_codec(&spi->dev, &soc_codec_dev_cs4271,
&cs4271_dai, 1);
Sorry for this maybe I am wrong but shouldn't this bee with {}
if (ret < 0) { kfree(cs4271); return ret;
}
Thanks
Victor Rodriguez
Oh, no, this part is correct, I'm sure. The question is why fmt_single_name() picks up "spi0.0" instead of "cs4271-codec", I've added some debug output. And this function relies on dev_name() instead of dev->driver->name, this works in 2 of 3 cases (where one string equals another): --- Jan 1 00:00:04 miniCio user.debug kernel: cs4271-codec spi0.0: codec register spi0.0 Jan 1 00:00:04 miniCio user.info kernel: dev_name=spi0.0 Jan 1 00:00:04 miniCio user.info kernel: dev->driver->name=cs4271-codec Jan 1 00:00:04 miniCio user.debug kernel: cs4271-codec spi0.0: dai register spi0.0 #1 Jan 1 00:00:04 miniCio user.debug kernel: Registered DAI 'cs4271-hifi' Jan 1 00:00:04 miniCio user.debug kernel: Registered codec 'spi0.0' Jan 1 00:00:04 miniCio user.info kernel: Codec driver for CS4271 registered Jan 1 00:00:04 miniCio user.debug kernel: ep93xx-pcm-audio ep93xx-pcm-audio: platform register ep93xx-pcm-audio Jan 1 00:00:04 miniCio user.info kernel: dev_name=ep93xx-pcm-audio Jan 1 00:00:04 miniCio user.info kernel: dev->driver->name=ep93xx-pcm-audio Jan 1 00:00:04 miniCio user.debug kernel: Registered platform 'ep93xx-pcm-audio' Jan 1 00:00:04 miniCio user.debug kernel: ep93xx-i2s ep93xx-i2s: dai register ep93xx-i2s Jan 1 00:00:04 miniCio user.info kernel: dev_name=ep93xx-i2s Jan 1 00:00:04 miniCio user.info kernel: dev->driver->name=ep93xx-i2s Jan 1 00:00:04 miniCio user.debug kernel: Registered DAI 'ep93xx-i2s' Jan 1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio: binding CS4271 at idx 0 Jan 1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio: CODEC cs4271-codec not registered Jan 1 00:00:04 miniCio user.debug kernel: soc-audio soc-audio: Registered card 'EDB93XX' Jan 1 00:00:04 miniCio user.info kernel: EDB93xx Machine ALSA Driver Jan 1 00:00:04 miniCio user.info kernel: ALSA device list: Jan 1 00:00:04 miniCio user.info kernel: No soundcards found. ---