You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/08/07 06:11:50 UTC
[incubator-nuttx] branch master updated: board/cxd56xx/audio: Fix CXD56 audio initialization
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new b66e4a44d9 board/cxd56xx/audio: Fix CXD56 audio initialization
b66e4a44d9 is described below
commit b66e4a44d982dd37dbafc69ca702c913cae3f247
Author: Takayoshi Koizumi <ta...@gmail.com>
AuthorDate: Sat Aug 6 22:12:10 2022 +0000
board/cxd56xx/audio: Fix CXD56 audio initialization
Fix PCM decoder config where it is always initialized assuming
it was enabled despite being optional.
---
boards/arm/cxd56xx/common/src/cxd56_audio.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/boards/arm/cxd56xx/common/src/cxd56_audio.c b/boards/arm/cxd56xx/common/src/cxd56_audio.c
index 3b875f9f7e..08ed9849ca 100644
--- a/boards/arm/cxd56xx/common/src/cxd56_audio.c
+++ b/boards/arm/cxd56xx/common/src/cxd56_audio.c
@@ -481,6 +481,10 @@ int board_audio_initialize_driver(int minor)
return -ENODEV;
}
+#ifndef CONFIG_AUDIO_FORMAT_PCM
+ pcm = cxd56;
+#else
+
/* Initialize a PCM decoder with the CXD56 instance. */
pcm = pcm_decode_initialize(cxd56);
@@ -491,6 +495,8 @@ int board_audio_initialize_driver(int minor)
return -ENODEV;
}
+#endif
+
/* Create a device name */
snprintf(devname, 12, "pcm%d", minor);