Jetson TX2 devkit, I2S1 play working, I2S1 record not working

Hi,

I am hoping you could advise why I am unable to to get record working on I2S1 via an AK4642 codec module. Playback is working fine on I2S1 to the same AK4642 slave codec, but when recording, I see that the master audio clock is enabled, but no bit clock / sample clock is generated by the I2S1 interface. Since the codec is configured as a slave, I need those clocks for the record.

I attach my record script, and the output from that script when I run it.
The error I am seeing, is as I have seen on other forum posts:

arecord: pcm_read:2103: read error: Input/output error

using dmesg, I can also see the error:
[ 200.446385] ================ak4642_set_mcko===============
[ 200.446397] ak4642: frequency = 12288000
[ 200.548885] tegra210-i2s tegra210-i2s.0: Failed at I2S0_RX sw reset
[ 200.555161] tegra210-i2s tegra210-i2s.0: ASoC: PRE_PMU: I2S1 DAP RX event failed: -22

The debug trace I think shows that the routing looks OK.

I also attach my edited device tree files.

When I run the record script, I can see that master audio clock is enabled, but I do not see the bit and sample clocks active on the I2S1 bus.

Please could you give me some hints of what to check to get the record process working?

many thanks

Dom

rec_i2s1.sh (513 Bytes) rec_i2s1_output.txt (27.3 KB)
tegra186-quill-common.dtsi (32.5 KB) tegra186-quill-p3310-1000-a00-00-base.dts (8.2 KB) tegra186-quill-p3310-1000-c03-00-base.dts (10.0 KB)

Hello Dom!

The following error is typically seen when the Tegra I2S interface is configured as slave and is not receiving a bit clock which causes the software reset of the I2S controller to fail.

I understand that you have configured the Tegra I2S interface to be the master via device-tree and that looks good. However, I can see that this is being overridden via userspace …

numid=1110,iface=MIXER,name='I2S1 codec master mode'
  ; type=ENUMERATED,access=rw------,values=1,items=3
  ; Item #0 'None'
  ; Item #1 'cbm-cfm'
  ; Item #2 'cbs-cfs'
  : values=1

The above means that the codec is the master and not the Tegra I2S. So you should set this to ‘None’ for the device-tree settings to be the default …

amixer -c tegrasndt186ref name='I2S1 codec master mode' None

I can also see from the register dump of the I2S registers that the Tegra I2S interface is configured as slave. For master we should see bit 10 set in …

a0: 1f000003

Let me know if this helps.

Regards,
Jon

Hi Jon,

That’s fixed it! Many thanks for your help… I spent alot time trying to figure this out!

kind regards

Dom

Hi Dom,

Great! Thanks for confirming.

Jon