masayuki2009 commented on a change in pull request #2282:
URL: https://github.com/apache/incubator-nuttx/pull/2282#discussion_r525880123



##########
File path: drivers/audio/cxd56.c
##########
@@ -1272,6 +1276,149 @@ static void cxd56_reset_channel_sel(cxd56_dmahandle_t 
handle)
     }
 }
 
+#ifdef CONFIG_CXD56_AUCIO_SRC
+static void _process_audio_with_src(cxd56_dmahandle_t hdl, uint16_t err_code)
+{
+  struct audio_msg_s msg;
+  struct cxd56_dev_s *dev;
+  irqstate_t flags;
+  bool request_buffer = true;
+  int ret;
+
+  dev = g_dev[hdl];
+
+  /* Trigger new DMA job */
+
+  flags = spin_lock_irqsave();
+
+  if (err_code == CXD56_AUDIO_ECODE_DMA_TRANS)
+    {
+      /* Notify end of data */
+
+      if (dev->state != CXD56_DEV_STATE_PAUSED
+          && dq_count(&dev->down_pendq) == 0)
+        {
+          msg.msg_id = AUDIO_MSG_STOP;
+          msg.u.data = 0;
+          ret = nxmq_send(dev->mq, (FAR const char *)&msg,

Review comment:
       @jerpelea 
   ```nxmq_send()``` should not be called within spin_lock_irqsave()
   




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to