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.

TLV320AIC3256: DMIC capture volume is very low

Part Number: TLV320AIC3256


Hi,

I am trying to integrate the codec with nvidia xavier agx, interfacing with i2c and i2s. I have speaker working fine, but have issues with DMIC. 

It seems recording, but the recording audio volume is very low, hard to hear. I have disabled all analog input blocks.

Do you have any recommended setting to improve record volume for DMIC?

Regards,

Vijay

  • Are you sending a full scale digital input to the CODEC? The device has digital volume control registers(0x41,0x42,0x53,0x54) but they are only for attenuation. With a full scale digital inputs, the analog full scale output is 2Vpp.

  • Yes, we are using full scale digital input to codec, below are the registers dump for page 0 and page 1

    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 00 00 10 00 03 91 08 12 40 00 00 89 82 00 80 02 ..?.????@..??.??
    10: 00 08 89 82 80 01 00 04 00 00 01 00 00 01 84 00 .?????.?..?..??.
    20: 00 00 00 00 cc 00 11 00 00 00 0e 00 00 00 00 00 ....?.?...?.....
    30: 00 00 00 00 00 12 03 0e 03 00 00 00 01 01 00 14 .....????...??.?
    40: 0c db db 00 6f 38 00 00 00 00 00 ee 10 d8 7e e3 ???.o8.....???~?
    50: 00 dc 00 28 28 00 00 00 7f 00 00 00 00 00 00 00 .?.((...?.......
    60: 7f 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    c0: 00 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 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 ................
    No size specified (using byte-data access)
    0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
    00: 01 00 00 00 00 00 00 00 00 00 00 10 00 00 08 08 ?..........?..??
    10: 40 40 1d 1d 00 00 00 00 00 00 00 00 00 00 00 00 @@??............
    20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    30: 00 00 00 00 00 00 00 00 00 00 fc da da 00 03 00 ..........???.?.
    40: 00 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 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 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    c0: 00 00 00 00 00 00 00 00 00 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 00 00 00 00 00 00 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 ................

    What are the CM1L & CM1R inputs ? How can we improve digital microphone input gain? 

    Also tlv320aic32x4.c linux driver doesn't seems to support DMIC input, I have to set registers below registers manually to enable dmic.

    i2cset -f -y 1 0x18 0x37 0x0e
    i2cset -f -y 1 0x18 0x38 0x02
    i2cset -f -y 1 0x18 0x51 0xfc
  • Hi,

    TLV320AIC3256 Application Reference (Rev. A)

    Reference application guid section 2.4.4.3.(1) for digital volume control and DRC this could be limiting what the perceived output volume of device is.

    Also 2.4.4 in its entirety for more information on digital volume/gain control

  • Hi Douglas,

    Thanks, my issue is not with playback, issue is with record. Playback works fine, I am able to play various audio files at different volumes.

    When I record audio and playback, I hear low voices of recording, even I tried to play the same recorded audio on computer/laptops, I see same quality of the audio, voice recorded is very low.

    Do you know if any of the codec/register settings could improve the quality of recorded voice ? 

    Any reason DMIC support is not available in  tlv320aic32x4.c linux driver?

  • Also, in table 2-2 of reference guide note the mux of digital data (O4-P8), please confirm that the Digital output is going to the intended pin.

    The linux driver is only a configuration software, it supports DMIC input

  • We have digital microphone data line is connected to SCLK_MFP3 (pin12)
    and digital microphone clock is connected to MISO_MFP4 (pin15)

    register 0x37 is programmed with 0x0e and  register 0x38 programmed with 0x02.

    I am sure the connection is fine, as I was able to record , only the issue is quality of recording.

    elixir.bootlin.com/.../tlv320aic32x4.c
    I don't see DMIC in DAPM INPUT options.

    SND_SOC_DAPM_OUTPUT("HPL"),
    SND_SOC_DAPM_OUTPUT("HPR"),
    SND_SOC_DAPM_OUTPUT("LOL"),
    SND_SOC_DAPM_OUTPUT("LOR"),
    SND_SOC_DAPM_INPUT("IN1_L"),
    SND_SOC_DAPM_INPUT("IN1_R"),
    SND_SOC_DAPM_INPUT("IN2_L"),
    SND_SOC_DAPM_INPUT("IN2_R"),
    SND_SOC_DAPM_INPUT("IN3_L"),
    SND_SOC_DAPM_INPUT("IN3_R"),
    SND_SOC_DAPM_INPUT("CM_L"),
    SND_SOC_DAPM_INPUT("CM_R"),

    Also I don't see anywhere in codec driver we enable DMIC routing by setting "Page 0 / Register 81: ADC Channel Setup Register - 0x00 / 0x51".

  • Hi Vijaya,

    Can you show how you set up mic and codec circuit in schematic?

    I also added Shenghao, our linux driver expert, to comment and troubleshoot as well.

    Regards,

  • Hi Guy,

    What kind of DMIC have you used? PDM-MIC?

    Can you share related schematics

  • Ho Douglas,

    Attached schematics.

  • Hi Vijaya,

    PDM MIC connections look good.

    register 0x37 is programmed with 0x0e and  register 0x38 programmed with 0x02.

    Also make sure pg0, R81: 0x55 -> D5:D4= 10 and that all analog blocks for adc channels are powered down.

    Also make sure pg 0, register 25-33 are aligned with your application as well, if not configured correctly could affect multifunction pins.

  • Have you calibated the PMIC? One more thing, do you know, what's the spec of the audio signal? MSB or LSB? Is there 1-delaly berween the audio singal and bit clk? Can you measure the bitclk, ws clk and audio signal with scope? What's the freq is offered to pmic?

  • Hi Shenghao, I am not sure about PMIC calibration, how to do that?

  • Hi Vijaya,

    For Pmic calibration, kindly consult to PMIC vendor.

    One more thing, can you check whether the audio signal from PMIC is little endian or big endian? Right-justified, left-justified or center? what's the bitwidth of the audio sample and audio channel? What's the offset(how many bitclk cycle delay) between the bit clk and audio sample?

    Looking forward to your reply.

    Good luck