Platform/ECM3532/M3/hw/hal/ecm3532/pdm/src/pdm_hal.c
/**
 * Stop PCM stream
 *
 * @param pdmNum PDM channel number
 * @return 0 on success, non-zero error code on failure
 */
Stop PCM stream
@param pdmNum PDM channel number
@return 0 on success, non-zero error code on failure
Stop PCM stream @param pdmNum PDM channel number @return 0 on success non - zero error code on failure
int ecm3532_stop_pdm_stream(uint8_t pdmNum)
{
  uint16_t *data;
  xSemaphoreTake(pdmLock, portMAX_DELAY);
  data = SharedMemAlloc(sizeof(uint16_t));
  data[0] = pdmNum;
  rpcSubmitWork(RPC_MODULE_ID_AUDIO, AUDIO_STOP, data);
  xSemaphoreTake(pdmDspRespSem, portMAX_DELAY);
  SharedMemFree(data);
  REGN_M1(pdmNum, PDM_PCMA_CTRL, EN, 0);
  sPdmDev[PDM_INDEX(pdmNum)].st = AUDIO_STOP;
  xSemaphoreGive(pdmLock);
  return 0;
}
int ecm3532_stop_pdm_stream ( uint8_t pdmNum ) { uint16_t * data ; xSemaphoreTake ( pdmLock , portMAX_DELAY ) ; data = SharedMemAlloc ( sizeof ( uint16_t ) ) ; data [ 0 ] = pdmNum ; rpcSubmitWork ( RPC_MODULE_ID_AUDIO , AUDIO_STOP , data ) ; xSemaphoreTake ( pdmDspRespSem , portMAX_DELAY ) ; SharedMemFree ( data ) ; REGN_M1 ( pdmNum , PDM_PCMA_CTRL , EN , 0 ) ; sPdmDev [ PDM_INDEX ( pdmNum ) ] . st = AUDIO_STOP ; xSemaphoreGive ( pdmLock ) ; return 0 ; }
Stop PCM stream
 @param pdmNum PDM channel number
 @return 0 on success, non-zero error code on failure
Stop PCM stream @param pdmNum PDM channel number @return 0 on success non - zero error code on failure
/* stop PDM block */