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.

Digital microphone interface on TPS65951

Other Parts Discussed in Thread: TPS65951, TPS65950

Hello,
I'm trying to get audio data from digital microphone input (Digimic0) of TPS65951, but looks like PDM data is interpreted incorrectly and I see only noise in audio data. Moreover, noice level is different on left and right channel (both are based on identical ADMP521 chips), you can see this on screenshot:



Codec operates in audio mode (OPT_MODE = 1).
If I enable digital loopback (TX1->RX2) I can hear this catched data (noise, but no any sounds). It means that problem caused by codec, not CPU.
If I switch TX1 to Analog microphone I got correct data and can hear sound from microphone by the same digital loopback. It means that TX1 path and RX2 path are configured correct.
I see correct CLK on DIG.MIC.CLK0 line (2.4MHz), correct VDD on MICBIAS1.OUT line (1.8V), and see that microphones output data to DIG.MIC.0 line by oscilloscope.
ADCMICSEL Register = 0x3

What else should I do to get correct audio data from the digital microphone?

  • Can you please provide your register settings?
  • Also, what is your sample frequency set at? PDM interface is only availabel when fs = 48kHz.
  • Thank you for respond. Fs=48kHz, CLK=2.4Mhz.
    Here is registers dump:

    [   74.381896] register: 0x01 - 0xa3
    [   74.381927] register: 0x02 - 0xc3
    [   74.381927] register: 0x03 - 0x00
    [   74.381927] register: 0x04 - 0x25
    [   74.381958] register: 0x05 - 0x00
    [   74.382080] register: 0x06 - 0x00
    [   74.382080] register: 0x07 - 0x04
    [   74.382110] register: 0x08 - 0x03
    [   74.382110] register: 0x09 - 0x00
    [   74.382110] register: 0x0a - 0x1c
    [   74.382141] register: 0x0b - 0x1c
    [   74.382141] register: 0x0c - 0x00
    [   74.382141] register: 0x0d - 0x00
    [   74.382171] register: 0x0e - 0x01
    [   74.382171] register: 0x0f - 0x00
    [   74.382171] register: 0x10 - 0x3f
    [   74.382202] register: 0x11 - 0x3f
    [   74.382202] register: 0x12 - 0x3f
    [   74.382202] register: 0x13 - 0x3f
    [   74.382232] register: 0x14 - 0x25
    [   74.382232] register: 0x15 - 0x00
    [   74.382232] register: 0x16 - 0x00
    [   74.382263] register: 0x17 - 0x08
    [   74.382263] register: 0x18 - 0x00
    [   74.382293] register: 0x19 - 0x32
    [   74.382293] register: 0x1a - 0x32
    [   74.382293] register: 0x1b - 0x33
    [   74.382324] register: 0x1c - 0x32
    [   74.382324] register: 0x1d - 0x38
    [   74.382324] register: 0x1e - 0x00
    [   74.382354] register: 0x1f - 0x55
    [   74.382354] register: 0x20 - 0x00
    [   74.382354] register: 0x21 - 0x00
    [   74.382385] register: 0x22 - 0x04
    [   74.382385] register: 0x23 - 0x05
    [   74.382385] register: 0x24 - 0x42
    [   74.382415] register: 0x25 - 0x00
    [   74.382415] register: 0x26 - 0x00
    [   74.382415] register: 0x27 - 0x00
    [   74.382446] register: 0x28 - 0x00
    [   74.382446] register: 0x29 - 0x00
    [   74.382446] register: 0x2a - 0x3f
    [   74.382476] register: 0x2b - 0x05
    [   74.382476] register: 0x2c - 0x00
    [   74.382507] register: 0x2d - 0x00
    [   74.382507] register: 0x2e - 0x00
    [   74.382507] register: 0x2f - 0x00
    [   74.382537] register: 0x30 - 0x13
    [   74.382537] register: 0x31 - 0x00
    [   74.382537] register: 0x32 - 0x00
    [   74.382568] register: 0x33 - 0x00
    [   74.382568] register: 0x34 - 0x00
    [   74.382568] register: 0x35 - 0x79
    [   74.382598] register: 0x36 - 0x11
    [   74.382598] register: 0x37 - 0x00
    [   74.382598] register: 0x38 - 0x00
    [   74.382629] register: 0x39 - 0x00
    [   74.382629] register: 0x3a - 0x16
    [   74.382629] register: 0x3b - 0x00
    [   74.382659] register: 0x3c - 0x44
    [   74.382659] register: 0x3d - 0x69
    [   74.382690] register: 0x3e - 0x02
    [   74.382690] register: 0x3f - 0x00
    [   74.382690] register: 0x40 - 0x00
    [   74.382720] register: 0x41 - 0x00
    [   74.382720] register: 0x42 - 0x00
    [   74.382720] register: 0x43 - 0x00
    [   74.382751] register: 0x44 - 0x32
    [   74.382751] register: 0x45 - 0x00
    [   74.382751] register: 0x46 - 0x00
    [   74.382781] register: 0x47 - 0x00
    [   74.382781] register: 0x48 - 0x00
    [   74.382781] register: 0x49 - 0x00

  • the problem was caused by broken microphone. please do not proceed with the issue and just close it.
  • Hi Anton,
    I'm facing with digital microphone on TPS65950. Can you tell me how to set 2.4MHz clock for DIG.MIC.CLK0?
  • As it said in documentation, the appropriate frequency of DIG_MIC_CLK is generated by the audio PLL, and the ratio between DIG_MIC_CLK and the sample rate equals 50.
    The PDM interface is available only when Fs = 48kHz which is set by changing TWL4030_REG_CODEC_MODE register to TWL4030_APLL_RATE_48000 value.

  • Hi,

    thanks for your answer.

    Can you tell me where I can change TWL4030_REG_CODEC_MODE register value? Is it in /kernel/sound/soc/codecs/twl4030.c.

    And another problem, below is my digital microphone clock connection. Do I need pin mux for that pin to use DIG.MIC.CLK0 mode? And how I do that?

    Thanks you.