Please provide response to the above queries and guide us. We need fix the sound issue very urgently. Thanks.
- Please check ADMAIF is not connected to any other I2S mux. For this please check I2S1 Mux, I2S2 Mux and soon. OR Try with some other ADMAIF (might be ADMAIF4).
- Please try to compare the mixer control settings (mainly codec) if you have dump incase of working scenario.
- Check the hardware connections.
- Check the DT if any new changes are done. You can also probe the data clock lines to check where the things went wrong.
Yes you can do if no failures are observed and have access to required tools and files.
Please note the above command is not the valid one, I hope its a typo.
amixer -c APE cset name='I2S4 Mux' ADMAIF1
Thanks for the reply.
I was able to fix the issue," LINE_OUT Switch" and “HeadPhone Out Switch” were in “off” state,
I changed them to “on” state, then we were able to heard the sound from HP out and Line out.
Thanks for the info. I have one doubt here, I see both my I2S4( which were are using for our codec) and I2S2 both are connected to ADMAIF2. How is it possible?
OK. We shall keep these points in case required in future for debugging.
As of now, there was no hardware issue and no DT changes.
Now, I am running aplay command and arecord command in another window, Arecord not throwing any error, but, when I play and recorded file, it audio sound in blank. Any idea about this issue?
- I have set the “capture MUX” to “LINE_IN”
- I have set “Capture Switch” to “ON”
ADMAIF2 Mux is connected to I2S2 and I2S4? Or I2S2 and I2S4 Mux are connected to ADMAIF2.
What’s the sequence of commands? Is playback file big enough to make sure playback is ON when recording is started?
I2S2 and I2S4 Mux were connected to ADMAIF2. Is this ok?
However, I set “I2S2 Mux” to 0.
Yes, playback file is 2-3 mins duration to make sure that playback is ON when , I run the arecord command in another terminal.
Just two commands aplay, followed by arecord, as the “I2S4 Mux” → “ADMAIF2”
and “ADMAIF2 Mux” --“I2S4” are already covered before.
aplay -D hw:APE,1 /home/trident/Downloads/digital_play.wav
In another terminal:
arecord -D hw:APE,1 -r 48000 -c 2 -f dat /tmp/out.wav
Should be ok.
Did you probe the tegra and codec data in and out lines.
I would like to know if there is data from codec to tegra I2S or not.
We probed and observed that there is data coming from tegra I2S. There is no issue there when we run “arecord” command.
Even the recorded wav file also has some size.
But when we play back the recorded file, we are not able to hear any sound. Its silent.
Please pull the recorded file and check if its fully silent (can open in hex format also).
How to check, if its fully silent?
Should the contents in hexa decimal should be zeros
Also one more doubt we have, the AVC control switch is set to “off”, is this causing any issue by any chance for mic /line in for sound to remain silent?
Thanks a lot for the updates.
I checked the contents of the recorded .wav file and it had contents.
I was able the play the recorded file using “aplay” command successfully.
But when I play the same file ( or any other normal internet downloaded .wav file ) using the video application, we are not able to hear any sound.
Any idea how to fix this issue?
kindly respond to the above query, where I am not able to hear any sound when i play video from youtube nor sound when I play wav file from the video App player.
where as aplay and arecord command works fine, I can hear the sound. Any amixer controls settings have to be done explictly for this?
Please open the file in audacity and increase the gain and check.
Then you probably need to check if there is a way to increase Mic input gain from codec.
what is audacity?
My MIC is working fine now. I am able to record my voice and save it in a .wav file.
I can play the same .wav file using “aplay” command.
I dont have issue with mic now. I am able to record my voice using “arecord” command and here back the same voice again using “aplay” command after playing the recorded . wav file.
the issue now is with the youtube or video player or etc, where if I play the same .wav files ( the one downloaded from internet also) not able to hear any sound. How to fix this issue?
Understand Mic is working.
Tegra HW won’t change the Mic gain, you need to check from codec side.
As per the sgtl datasheet you can change Mic gain, below snippet is from datasheet
Configure MIC gain if needed. Example shows gain of 20dB
Modify CHIP_MIC_CTRL->GAIN 0x0001
Modify CHIP_MIC_CTRL (0x2a) as per datasheet
How can we change this?
I will try to check in the amixer scontrols, if there is any MIC GAIN control and modify it, if possible.
The other issue we have is we are not able to hear any sound from the youtube or Video APP player on our target. Any idea what may be the issue?
Please reply to the above query of , why we are not able to hear any sound when we play wav files in Video player App.
Even when we play youtube video, we cannot hear any sound.
Did you try updating Mic gain? Probably it can help.
If it doesn’t help please reach to codec vendor. The query is out of scope from tegra HW perspective.
I checked the list of H40-SGTL controls, I dont see any field with the name suiting Mic Gain or something related to Mic Gain, so I dont know which amixer control , field should we modify to increase the Mic Gain.
As of now, our MIC functionality is working, we are able to record the voice and save it in a .wav file. The saved wav file can be played back using aplay command. However, will try to mail the codec vendor about this query of how to increase the Mic Gain through amixer controls.
I read in the below thread in this forum
It may be related to some pulse audio functionalities or changing some of our I24 controls like … “I2S4 mono to stereo conv” to “copy”
“I2S4 no of channels” to “2” etc might help us to fix this issue, so was asking.
H40-SGTL Mic Volume is the mixer control. Please try with that.
Understand but in above query atleast one channel data was audible. In your issue, there is no sound at all when you play with Video App.
I think Mic gain might help. Please try with the control once.
I already increased MIC volume tomaximum “15” value and mic functionality is working fine.
Did not understand how mic gain is related to playing a wav file in video app?
playing is related to “aplay” command right. Mic is related to “arecord” command.
However, during intial days, when my sound worked with the codec, I remember sound was coming when we play any wav file through the video app… but later on dont know what happened. it is not coming.
As far as I know, I did not do any changes. May be we need to do some settings in alsamixer ? not sure…