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.

PCM3168A: TMS320DM8168: Use McASP0 multi-serializer connected with PCM3168

Part Number: PCM3168A
Other Parts Discussed in Thread: PCM3168,

Hi Ti,

I am using PCM3168 connect with  our custom board DM8168  McASP0(6-Input) and McASP2(2-Input).

Is there any pcm3168 Driver code which is i have to add ?

I am new for multi-serializer use.

Some one could give me help.

Thanks & Regards;

Anil.

  • Hi Anil,

    I am personally not very familiar with the McASP devices, but from your referenced post it looks like ALSA drivers were compatible. We do have Linux drivers for the PCM3168A. Generally we try to upstream these to the latest linux Kernels. You can find the drivers for PCM3168A here: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/sound/soc/codecs/

    If you are not using Linux OS these may still serve as a good starting point!

    Best,

    Zak

  • Hi Zake,

    Thanks for the quick reply.

    As you mentioned above driver for PCM3168A  is not working,i modified Makefile and Konfig filws also then it seems that a module crashed in a boot time.

    Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
    Backtrace:
    [<c004abb8>] (dump_backtrace+0x0/0x110) from [<c039d8f4>] (dump_stack+0x18/0x1c)
     r7:c4814000 r6:00000000 r5:c002ec44 r4:c0523750
    [<c039d8dc>] (dump_stack+0x0/0x1c) from [<c039d958>] (panic+0x60/0x17c)
    [<c039d8f8>] (panic+0x0/0x17c) from [<c00092b4>] (mount_block_root+0x1e0/0x220)
     r3:00000000 r2:00000000 r1:c4825f58 r0:c045c03c
    [<c00090d4>] (mount_block_root+0x0/0x220) from [<c00093a0>] (mount_root+0xac/0xcc)
    [<c00092f4>] (mount_root+0x0/0xcc) from [<c0009530>] (prepare_namespace+0x170/0x1d4)
     r4:c0522f64
    [<c00093c0>] (prepare_namespace+0x0/0x1d4) from [<c00087c4>] (kernel_init+0x114/0x154)
     r5:c00086b0 r4:c0522f00
    [<c00086b0>] (kernel_init+0x0/0x154) from [<c0072de8>] (do_exit+0x0/0x5e4)
     r5:c00086b0 r4:00000000

    Please suggest me anything i'm missing or is there any modification i have to do !

    Regards,

    Anil

  • Hi Anil,

    I'm sorry but I don't have any Linux expertise to help with driver debug. We upstream the drivers to the latest Linux kernels but we do not develop them ourselves. You may be able to get some assistance from the Linux community.

    Best,

    Zak

  • Hi zak,

    Please can you tell me,PCM3168 audio-codec is supported for linux kernal verson 2.6.37 ?
    I just want to confirm it ?

    Thanks & Regards

    Anil

  • Hi ,

     PCM3168 audio-codec Driver is supported for linux kernal version 2.6.37 ?

    Thanks & Regards,

    Anil

  • Hi Anil,

    I'm sorry but I do not know which versions of Linux would have supported this driver. The files I have provided you are all that I have available.

    Best,

    Zak

  • Hi ,

    We are using I2C_1 for interfacing three PCM3168A .


    At u-boot level when i probe i2c line using Command I2C probe then i got below 
     

    TI8168_EVM#i2c probe
    Valid chip addresses: 44 45 46


    At boot time in kernal logs i got this 

    pcm3168a: probe of 1-0044 failed with error -22.

    After booting when i try i2cdetect -y -r 1 then i got below

    root@dm816x-evm:~# i2cdetect -y -r 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- 44 45 46 -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    Can you please guide me how to configure PCM3168A audio codec through I2c.Is there any steps i'm missing.
    I already make all changes but when i boot my board then i'm not able to detect PCM3168A sound card.

    Thanks & Regards,

        anil dongare

     

  • Hi

    Can you please tell me I2C Slave Device Addresses for pcm3168A ?

    Thanks and Regards,

    Anilk. Dongare

  • Hi Anil,

    The PCM3168 has a 7-bit slave address. The first 5 bits of the address are fixed as 10001 and the final two bits are determined by the state of the ADR0 and ADR1 pins, resulting in 4 possible addresses. These would be hex 0x44, 0x45, 0x46, and 0x47.

    Best,

    Zak

  • Hi  

    Thank you so much .
    As per your above answer we make changes in /linux-2.6.37-psp04.04.00.01/arch/arm/mach-omap2/board-ti8168evm.c/ board-ti8168evm.c

    static struct i2c_board_info __initdata ti816x_i2c_boardinfo0[] = {
        /*{
            I2C_BOARD_INFO("eeprom", 0x50),
            .platform_data    = &eeprom_info,
        },*/

        /*{
            I2C_BOARD_INFO("cpld", 0x23),
        },*/
       
        {
            I2C_BOARD_INFO("pcm3168a", 0x44),
        },        

        {
            I2C_BOARD_INFO("pcm3168a", 0x45),
        },    

        {
            I2C_BOARD_INFO("pcm3168a", 0x46),
        },

        
        /*{
            I2C_BOARD_INFO("IO Expander", 0x20),
        },
        */
    };

    After this when i try i2cdetect then it showing ,

    root@dm816x-evm:~# i2cdetect -y -r 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: -- -- -- -- 44 45 46 -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: -- -- -- -- -- -- -- --

    But now problem is ,in boot log it showing below

    pcm3168a: probe of 1-0044 failed with error -22

    pcm3168a: probe of 1-0045 failed with error -22.

    pcm3168a: probe of 1-0046 failed with error -22..

    And when i put aplay -l command then i got

    root@dm816x-evm:~#aplay -l

    aplay: device_list:242: no soundcards found....

     


    Please help me  

    Thanks and Regards

    Anil

     

  • Hi Anil,

    The first thing is that it looks like you are using a very old linux kernel. Linux 2.6.37 is no longer supported by the community. Our PCM3168 drivers are in the 4.19 kernel, but I don't know what was supported in 2.6. Typically you should not have to modify the Konfig and Makefile.

    It looks like your board is able to to confirm that the PCM3168s are connected to the I2C bus with the proper addresses, but there is an error in your I2C communication. Error 22 refers to an invalid argument. You may try using a an i2cget command to see if you are able to read any registers from the device. 

    Best,

    Zak

  • Hi  

    Thanks for the reply.It's very helpful to me.

    Can you please provide me official TI web-link or web-site for downloading Kernel 4.19 version !

    When we try i2cget command then we get below

    root@dm816x-evm:~# i2cget -y 1 0x45     
    0x00


    root@dm816x-evm:~# i2cget -y 1 0x46
    0x00


    root@dm816x-evm:~# i2cget -y 1 0x47
    0x00

     

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi Anil,

    Linux is not something that TI develops so there is no official TI link. I believe that kernel.org is the official repository for Linux releases.

    I think there may be an error in your syntax for the i2cget function. It should follow i2cget [-f] [-yi2cbus chip-address [data-address [mode]]. Try i2cget -f -y 0x45 0x40

    Best,

    Zak

  • Hi  

    when we try i2cget -f -y 0x45 0x40 then it shows no address found.

    Is it software issue or hardware issue once i want to clarify this  ?

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi Anil,

    This sounds like this is a software issue given that you were previously able to identify three valid I2C addresses on the bus. You could double check your hardware configuration though to make sure you are setting the device to I2C mode and setting unique addresses for each with the ADR pins.

    Best,

    Zak

  • Hi  

    when we try i2cget -f -y 1 0x45 0x40 then it shows....

    root@dm816x-evm:~# i2cget -f -y 1 0x45 0x40
    0xc0

    root@dm816x-evm:~# i2cget -f -y 1 0x46 0x40
    0xc0

    root@dm816x-evm:~# i2cget -f -y 1 0x47 0x40
    0xc0

    PCM3168A soundcard also not listed...

    root@dm816x-evm:~# aplay -l
    aplay: device_list:242: no soundcards found...

    Please help,it's important for us.

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi  

    We tried the setting unique addresses for each with the ADR pins,so able to set it.And we also successfully able  to set Control register like Reset Control (0x40), ADC Sampling Mode(0x50) etc Registers.

    Now problem is we are not able to detect sound card

    root@dm816x-evm:~# i2cget -f -y 1 0x47 0x40
    0xc0

    PCM3168A soundcard also not listed...

    Where or which file we have to sound node ?

    Which changes we have to make for add new sound Node ?

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi

    As per user suggestion we download the Linux kernel 4.19.


    So in that we observed the PCM3168A modules are present in this kernel version but
    there is not any support files like linux/arch/arm/mach-omap2/board-ti8168evm.c etc for any Davinci family like  DM81xx.

    Please suggest any SDK which is supporting PCM3168A codec so for that i will compare that configuration and i will make same changes in our currenr SDK.

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi Anil,

    I'm not sure what SDKs are available that might have PCM3168 codec support, you may want to post a thread to the processors forum to see if they have anything for PCM3168 or other audio codecs. I can assist you with device level questions but I am not an expert in Linux, processors, or your system so unfortunately I cannot assist you with end system integration.

    Best,

    Zak

  • Hi  

    Where or which files we have  to make a changes to add  sound node ?

    Like by default they are use tlv320aic3x,suppose instead of i want to use PCM3168A !

    So for that what changes i have to do ?

    Please help. 

    Thanks and Regards,

    Anil

    Embedded Engineer

  • Hi ,

    How to set DM8168 as a Master mode and PCM3168A codec in slave mode ?

    Please help us.

    Thanks and Regards

    Anil

    Embedded Engineer