I am connecting MIC in I2S1 line (pinmuxed to DMIC-modified in pinmux excel sheet) without any external codec to the Xavier carrier board which has TX2-NX SoM mounted.When we do amixer setting and try to record with arecord command,we are getting noise when sampling is set greater than or equal to 44.1Khz
Below is the amixer setting done and arecord command used for recording,
Note:When we tried to set the channel for Mono in amixer setting(amixer -c tegrasndt186ref cset name=“DMIC1 Mono Channel Select” L) we were getting below error, amixer: Cannot find the given element from control hw:1
I’m not really a “sound guy”, but that popping first made me think that part of the software is operating at a different sample rate than the other software (which doesn’t seem to be the actual case). I don’t have a mic to try, so I can’t give much in the way of useful feedback other than “that’s a software setting and not a hardware failure”. Looking at the audio in Audacity I see though that it might just be a case of clipping rather than difference in sample rate at two different places in software. So much clipping tends to distort what is heard, and at this level of clipping, it just might be an otherwise good audio stream turns into that popping/clicking.
This is a screenshot of levels in Audacity for 32k:
The 32k stream sounds good. Notice that gain levels are the same on reading this and the 44.1k stream, but the 32k stream never reaches 100%. Almost every single part of the 44.1k stream clips at 100%. Check microphone gain settings at 44.1k.
Just a side thought: Audacity says both streams are at their advertised sample rates, and it also states that both streams are 32-bit. I emphasize “32-bit” because if some part of the software thought this was 16-bit in the 44.1k case, then it is possible for mic gain to be correct, and yet have “clipping” as 32 bits are supplied to software maxing out at 16 bits.
This is a good point. One thing that looks odd to me is that the ‘bit format’ for the MVC and DMIC1 is set to 32-bits, yet arecord is using 16-bit. Typically, you should not need to override the bit format in the MVC and DMIC and just let arecord pass the necessary bit size.
We want this to be set to OSR_64. From what we can tell the MIC supports clocks upto 4.8MHz and at 48kHz with an over-sampling ratio (OSR) of 64, this will yield a 3.072MHz clock. If the OSR is 128 then the clock will be 6.144MHz which is too high for the MIC. If the OSR is 64 and it is still noisy then maybe there is a signal integrity issue. How is the MIC connected to Jetson? Are you using jumper wires?