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.

TLV320AIC3104: Trouble getting playback to work

Part Number: TLV320AIC3104

I'm trying to use the TLV320AIC3104 to play audio with a BeagleBone Black (BBB), running 4.19.94-ti-r73. Specifically, I'm using a clone of the Audio Cape RevB. I parsed a thread on TechForum that followed a similar issue but it's unclear that they resolved the issue. I was able to get the BBB to "see" the codec when using aplay -l. Below is the output

x@y:~$ aplay -l 

**** List of PLAYBACK Hardware Devices **** 

card 0: B [AudioCape Rev B], device 0: davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0 [davinci-mcasp.0-tlv320aic3x-hifi tlv320aic3x-hifi-0

Subdevices: 1/1 

Subdevice #0: subdevice #0

When I try playing an audio file, nothing happens (i.e. no sound and aplay gets stuck)

When I run dmesg | grep tlv320*, I get the following:

[ 1.400390] tlv320aic3x-codec 2-0018: 2-0018 supply IOVDD not found, using dummy regulator
[ 1.400498] tlv320aic3x-codec 2-0018: Linked as a consumer to regulator.0
[ 1.400513] tlv320aic3x-codec 2-0018: 2-0018 supply DVDD not found, using dummy regulator
[ 1.400598] tlv320aic3x-codec 2-0018: 2-0018 supply AVDD not found, using dummy regulator
[ 1.400683] tlv320aic3x-codec 2-0018: 2-0018 supply DRVDD not found, using dummy regulator
[ 1.400771] tlv320aic3x-codec 2-0018: Invalid supply voltage(s) AVDD: -22, DVDD: -22
[ 1.562159] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
[ 854.335039] tlv320aic3x-codec 2-0018: Unable to sync registers 0x3-0x3. -121

The last line seems to be the issue but I am unsure what it means.

Running i2cdetect, I can see that the driver has a hold on the 0x18 address (it comes up as UU) so I believe that the BBB is properly communicating with the TLV320. Looking at the TLV320AIC3104, I can't find any reference to sync registers 0x3.


Any help would be greatly appreciated.

  • Can you use i2cdump to check whether to access the chip?

    One more thing, tell me whether to set aic3104 as master or slave?

    Following is a guideline including how to set i2c in BBB's devicetree. Hope this can help you.

    audio device driver Guidelines.pdf (ti.com)

  • Thanks for the reply. When I run i2cdump, I get "Could not set address to 0x18: Device or resource busy". I'm assuming the device is already being talked to by the DTS because running i2cdetect, I get UU at 0x18.

    How do you check whether the AIC3104 is in master or slave mode? The data sheet doesn't make it clear how to check.

    The Guidelines you shared start with a driver package. Where can I find that package?

  • master codec will generate audio clk. Slave codec can't.

    i2cdetect passed only show that an i2c address 0x18 device is connected to the i2c bus, i2cget or i2cdump working well means the i2c communication is ok.

    Do not care the driver package. It is not the codec driver. 

  • It turns out that I had a connection issue and I2C was not properly connected. i2cdump now provides the following:


    00: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80 ...??......?...?
    10: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
    20: 00 08 00 00 22 00 00 00 00 00 00 80 80 00 00 00 .?.."......??...
    30: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 ...?......?.....
    40: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?......?.......
    50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    60: 00 03 00 00 00 00 02 00 00 00 00 00 00 00 00 00 .?....?.........
    70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    80: 00 00 00 10 04 00 00 00 00 00 00 01 00 00 00 80 ...??......?...?
    90: 80 ff ff 78 78 78 78 78 78 06 00 fe 00 00 fe 00 ?..xxxxxx?.?..?.
    a0: 00 08 00 00 22 00 00 00 00 00 00 80 80 00 00 00 .?.."......??...
    b0: 00 00 00 04 00 00 00 00 00 00 04 00 00 00 00 00 ...?......?.....
    c0: 00 04 00 00 00 00 00 00 04 00 00 00 00 00 00 00 .?......?.......
    d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    e0: 00 03 00 00 00 00 02 00 00 00 00 00 00 00 00 00 .?....?.........
    f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

    Is this what it should be outputting? I ask because when I know run aplay to play a sound, I can hear the codec initiate (there's a bump sound through my headphones) but the audio does not play. If I run dmesg | grep tlv*, I get:

    [ 0.236043] audit: initializing netlink subsys (disabled)
    [ 1.399183] tlv320aic3x-codec 2-0018: 2-0018 supply IOVDD not found, using dummy regulator
    [ 1.399294] tlv320aic3x-codec 2-0018: Linked as a consumer to regulator.0
    [ 1.399310] tlv320aic3x-codec 2-0018: 2-0018 supply DVDD not found, using dummy regulator
    [ 1.399397] tlv320aic3x-codec 2-0018: 2-0018 supply AVDD not found, using dummy regulator
    [ 1.399481] tlv320aic3x-codec 2-0018: 2-0018 supply DRVDD not found, using dummy regulator
    [ 1.399882] tlv320aic3x-codec 2-0018: Invalid supply voltage(s) AVDD: -22, DVDD: -22
    [ 1.561836] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp mapping ok
    [ 51.110769] PM: bootloader does not support rtc-only!

    Do any of the above indicate any specific issue?

  • Now, the headphones playback can work and speaker playback can't, is it correct?

  • I did some more testing and it seems like it's a kernel issue. I was originally working with 4.19.94-ti-r74. I tried with an older kernel (4.19.94-ti-r42) and I had no issue. I'm don't know why that is. For now, though, my issue is resolved. Thank you for your help.