Fix some warnings in audio code causing by fixing the prototypes of mq_send() and mq_receive()
This commit is contained in:
parent
8a28f7fc5d
commit
b285162e79
@ -716,7 +716,7 @@ static inline void audio_dequeuebuffer(FAR struct audio_upperhalf_s *upper,
|
||||
msg.session = session;
|
||||
#endif
|
||||
apb->flags |= AUDIO_APB_DEQUEUED;
|
||||
mq_send(upper->usermq, &msg, sizeof(msg),
|
||||
mq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
}
|
||||
}
|
||||
@ -754,7 +754,7 @@ static inline void audio_complete(FAR struct audio_upperhalf_s *upper,
|
||||
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||
msg.session = session;
|
||||
#endif
|
||||
mq_send(upper->usermq, &msg, sizeof(msg),
|
||||
mq_send(upper->usermq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||
}
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ static void *null_workerthread(pthread_addr_t pvarg)
|
||||
{
|
||||
/* Wait for messages from our message queue */
|
||||
|
||||
msglen = mq_receive(priv->mq, &msg, sizeof(msg), &prio);
|
||||
msglen = mq_receive(priv->mq, (FAR char *)&msg, sizeof(msg), &prio);
|
||||
|
||||
/* Handle the case when we return with no message */
|
||||
|
||||
@ -589,7 +589,8 @@ static int null_stop(FAR struct audio_lowerhalf_s *dev)
|
||||
|
||||
term_msg.msgId = AUDIO_MSG_STOP;
|
||||
term_msg.u.data = 0;
|
||||
mq_send(priv->mq, &term_msg, sizeof(term_msg), CONFIG_AUDIO_NULL_MSG_PRIO);
|
||||
mq_send(priv->mq, (FAR const char *)&term_msg, sizeof(term_msg),
|
||||
CONFIG_AUDIO_NULL_MSG_PRIO);
|
||||
|
||||
/* Join the worker thread */
|
||||
|
||||
|
@ -1239,7 +1239,8 @@ static int vs1053_dreq_isr(int irq, FAR void *context)
|
||||
if (dev->running)
|
||||
{
|
||||
msg.msgId = AUDIO_MSG_DATA_REQUEST;
|
||||
mq_send(dev->mq, &msg, sizeof(msg), CONFIG_VS1053_MSG_PRIO);
|
||||
mq_send(dev->mq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_VS1053_MSG_PRIO);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1303,7 +1304,7 @@ static void *vs1053_workerthread(pthread_addr_t pvarg)
|
||||
|
||||
/* Wait for messages from our message queue */
|
||||
|
||||
size = mq_receive(dev->mq, &msg, sizeof(msg), &prio);
|
||||
size = mq_receive(dev->mq, (FAR char *)&msg, sizeof(msg), &prio);
|
||||
|
||||
/* Handle the case when we return with no message */
|
||||
|
||||
@ -1530,7 +1531,8 @@ static int vs1053_stop(FAR struct audio_lowerhalf_s *lower)
|
||||
|
||||
term_msg.msgId = AUDIO_MSG_STOP;
|
||||
term_msg.u.data = 0;
|
||||
mq_send(dev->mq, &term_msg, sizeof(term_msg), CONFIG_VS1053_MSG_PRIO);
|
||||
mq_send(dev->mq, (FAR const char *)&term_msg, sizeof(term_msg),
|
||||
CONFIG_VS1053_MSG_PRIO);
|
||||
|
||||
/* Join the worker thread */
|
||||
|
||||
@ -1643,7 +1645,8 @@ static int vs1053_enqueuebuffer(FAR struct audio_lowerhalf_s *lower,
|
||||
{
|
||||
term_msg.msgId = AUDIO_MSG_ENQUEUE;
|
||||
term_msg.u.data = 0;
|
||||
mq_send(dev->mq, &term_msg, sizeof(term_msg), CONFIG_VS1053_MSG_PRIO);
|
||||
mq_send(dev->mq, (FAR const char *)&term_msg, sizeof(term_msg),
|
||||
CONFIG_VS1053_MSG_PRIO);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1336,7 +1336,8 @@ static void wm8904_senddone(FAR struct i2s_dev_s *i2s,
|
||||
*/
|
||||
|
||||
msg.msgId = AUDIO_MSG_COMPLETE;
|
||||
ret = mq_send(priv->mq, &msg, sizeof(msg), CONFIG_WM8904_MSG_PRIO);
|
||||
ret = mq_send(priv->mq, (FAR const char *)&msg, sizeof(msg),
|
||||
CONFIG_WM8904_MSG_PRIO);
|
||||
if (ret < 0)
|
||||
{
|
||||
audlldbg("ERROR: mq_send failed: %d\n", errno);
|
||||
@ -1597,7 +1598,8 @@ static int wm8904_stop(FAR struct audio_lowerhalf_s *dev)
|
||||
|
||||
term_msg.msgId = AUDIO_MSG_STOP;
|
||||
term_msg.u.data = 0;
|
||||
mq_send(priv->mq, &term_msg, sizeof(term_msg), CONFIG_WM8904_MSG_PRIO);
|
||||
mq_send(priv->mq, (FAR const char *)&term_msg, sizeof(term_msg),
|
||||
CONFIG_WM8904_MSG_PRIO);
|
||||
|
||||
/* Join the worker thread */
|
||||
|
||||
@ -1712,7 +1714,8 @@ static int wm8904_enqueuebuffer(FAR struct audio_lowerhalf_s *dev,
|
||||
term_msg.msgId = AUDIO_MSG_ENQUEUE;
|
||||
term_msg.u.data = 0;
|
||||
|
||||
ret = mq_send(priv->mq, &term_msg, sizeof(term_msg), CONFIG_WM8904_MSG_PRIO);
|
||||
ret = mq_send(priv->mq, (FAR const char *)&term_msg, sizeof(term_msg),
|
||||
CONFIG_WM8904_MSG_PRIO);
|
||||
if (ret < 0)
|
||||
{
|
||||
int errcode = errno;
|
||||
@ -2028,7 +2031,7 @@ static void *wm8904_workerthread(pthread_addr_t pvarg)
|
||||
|
||||
/* Wait for messages from our message queue */
|
||||
|
||||
msglen = mq_receive(priv->mq, &msg, sizeof(msg), &prio);
|
||||
msglen = mq_receive(priv->mq, (FAR char *)&msg, sizeof(msg), &prio);
|
||||
|
||||
/* Handle the case when we return with no message */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user