I2s audio broken on version 1.3 of the ubuntu-4.9-image

Which Khadas SBC do you use?

VIM3

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu

Which version of system do you use? Khadas official images, self built images, or others?

Official server image 1.3: vim3-ubuntu-20.04-server-linux-4.9-fenix-1.3-221118-emmc.raw.img.xz

Please describe your issue below:

I use an ADAU7002 connected to i2s for audio input. The i2s overlay is active. This setup was working perfectly on version 1.0.11, the audio signal was available via the TDM-B-dummy-alsaPORT-i2s ALSA device.

I2S audio doesn’t work anymore in image version 1.3: alsa doesn’t find any sound devices, the AMLAUGESOUND device is missing.

Post a console log of your issue below:

1.3:

$ arecord -l
arecord: device_list:276: no soundcards found...

$ dmesg |grep snd
[    0.377438] aml_snd_reg_map[0], reg:ff640000, size:2000
[    0.377453] aml_snd_reg_map[1], reg:ff642000, size:2000
[    0.377466] aml_snd_reg_map[2], reg:ff64a000, size:2000
[    0.377479] aml_snd_reg_map[3], reg:ff656000, size:1800
[    0.377493] aml_snd_reg_map[4], reg:ffd01000, size:1000
[    0.377497] amlogic auge_snd_iomap probe done
[    2.058617] usbcore: registered new interface driver snd-usb-audio
[    2.061479] snd_tdm ff642000.audiobus:tdma: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.061519] snd_tdm ff642000.audiobus:tdma: neither mclk_pad nor mclk2pad set
[    2.061764] snd_tdm ff642000.audiobus:tdmb: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.062012] snd_tdm ff642000.audiobus:tdmc: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.062447] snd_spdif ff642000.audiobus:spdif: aml_spdif_get_pins error!
[    2.062455] snd_spdif: probe of ff642000.audiobus:spdif failed with error -22

$ dmesg |grep tdm
[    2.059400] T9015 acodec used by auge, tdmout:1
[    2.061461] aml_tdm_platform_probe, tdm ID = 0, lane_cnt = 4
[    2.061479] snd_tdm ff642000.audiobus:tdma: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.061519] snd_tdm ff642000.audiobus:tdma: neither mclk_pad nor mclk2pad set
[    2.061578] aml_tdm_platform_probe(), share en = 1
[    2.061713] aml_tdm_platform_probe, tdm ID = 1, lane_cnt = 4
[    2.061764] snd_tdm ff642000.audiobus:tdmb: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.061895] aml_tdm_platform_probe(), share en = 1
[    2.061997] aml_tdm_platform_probe, tdm ID = 2, lane_cnt = 4
[    2.062012] snd_tdm ff642000.audiobus:tdmc: lane_mask_out = 1, lane_oe_mask_out = 0
[    2.062116] aml_tdm_platform_probe(), share en = 1

1.0.11:

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 1: TDM-A-dummy-alsaPORT-pcm multicodec-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: TDM-B-dummy-alsaPORT-i2s multicodec-2 []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: TDM-C-dummy multicodec-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ dmesg |grep snd
[    0.377430] aml_snd_reg_map[0], reg:ff640000, size:2000
[    0.377444] aml_snd_reg_map[1], reg:ff642000, size:2000
[    0.377456] aml_snd_reg_map[2], reg:ff64a000, size:2000
[    0.377469] aml_snd_reg_map[3], reg:ff656000, size:1800
[    0.377486] aml_snd_reg_map[4], reg:ffd01000, size:1000
[    0.377489] amlogic auge_snd_iomap probe done
[    6.704739] usbcore: registered new interface driver snd-usb-audio
[    6.707911] snd_tdm ff642000.audiobus:tdma: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.707952] snd_tdm ff642000.audiobus:tdma: neither mclk_pad nor mclk2pad set
[    6.708203] snd_tdm ff642000.audiobus:tdmb: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.708457] snd_tdm ff642000.audiobus:tdmc: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.918879] snd_tdm ff642000.audiobus:tdmb: ASoC: Failed to add I2SIn CLK: -16
[    6.926261] aml_dai_tdm_probe, failed add snd tdm controls
[    6.939596] snd_tdm ff642000.audiobus:tdmc: ASoC: Failed to add I2SIn CLK: -16
[    6.946959] aml_dai_tdm_probe, failed add snd tdm controls
[    6.954802] snd_card_add_kcontrols card:ffffffc027ad7018

$ dmesg |grep tdm
[    6.705544] T9015 acodec used by auge, tdmout:1
[    6.707893] aml_tdm_platform_probe, tdm ID = 0, lane_cnt = 4
[    6.707911] snd_tdm ff642000.audiobus:tdma: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.707952] snd_tdm ff642000.audiobus:tdma: neither mclk_pad nor mclk2pad set
[    6.708013] aml_tdm_platform_probe(), share en = 1
[    6.708151] aml_tdm_platform_probe, tdm ID = 1, lane_cnt = 4
[    6.708203] snd_tdm ff642000.audiobus:tdmb: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.708340] aml_tdm_platform_probe(), share en = 1
[    6.708442] aml_tdm_platform_probe, tdm ID = 2, lane_cnt = 4
[    6.708457] snd_tdm ff642000.audiobus:tdmc: lane_mask_out = 1, lane_oe_mask_out = 0
[    6.708561] aml_tdm_platform_probe(), share en = 1
[    6.918879] snd_tdm ff642000.audiobus:tdmb: ASoC: Failed to add I2SIn CLK: -16
[    6.926261] aml_dai_tdm_probe, failed add snd tdm controls
[    6.939596] snd_tdm ff642000.audiobus:tdmc: ASoC: Failed to add I2SIn CLK: -16
[    6.946959] aml_dai_tdm_probe, failed add snd tdm controls
[    6.952867] aml_dai_set_tdm_slot(), txmask(0xff), rxmask(0xff)
[    6.952880] asoc aml_dai_set_tdm_fmt, 0x4004, ffffffc024789818, id(0), clksel(0)
[    6.953128] aml_dai_set_tdm_slot(), txmask(0x3), rxmask(0x3)
[    6.953140] asoc aml_dai_set_tdm_fmt, 0x4001, ffffffc024789e18, id(1), clksel(1)
[    6.953354] aml_dai_set_tdm_slot(), txmask(0x3), rxmask(0x3)
[    6.953364] asoc aml_dai_set_tdm_fmt, 0x4001, ffffffc0247aa618, id(2), clksel(2)

Hello @rst_rise

Can you update the kernel and try again?

sudo apt update
sudo apt full-upgrade

hello @numbqq

audio input works after the kernel update! The order of devices is different than before (i2s is device 0 but was device 2 before), but that shouldn’t be too much of a problem.

thx

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: AMLAUGESOUND [AML-AUGESOUND], device 0: TDM-B-dummy-alsaPORT-i2s multicodec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 2: TDM-A-dummy-alsaPORT-pcm multicodec-2 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AMLAUGESOUND [AML-AUGESOUND], device 3: TDM-C-dummy multicodec-3 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0