This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Registering a generic audio CODEC with Beaglebone ALSA ASOC

Hi

I have interfaced my Beaglebone with an external audio CODEC and want to build an ALSA driver (based on the existing ASOC driver) for the CODEC to be shown in the ALSA device list. Is there some kind of I2C handshaking between the ASOC and the CODEC that is required for  the CODEC to be registered as an ALSA device (my CODEC is not the AIC31 - I can configure my CODEC from a software tool)?

Cheers

  • codec is an i2c device. This device is registered in board file ( example on AM335x platform, it is registered in arch/arm/mach-omap2/board-am335xevm.c)

    Here Codec is on i2c-1 bus at address 0x1b.

    static struct i2c_board_info am335x_i2c_boardinfo1[] = {
        {
            I2C_BOARD_INFO("tlv320aic3x", 0x1b),
        },
    ...

    ...

    This data is compared with the codec name generated by ALSA frameowrk with the Codec registered. On AM335x Platform it is in sound/soc/davinci/davinci-evm.c

    static struct snd_soc_dai_link am335x_evm_dai = {
        .name = "TLV320AIC3X",
        .stream_name = "AIC3X",
        .cpu_dai_name = "davinci-mcasp.1",
        .codec_dai_name = "tlv320aic3x-hifi",
        .codec_name = "tlv320aic3x-codec.2-001b",
        .platform_name = "davinci-pcm-audio",
        .init = evm_aic3x_init,
        .ops = &evm_ops,
    };

    2 basically means i2c-1 bus

    Hope this helps.

    Regards

    Gururaja

  • Hi Guruaja,

    Thanks a bunch for the information. Do you know if the CODEC has to be reached on the I2C bus for the ALSA device to be registered (i.e. is there somekind of handshaking needed for the registration to complete)?

    Thanks 

    Tom