Lines Matching refs:data
279 * up to one write MTU of data left in encoder buffer from previous round.
353 /* Not enough data in encoder buffer */
378 /* First, render some data */
401 * provide encoded data. */
465 pa_log_error("Failed to read data from socket: %s", received < 0 ? pa_cstrerror(errno) : "EOF");
489 pa_log_warn("Couldn't find SO_TIMESTAMP data in auxiliary recvmsg() data!");
502 /* Read incoming data, decode it and post result (if any) to source output.
550 /* Decoding of data may result in empty buffer, in this case
576 * socket man page. The data is written to the socket in chunks of write_block_size, so
681 /* If there is still data in the memchunk, we have to discard it
830 static int source_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
845 *((int64_t*) data) = u->source->thread_info.fixed_latency - pa_smoother_2_get_delay(u->read_smoother, pa_rtclock_now(), u->read_index);
850 *((int64_t*) data) = u->source->thread_info.fixed_latency + wi - ri;
853 *((int64_t*) data) = 0;
874 return pa_source_process_msg(o, code, data, offset, chunk);
1010 pa_source_new_data data;
1014 pa_source_new_data_init(&data);
1015 data.module = u->module;
1016 data.card = u->card;
1017 data.driver = __FILE__;
1018 data.name = pa_sprintf_malloc("bluez_source.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile));
1019 data.namereg_fail = false;
1020 pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
1022 pa_proplist_sets(data.proplist, PA_PROP_BLUETOOTH_CODEC, u->bt_codec->name);
1023 pa_source_new_data_set_sample_spec(&data, &u->decoder_sample_spec);
1026 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
1028 connect_ports(u, &data, PA_DIRECTION_INPUT);
1035 data.suspend_cause = PA_SUSPEND_USER;
1042 data.suspend_cause = PA_SUSPEND_USER;
1052 u->source = pa_source_new(u->core, &data, PA_SOURCE_HARDWARE|PA_SOURCE_LATENCY);
1053 pa_source_new_data_done(&data);
1069 static int sink_process_msg(pa_msgobject *o, int code, void *data, int64_t offset, pa_memchunk *chunk) {
1097 *((int64_t*) data) = u->sink->thread_info.fixed_latency + delay;
1117 return pa_sink_process_msg(o, code, data, offset, chunk);
1249 pa_sink_new_data data;
1253 pa_sink_new_data_init(&data);
1254 data.module = u->module;
1255 data.card = u->card;
1256 data.driver = __FILE__;
1257 data.name = pa_sprintf_malloc("bluez_sink.%s.%s", u->device->address, pa_bluetooth_profile_to_string(u->profile));
1258 data.namereg_fail = false;
1259 pa_proplist_sets(data.proplist, "bluetooth.protocol", pa_bluetooth_profile_to_string(u->profile));
1261 pa_proplist_sets(data.proplist, PA_PROP_BLUETOOTH_CODEC, u->bt_codec->name);
1262 pa_sink_new_data_set_sample_spec(&data, &u->encoder_sample_spec);
1265 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_INTENDED_ROLES, "phone");
1267 connect_ports(u, &data, PA_DIRECTION_OUTPUT);
1273 data.suspend_cause = PA_SUSPEND_USER;
1280 data.suspend_cause = PA_SUSPEND_USER;
1292 u->sink = pa_sink_new(u->core, &data, PA_SINK_HARDWARE|PA_SINK_LATENCY);
1293 pa_sink_new_data_done(&data);
1529 /* If the stream is writable, send some data if necessary */
1553 * until we've received more data, so in that case we only want to set
1578 * the socket has not been accepting data fast enough (could be due to
1621 /* If the stream is writable, send some data if necessary */
1645 * will wake up the thread when the next data needs to be written. */
2195 pa_card_new_data data;
2208 pa_card_new_data_init(&data);
2209 data.driver = __FILE__;
2210 data.module = u->module;
2213 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_DESCRIPTION, alias);
2216 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_STRING, d->address);
2217 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_API, "bluez");
2218 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_CLASS, "sound");
2219 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_BUS, "bluetooth");
2222 pa_proplist_sets(data.proplist, PA_PROP_DEVICE_FORM_FACTOR, form_factor_to_string(ff));
2224 pa_proplist_sets(data.proplist, "bluez.path", d->path);
2225 pa_proplist_setf(data.proplist, "bluez.class", "0x%06x", d->class_of_device);
2226 pa_proplist_sets(data.proplist, "bluez.alias", d->alias);
2227 data.name = pa_sprintf_malloc("bluez_card.%s", d->address);
2228 data.namereg_fail = false;
2233 pa_proplist_setf(data.proplist, "bluetooth.battery", "%d%%", level);
2236 create_card_ports(u, data.ports);
2247 if (pa_hashmap_get(data.profiles, pa_bluetooth_profile_to_string(profile))) {
2257 cp = create_card_profile(u, profile, data.ports);
2258 pa_hashmap_put(data.profiles, cp->name, cp);
2261 pa_assert(!pa_hashmap_isempty(data.profiles));
2267 pa_hashmap_put(data.profiles, cp->name, cp);
2269 u->card = pa_card_new(u->core, &data);
2270 pa_card_new_data_done(&data);
2701 static int device_process_msg(pa_msgobject *obj, int code, void *data, int64_t offset, pa_memchunk *chunk) {