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.

Why OMAP4460 Blaze tablet MIC tinycap 4 mic capture only @ 48 KHz and 32 bits/sample settings.

Hi all,

I am using tinycap to capture signals from 4 digital mics present in OMAP4460 Blaze tablet .

My tinycap settings are as follows.

tinycap /sdcard/test.pcm -D 0 -d 0 -c 4 -r 48000 -b 32 -p 768 -n 10

My question is 

1) Why am i not able to capture signals at sampling rate other than 48 KHz.

2) why cant i capture signals @ 16 bits /sample configuaration i.e. -b 16.

By the way  when i use device 1 i.e. -d 1 to capture 1 or 2 channel data i am able to capture signals @ samp_Rate other than 48 KHz and bits/sample as 16.

Regards,

Sreenivasa U

  • Sreenivasa,

    You already posted your topic in http://e2e.ti.com/support/omap/f/849/t/397509

    Please do not repost your questions!

    Please remove one of the both posts!

    We will familiarize with your issues and will provide you a solution.

    Please, observe e2e Forum rules.

    At first you can see the e2e thread - http://e2e.ti.com/support/omap/f/849/t/201746

    Best regards,

    Yanko

  • Hi Yanko,

    I did not mean to repost any issue.
    I did not want to combine too many questions in a single post, so that things will be missed out and thread will be difficult to follow.
    Though they are related , they are different kind of issues. 

    Do you want me to combine the two threads and add it to one of them?

    I have gone through the other threads associated with audio capture on OMAP4, but they do not  solve my problem.


    Thanks .
    Regards,
    Sreenivasa

  • Hello Sreenivasa,

    At first, I suggest you to enable ABE module in your OMAP4460 by the PRCM registers. It is needed to set Clock signals and enable power domain for DMIC module.

    Apply following configuration:

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

    CM1_ABE_DMIC_CLKCTRL[25:24] CLKSEL_SOURCE - 0x0: Functional clock is sourced from an internal clock
    CM1_ABE_DMIC_CLKCTRL[27:26] CLKSEL_INTERNAL_SOURCE -
    CM1_ABE_CLKSTCTRL[1:0] CLKTRCTRL - 0x1: ABE_SYSCLK is selected

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

    Could you provide what message is generated in your console after running of tinycap command?

    1) Why am i not able to capture signals at sampling rate other than 48 KHz.

    -  See tinycap.c file - https://android.googlesource.com/platform/external/tinyalsa/+/c1239623c178f0142352c28a0f968d826afcb078/tinycap.c

    2) why cant i capture signals @ 16 bits /sample configuration i.e. -b 16.

    - I suggest you to see Audio driver architecture - http://omappedia.com/wiki/Audio_Drive_Arch

    See also http://focus.ti.com/pdfs/wtbu/OMAP4430_ES2%20x_4460_ES1%200_PUBLIC_TRM_Addendum_ABE_HAL_vC.pdf

  • Hi Yanko,

    Thanks for the reply.

    1) What are the implications of these settings

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

    CM1_ABE_DMIC_CLKCTRL[25:24] CLKSEL_SOURCE - 0x0: Functional clock is sourced from an internal clock
    CM1_ABE_DMIC_CLKCTRL[27:26] CLKSEL_INTERNAL_SOURCE -
    CM1_ABE_CLKSTCTRL[1:0] CLKTRCTRL - 0x1: ABE_SYSCLK is selected

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

    Can i Do them from tinymix alone?

    2 )Could you provide what message is generated in your console after running of tinycap command?
    When i give the follwing command
    " tinycap /sdcard/test.pcm -D 0 -d 0 -c 4 -r 16000 -b 32 -p 600 -n 4 "
    i get the message " Unable to open PCM device (cannot set hw params: Invalid argument) ".

    When i give the following command
    " tinycap /sdcard/test.pcm -D 0 -d 0 -c 4 -r 48000 -b 16 -p 600 -n 4 "
    i get the message " Unable to open PCM device (cannot set hw params: Invalid argument) "


    3 ) I went through the links you have shared. It appears they talk about the ABE level settings to configure the the audio path.
    In my use case i use only the tinymix settings and the tinycap application.

    Please advice me on this.


    Regards,
    Sreenivasa
  • Hello Sreenivasa,

    Base on the log messages your ABE system is not enabled.
    Please apply suggested settings in PRCM's registers. You can use devmem2 or omapconf. The physical addresses of registers you can find in OMAP4460 TRM.

    Best regards,
    Yanko
  • HI Yanko,

    Thanks for the active support for the query.

    I looked for devmem2 and omapconf tool on the device, but could not find them.
    Can you share me the pre-built omapconf and devmem2 tool for Android version 4.1.1.

    I will apply the suggested settings and let see how things work out.

    Regards,
    Sreenivasa
  • Hello Sreenivasa,

    You can use only omapconf if you use Android. see the attached exe -1715.omapconf.zip

    devmem2 is only actual for linux.

    You must push omapconf in your Android as follow the sequence:

    1. adb root

    2. adb remount

    3. adb push omapconf /system/bin

    Please read omapconf's user guides - https://github.com/omapconf/omapconf

    Best regards,

    Yanko