Remote_mic_tx_raw receving pcm data ,right channel has no audio,please help to check

hi, in remote_mic_tx_raw ,pcm mode, right channel has no audio
we print pcm_data in app.c ,the output is like below

00> __remote_mic_tx_raw has started with G722

00> __RM_START

00> 63968 0 63587 0 63587 0 63954 0 63954 0 1426 0 1426 0 3779 0 3779 0 2099 0 2099 0 64905 0 64905 0 64205 0 64205 0 64064 0 64064 0 63683 0 63683 0 64621 0 64621 0 1247 0 1247 0 2762 0 2762 0 2374 0 2374 0 157 0 157 0 63349 0 63349 0 62679 0

00> 62679 0 63350 0 63350 0 64806 0 64806 0 1750 0 1750 0 3011 0 3011 0 677 0 677 0 63567 0 63567 0 64185 0 64185 0 64993 0 64993 0 63873 0 63873 0 64759 0 64759 0 2134 0 2134 0 1808 0 1808 0 64909 0 64909 0 65126 0 65126 0 65343 0 65343 0 62887 0

00> 64811 0 213 0 213 0 2133 0 2133 0 2113 0 2113 0 65365 0 65365 0 62947 0 62947 0 62402 0 62402 0 63423 0 63423 0 63924 0 63924 0 62958 0 62958 0 61827 0 61827 0 61501 0 61501 0 61114 0 61114 0 60244 0 60244 0 60203 0 60203 0 61596 0 61596 0 62802 0

00> 62802 0 62193 0 62193 0 60437 0 60437 0 59804 0 59804 0 61614 0 61614 0 64334 0 64334 0 64893 0 64893 0 62779 0 62779 0 61251 0 61251 0 62834 0 62834 0 150 0 150 0 1071 0 1071 0 11 0 11 0 64873 0 64873 0 220 0 220 0 1464 0 1464 0 1309 0

as you can see the even-index pcm_data is 0, so right channel has no audio
we tested RX function with ezario 7160 or RSL10 evb running remote_mic_rx_raw , right channel has no audio in both scneario
in my own customerized hardware , no audio for right channel either

below is app.c to print pcm_data
while (1)
{
/* Refresh the watch-dog timer. */
Sys_Watchdog_Refresh();

    repeat_times ++;
    if (repeat_times ==2000) {
    	if (asrc_in_buf[0] !=0) {
			for (uint8_t i=0;i< SUBFRAME_LENGTH*2;i++) {
				PRINTF("%d ",pcm_buf[i]);
			}
			PRINTF("\n");
			for (uint8_t i=SUBFRAME_LENGTH*2;i< SUBFRAME_LENGTH*4;i++) {
					PRINTF("%d ",pcm_buf[i]);
				   }
			PRINTF("\n");
    	}
    repeat_times = 0;
    }

    /* Handle Remote Microphone BLE application pending events. */
    RM_StatusHandler();

    /* Wait for an event before executing the scheduler again. */
    SYS_WAIT_FOR_EVENT;
}

@hfvoip

As a first step, can you make use of a logic analyzer on the PCM lines and share the results ?

This will allow us to determine if it is the PCM interface that is dropping frames, or if perhaps the PCM data being passed into the RSL10 is not formatted properly for I2S.

@martin.bela
lease check,we tested in our custom pcba (pic 1 is aux audio source ,pic2 is spdif audio source)


Channel 0 : BCLK Channel1: LRCLK Channel2: I2S DOUT
BCLK 1MHz LRCLK 16KHz

@hfvoip

The PCM signal looks good, so this is likely not the problem.
Could you please copy the PCM data within the “rx_DMA_ready_PCM()” function and print the buffer from main?
It would likely also be possible to use a flag to ensure the main loop is only reading from the half of the buffer that is not being actively received into (this firmware will process half of the PCM buffer while the other have receives the samples to prevent data hazards).

hi,
@martin.bela
in the 1st thread ,I have pasted the pcm_buf output ,like below:
00> 63968 0 63587 0 63587 0 63954 0 63954 0 1426 0 1426 0 3779 0 3779 0 2099 0 2099 0 64905 0 64905 0 64205 0 64205 0 64064 0 64064 0 63683 0 63683 0 64621 0 64621 0 1247 0 1247 0 2762 0 2762 0 2374 0 2374 0 157 0 157 0 63349 0 63349 0 62679 0

I didn’t use flag to avoid possible coding mistakes

for the last 5 days ,I also tried to make some test by config app.h

PCM_CFG_RX from pcm_multiword_16 to pcm_multword_32

#define PCM_MULTIWORD_32 ((uint32_t)(0x8U << PCM_CTRL_FRAME_LENGTH_Pos))

#define PCM_CFG_RX (PCM_BIT_ORDER_MSB_FIRST |
PCM_TX_ALIGN_LSB |
PCM_WORD_SIZE_16 |
PCM_FRAME_ALIGN_LAST |
PCM_FRAME_WIDTH_LONG |
// START 2023-02-01
PCM_MULTIWORD_32 |
//END 2023-02-01
PCM_SUBFRAME_DISABLE |
PCM_CONTROLLER_DMA |
PCM_DISABLE |
PCM_SAMPLE_RISING_EDGE |
PCM_SELECT_SLAVE)

and I can see pcm_buf it non-zero for right channel ,and can hear to right channel ,but the sound I hear has wrong sample rate ,and different from original input sound

@hfvoip

In our using the default “remote_mic_tx_raw” sample firmware, we were able to see proper PCM reception for both Left and Right frames. Please see the PCM waveform and “pcm_buff” captures below showing the proper transmission and reception of the “Hello World” PCM packets.

PCM Waveform

PCM Buffer within “rx_DMA_ready_PCM()”” Function

PCM Settings on the Master side (data was bit shifted << 8 as Slave side only receives 24 bit)
image