Hello everybody,
following various thread I was able to route I2S4 on the 40pin header. Now I would like to configure playback/record of a TDM stream of 16ch at 16bits 48KHz. Is there any guide that describes how to configure alsa using amixer? I’m using latest jetpack and as far I understood all configuration is made via userspace
Note that the number of channels will be set to 16 and the rate set to 48kHz by the aplay command. You only need to set the number controls for these if you wish to override the channels and rate specified in the aplay command. This is typically used in more complex scenarios where the number of channels is being change within the audio subsystem. For normal playback cases, it is not necessary to configure these.
Hello Jon,
I did some tests but if I change the number of channels in aplay (2, 4, 8 or 16) I always see a 3MHz clock on the SCLK pin.
Furthermore my DSP needs the FS with a 50% duty cycle (left-j configuration).
Do you think it is possible to configure in this manner?
My advise would be to use the dsp-a or dsp-b mode. The difference being that dsp-a has a 1-bit delay after the fsync goes high until the first data is outputed, where as dsp-b mode has a 0-bit delay. You can set the fsync width using the following control.
Thanks for the confirmation. Unfortunately, these mixer controls are not described in the documentation, but we are in the process of updating the audio documentation and so for the next L4T release this should be clearer.
I tried to connect 16 MEMS ICS-52000 MIC Array to perform Beam Forming AI based with the Jatson NANO. I have an issue that seems like competability between the NANO TDM format settings and the ICS-52000 MEMS Mic TDM Protocol. From the MEMS device I see that it requires the MSB bit to be at same clock as the Rising edge of the WS Pulse. The MEMS MIC Datasheet
Fig 11 shows the timing expected for TDM.
Thanks
Mati
hi Sharad, Mait and I worked on same project … please same the command
amixer -c tegrasndt210ref sset ‘I2S4 fsync width’ 0
amixer -c tegrasndt210ref cset name=‘I2S4 codec frame mode’ dsp-a
arecord -D hw:tegrasndt210ref,0 -c 4 -r 48000 -f S32_LE -d 10 cap.wav
also we are using jetson nano emmc production module so i think the dtb is tegra210-p3448-0002-p3449-0000-b00.dtb. [tegra210-p3448-0002-p3449-0000-b00.log|attachment]
(upload://xWywLXBTsAw9w0vQMGYeNPkD7HL.log) (209.8 KB)
btw your system does not allow me to upload .dtb i renmae to .log please change to tegra210-p3448-0002-p3449-0000-b00.dtb then convert to dts
I mentioned in email previously that the ICS-52000 MEMS MIC shows in the data sheet requirement for Start UP period where the SCLK ONLY running for at least 10ms. It is mentioned that this period is needed too make ALL the Microphones synchronized. Only after 10ms period the WS signal is allowed to go active. Can Jetson Nano implement such requirement? Is it possible to have WS pin default to GPIO Output drive LOW and after 10ms of Stadt of Audio Record the WS pin will change from GPIO to WS? any other suggestion its welcome!!!
Could you please probe and check start timings for SCK and WS/LRCLK? As per the driver design, WS should be delayed already (compared to SCK). You can also experiment with dapm_pop_time. This can be used to delay the WS further.
$ echo 50 | sudo tee /sys/kernel/debug/asoc/tegra-snd-t210ref-mobile-rt565x/dapm_pop_time
I will double check but when I probed them they look like stating exactly the same time. But it is GOOD news you say that the driver should support it that means we have some setting to do to make this happen. I will check with Terry. Do you actually sample the MSB of the sample on the first rising edge of SCLK after the WS goes Low?
We don’t have the setup at our end to debug and hence we require some more info from your side:
Is captured data all noise in DSP-A mode as well, or is it silence? Could you please share captured WAV file (small duration) in DSP-A mode. [Please try 2 channel and 4 channel capture and share observations separately.]
Not sure, if you got a chance to probe signals and experiment with dap_pop_time. Kindly let us know your observations and share signal snapshots.
Please dump I2S registers during the capture and share here.
all channels are connected in daisy chain , when I look in oscilloscope the data is synchronized but all I get is one channel , and the rest are noise.
how did you solve the problem ?