[alsa-devel] ASoC: BeagleBoard driver development (PCM3168)

Peter Ujfalusi peter.ujfalusi at ti.com
Tue Feb 19 12:10:06 CET 2013

On 02/16/2013 01:05 PM, wendelin klimann wrote:
>     > I try to implement an PCM3168 audio codec from TI to the BeagleBoard but
>     > actually i am stuck and it would be rally nice if one could help me a
>     > little bit.
>     > My ALSA driver version is 1.0.24 and i use an 3.2.18 kernel.
>     > As a startingpoint i used the files

Is there any particular reason to use so ancient kernel and alsa-driver package?

>     >     .codec_dai_name = "pcm3168-hifi",
>     >     .codec_name = "pcm3168-codec",
>     codec name should be: pcm3168-codec.0
> Thanks that helpt to get the (old machine-driver) driver to load correctly and
> now i can start with the mcbsp and hardware-testing.


>     You should update you machine driver to use snd_soc_register_card() see other
>     machine drivers as example (omap-twl4030.c is in the same directory for
>     example and it is really simple).
> I took the omap3beagle.c (and the omap-twl4030.c with same results) file as
> template and adapted it. The driver can be compiled correctly but when i load
> it it is not inseting the corresponding codec (snd_soc_pcm3168.ko).
> Even if i load the snd_soc_pcm3168.ko driver manually and after load the
> snd_soc_pcm3168_soundcard.ko driver i do not find the soundcard and the codec in:

I'm confused now. Previously you said it is working and now you are telling
that it is not...

>  $/sys/kernel/debug/asoc$: ls
>        codecs       dais         omap3beagle      platforms
>  $/sys/kernel/debug/asoc$: cat codecs
>        twl4030-codec      

You do not have the codec loaded so the card is not going to come up.
What do you have in the kernel messages around this time?
Have you registered the platform device for your testing codec driver?

>     According to the datasheet the PCM3168 have I2C or SPI control interface. You
>     should have the driver as i2c/spi device so you can actually control it.
> As it is my first attempt to implement an audio codec i thought to start as
> simple as possible and do all the setup with the external pins and avoid to
> use the I2C or SPI at first. Of course i want to add it later on but i thought
> it would be wise to test the hardware first.

The time to start the driver in a proper way will save you lots of time... You
don't need to write two drivers (platform driver for testing followed by a new
real driver).


More information about the Alsa-devel mailing list