Lines Matching +full:- +full:m
2 * Use of this source code is governed by a BSD-style license that can be
30 /* Client -> Server*/
62 /* Server -> Client */
132 static inline void cras_fill_connect_message(struct cras_connect_message *m, in cras_fill_connect_message() argument
143 m->proto_version = CRAS_PROTO_VER; in cras_fill_connect_message()
144 m->direction = direction; in cras_fill_connect_message()
145 m->stream_id = stream_id; in cras_fill_connect_message()
146 m->stream_type = stream_type; in cras_fill_connect_message()
147 m->buffer_frames = buffer_frames; in cras_fill_connect_message()
148 m->cb_threshold = cb_threshold; in cras_fill_connect_message()
149 m->flags = flags; in cras_fill_connect_message()
150 m->effects = effects; in cras_fill_connect_message()
151 pack_cras_audio_format(&m->format, &format); in cras_fill_connect_message()
152 m->dev_idx = dev_idx; in cras_fill_connect_message()
153 m->header.id = CRAS_SERVER_CONNECT_STREAM; in cras_fill_connect_message()
154 m->header.length = sizeof(struct cras_connect_message); in cras_fill_connect_message()
163 struct cras_disconnect_stream_message *m, in cras_fill_disconnect_stream_message() argument
166 m->stream_id = stream_id; in cras_fill_disconnect_stream_message()
167 m->header.id = CRAS_SERVER_DISCONNECT_STREAM; in cras_fill_disconnect_stream_message()
168 m->header.length = sizeof(struct cras_disconnect_stream_message); in cras_fill_disconnect_stream_message()
184 struct cras_set_system_volume *m, in cras_fill_set_system_volume() argument
187 m->volume = volume; in cras_fill_set_system_volume()
188 m->header.id = CRAS_SERVER_SET_SYSTEM_VOLUME; in cras_fill_set_system_volume()
189 m->header.length = sizeof(*m); in cras_fill_set_system_volume()
198 struct cras_set_system_capture_gain *m, in cras_fill_set_system_capture_gain() argument
201 m->gain = gain; in cras_fill_set_system_capture_gain()
202 m->header.id = CRAS_SERVER_SET_SYSTEM_CAPTURE_GAIN; in cras_fill_set_system_capture_gain()
203 m->header.length = sizeof(*m); in cras_fill_set_system_capture_gain()
209 int32_t mute; /* 0 = un-mute, 1 = mute. */
212 struct cras_set_system_mute *m, in cras_fill_set_system_mute() argument
215 m->mute = mute; in cras_fill_set_system_mute()
216 m->header.id = CRAS_SERVER_SET_SYSTEM_MUTE; in cras_fill_set_system_mute()
217 m->header.length = sizeof(*m); in cras_fill_set_system_mute()
220 struct cras_set_system_mute *m, in cras_fill_set_user_mute() argument
223 m->mute = mute; in cras_fill_set_user_mute()
224 m->header.id = CRAS_SERVER_SET_USER_MUTE; in cras_fill_set_user_mute()
225 m->header.length = sizeof(*m); in cras_fill_set_user_mute()
228 struct cras_set_system_mute *m, in cras_fill_set_system_mute_locked() argument
231 m->mute = locked; in cras_fill_set_system_mute_locked()
232 m->header.id = CRAS_SERVER_SET_SYSTEM_MUTE_LOCKED; in cras_fill_set_system_mute_locked()
233 m->header.length = sizeof(*m); in cras_fill_set_system_mute_locked()
236 struct cras_set_system_mute *m, in cras_fill_set_system_capture_mute() argument
239 m->mute = mute; in cras_fill_set_system_capture_mute()
240 m->header.id = CRAS_SERVER_SET_SYSTEM_CAPTURE_MUTE; in cras_fill_set_system_capture_mute()
241 m->header.length = sizeof(*m); in cras_fill_set_system_capture_mute()
244 struct cras_set_system_mute *m, in cras_fill_set_system_capture_mute_locked() argument
247 m->mute = locked; in cras_fill_set_system_capture_mute_locked()
248 m->header.id = CRAS_SERVER_SET_SYSTEM_CAPTURE_MUTE_LOCKED; in cras_fill_set_system_capture_mute_locked()
249 m->header.length = sizeof(*m); in cras_fill_set_system_capture_mute_locked()
260 struct cras_set_node_attr *m, in cras_fill_set_node_attr() argument
265 m->header.id = CRAS_SERVER_SET_NODE_ATTR; in cras_fill_set_node_attr()
266 m->node_id = node_id; in cras_fill_set_node_attr()
267 m->attr = attr; in cras_fill_set_node_attr()
268 m->value = value; in cras_fill_set_node_attr()
269 m->header.length = sizeof(*m); in cras_fill_set_node_attr()
279 struct cras_select_node *m, in cras_fill_select_node() argument
283 m->header.id = CRAS_SERVER_SELECT_NODE; in cras_fill_select_node()
284 m->direction = direction; in cras_fill_select_node()
285 m->node_id = node_id; in cras_fill_select_node()
286 m->header.length = sizeof(*m); in cras_fill_select_node()
296 struct cras_add_active_node *m, in cras_fill_add_active_node() argument
300 m->header.id = CRAS_SERVER_ADD_ACTIVE_NODE; in cras_fill_add_active_node()
301 m->direction = direction; in cras_fill_add_active_node()
302 m->node_id = node_id; in cras_fill_add_active_node()
303 m->header.length = sizeof(*m); in cras_fill_add_active_node()
313 struct cras_rm_active_node *m, in cras_fill_rm_active_node() argument
317 m->header.id = CRAS_SERVER_RM_ACTIVE_NODE; in cras_fill_rm_active_node()
318 m->direction = direction; in cras_fill_rm_active_node()
319 m->node_id = node_id; in cras_fill_rm_active_node()
320 m->header.length = sizeof(*m); in cras_fill_rm_active_node()
328 struct cras_reload_dsp *m) in cras_fill_reload_dsp() argument
330 m->header.id = CRAS_SERVER_RELOAD_DSP; in cras_fill_reload_dsp()
331 m->header.length = sizeof(*m); in cras_fill_reload_dsp()
340 struct cras_dump_dsp_info *m) in cras_fill_dump_dsp_info() argument
342 m->header.id = CRAS_SERVER_DUMP_DSP_INFO; in cras_fill_dump_dsp_info()
343 m->header.length = sizeof(*m); in cras_fill_dump_dsp_info()
352 struct cras_dump_audio_thread *m) in cras_fill_dump_audio_thread() argument
354 m->header.id = CRAS_SERVER_DUMP_AUDIO_THREAD; in cras_fill_dump_audio_thread()
355 m->header.length = sizeof(*m); in cras_fill_dump_audio_thread()
364 struct cras_dump_snapshots *m) in cras_fill_dump_snapshots() argument
366 m->header.id = CRAS_SERVER_DUMP_SNAPSHOTS; in cras_fill_dump_snapshots()
367 m->header.length = sizeof(*m); in cras_fill_dump_snapshots()
376 static inline void cras_fill_add_test_dev(struct cras_add_test_dev *m, in cras_fill_add_test_dev() argument
379 m->header.id = CRAS_SERVER_ADD_TEST_DEV; in cras_fill_add_test_dev()
380 m->header.length = sizeof(*m); in cras_fill_add_test_dev()
381 m->type = type; in cras_fill_add_test_dev()
393 static inline void cras_fill_test_dev_command(struct cras_test_dev_command *m, in cras_fill_test_dev_command() argument
399 m->header.id = CRAS_SERVER_TEST_DEV_COMMAND; in cras_fill_test_dev_command()
400 m->header.length = sizeof(*m) + data_len; in cras_fill_test_dev_command()
401 m->iodev_idx = iodev_idx; in cras_fill_test_dev_command()
402 m->command = command; in cras_fill_test_dev_command()
403 m->data_len = data_len; in cras_fill_test_dev_command()
404 memcpy(m->data, data, data_len); in cras_fill_test_dev_command()
407 static inline void cras_fill_suspend_message(struct cras_server_message *m, in cras_fill_suspend_message() argument
410 m->id = is_suspend ? CRAS_SERVER_SUSPEND : CRAS_SERVER_RESUME; in cras_fill_suspend_message()
411 m->length = sizeof(*m); in cras_fill_suspend_message()
425 struct cras_config_global_remix *m, in cras_fill_config_global_remix_command() argument
430 m->header.id = CRAS_CONFIG_GLOBAL_REMIX; in cras_fill_config_global_remix_command()
431 m->header.length = sizeof(*m) + count * sizeof(*coeff); in cras_fill_config_global_remix_command()
432 m->num_channels = num_channels; in cras_fill_config_global_remix_command()
433 memcpy(m->coefficient, coeff, count * sizeof(*coeff)); in cras_fill_config_global_remix_command()
443 struct cras_get_hotword_models *m, in cras_fill_get_hotword_models_message() argument
446 m->header.id = CRAS_SERVER_GET_HOTWORD_MODELS; in cras_fill_get_hotword_models_message()
447 m->header.length = sizeof(*m); in cras_fill_get_hotword_models_message()
448 m->node_id = node_id; in cras_fill_get_hotword_models_message()
459 struct cras_set_hotword_model *m, in cras_fill_set_hotword_model_message() argument
463 m->header.id = CRAS_SERVER_SET_HOTWORD_MODEL; in cras_fill_set_hotword_model_message()
464 m->header.length = sizeof(*m); in cras_fill_set_hotword_model_message()
465 m->node_id = node_id; in cras_fill_set_hotword_model_message()
466 memcpy(m->model_name, model_name, CRAS_HOTWORD_NAME_MAX_SIZE); in cras_fill_set_hotword_model_message()
477 struct cras_set_aec_dump *m, in cras_fill_set_aec_dump_message() argument
481 m->header.id = CRAS_SERVER_SET_AEC_DUMP; in cras_fill_set_aec_dump_message()
482 m->header.length = sizeof(*m); in cras_fill_set_aec_dump_message()
483 m->stream_id = stream_id; in cras_fill_set_aec_dump_message()
484 m->start = start; in cras_fill_set_aec_dump_message()
492 struct cras_reload_aec_config *m) in cras_fill_reload_aec_config() argument
494 m->header.id = CRAS_SERVER_RELOAD_AEC_CONFIG; in cras_fill_reload_aec_config()
495 m->header.length = sizeof(*m); in cras_fill_reload_aec_config()
504 struct cras_register_notification *m, in cras_fill_register_notification_message() argument
508 m->header.id = CRAS_SERVER_REGISTER_NOTIFICATION; in cras_fill_register_notification_message()
509 m->header.length = sizeof(*m); in cras_fill_register_notification_message()
510 m->msg_id = msg_id; in cras_fill_register_notification_message()
511 m->do_register = do_register; in cras_fill_register_notification_message()
524 struct cras_client_connected *m, in cras_fill_client_connected() argument
527 m->client_id = client_id; in cras_fill_client_connected()
528 m->header.id = CRAS_CLIENT_CONNECTED; in cras_fill_client_connected()
529 m->header.length = sizeof(struct cras_client_connected); in cras_fill_client_connected()
556 struct cras_client_stream_connected *m, in cras_fill_client_stream_connected() argument
563 m->err = err; in cras_fill_client_stream_connected()
564 m->stream_id = stream_id; in cras_fill_client_stream_connected()
565 pack_cras_audio_format(&m->format, format); in cras_fill_client_stream_connected()
566 m->shm_max_size = shm_max_size; in cras_fill_client_stream_connected()
567 m->effects = effects; in cras_fill_client_stream_connected()
568 m->header.id = CRAS_CLIENT_STREAM_CONNECTED; in cras_fill_client_stream_connected()
569 m->header.length = sizeof(struct cras_client_stream_connected); in cras_fill_client_stream_connected()
572 struct cras_client_stream_connected_old *m, in cras_fill_client_stream_connected_old() argument
578 m->err = err; in cras_fill_client_stream_connected_old()
579 m->stream_id = stream_id; in cras_fill_client_stream_connected_old()
580 pack_cras_audio_format(&m->format, format); in cras_fill_client_stream_connected_old()
581 m->shm_max_size = shm_max_size; in cras_fill_client_stream_connected_old()
582 m->header.id = CRAS_CLIENT_STREAM_CONNECTED; in cras_fill_client_stream_connected_old()
583 m->header.length = sizeof(struct cras_client_stream_connected_old); in cras_fill_client_stream_connected_old()
591 struct cras_client_audio_debug_info_ready *m) in cras_fill_client_audio_debug_info_ready() argument
593 m->header.id = CRAS_CLIENT_AUDIO_DEBUG_INFO_READY; in cras_fill_client_audio_debug_info_ready()
594 m->header.length = sizeof(*m); in cras_fill_client_audio_debug_info_ready()
604 struct cras_client_get_hotword_models_ready *m, in cras_fill_client_get_hotword_models_ready() argument
608 m->header.id = CRAS_CLIENT_GET_HOTWORD_MODELS_READY; in cras_fill_client_get_hotword_models_ready()
609 m->header.length = sizeof(*m) + hotword_models_size; in cras_fill_client_get_hotword_models_ready()
610 m->hotword_models_size = hotword_models_size; in cras_fill_client_get_hotword_models_ready()
611 memcpy(m->hotword_models, hotword_models, hotword_models_size); in cras_fill_client_get_hotword_models_ready()
620 struct cras_client_volume_changed *m, int32_t volume) in cras_fill_client_output_volume_changed() argument
622 m->header.id = CRAS_CLIENT_OUTPUT_VOLUME_CHANGED; in cras_fill_client_output_volume_changed()
623 m->header.length = sizeof(*m); in cras_fill_client_output_volume_changed()
624 m->volume = volume; in cras_fill_client_output_volume_changed()
627 struct cras_client_volume_changed *m, int32_t gain) in cras_fill_client_capture_gain_changed() argument
629 m->header.id = CRAS_CLIENT_CAPTURE_GAIN_CHANGED; in cras_fill_client_capture_gain_changed()
630 m->header.length = sizeof(*m); in cras_fill_client_capture_gain_changed()
631 m->volume = gain; in cras_fill_client_capture_gain_changed()
641 struct cras_client_mute_changed *m, int32_t muted, in cras_fill_client_output_mute_changed() argument
644 m->header.id = CRAS_CLIENT_OUTPUT_MUTE_CHANGED; in cras_fill_client_output_mute_changed()
645 m->header.length = sizeof(*m); in cras_fill_client_output_mute_changed()
646 m->muted = muted; in cras_fill_client_output_mute_changed()
647 m->user_muted = user_muted; in cras_fill_client_output_mute_changed()
648 m->mute_locked = mute_locked; in cras_fill_client_output_mute_changed()
651 struct cras_client_mute_changed *m, int32_t muted, in cras_fill_client_capture_mute_changed() argument
654 m->header.id = CRAS_CLIENT_CAPTURE_MUTE_CHANGED; in cras_fill_client_capture_mute_changed()
655 m->header.length = sizeof(*m); in cras_fill_client_capture_mute_changed()
656 m->muted = muted; in cras_fill_client_capture_mute_changed()
657 m->user_muted = 0; in cras_fill_client_capture_mute_changed()
658 m->mute_locked = mute_locked; in cras_fill_client_capture_mute_changed()
665 struct cras_client_nodes_changed *m) in cras_fill_client_nodes_changed() argument
667 m->header.id = CRAS_CLIENT_NODES_CHANGED; in cras_fill_client_nodes_changed()
668 m->header.length = sizeof(*m); in cras_fill_client_nodes_changed()
677 struct cras_client_active_node_changed *m, in cras_fill_client_active_node_changed() argument
681 m->header.id = CRAS_CLIENT_ACTIVE_NODE_CHANGED; in cras_fill_client_active_node_changed()
682 m->header.length = sizeof(*m); in cras_fill_client_active_node_changed()
683 m->direction = direction; in cras_fill_client_active_node_changed()
684 m->node_id = node_id; in cras_fill_client_active_node_changed()
693 struct cras_client_node_value_changed *m, in cras_fill_client_output_node_volume_changed() argument
697 m->header.id = CRAS_CLIENT_OUTPUT_NODE_VOLUME_CHANGED; in cras_fill_client_output_node_volume_changed()
698 m->header.length = sizeof(*m); in cras_fill_client_output_node_volume_changed()
699 m->node_id = node_id; in cras_fill_client_output_node_volume_changed()
700 m->value = volume; in cras_fill_client_output_node_volume_changed()
703 struct cras_client_node_value_changed *m, in cras_fill_client_node_left_right_swapped_changed() argument
707 m->header.id = CRAS_CLIENT_NODE_LEFT_RIGHT_SWAPPED_CHANGED; in cras_fill_client_node_left_right_swapped_changed()
708 m->header.length = sizeof(*m); in cras_fill_client_node_left_right_swapped_changed()
709 m->node_id = node_id; in cras_fill_client_node_left_right_swapped_changed()
710 m->value = swapped; in cras_fill_client_node_left_right_swapped_changed()
713 struct cras_client_node_value_changed *m, in cras_fill_client_input_node_gain_changed() argument
717 m->header.id = CRAS_CLIENT_INPUT_NODE_GAIN_CHANGED; in cras_fill_client_input_node_gain_changed()
718 m->header.length = sizeof(*m); in cras_fill_client_input_node_gain_changed()
719 m->node_id = node_id; in cras_fill_client_input_node_gain_changed()
720 m->value = gain; in cras_fill_client_input_node_gain_changed()
729 struct cras_client_num_active_streams_changed *m, in cras_fill_client_num_active_streams_changed() argument
733 m->header.id = CRAS_CLIENT_NUM_ACTIVE_STREAMS_CHANGED; in cras_fill_client_num_active_streams_changed()
734 m->header.length = sizeof(*m); in cras_fill_client_num_active_streams_changed()
735 m->direction = direction; in cras_fill_client_num_active_streams_changed()
736 m->num_active_streams = num_active_streams; in cras_fill_client_num_active_streams_changed()