RT565X AUDIO Noise problem

TX1 Play wav music with rt565x i2s1

aplay -Dhw:1,0 piano2.wav

There is music, but the noise is very loud.
Almost covered music.
What should I do?

amixer -c 1 sset ‘MIXER1-1 Mux’ ‘ADMAIF1’
amixer -c 1 sset ‘I2S1 Mux’ ‘MIXER1-1’
I have a test, 48khz, 41khz audio
But the effect is the same, the noise is very large

static int tegra_t210ref_dai_init(struct snd_soc_pcm_runtime *rtd,
					int rate,
					int channels,
					u64 formats)
{
	struct snd_soc_card *card = rtd->card;
	struct tegra_t210ref *machine = snd_soc_card_get_drvdata(card);
	struct snd_soc_pcm_stream *dai_params;
	unsigned int idx, mclk, clk_out_rate;
	int err, codec_rate, clk_rate;

	codec_rate = tegra_t210ref_srate_values[machine->rate_via_kcontrol];
	clk_rate = (machine->rate_via_kcontrol) ? codec_rate : rate;
	/* aud_mclk, 256 times the sample rate */
	clk_out_rate = clk_rate << 8;

	switch (clk_rate) {
	case 11025:
		mclk = 22579200;
		break;
	case 22050:
	case 44100:
	case 88200:
//	case 176400:
//		mclk = 45158400;
//		break;
	//case 8000:
//		mclk = 24576000;
		//break;
	case 176000:
		clk_out_rate = clk_rate << 8;
		mclk = 11289600 * 2;
		break;
	case 8000:
	case 16000:
	case 32000:
	case 48000:
	case 64000:
	case 96000:
	case 192000:
	default:
		mclk = 49152000;
		break;
	}
nvidia@tegra-ubuntu:~/Music$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: tegrahda [tegra-hda], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 0: ADMAIF1 CIF ADMAIF1-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 1: ADMAIF2 CIF ADMAIF2-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 2: ADMAIF3 CIF ADMAIF3-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 3: ADMAIF4 CIF ADMAIF4-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 4: ADMAIF5 CIF ADMAIF5-4 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 5: ADMAIF6 CIF ADMAIF6-5 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 6: ADMAIF7 CIF ADMAIF7-6 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 7: ADMAIF8 CIF ADMAIF8-7 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 8: ADMAIF9 CIF ADMAIF9-8 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: tegrasndt210ref [tegra-snd-t210ref-mobile-rt565x], device 9: ADMAIF10 CIF ADMAIF10-9 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Results posted
The problem has been solved!

@CalmCar
Please remove your codec device use the dummy codec to verify if the noise if from the Tegra I2S or codec.

amixer sset 'ADMAIF1 Mux' 'ADMAIF1'
aplay -Dhw:1,0 xxx.wav &
arecord -Dhw:1,0 -f dat t.wav

Hi CalmCar,

Could you share what’s the cause, and how to resolve?

Thanks

I meet the same problem. How do you resolve it?