SLN-ALEXA-IOT microphone gain control

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SLN-ALEXA-IOT microphone gain control

1,805 Views
pawel_dobrowols
Contributor I

Hi,

We are facing problems with controlling gain of microphone. Our main suspect is SLN_DSP_SetGainFactor from SLN_inteligence toolbox. Because of lack of online documentation , can anyone share information how to control gain(volume) of input microphone to i.MX RT106x.

Regards,

pjd

Labels (1)
6 Replies

1,555 Views
pawel_dobrowols
Contributor I

 Hi kerryzhou‌,

I've forwarded your questions to our sales department, I will share answer as soon as it bounce back.

Thank you for details, can you tell me what is range of that gain and in which units is it?

Regards,

pjd

0 Kudos
Reply

1,555 Views
victorjimenez
NXP TechSupport
NXP TechSupport

Hello Pawel Dobrowolski

Regarding your question please see my comments below. 

Can you tell me what is the range of that gain and in which units is it?

There is not a defined range due to the natural behavior of the module. Going past a certain point will cause the signal to get distorted or clipped.

The units are gain shifts. 

Basically it's a 32Bit sample that is shifted left by the value given to the gain function, it will then perform DC offset and converted to 16Bit sample. 

Best Regards, 

Victor 

1,555 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pawel Dobrowolski,

we have a function that changes the gain below:

 

static int32_t pdm_to_pcm_dsp_init(uint8_t **memPool)

{

    int32_t dspStatus = kDspSuccess;

 

    dspStatus = SLN_DSP_Init(memPool, pvPortMalloc);

 

    if (kDspSuccess == dspStatus)

    {

        dspStatus = SLN_DSP_SetCaptureLength(memPool, PDM_SAMPLE_COUNT * PDM_CAPTURE_SIZE_BYTES);

    }

 

    if (kDspSuccess == dspStatus)

    {

        dspStatus = SLN_DSP_SetGainFactor(memPool, 3);

    }

 

    return dspStatus;

}

 

This function does not work runtime. The gain factor is set to be perfect for Far-Field support. We don’t document this function because we don’t expect the customer to reduce or increase the gain (because it’s configured for optimal performance).

 

The higher the number, the higher the gain. The gain is applied before the DC Offset which ensures it doesn’t lose valuable precise PCM data.

Could you please tell us how you are using the function?

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

1,555 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pawel Dobrowolski,

   Could you please tell me the following information?

1. where you gets SLN_inteligence toolbox.

2. what is your development environment , hardware board & SDK package?

Waiting for your updated information.

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,555 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Pawel Dobrowolski,

  Any updated information about my above question?

  We need your detail information at first.

  Waiting for your reply!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply

1,555 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Pawel Dobrowolski ,

   Thanks for your interest in the NXP RT product, I would like to provide service for you.

    I already help you to check your question with our related department, please keep patient!

   Thanks a lot for your understanding!

Have a great day,
Kerry

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------