This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
So we use TLV320AIC3106 with AM4378 and TI Linux. The design works fine when we play back recording audio so the Codec is properly connected to the processor. We are trying to determine the proper device tree setting and console command to select one of Line1/Line2/Line3 inputs to control which codec input gets routed to the output.
We have added to our Device Tree File based on what we see in other posts:
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "AudioCard";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,bitclock-inversion;
simple-audio-card,cpu {
sound-dai = <&mcasp1>;
};
sound_master: simple-audio-card,codec {
sound-dai = <&tlv320aic3106>;
system-clock-frequency = <24000000>;
};
};
From the console we send:
'amixer sset 'Left PGA Mixer Line1L' on'
'amixer sset 'Right PGA Mixer Line1R' on'
We also run alsamixer and increase volume of PGA.
To test we try to record and file is empty. An another board design we have Microphone input and this process with correct input names works fine.
If you see something we are missing let us know.
The audio comes in from board edge through series cap to device pins this is intact so we feel this is OK signal. We use function generator to create audible waveform.
Thanks
Pete
Hello Pete,
Could you please share your register settings so we can get a better look at how the device is being set up?
Regards,
Aaron
Thank you Aaron for your reply. We discovered an issue with a part of our design outside of the codec that was causing the problem. We resolved this and we can record from inputs Line 1/2. The original post has been resolved.
Moving forward, during testing we notice that we cannot control individual input volumes, we can only modify the recorded volume based on PGA setting using alsamixer. Our system has different signal level volumes coming into the codec and we anticipated using individual Line volume settings to even out overall levels when selecting between different inputs. The codec datasheet implies we can adjust input volumes separately so we are looking for suggestions using alsamixer or otherwise how we might be able to control that. For inputs currently not in use, we plan to disable/mute entirely to prevent noise bleed. If you have any suggestions this will help us greatly.
Another issue is that when recording from one of the Line inputs we get a clipped signal even though PGA in the alsamixer is set very low (~2-5).
Below is from Audacity of our recorded 600Hz waveform. Top trace uses PGA =5 and bottom is PGA =2. The signal is about 300mV p-p so we don't feel it's too high. Note the clip. In our system we will be using the codec to select one of these inputs and sending directly out to the HFOUTL/R as a mono audio. We were recording as a test but expect that routing this out directly will be similar. Again, the codec datasheet implies this is possible can you assist with using Linux to perform this programmatically. Finally, the Line1 input has 2 different signals on the L/R channels, so we need to mute left while we play right and vice versa. Any suggestions here also very helpful.
Thanks,
Pete
Hi Pete,
Good news that your initial problem has been resolved.
About your next question, what input channels are you using? In the data sheet, Page 0/Register 17 - Page 0/Register 24 control the input levels for the different input channels. You can give that a look and see what you are currently configuring those registers to be.
To better understand how you are setting up the codec, can you please provide your register configuration? As for Linux help, unfortunately we do not provide Linux coding support.
Regards,
Aaron