Hello,
I am running Android 11 operating system with IMX8MQ processor on custom carrier board. I am using SGTL5000 codec.
I am trying to record sound by connecting microphone to Line-In pin of SGTL5000 chip. However, Frame number is different from 0, that is, although frame size increases as recording time increases, no sound is heard in xxx.wav file that is recorded.
I am sure about microphone connection because same connection works with same sgtl5000 codec in our other Linux based custom devices.
In my researches, I see that some people have this problem but they measure 0 frames after recording. I do not have such a situation, I see that frame size increases as recording time increases.
As stated in SGTL5000 document, Line-In can bypass ADC and go to Headphone output. In order to cancel this, I cleared CHIP_ANA_CTRL -> SELECT_HP bit. I write the value 0x0036 to the CHIP_ANA_CTRL register on the driver side. Therefore, I think Line-In does not go directly to the HP output, it goes to the adc.
Also, I learned that the ADC_POWERUP Bit value in the CHIP_DIG_POWER register specified in the datasheet should be 0x1 for the adc to be enabled, when I check the driver side, the ADC_POWERUP and DAC_POWERUP bit values appear as 0x1. So there is no problem there either.
I use tinycap for sound recording.
I open sound files with tinyplay. I get sound through the lineout pins. I can listen to normal wav files, only the file I record has no sound.
I noticed that there is a capture mux variable in the tinymix settings. Even though I changed this to LINE_IN, I still cannot record sound properly.
Below, I save the default setting as tinymix as tinymix_default.txt.
Below, I am saving the changes I made to be able to record sound via tinymix as tinymix_changed.txt.
Changes I made via Tinymix
Controller Name |Default Value| Updated Value|
--------------------------------------------
CAPTURE VALUME | 0 0 > | 12 12 |
--------------------------------------------
CAPTURE SWITCH | OFF > | ON |
--------------------------------------------
Mic Volume | 0 > | 3 |
--------------------------------------------
Capture Mux | MIC_IN > | LINE_IN |
--------------------------------------------
SGTL5000 Power Connections:
VDDIO:1.8V
VDDD: 1.8V (VDDD powered up VDDIO and VDDA have alrady powered up according to ErrataSheet. We have solved it by hardware configuration)
VDDA: 3.3