• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Pipewireパッケージ(ちょっと変更)


Commit MetaInfo

Revisión17c583bbe73d030c6cf740c69397521e9764df5a (tree)
Tiempo2023-11-13 01:48:25
AutorPauli Virtanen <pav@iki....>
CommiterPauli Virtanen

Log Message

bluez5: iso-io: get proper group id for broadcast

Cambiar Resumen

Diferencia incremental

--- a/spa/plugins/bluez5/iso-io.c
+++ b/spa/plugins/bluez5/iso-io.c
@@ -37,7 +37,7 @@ struct group {
3737 struct spa_source source;
3838 struct spa_list streams;
3939 int timerfd;
40- uint8_t cig;
40+ uint8_t id;
4141 uint64_t next;
4242 uint64_t duration;
4343 uint32_t paused;
@@ -155,7 +155,7 @@ static void group_on_timeout(struct spa_source *source)
155155 if ((res = spa_system_timerfd_read(group->data_system, group->timerfd, &exp)) < 0) {
156156 if (res != -EAGAIN)
157157 spa_log_warn(group->log, "%p: ISO group:%u error reading timerfd: %s",
158- group, group->cig, spa_strerror(res));
158+ group, group->id, spa_strerror(res));
159159 return;
160160 }
161161
@@ -178,7 +178,7 @@ static void group_on_timeout(struct spa_source *source)
178178
179179 if (group->paused) {
180180 --group->paused;
181- spa_log_debug(group->log, "%p: ISO group:%d paused:%u", group, group->cig, group->paused);
181+ spa_log_debug(group->log, "%p: ISO group:%u paused:%u", group, group->id, group->paused);
182182 }
183183
184184 /* Produce output */
@@ -194,7 +194,7 @@ static void group_on_timeout(struct spa_source *source)
194194 }
195195 if (stream->this.size == 0) {
196196 spa_log_debug(group->log, "%p: ISO group:%u miss fd:%d",
197- group, group->cig, stream->fd);
197+ group, group->id, stream->fd);
198198 if (stream_silence(stream) < 0) {
199199 fail = true;
200200 continue;
@@ -208,7 +208,7 @@ static void group_on_timeout(struct spa_source *source)
208208 }
209209
210210 spa_log_trace(group->log, "%p: ISO group:%u sent fd:%d size:%u ts:%u idle:%d res:%d",
211- group, group->cig, stream->fd, (unsigned)stream->this.size,
211+ group, group->id, stream->fd, (unsigned)stream->this.size,
212212 (unsigned)stream->this.timestamp, stream->idle, res);
213213
214214 stream->this.size = 0;
@@ -243,19 +243,29 @@ static struct group *group_create(struct spa_bt_transport *t,
243243 struct spa_log *log, struct spa_loop *data_loop, struct spa_system *data_system)
244244 {
245245 struct group *group;
246+ uint8_t id;
246247
247248 if (t->bap_interval <= 5000) {
248249 errno = EINVAL;
249250 return NULL;
250251 }
251252
253+ if (t->profile & (SPA_BT_PROFILE_BAP_SINK | SPA_BT_PROFILE_BAP_SOURCE)) {
254+ id = t->bap_cig;
255+ } else if (t->profile & (SPA_BT_PROFILE_BAP_BROADCAST_SINK | SPA_BT_PROFILE_BAP_BROADCAST_SOURCE)) {
256+ id = t->bap_big;
257+ } else {
258+ errno = EINVAL;
259+ return NULL;
260+ }
261+
252262 group = calloc(1, sizeof(struct group));
253263 if (group == NULL)
254264 return NULL;
255265
256266 spa_log_topic_init(log, &log_topic);
257267
258- group->cig = t->bap_cig;
268+ group->id = id;
259269 group->log = log;
260270 group->data_loop = data_loop;
261271 group->data_system = data_system;