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.

OMAP4 Android Audio doubts

hi ,

I am working on OMAP4460 Blaze tablet running Android 4AI.1.7 ICS.

I have the following doubts w.r.t. the Audio Architechture (both hw and sw).

1) It is possible to open multiple sound devices using tinyalsa utilities. Also When i run the sound recorder/music player application the Audio HAL is configured to open device 1 / 6 (ie MM_UL2 or MM_DL ) respectively by default . Is it possible to open multiple devices simultaneously from the Audio Flinger/HAL itself ( like two devices for audio capture MM_UL and MM_UL2)  ? If yes how ?

Also is there any way (without modifying the framework src) in which we can pass a custom param/pointer from the audio flinger to the Audio HAL ?

2) On device 0 ie MM_UL (for audio capture), this device can be opened with audio format as signed 32bit LE only. Is this a limitation of this device ? can i configure to signed 16bit LE ?

3) Similar to question 2) above , the playout devices audio format are configured to S16bit LE. Is this a limitation ? can this be changed ?

4) Is there a pre-built AEC s/w (Echo Cancellation) module ? If yes , how to use it ; If no , if no , Is there a provision to plugin custom AEC s/w ?

5) I have a loopback application at the higher layers (OpenSLES). I see that the end to end latency is quite high. Is there any way to reduce this latency ? (i am ok with base port changes)

Thanks in Advance.

Regards,

Shrish.

  • Adding to the above doubts.

    6) I have captured audio using the Digital Mics Dmic0/1/2 with Mic gains set to max (i.e. 149 ; using tinymix). The sound quality seems to be good but i see there is a lot of electrical noise (a constant "humming" tone in the background). This can clearly be seen through Cool Edit software. Is there any way to reduce this ?(hardware modifications?).

    (I have attached a sample pcm file recorded ; to play this please set the player ( like goldwave etc) settings to : file type-raw/pcm , PCM signed 32 bit little endian mono at 48kHz4834.audio_channel_1.zip )

    Thank you.

    Regards,

    Shrish

  • Hi Shrish,

    Here some answers to your questions:

    1) Yes, it is possible to open multiple sound devices using tinyalsa, all you need to so is to set the path and open the FE port. Also it is possible to open multiple devices from Audio Flinger, what you need to do is to open the streams. I am not very familiar with this, so you need to look into Android source code. Also It might involve several changes in the audio_hw.c file to be able to open several pcm streams.

    2) It is not a limitation in the device, but there where some changes in the driver to support 32 bits LE. If you change the driver it should work.

    3) Same as above.

    4) No, there isn't anything for Echo Cancellation. What you can do is to connect an echo cancellation device ie to any McBSP port available

    5) Android has some layers for Mixing, re sampling, etc that increase the latency, because it is not much when coming from ALSA (few msec), so ypu may want to bypass that process.

  • About the 6) can you provide more information on how are you doing the testing?

  • hi ICe,

    Thank you for Clarfying the doubts.

    For 6) I am using the Digital Mic and capturing through tinycap application and the envirinment was quite noise free.  (the same same effect is observed on analog headset mic.) The Blaze tablet is powered by external adapter.

    I have attached another pcm file , here recorded via the analog mics on headset (PCM signed 16 bit little endian sterio at 48kHz). Here after ~6 seconds, i increased the gain to maximum (the noise is quite clear then). There are two noises , one is a constant high frequency tone and other a electrical hum (low freq ~50Hz , Ac mains supply is at 50-60Hz). Do you need any more info ?

    Regards,

    Shrish

    2262.Captured_audio.zip

  • Hi Shrish,

    The noise problem in you file seems to me that is being caused for an electrical source. I just test it and I don't see anything like that.

    I am attaching the file I just record, it has a gain of 120 since the beginning to the sec 9, the I change the value to 149, then there is some noise do to the high gain in the control that is amplifying the static, also the amplitude of the audio versus noise is very significant. But it is different to yours for what I can see.

    2275.filecapdmic.wav.zip

  • Thanks ICe,

    Can you tell me how did you record the audio ?

    Like, Did you use Blaze Tablet 2  ? power source - external or battery ? Set up ?

    (Also , do you know how to power the Blaze tablet 2 through Battery ? because the battery Power lines on the SOM and the corresponding connector on Blaze tablet 2 (J5 in schematics) are not aligned and hence cannot be powered via battery )

    Regards,

    Shrish

  • Hi Shrish,

    I recorded it in a Blaze Tablet2 using an external power source ( the one that comes with the Tablet) using the tinycap tool.

    Sorry, I don't know, I haven't using it with battery. As far as I know all you have to do is to move the switch that is close to the HDMI port to battery symbol.

  • Hi ICe,

    I have one more doubt.

    In the ABE block diagram , i see an echo reference path. Can you please tell me how can i tap this.

    Is it possible to tap this at the tinyalsa layer ? Audio HAL ? kernel level ?

    I see it as an input to VX_UL ..can you clarify on this.

    Regards,

    Shrish

     

  • hi ,

    I solved the Noise issue,

    It was mainly due to the touch screen. Once i switched off the screen , i didnt observe any electrical noise.

    However i need clarification on the "echo reference path".

    Regards,

    Shrish

  • Hi Shrish,

    There is no echo_ref as far as I know in OMAP4 ABE, if you look at the images that has the echo_ref path it also says OMAP4 OMAP5, so is an image that represents ABE components on both SoCs. But the last image is only for OMAP4 SoC and it doesn't have echo_ref path. So it seems like that feature will be added in OMAP5.