tmedicci commented on code in PR #10465:
URL: https://github.com/apache/nuttx/pull/10465#discussion_r1314920468


##########
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:
   I changed the return of the function and checked for errors on the 
initialize function (which is the most important). Now, it's up to the board to 
PANIC or not if the codec initialization 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]

Reply via email to