Skip to content

Commit 10b5fa4

Browse files
authored
drivers: audio: dmic_nrfx_pdm: Reclassify log in PDM read when no data is ready
Currently the dmic_nrfx_pdm read implementation treats a timeout as an error, in that a logging error message is produced when no PDM data is available. However, for non-(or minimally-)blocking applications this is normal behavior. Classified this way, the logger is flooded with error messages unnecessarily, unless the log level is changed for the dmic module, which is not desirable. This modification simply changes the log-level to debug so the application user can then decide whether or not a failed read needs to produce an error message. Signed-off-by: Anthony Wertz <[email protected]>
1 parent 48a077f commit 10b5fa4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/audio/dmic_nrfx_pdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static int dmic_nrfx_pdm_read(const struct device *dev,
499499

500500
ret = k_msgq_get(&drv_data->rx_queue, buffer, SYS_TIMEOUT_MS(timeout));
501501
if (ret != 0) {
502-
LOG_ERR("No audio data to be read");
502+
LOG_DBG("No audio data to be read");
503503
} else {
504504
LOG_DBG("Released buffer %p", *buffer);
505505

0 commit comments

Comments
 (0)