I have been trying to interface a CS4344 codec chip to a Jetson TX2 using the I2S1 connection on the J21 Expansion Header. However when trying it out there is no sound playing. I think that the CS4344 codec might not be supported on the Jetson TX2 without adding it myself.
Can I somehow/somewhere check if the CS4344 is supported, and if so, how?
and when checking the relevant pins with an oscilloscope they seem to produce their expected signals.
Update
I am not sure if “codec” is the right word. The entire chip taking the I2S signals is called PmodI2s, and the ADC on it is a Cirrus Logic CS4344.
Anyways, I have also been experimenting with the audio path by for example
Probing more with the scope, it seems that the MCLK signal is more sinusoidal than square, which do not seem right. Though I am not certain that the scope is entirely reliable at those rates (it gives a frequency output of ~42 MHz).
Don’t bother with routing through the ‘MIXER’ (at least to begin with) because this is not necessary.
Typically, there is some configuration needed when adding a codec. However, looking at the datasheet for the CS4344 (which is a simple DAC with an I2S interface and no I2C/SPI interface for configuring it), you should be able to just connect up the I2S signals and it should work. I see the PmodI2s is just a module with the CS4344 on it.
If you see the I2S signals toggling then that is a good sign. By default the I2S interface will use the standard I2S signaling. The MCLK should be 256x Fs by default and so at say 48kHz you should get 12.288MHz.
To check the clock frequencies, while audio playback has started you can …
The ‘aud_mclk’ is the clock that drives the external MCLK. The 42MHz does not seem right if this is 48kHz. Dumping the above will provide a bit more info to see what is going on.
when running a file with a 48000 sample rate. The aud_mclk hits 12.288 MHz as you said, and the i2s1 and ahub hits even powers of two of 48000 as well (or are at least very close). Running a file with a 44100 sample rate provides different rates but with the corresponding ratios, so everything seems fine there. I am not sure what the “ape” or “apb2ape” clocks correspond to.
I did a more thorough probing with the scope, and the 42 MHz I mentioned was due to a poor measurement with a low resistance probe. Fixing that resulted in a way better square wave with a 12.29 MHz rate for aud_mclk. The I2S1_SCLK, I2S1_LRCK and the I2S1_SDATA_OUT also outputted correct rates.
It seems to me that the chip itself might be faulty, and I have ordered a few more, but I wonder if there could be anything else that I could try in the mean time?
Don’t worry about the ‘ape’ and ‘apb2ape’ clocks. These are clocks internal to the Audio Processing Engine (APE) and I always dump them all to ensure everything looks good (and it does).
What voltage does the CS4344 expect on the I2S and MCLK pins? I2S is going to be 3.3V and it is not clear to me what this chip is expecting.
It turns out the I2S system did work as expected. The I2S-DAC I used had its pins incorrectly marked in the manual I used, referring to an up-to-date schematic solved the issue.
… and adjust the ‘MVC1 Vol’ percentage value to get the desired volume. I am not familiar with the CS4344 chip to know if it can control the volume or not.
Hi, sorry for resurrecting this thread but I am having an issue almost identical to this.
I am for the most part very new to I2S though I am trying to get sound to play from the tx2 through the PmodI2S with no success.
The I2S-DAC seems to be wired correctly and I am getting waveforms through it when audio is played yet no sound is coming through when plugged into anything.
Are you saying the you see the I2S signals (bit-clock, frame-sync, and data output) from Tegra active when playing the audio file? If so then that would suggest playback from a Tegra perspective is working fine, but for some reason the audio codec is not outputting the audio. You may wish to check the frequency of the bit-clock and frame-sync look correct. If they do then check the codec is powered correctly as it would imply the problem is on the codec side.