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.

Does anybody know how to port dmic on blaze without twl6040

Other Parts Discussed in Thread: TWL6032, TWL6040

Now I try to port 4AJ.2.5p2 (blaze version) on my board (omap4460+twl6032) with only one

digital mic connected to ABE_DMIC_DIN1  and ABE_DMIC_CLK1, and without twl6040 

I have tried http://e2e.ti.com/support/omap/f/849/p/216244/762782.aspx#762782

and done this change in board-sdp4430.c :

OMAP4_MUX(ABE_CLKS, OMAP_PIN_INPUT_PULLDOWN | OMAP_MUX_MODE0),
OMAP4_MUX(ABE_DMIC_CLK1, OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
OMAP4_MUX(ABE_DMIC_DIN1, OMAP_PIN_INPUT | OMAP_MUX_MODE0),

I used soundrecord APP to test , but it fails. As you said it seems to follow analog path, and also tried 

# tinymix 46 1

# tinymix 47 2

# tinycap /data/dmiccap.wav -D 0 -d 1 -c 2 -r 48000

but it still fails...because unable to open /dev/snd/pcmCxDxp.

ps : when I type # tinymix I have nothing output

ctl    type    num    name  value

besides, I find ABE_DMIC_CLK1 is not input to DMIC, and data is not output to omap4460  

Does any one teach me how to turn on DMIC, or I miss something needed to modify

Thanks!

Allen

  • Hello Allen,

    The DMIC module has two types of clocks:

    - DMIC_ABE_FCLK - Functional clock
    - ABE_ICLK2 - Interface clock

    The PRCM register CM1_ABE_DMIC_CLKCTRL[1:0] MODULEMODE - enable DMIC module.

    This register CM1_ABE_DMIC_CLKCTRL - manages the DMIC clocks.

    Mux DMIC_FCLK  - CM1_ABE_DMIC_CLKCTRL[25:24] CLKSEL_SOURCE - Selects the internal clock to be used as the functional clock in case CLKSEL_SOURCE selects the internal clock source as the functional clock source.

    Mux DMIC_INT_FCLK  - CM1_ABE_DMIC_CLKCTRL[27:26] CLKSEL_INTERNAL_SOURCE - Selects the source of the functional clock between, internal source, CLKS pad and Audio SLIMBUS_CLK pad. The switching between the clocks is not guaranteed to be glitchless.

    ABE DMIC Signal Group Parameter Controls to Different Interface I/O Pads Mapping:

    CONTROL_SMART3IO_PADCONF_0[31:30]  DMIC_DR0_MB  - abe_dmic_clk1;
    CONTROL_SMART3IO_PADCONF_2[31] DMIC_DR0_LB          - abe_dmic_din1;

    I suggest using the following link with reference information about ABE subsystem: - http://www.omappedia.com/wiki/Audio_Drive_Arch

    Beside board-sdp4430.c, you must apply changes in the following files:
    - arch/arm/mach-omap2/ mux44xx.c

    - sound/soc/omap/ omap-dmic.c

    For more information about ABE Hardware abstraction layer. - http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2%20x_4460_ES1%200_PUBLIC_TRM_Addendum_ABE_HAL_vC.pdf

    Best regards,

    Yanko

  • Hi, Yanko

    Thanks for the response . I have definitely take a look at the link that you mentioned above.

    but I have a question need you help to clarify that I don't layout twl6040 on board and

    is it possible to bring up  DMIC ?  

    Thanks!

    Allen

  • Allen,

    It is possible to use DMIC without  TWL6040. I already said how must configure your clock signal to DMIC module.

    To activate DMIC module, you must configure its power state in ON State. For this purpose use register PM_ABE_PWRSTCTRL[1:0] POWERSTATE - 0x3 - Power state control
    This register controls the ABE domain power state to reach upon a domain sleep transition.

    However, you must present more details about your use case with DMIC module. If you want our support.

    Best regards,

    Yanko

  • Hi, Yanko

    Thanks for your support, and I have completed NO-twl6040 version.

    Then we continue to try another board which has twl6040, (omap4460+twl6040 blaze version)

    but met the same issue (NO sound) when testing by using tinycap

    The DMIC I have is one R-channel connected to abe_dmic_din1 and use abe_dmic_clk1.

    when I type

    #tinymix 48 2

    #tinymix 49 2

    #tinycap /data/001.wav -D 0 -d 1 -c 1 -r 48000

    it record successfully but no sound when I play it on PC by VLC (plays successfully)

    I have checked there is data in test.wav.

    Could you support me or offer other commands? my information is below.

    shell@android:/ # tinymix
    Number of controls: 75


    ctl type num name value


    0 ENUM 1 DL1 Equalizer Flat response
    1 ENUM 1 Sidetone Equalizer Flat response
    2 ENUM 1 AMIC Equalizer High-pass 0dB
    3 ENUM 1 DMIC Equalizer High-pass 0dB
    4 INT 1 DL1 Media Playback Volume 0
    5 INT 1 DL1 Tones Playback Volume 0
    6 INT 1 DL1 Voice Playback Volume 0
    7 INT 1 DL1 Capture Playback Volume 0
    8 INT 1 VXREC Media Volume 0
    9 INT 1 VXREC Tones Volume 0
    10 INT 1 VXREC Voice DL Volume 0
    11 INT 1 VXREC Voice UL Volume 0
    12 INT 1 Echo DL1 Volume 0
    13 INT 1 Echo DL2 Volume 0
    14 INT 1 AUDUL Media Volume 0
    15 INT 1 AUDUL Tones Volume 0
    16 INT 1 AUDUL Voice UL Volume 120
    17 INT 1 AUDUL Voice DL Volume 0
    18 INT 1 SDT UL Volume 0
    19 INT 1 SDT DL Volume 120
    20 INT 2 DMIC1 UL Volume 120 120
    21 INT 2 DMIC2 UL Volume 120 120
    22 INT 2 DMIC3 UL Volume 120 120
    23 INT 2 AMIC UL Volume 120 120
    24 INT 2 BT UL Volume 120 120
    25 BOOL 1 DL1 Mono Mixer Off
    26 BOOL 1 AUDUL Mono Mixer Off
    27 BOOL 1 DL1 MM_EXT Switch Off
    28 BOOL 1 DL1 BT_VX Switch Off
    29 BOOL 1 DL1 PDM_DL2 Switch Off
    30 BOOL 1 DL1 PDM Switch Off
    31 BOOL 1 Echo Mixer DL1 Off
    32 BOOL 1 Echo Mixer DL2 Off
    33 BOOL 1 Sidetone Mixer Capture Off
    34 BOOL 1 Sidetone Mixer Playback Off
    35 BOOL 1 Capture Mixer Tones Off
    36 BOOL 1 Capture Mixer Voice Playback Off
    37 BOOL 1 Capture Mixer Voice Capture Off
    38 BOOL 1 Capture Mixer Media Playback Off
    39 BOOL 1 Voice Capture Mixer Tones Playback Off
    40 BOOL 1 Voice Capture Mixer Media Playback Off
    41 BOOL 1 Voice Capture Mixer Capture Off
    42 BOOL 1 DL1 Mixer Tones Off
    43 BOOL 1 DL1 Mixer Voice Off
    44 BOOL 1 DL1 Mixer Capture Off
    45 BOOL 1 DL1 Mixer Multimedia Off
    46 ENUM 1 MUX_VX1 None
    47 ENUM 1 MUX_VX0 None
    48 ENUM 1 MUX_UL11 DMic0R
    49 ENUM 1 MUX_UL10 DMic0R
    50 ENUM 1 MUX_UL05 None
    51 ENUM 1 MUX_UL04 None
    52 ENUM 1 MUX_UL03 None
    53 ENUM 1 MUX_UL02 None
    54 ENUM 1 MUX_UL01 None
    55 ENUM 1 MUX_UL00 None
    56 INT 2 Capture Preamplifier Volume 1 1
    57 INT 2 Capture Volume 0 0
    58 INT 2 Aux FM Volume 0 0
    59 INT 2 Headset Playback Volume 0 0
    60 INT 2 Handsfree Playback Volume 0 0
    61 INT 1 Earphone Playback Volume 0
    62 ENUM 1 Headset Power Mode Low-Power
    63 ENUM 1 PLL Selection Low-Power
    64 BOOL 1 AUXR Playback Switch Off
    65 BOOL 1 AUXL Playback Switch Off
    66 BOOL 1 Earphone Playback Switch Off
    67 ENUM 1 Vibra Right Playback Input FF
    68 ENUM 1 Vibra Left Playback Input FF
    69 ENUM 1 Headset Right Playback Off
    70 ENUM 1 Headset Left Playback Off
    71 ENUM 1 Handsfree Right Playback Off
    72 ENUM 1 Handsfree Left Playback Off
    73 ENUM 1 Analog Right Capture Route Off
    74 ENUM 1 Analog Left Capture Route Off

    Thanks!

  • Hello Allen,


    My new suggestion is using the commands and recommendation described in this link: http://www.omappedia.com/wiki/Audio_Drive_Arch


    I think that your ABE subsystem is not initialized.

    Check the clock signals and power states of all modules in ABE, by the dedicated registers in PRCM.

    Check your ALSA configuration.

    Best regards,

    Yanko