I am getting only 1 channel out of 2, for each serial pin in Beaglebone AI

Hello I want to record 8 channels from TIDA-01454 CMB into a Beaglebone AI. As the CMB is built with two PCM1864 ADCs and it is also a Beagle board, I followed this guide(https://www.ti.com/lit/an/sprac97/sprac97.pdf) with some changes(channels_max=16).

I have managed to record audio from 4 of the 8 microphones that the CMB has(I just tap the mic to check if that one is working). However I want to record the 8 channels. Currently the working microphones are MIC1, MIC4, MIC5 and MIC8, although I would say there is much noise.The CMB has 4 data output pins, I suppose each one transmits 2 channels, so the problem is that each pin is getting mono instead of stereo. This might be because a problem in DTS, therefore this is my dts file:

pcm5102a: pcm5102a { 

     #sound-dai-cells = <0>; 

     compatible = "ti,pcm5102a"; 

     status = "okay"; 

  }; 

   

   

  sound {compatible = "simple-audio-card"; 

    simple-audio-card,format = "i2s"; 

    simple-audio-card,name = "PCM5102a"; 

    simple-audio-card,bitclock-master = <&sound1_master>; 

    simple-audio-card,frame-master = <&sound1_master>; 

    simple-audio-card,bitclock-inversion; 

     

     

    simple-audio-card,cpu { 

            sound-dai = <&mcasp1>; 

    }; 

    sound1_master: simple-audio-card,codec { 

        #sound-dai-cells = <0>; 

        sound-dai = <&pcm5102a>; 

          //clocks = <&mcasp1_fck>; 

          //clock-names = "mclk"; 

      }; 

  }; 

&mcasp1 { 

    #sound-dai-cells = <0>; 

    pinctrl-names = "default"; 

    pinctrl-0 = <&mcasp1_pins>; 

    status = "okay"; 

    op-mode = <0>; /* MCASP_IIS_MODE */ 

    tdm-slots = <2>; 

    num-serializer = <4>; 

    serial-dir = < /* 1 TX 2 RX 0 unused */ 

        2 2 0 0 0 0 0 0 0 0 2 2

      >; 

    rx-num-evt = <4>; 

    tx-num-evt = <4>; 

};

The serial-dir is that way because I use mcasp1_axr0, mcasp1_axr1, mcasp1_10 and mcasp1_axr11 ,those are the ones available in Beaglbone AI. I connected the pins DATA1-MiniDSP, DATA2-MiniDSP, DATA3-MiniDSP and DATA4-MiniDSP in J5(of the CMB) to these pins in my Beaglebone:

P9.18b                               173 fast rx       0 mcasp 0 d0       mcasp@48460000 (mcasp1_pins)
P9.17b                               174 fast rx       0 mcasp 0 d1       mcasp@48460000 (mcasp1_pins)
P9.30                                183 fast rx       0 mcasp 0 d10      mcasp@48460000 (mcasp1_pins)
P9.28                                184 fast rx       0 mcasp 0 d11      mcasp@48460000 (mcasp1_pins)

I also conected DATA1-MiniDSP, LRCLK and BCLK to an external I2S DAC to make a test and I could hear MIC1 and MIC2. So I can assure that outputs are coming in stereo. My problem is that when connect the outputs to Beaglebone and record, I just get 1 of those 2 channels for each DOUT. I checked all of them just in case with the external I2S DAC:

Data 1 is giving MIC1 and MIC2

Data 2 is giving MIC5 and MIC6

Data 3 is giving MIC3 and MIC4

Data 4 is giving MIC7 and MIC8

So what is wrong? How can I get all the mics?

In case it helps, here is myDummy CODEC:

#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>

#include <sound/soc.h>

static struct snd_soc_dai_driver pcm5102a_dai = {
	.name = "pcm5102a-hifi",
	.playback = {
		.channels_min = 2,
		.channels_max = 2,
		.rates = SNDRV_PCM_RATE_8000_192000,
		.formats = SNDRV_PCM_FMTBIT_S16_LE |
			   SNDRV_PCM_FMTBIT_S24_LE |
			   SNDRV_PCM_FMTBIT_S32_LE
	},
	.capture = { 

		.stream_name = "Capture", 

		.channels_min = 1, 

		.channels_max = 16, 

		.rates = SNDRV_PCM_RATE_8000_192000, 

		.formats = SNDRV_PCM_FMTBIT_S16_LE | 

			SNDRV_PCM_FMTBIT_S24_LE | 

			SNDRV_PCM_FMTBIT_S32_LE 

	}, 
};

static struct snd_soc_codec_driver soc_codec_dev_pcm5102a;

static int pcm5102a_probe(struct platform_device *pdev)
{
	return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_pcm5102a,
			&pcm5102a_dai, 1);
}

