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.

Omap4470 DMIC issue

Intellectual 620 points

Replies: 5

Views: 4138

Hi TI,

When I use OMAP4470 DMIC to capture audio by tinycap, the kernel show the errors as below at the beginning:

<6>[ 31.683319] DMA synchronization event drop occurred with device 67
<6>[ 31.706115] DMA synchronization event drop occurred with device 67
<6>[ 31.733551] DMA synchronization event drop occurred with device 67
<6>[ 31.767608] DMA synchronization event drop occurred with device 67
<6>[ 31.857482] DMA synchronization event drop occurred with device 67
<6>[ 31.867889] DMA synchronization event drop occurred with device 67
<6>[ 31.900054] DMA synchronization event drop occurred with device 67
<7>[ 41.909057] ALSA sound/core/pcm_lib.c:1854 capture write error (DMA or IRQ trouble?)

Is it a problem?

5 Replies

  • Hello Wei Li,

    Based on the presented log, there are no problems.
    Could you explain:

    What is the version of your Android?
    What is the hardware platform in your case?

    Best regards,
    Yanko

      Please click the Verify Answer button on this post if it answers your question.

            Be sure to read the OMAP Application Processors Forum Guidelines and FAQ

  • In reply to Yanko Todorov-XID:

    Hi Yanko,

    The Android version is 4.2.2, and the release is 4J2.5P2 OMAP4 Jelly Bean.

    Then hardware platform is OMAP4 BlazeTablt.

    And I changed the DMIC internal clock to abe_sys_clk, it prints the DMA drop event. If I used the DMIC internal clock to adb_24M_FCLK, there is no the prints.

    Why there have the prints about DMA? What does it mean? How to avoid it? I have to use adb_sys_clk.

    Thanks,

    Wei Li

  • In reply to Wei Li:

    Hello Wei Li,

    Take a look on the sequence for enabling abe_sys_clk:

    1. PM_ABE_PWRSTCTRL[1:0] POWERSTATE - 0x3: ON State

    2. CM1_ABE_CLKSTCTRL[1:0] CLKTRCTRL - 0x2: SW_WKUP: Start a software forced wake-up transition on the domain.

    3. CM1_ABE_AESS_CLKCTRL[1:0] MODULEMODE - 0x2: Module is explicitly enabled.

    4. CM1_ABE_DMIC_CLKCTRL[27:26] CLKSEL_INTERNAL_SOURCE - 0x1: ABE_SYSCLK is selected
        CM1_ABE_DMIC_CLKCTRL[1:0] MODULEMODE - 0x2: Module is explicitly enabled.
        Read CM1_ABE_DMIC_CLKCTRL[17:16] Read 0x0: Module is fully functional

    5. Check if this bit is set PM_ABE_DMIC_WKDEP[7] WKUPDEP_DMIC_DMA_SDMA. If yes disable SDMA dependence. 0x0: Dependency is disabled

    I also use 4AJ2.5P2 JB release for OMAP4 and don't have such problems.

    Best regards,

    Yanko

      Please click the Verify Answer button on this post if it answers your question.

            Be sure to read the OMAP Application Processors Forum Guidelines and FAQ

  • In reply to Yanko Todorov-XID:

    Hi Yanko,

    Thank you very much for your quick reply.

    Could you share your changes about omap_dmic.c and sdp44xx_panda_aic3256.c to me? I can verify it.

    Thanks,

    Wei

  • In reply to Yanko Todorov-XID:

    Hi, I have similar problem and try to follow your guide. But still can't record any sound from my DMIC (there is still no CLK on DMIC_CLK line).
    My set-up:


    OMAPCONF (rev 1.52 built Wed Dec 12 15:03:01 UTC 2012)
    
    HW Platform Revision:
      OMAP4460 ES1.1 GP Device (HIGH performance (1.5GHz))
      TPS62361
      TWL6030  ES2.1 (EPROM rev36.0)
      TWL6040  ES1.1
    
    SW Build Details:
      Build:
        Version: Ubuntu 12.04.1 LTS
      Kernel:
        Version: 3.4.0-1489-omap4
        Author: dart@ubuntu
        Toolchain: gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)
        Type: #28 SMP PREEMPT
        Date: Wed Feb 4 20:53:15 CET 2015

    After your changes I see my DMIC 'running'
    |----------------------------------------------------------|
    | DMIC       Module Configuration                   |
    |--------------------------------|-------------------------|
    | Mode                   | Enabled (EXPLICITLY)    |
    | FCLK Source     | 24MHz from DPLL_ABE  |
    | Idle Status          | OCP-ONLY Idle                 |
    | Last Context       |                                             |
    |   PERIPHMEM           | LOST                          |
    |   DFF-based               | LOST                          |
    |----------------------------------------------------------|



    (I get it by: omapconf show abe)

    and here is my full abe dump

    |---------------------------------------------------|
    | Reg. Name               | Reg. Addr  | Reg. Val.  |
    |---------------------------------------------------|
    | PM_ABE_PWRSTCTRL        | 0x4A306500 | 0x00330103 |
    | PM_ABE_PWRSTST          | 0x4A306504 | 0x00000337 |
    | RM_ABE_AESS_CONTEXT     | 0x4A30652C | 0x00000000 |
    | RM_ABE_PDM_CONTEXT      | 0x4A306534 | 0x00000000 |
    | RM_ABE_DMIC_CONTEXT     | 0x4A30653C | 0x00000101 |
    | RM_ABE_MCASP_CONTEXT    | 0x4A306544 | 0x00000001 |
    | RM_ABE_MCBSP1_CONTEXT   | 0x4A30654C | 0x00000101 |
    | RM_ABE_MCBSP2_CONTEXT   | 0x4A306554 | 0x00000101 |
    | RM_ABE_MCBSP3_CONTEXT   | 0x4A30655C | 0x00000101 |
    | RM_ABE_SLIMBUS_CONTEXT  | 0x4A306564 | 0x00000101 |
    | RM_ABE_TIMER5_CONTEXT   | 0x4A30656C | 0x00000001 |
    | RM_ABE_TIMER6_CONTEXT   | 0x4A306574 | 0x00000001 |
    | RM_ABE_TIMER7_CONTEXT   | 0x4A30657C | 0x00000001 |
    | RM_ABE_TIMER8_CONTEXT   | 0x4A306584 | 0x00000001 |
    | RM_ABE_WDT3_CONTEXT     | 0x4A30658C | 0x00000001 |
    | CM_CLKSEL_ABE           | 0x4A004108 | 0x00000001 |
    | CM_ABE_CLKSTCTRL        | 0x4A004500 | 0x00002103 |
    | CM1_ABE_L4ABE_CLKCTRL   | 0x4A004520 | 0x00020001 |
    | CM1_ABE_AESS_CLKCTRL    | 0x4A004528 | 0x00070000 |
    | CM1_ABE_PDM_CLKCTRL     | 0x4A004530 | 0x00030000 |
    | CM1_ABE_DMIC_CLKCTRL    | 0x4A004538 | 0x00020002 |
    | CM1_ABE_MCASP_CLKCTRL   | 0x4A004540 | 0x00030000 |
    | CM1_ABE_MCBSP1_CLKCTRL  | 0x4A004548 | 0x00030000 |
    | CM1_ABE_MCBSP2_CLKCTRL  | 0x4A004550 | 0x00030000 |
    | CM1_ABE_MCBSP3_CLKCTRL  | 0x4A004558 | 0x00030000 |
    | CM1_ABE_SLIMBUS_CLKCTRL | 0x4A004560 | 0x00030000 |
    | CM1_ABE_TIMER5_CLKCTRL  | 0x4A004568 | 0x00030000 |
    | CM1_ABE_TIMER6_CLKCTRL  | 0x4A004570 | 0x00030000 |
    | CM1_ABE_TIMER7_CLKCTRL  | 0x4A004578 | 0x00030000 |
    | CM1_ABE_TIMER8_CLKCTRL  | 0x4A004580 | 0x00030000 |
    | CM1_ABE_WDT3_CLKCTRL    | 0x4A004588 | 0x00030000 |

    |---------------------------------------------------|



    What should I do more to find it working? And if I set it correctly will I see a CLK even without connected any DMIC for DIN lines?

    PS. I record it with:
    arecord -D hw:0,0 -d 5 -f S32_LE -r 48000 test.wav
    (previously I change also do:            amixer cset numid=61 1)



    Regards,
    Paweł Krzyżanowski

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.