imxrt1010 EVM headphone output extremely low

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

imxrt1010 EVM headphone output extremely low

3,467 Views
bowerymarc
Contributor V

I loaded the sai demo app into the imxrt1010 EVM board, using the WM8960 codec.  The output level is incredibly low.  50mV rms.  Data sheet for WM8960 indicates full scale level with 3V3 supply is 1V rms.

I noticed that the volume is limited to 100, when the volume register in the chip can go up to 127.  Even so, that doesn't explain the discrepancy.  Has anyone else noticed this?

There is also a high frequency tone in the audio.

Best,
Marc

imxrt1010_sai_sinewave.png

0 Kudos
Reply
9 Replies

1,157 Views
ET_Dev
Contributor III

@bowerymarc Did you every find a solution to this? I have the same problem on a imxqxp evaluation based design. Beyond approximately 100mV (Peak to Peak) the audio is clipping in my case. 

0 Kudos
Reply

3,458 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi bowerymarc,

  Which detail points you test on your side?

image.png  HP_L and HP_R?

About the volume, in fact, we normally use % to indicate it, so when you run it, do you test the related register, whether that can up to the max volume, the SDK have the API code to adjust the volume, when you modify that volume to the highest, whether the output has a larger level or not on your side?

Any updated information, please kindly let me know.

Best Regards,

Kerry

0 Kudos
Reply

3,455 Views
bowerymarc
Contributor V

I plugged a TRRS cable into the headphone out jack and ran the two output channels to the AP.  

I traced through the code and compared it to the WM8960 data sheet.  The headphone volume register can be set for up to +6dB gain, which is 127 (bits 0-7 all 1).  But the driver function limits this value to 100.

If I use a lower level call to get around that assert, then I can get 300mV RMS out of the headphone jack, which is still much lower than 1V RMS per the data sheet.

Thx

M

0 Kudos
Reply

3,450 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi bowerymarc,

   1. About the volume

image.png

In fact, it is the percent, if 100, it will get the max value:

#define WM8960_HEADPHONE_MAX_VOLUME_vALUE 0x7FU
#define WM8960_HEADPHONE_MIN_VOLUME_vALUE 0x30U

 

mappedVolume = (volume * (WM8960_HEADPHONE_MAX_VOLUME_vALUE - WM8960_HEADPHONE_MIN_VOLUME_vALUE)) / 100U +
WM8960_HEADPHONE_MIN_VOLUME_vALUE;

retVal = WM8960_SetVolume((wm8960_handle_t *)((uint32_t)(((codec_handle_t *)handle)->codecDevHandle)),
kWM8960_ModuleHP, mappedVolume);

So, this part, even you give 100, the real value should be mappedVolume=(100*(127-48)/100 + 48)=127

It is the max data.

2. About the 1V RMS 

  Maybe still other register need to set, more details need to check the codec datasheet, I will also check with our audio expert, any updated information, will let you know later.

 

Best Regards,

kerry

0 Kudos
Reply

3,435 Views
bowerymarc
Contributor V

Hi, I didn't notice that code, maybe I have an older version.  And my copy had some ASSERTS to check the input variables.  Are you sure you're looking at the RT1060 code?  But I called WM8960_SetVolume directly so it had the same effect.  And I checked all the other registers, everything else seems to be set to maximum level, but please double check.

0 Kudos
Reply

3,433 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi bowerymarc,

  You mentioned RT1010 in the previous post, so I am checking:

SDK_2.9.1_EVK-MIMXRT1010\boards\evkmimxrt1010\driver_examples\sai\edma_transfer

 

kerryzhou_0-1615441417969.png

You can check it again, SDK2.9.1

Wish it helps you!

Best Regards,

Kerry

 

0 Kudos
Reply

3,398 Views
bowerymarc
Contributor V

Hi Kerry,

As I said, I called the next lower level which had the ability to set the volume to full.  And this is how it was set when I made the measurements attached to this example.  So the CODEC is not putting out the full voltage per the IC spec sheet.

Thanks,
Marc

0 Kudos
Reply

3,379 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi bowerymarc,

   Thanks for your updated information, so now, even you set the volume to the max 127, you still can't get the codec mentioned RMS 1V, right?

kerryzhou_0-1616561466567.png

Your real test point is J11_2 and J11_3, the wave between these to pins, didn't get the related data?

Do you check the HP_L to ground, whether it is 1V?

This is mainly the codec question, I think you also can check with the codec company how to get the datasheet's mentioned max data.

Anyway, after you confirm the detail test point, I will help you to check with internal expert. But I don't have your first post picture tool, I just have the oscilloscope, so I need to confirm your real test point at first.

 

Best Regards,

kerry 

 

0 Kudos
Reply

3,283 Views
bowerymarc
Contributor V

Hi Kerry,

Yes those test points are connected to the jack, so same potential.

Best,
Marc

0 Kudos
Reply