fix build break with CONFIG_AUDIO_MULTI_SESSION enabled
N/A Change-Id: Idfa87031e09f26bd4ca57b5c220ce0ca849f80c4 Signed-off-by: danguanghua <danguanghua@xiaomi.com>
This commit is contained in:
parent
73d4832c15
commit
796217917a
@ -68,8 +68,14 @@ struct sim_audio_s
|
|||||||
|
|
||||||
static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
|
static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
|
||||||
struct audio_caps_s *caps);
|
struct audio_caps_s *caps);
|
||||||
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
|
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
||||||
|
FAR void *session,
|
||||||
|
const struct audio_caps_s *caps);
|
||||||
|
#else
|
||||||
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
||||||
const struct audio_caps_s *caps);
|
const struct audio_caps_s *caps);
|
||||||
|
#endif
|
||||||
static int sim_audio_shutdown(struct audio_lowerhalf_s *dev);
|
static int sim_audio_shutdown(struct audio_lowerhalf_s *dev);
|
||||||
static int sim_audio_start(struct audio_lowerhalf_s *dev);
|
static int sim_audio_start(struct audio_lowerhalf_s *dev);
|
||||||
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
|
#ifndef CONFIG_AUDIO_EXCLUDE_STOP
|
||||||
@ -353,8 +359,14 @@ static int sim_audio_getcaps(struct audio_lowerhalf_s *dev, int type,
|
|||||||
return caps->ac_len;
|
return caps->ac_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
|
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
||||||
|
FAR void *session,
|
||||||
|
const struct audio_caps_s *caps)
|
||||||
|
#else
|
||||||
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
static int sim_audio_configure(struct audio_lowerhalf_s *dev,
|
||||||
const struct audio_caps_s *caps)
|
const struct audio_caps_s *caps)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
|
struct sim_audio_s *priv = (struct sim_audio_s *)dev;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
@ -421,10 +433,18 @@ static int sim_audio_stop(struct audio_lowerhalf_s *dev)
|
|||||||
struct ap_buffer_s *apb;
|
struct ap_buffer_s *apb;
|
||||||
|
|
||||||
apb = (struct ap_buffer_s *)dq_remfirst(&priv->pendq);
|
apb = (struct ap_buffer_s *)dq_remfirst(&priv->pendq);
|
||||||
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK, NULL);
|
||||||
|
#else
|
||||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK);
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK, NULL);
|
||||||
|
#else
|
||||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_COMPLETE, NULL, OK);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -576,7 +596,11 @@ static void sim_audio_process(struct sim_audio_s *priv)
|
|||||||
final = true;
|
final = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK, NULL);
|
||||||
|
#else
|
||||||
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK);
|
priv->dev.upper(priv->dev.priv, AUDIO_CALLBACK_DEQUEUE, apb, OK);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (final)
|
if (final)
|
||||||
{
|
{
|
||||||
|
@ -808,7 +808,7 @@ static inline void audio_message(FAR struct audio_upperhalf_s *upper,
|
|||||||
if (upper->usermq != NULL)
|
if (upper->usermq != NULL)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
#ifdef CONFIG_AUDIO_MULTI_SESSION
|
||||||
msg.session = session;
|
msg->session = session;
|
||||||
#endif
|
#endif
|
||||||
nxmq_send(upper->usermq, (FAR const char *)msg, sizeof(*msg),
|
nxmq_send(upper->usermq, (FAR const char *)msg, sizeof(*msg),
|
||||||
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
CONFIG_AUDIO_BUFFER_DEQUEUE_PRIO);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user