From b66e4a44d982dd37dbafc69ca702c913cae3f247 Mon Sep 17 00:00:00 2001 From: Takayoshi Koizumi Date: Sat, 6 Aug 2022 22:12:10 +0000 Subject: [PATCH] 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);