acassis commented on code in PR #10465:
URL: https://github.com/apache/nuttx/pull/10465#discussion_r1314261522
##########
drivers/audio/cs4344.c:
##########
@@ -1417,13 +1417,30 @@ static void *cs4344_workerthread(pthread_addr_t pvarg)
static void cs4344_reset(FAR struct cs4344_dev_s *priv)
{
+ int ret;
+
/* Put audio output back to its initial configuration */
priv->samprate = CS4344_DEFAULT_SAMPRATE;
priv->nchannels = CS4344_DEFAULT_NCHANNELS;
priv->bpsamp = CS4344_DEFAULT_BPSAMP;
priv->mclk_freq = 0;
+ ret = cs4344_setmclkfrequency(priv);
+ if (ret != OK)
+ {
+ if (ret != -ENOTTY)
+ {
+ auderr("ERROR: Unsupported combination of sample rate and"
+ "data width\n");
+ PANIC();
Review Comment:
Please verify if PANIC() is the best option here. It will crash the board
case audio clock fails
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]