board/cxd56xx/audio: Fix CXD56 audio initialization

Fix PCM decoder config where it is always initialized assuming
it was enabled despite being optional.
This commit is contained in:
Takayoshi Koizumi 2022-08-06 22:12:10 +00:00 committed by Xiang Xiao
parent 631ae0032e
commit b66e4a44d9

View File

@ -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);