[alsa-devel] Non-I2C/SPI ASoC codec

Daniel Mack daniel at zonque.org
Thu Jul 3 13:28:05 CEST 2014


On 07/03/2014 01:14 PM, Matthew Bucknall wrote:
> I'm trying to get audio support for a custom ARM board to work and have
> written codec and machine drivers - The platform driver already existed
> (atmel_ssc_dai). The codec I am supporting is extremely simple and has no
> SPI/I2C interface for configuration and just accepts fixed format/fixed
> rate I2S.
> 
> Previously, when I've gotten ASoC support for another board working, the
> codec it used (TLV320AIC32) had an I2C interface. Declaring I2C_BOARD_INFO
> for this in my board file seemed sufficient to get the machine driver to
> probe and initialize. For this new board, I have no SPI/I2C device to
> declare in the board file and its associated machine driver is not probing.
> All I get from the kernel is 'No soundcards found.'
> 
> My driver modules are getting compiled and are linked statically. What do I
> need to do to get the machine driver going?

You need to

a) get the driver compiled into your kernel (statically or as module),

and

b) instantiate the driver, from either DTB or a platform_device struct.

There are plenty of good examples in the mainline kernel for both ways,
but note that board-file driven (non-DTB) boards are considered legacy.

FWIW, A very simple ASoC codec that doesn't have any control bus such as
I2C/SPI is already present in sound/soc/codecs/ak5386.c.


Daniel



More information about the Alsa-devel mailing list