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.
Which detail points you test on your side?
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.
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.
1. About the volume
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 +
retVal = WM8960_SetVolume((wm8960_handle_t *)((uint32_t)(((codec_handle_t *)handle)->codecDevHandle)),
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.
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.
You mentioned RT1010 in the previous post, so I am checking:
You can check it again, SDK2.9.1
Wish it helps you!
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 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?
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.