static int pcm5102a_remove(struct platform_device *pdev)
{
	snd_soc_unregister_codec(&pdev->dev);
	return 0;
}

static const struct of_device_id pcm5102a_of_match[] = {
	{ .compatible = "ti,pcm5102a", },
	{ }
};
MODULE_DEVICE_TABLE(of, pcm5102a_of_match);

static struct platform_driver pcm5102a_codec_driver = {
	.probe		= pcm5102a_probe,
	.remove		= pcm5102a_remove,
	.driver		= {
		.name	= "pcm5102a-codec",
		.of_match_table = pcm5102a_of_match,
	},
};

module_platform_driver(pcm5102a_codec_driver);

MODULE_DESCRIPTION("ASoC PCM5102A codec driver");
MODULE_AUTHOR("Florian Meier <florian.meier@koalo.de>");
MODULE_LICENSE("GPL v2");

and also my CMB configuration:

uint8_t U1_PCM1864_CONFIG[][2] = { 

{0x00, 0x00}, // Change to Page 0 

{0x01, 0x40}, // PGA CH1_L to 32dB 

{0x02, 0x40}, // PGA CH1_R to 32dB 

{0x03, 0x40}, // PGA CH2_L to 32dB 

{0x04, 0x40}, // PGA CH2_R to 32dB 

{0x05, 0x86}, // Enable SMOOTH PGA Change; Independent Link PGA; 

{0x06, 0x41}, // Polarity: Normal, Channel: VINL1[SE] 

{0x07, 0x41}, // Polarity: Normal, Channel: VINR1[SE] 

{0x08, 0x44}, // Polarity: Normal, Channel: VINL3[SE] 

{0x09, 0x44}, // Polarity: Normal, Channel: VINR3[SE] 

{0x0A, 0x00}, // Secondary ADC Input: No Selection 

{0x0B, 0x44}, // RX WLEN: 24bit; TX WLEN: 24 bit; FMT: I2S format 

{0x10, 0x03}, // GPIO0_FUNC - SCK Out; GPIO0_POL - Normal 

{0x11, 0x50}, // GPIO3_FUNC - DOUT2; GPIO3_POL - Normal 

{0x12, 0x04}, // GPIO0_DIR - GPIO0 - Output 

{0x13, 0x40}, // GPIO3_DIR � GPIO3 - Output 

{0x20, 0x11}  // MST_MODE: Master; CLKDET_EN: Disable 

}; 

  

uint8_t U2_PCM1864_CONFIG[][2] = { 

{0x00, 0x00}, // Change to Page 0 

{0x01, 0x40}, // PGA CH1_L to 32dB 

{0x02, 0x40}, // PGA CH1_R to 32dB 

{0x03, 0x40}, // PGA CH2_L to 32dB 

{0x04, 0x40}, // PGA CH2_R to 32dB 

{0x05, 0x86}, // Enable SMOOTH PGA Change; Independent Link PGA; 

{0x06, 0x41}, // Polarity: Normal, Channel: VINL1[SE] 

{0x07, 0x41}, // Polarity: Normal, Channel: VINR1[SE] 

{0x08, 0x44}, // Polarity: Normal, Channel: VINL3[SE] 

{0x09, 0x44}, // Polarity: Normal, Channel: VINR3[SE] 

{0x0A, 0x00}, // Secondary ADC Input: No Selection 

{0x0B, 0x44}, // RX WLEN: 24bit; TX WLEN: 24 bit; FMT: I2S format 

{0x10, 0x00}, // GPIO0_FUNC – GPIO0; GPIO0_POL - Normal 

{0x11, 0x50}, // GPIO3_FUNC - DOUT2; GPIO3_POL - Normal 

{0x12, 0x00}, // GPIO0_DIR - GPIO0 - Input 

{0x13, 0x40}, // GPIO3_DIR � GPIO3 - Output 

{0x20, 0x01}  // MST_MODE: Slave; CLKDET_EN: Enable 

};