diff --git a/audio/avdtp.c b/audio/avdtp.c
index 1287698..736eed7 100644
--- a/audio/avdtp.c
+++ b/audio/avdtp.c
break;
case AVDTP_STATE_OPEN:
stream->starting = FALSE;
- if (old_state > AVDTP_STATE_OPEN && session->auto_dc)
+ if ((old_state > AVDTP_STATE_OPEN && session->auto_dc) ||
+ stream->open_acp)
stream->idle_timer = g_timeout_add_seconds(STREAM_TIMEOUT,
stream_timeout,
stream);
break;
case AVDTP_STATE_STREAMING:
+ if (stream->idle_timer) {
+ g_source_remove(stream->idle_timer);
+ stream->idle_timer = 0;
+ }
+ stream->open_acp = FALSE;
+ break;
case AVDTP_STATE_CLOSING:
case AVDTP_STATE_ABORTING:
if (stream->idle_timer) {
if (stream->lsep->state != AVDTP_STATE_OPEN)
return -EINVAL;
+ /* Recommendation 12:
+ * If the RD has configured and opened a stream it is also responsible
+ * to start the streaming via GAVDP_START.
+ */
+ if (stream->open_acp) {
+ stream->starting = TRUE;
+ return 0;
+ }
+
if (stream->close_int == TRUE) {
error("avdtp_start: rejecting start since close is initiated");
return -EINVAL;