Home | History | Annotate | Download | only in audio

Lines Matching refs:sep

93 	struct a2dp_sep *sep;
246 cb->config_cb(s->session, s->sep, stream, s->err,
306 cb->select_cb(s->session, s->sep, s->caps, cb->user_data);
359 struct a2dp_sep *sep = user_data;
364 if (sep->suspend_timer) {
365 g_source_remove(sep->suspend_timer);
366 sep->suspend_timer = 0;
369 if (sep->session) {
370 avdtp_unref(sep->session);
371 sep->session = NULL;
374 if (sep->endpoint)
375 media_endpoint_clear_configuration(sep->endpoint);
377 sep->stream = NULL;
387 if (setup->sep->stream == NULL)
396 stream_state_changed, setup->sep);
398 if (setup->sep->type == AVDTP_SEP_TYPE_SOURCE)
418 struct avdtp_local_sep *sep,
428 DBG("Sink %p: Set_Configuration_Ind", sep);
430 DBG("Source %p: Set_Configuration_Ind", sep);
437 setup->sep = a2dp_sep;
482 static gboolean sbc_getcap_ind(struct avdtp *session, struct avdtp_local_sep *sep,
491 DBG("Sink %p: Get_Capability_Ind", sep);
493 DBG("Source %p: Get_Capability_Ind", sep);
550 struct avdtp_local_sep *sep,
560 DBG("Sink %p: Set_Configuration_Ind", sep);
562 DBG("Source %p: Set_Configuration_Ind", sep);
569 setup->sep = a2dp_sep;
591 struct avdtp_local_sep *sep,
600 DBG("Sink %p: Get_Capability_Ind", sep);
602 DBG("Source %p: Get_Capability_Ind", sep);
662 struct avdtp_local_sep *sep,
672 DBG("Sink %p: Set_Configuration_Ind", sep);
674 DBG("Source %p: Set_Configuration_Ind", sep);
681 setup->sep = a2dp_sep;
728 struct avdtp_local_sep *sep,
739 DBG("Sink %p: Get_Capability_Ind", sep);
741 DBG("Source %p: Get_Capability_Ind", sep);
795 static void setconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
805 DBG("Sink %p: Set_Configuration_Cfm", sep);
807 DBG("Source %p: Set_Configuration_Cfm", sep);
861 static gboolean getconf_ind(struct avdtp *session, struct avdtp_local_sep *sep,
867 DBG("Sink %p: Get_Configuration_Ind", sep);
869 DBG("Source %p: Get_Configuration_Ind", sep);
873 static void getconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
880 DBG("Sink %p: Set_Configuration_Cfm", sep);
882 DBG("Source %p: Set_Configuration_Cfm", sep);
885 static gboolean open_ind(struct avdtp *session, struct avdtp_local_sep *sep,
892 DBG("Sink %p: Open_Ind", sep);
894 DBG("Source %p: Open_Ind", sep);
898 static void open_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
906 DBG("Sink %p: Open_Cfm", sep);
908 DBG("Source %p: Open_Cfm", sep);
925 static gboolean suspend_timeout(struct a2dp_sep *sep)
927 if (avdtp_suspend(sep->session, sep->stream) == 0)
928 sep->suspending = TRUE;
930 sep->suspend_timer = 0;
932 avdtp_unref(sep->session);
933 sep->session = NULL;
938 static gboolean start_ind(struct avdtp *session, struct avdtp_local_sep *sep,
946 DBG("Sink %p: Start_Ind", sep);
948 DBG("Source %p: Start_Ind", sep);
964 static void start_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
972 DBG("Sink %p: Start_Cfm", sep);
974 DBG("Source %p: Start_Cfm", sep);
988 static gboolean suspend_ind(struct avdtp *session, struct avdtp_local_sep *sep,
995 DBG("Sink %p: Suspend_Ind", sep);
997 DBG("Source %p: Suspend_Ind", sep);
1009 static void suspend_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
1019 DBG("Sink %p: Suspend_Cfm", sep);
1021 DBG("Source %p: Suspend_Cfm", sep);
1054 static gboolean close_ind(struct avdtp *session, struct avdtp_local_sep *sep,
1062 DBG("Sink %p: Close_Ind", sep);
1064 DBG("Source %p: Close_Ind", sep);
1079 struct a2dp_sep *sep = setup->sep;
1089 if (!setup->rsep || sep->codec != rsep_codec->media_codec_type)
1090 setup->rsep = avdtp_find_remote_sep(setup->session, sep->lsep);
1093 sep->lsep,
1108 static void close_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
1116 DBG("Sink %p: Close_Cfm", sep);
1118 DBG("Source %p: Close_Cfm", sep);
1138 static gboolean abort_ind(struct avdtp *session, struct avdtp_local_sep *sep,
1145 DBG("Sink %p: Abort_Ind", sep);
1147 DBG("Source %p: Abort_Ind", sep);
1154 static void abort_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
1162 DBG("Sink %p: Abort_Cfm", sep);
1164 DBG("Source %p: Abort_Cfm", sep);
1173 static gboolean reconf_ind(struct avdtp *session, struct avdtp_local_sep *sep,
1179 DBG("Sink %p: ReConfigure_Ind", sep);
1181 DBG("Source %p: ReConfigure_Ind", sep);
1187 struct avdtp_local_sep *sep,
1195 DBG("Sink %p: DelayReport_Ind", sep);
1197 DBG("Source %p: DelayReport_Ind", sep);
1205 struct avdtp_local_sep *sep,
1213 DBG("Sink %p: DelayReport_Ind", sep);
1215 DBG("Source %p: DelayReport_Ind", sep);
1226 static void reconf_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
1234 DBG("Sink %p: ReConfigure_Cfm", sep);
1236 DBG("Source %p: ReConfigure_Cfm", sep);
1250 static void delay_report_cfm(struct avdtp *session, struct avdtp_local_sep *sep,
1257 DBG("Sink %p: DelayReport_Cfm", sep);
1259 DBG("Source %p: DelayReport_Cfm", sep);
1438 /* Don't register any local sep if Socket is disabled */
1540 static void a2dp_unregister_sep(struct a2dp_sep *sep)
1542 if (sep->endpoint) {
1543 media_endpoint_release(sep->endpoint);
1544 sep->endpoint = NULL;
1547 avdtp_unregister_sep(sep->lsep);
1548 g_free(sep);
1582 struct a2dp_sep *sep;
1607 sep = g_new0(struct a2dp_sep, 1);
1617 sep->lsep = avdtp_register_sep(&server->src, type,
1619 delay_reporting, ind, &cfm, sep);
1620 if (sep->lsep == NULL) {
1621 g_free(sep);
1627 sep->server = server;
1628 sep->endpoint = endpoint;
1629 sep->codec = codec;
1630 sep->type = type;
1631 sep->delay_reporting = delay_reporting;
1647 avdtp_unregister_sep(sep->lsep);
1648 g_free(sep);
1657 avdtp_unregister_sep(sep->lsep);
1658 g_free(sep);
1666 *l = g_slist_append(*l, sep);
1670 return sep;
1673 void a2dp_remove_sep(struct a2dp_sep *sep)
1675 struct a2dp_server *server = sep->server;
1677 if (sep->type == AVDTP_SEP_TYPE_SOURCE) {
1678 if (g_slist_find(server->sources, sep) == NULL)
1680 server->sources = g_slist_remove(server->sources, sep);
1686 if (g_slist_find(server->sinks, sep) == NULL)
1688 server->sinks = g_slist_remove(server->sinks, sep);
1695 if (sep->locked)
1698 a2dp_unregister_sep(sep);
1724 struct a2dp_sep *sep = l->data;
1726 if (sep->locked)
1729 if (sep->codec != codec_cap->media_codec_type)
1732 if (!sep->stream || avdtp_has_stream(session, sep->stream))
1733 return sep;
1900 cap->media_codec_type = setup->sep->codec;
1926 struct a2dp_sep *sep = list->data;
1932 if (sep->endpoint == NULL)
1935 name = media_endpoint_get_sender(sep->endpoint);
1940 if (avdtp_find_remote_sep(session, sep->lsep) == NULL)
1943 return sep;
1953 struct a2dp_sep *sep;
1965 sep = a2dp_find_sep(session, l, sender);
1966 if (sep != NULL)
1967 return sep;
1979 struct a2dp_sep *sep;
1983 sep = a2dp_select_sep(session, type, sender);
1984 if (!sep) {
1985 error("Unable to select SEP");
1997 setup->sep = sep;
1998 setup->rsep = avdtp_find_remote_sep(session, sep->lsep);
2001 error("Could not find remote sep");
2007 if (sep->endpoint == NULL) {
2010 error("Unable to auto select remote SEP capabilities");
2022 if (media_endpoint_select_configuration(sep->endpoint, codec->data,
2034 unsigned int a2dp_config(struct avdtp *session, struct a2dp_sep *sep,
2066 if (sep->codec != codec_cap->media_codec_type)
2069 DBG("a2dp_config: selected SEP %p", sep->lsep);
2079 setup->sep = sep;
2080 setup->stream = sep->stream;
2089 switch (avdtp_sep_get_state(sep->lsep)) {
2091 if (sep->type == AVDTP_SEP_TYPE_SOURCE)
2113 setup->rsep = avdtp_find_remote_sep(session, sep->lsep);
2120 sep->lsep, caps,
2136 if (avdtp_close(session, sep->stream, FALSE) < 0) {
2143 error("SEP in bad state for requesting a new stream");
2154 unsigned int a2dp_resume(struct avdtp *session, struct a2dp_sep *sep,
2168 setup->sep = sep;
2169 setup->stream = sep->stream;
2171 switch (avdtp_sep_get_state(sep->lsep)) {
2176 if (avdtp_start(session, sep->stream) < 0) {
2182 if (!sep->suspending && sep->suspend_timer) {
2183 g_source_remove(sep->suspend_timer);
2184 sep->suspend_timer = 0;
2185 avdtp_unref(sep->session);
2186 sep->session = NULL;
2188 if (sep->suspending)
2195 error("SEP in bad state for resume");
2206 unsigned int a2dp_suspend(struct avdtp *session, struct a2dp_sep *sep,
2220 setup->sep = sep;
2221 setup->stream = sep->stream;
2223 switch (avdtp_sep_get_state(sep->lsep)) {
2232 if (avdtp_suspend(session, sep->stream) < 0) {
2236 sep->suspending = TRUE;
2239 error("SEP in bad state for suspend");
2281 gboolean a2dp_sep_lock(struct a2dp_sep *sep, struct avdtp *session)
2283 if (sep->locked)
2286 DBG("SEP %p locked", sep->lsep);
2287 sep->locked = TRUE;
2292 gboolean a2dp_sep_unlock(struct a2dp_sep *sep, struct avdtp *session)
2294 struct a2dp_server *server = sep->server;
2298 state = avdtp_sep_get_state(sep->lsep);
2300 sep->locked = FALSE;
2302 DBG("SEP %p unlocked", sep->lsep);
2304 if (sep->type == AVDTP_SEP_TYPE_SOURCE)
2309 /* Unregister sep if it was removed */
2310 if (g_slist_find(l, sep) == NULL) {
2311 a2dp_unregister_sep(sep);
2315 if (!sep->stream || state == AVDTP_STATE_IDLE)
2323 if (avdtp_suspend(session, sep->stream) == 0)
2324 sep->suspending = TRUE;
2333 gboolean a2dp_sep_get_lock(struct a2dp_sep *sep)
2335 return sep->locked;
2340 const struct a2dp_sep *sep = data;
2343 return (sep->stream != stream);
2376 struct avdtp_stream *a2dp_sep_get_stream(struct a2dp_sep *sep)
2378 return sep->stream;