linguini1 commented on code in PR #18348:
URL: https://github.com/apache/nuttx/pull/18348#discussion_r2766091473


##########
audio/audio.c:
##########
@@ -292,6 +332,254 @@ static ssize_t audio_write(FAR struct file *filep,
   return 0;
 }
 
+/****************************************************************************
+ * Name: audio_setstate
+ *
+ * Description:
+ *   Update lower driver state
+ *
+ ****************************************************************************/
+
+static inline void audio_setstate(FAR struct audio_upperhalf_s *upper,
+                                  int state)
+{
+  irqstate_t flags;
+
+  flags = spin_lock_irqsave(&upper->spinlock);

Review Comment:
   Is there a reason not to just use nxmutex?



-- 
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