/external/adhd/cras/src/server/ |
H A D | cras_device_monitor.h | 12 int cras_device_monitor_reset_device(struct cras_iodev *iodev); 15 int cras_device_monitor_set_device_mute_state(struct cras_iodev *iodev);
|
H A D | cras_hfp_iodev.c | 27 static int update_supported_formats(struct cras_iodev *iodev) argument 30 iodev->format->format = SND_PCM_FORMAT_S16_LE; 32 free(iodev->supported_rates); 33 iodev->supported_rates = (size_t *)malloc(2 * sizeof(size_t)); 34 iodev->supported_rates[0] = 8000; 35 iodev->supported_rates[1] = 0; 37 free(iodev->supported_channel_counts); 38 iodev->supported_channel_counts = (size_t *)malloc(2 * sizeof(size_t)); 39 iodev->supported_channel_counts[0] = 1; 40 iodev 51 frames_queued(const struct cras_iodev *iodev, struct timespec *tstamp) argument 69 struct cras_iodev *iodev = &hfpio->base; local 77 open_dev(struct cras_iodev *iodev) argument 114 close_dev(struct cras_iodev *iodev) argument 129 set_hfp_volume(struct cras_iodev *iodev) argument 141 delay_frames(const struct cras_iodev *iodev) argument 148 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 170 put_buffer(struct cras_iodev *iodev, unsigned nwritten) argument 181 flush_buffer(struct cras_iodev *iodev) argument 193 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 218 struct cras_iodev *iodev; local 284 hfp_iodev_destroy(struct cras_iodev *iodev) argument [all...] |
H A D | cras_iodev.h | 7 * cras_iodev represents playback or capture devices on the system. Each iodev 10 * render the samples it gets to the iodev. For capture the process is 31 * playback path of an iodev with the samples that are being played back. 37 /* State of an iodev. 51 * dev - iodev which this node belongs to. 129 * update_channel_layout - Update the channel layout base on set iodev->format, 130 * expect the best available layout be filled to iodev->format. 131 * set_hotword_model - Sets the hotword model to this iodev. 133 * hotword models of this iodev. 136 * iodev wa 408 cras_iodev_adjust_active_node_volume( struct cras_iodev *iodev, unsigned int system_volume) argument 418 cras_iodev_adjust_active_node_gain( const struct cras_iodev *iodev, long system_gain) argument 428 cras_iodev_software_volume_needed( const struct cras_iodev *iodev) argument 446 cras_iodev_maximum_software_gain( const struct cras_iodev *iodev) argument 559 cras_iodev_delay_frames(const struct cras_iodev *iodev) argument 565 cras_iodev_is_open(const struct cras_iodev *iodev) argument [all...] |
H A D | cras_empty_iodev.c | 50 static unsigned int current_level(const struct cras_iodev *iodev) argument 52 struct empty_iodev *empty_iodev = (struct empty_iodev *)iodev; 58 iodev->format->frame_rate); 60 if (iodev->direction == CRAS_STREAM_INPUT) 70 * iodev callbacks. 73 static int frames_queued(const struct cras_iodev *iodev, argument 77 return current_level(iodev); 80 static int delay_frames(const struct cras_iodev *iodev) argument 85 static int close_dev(struct cras_iodev *iodev) argument 87 struct empty_iodev *empty_iodev = (struct empty_iodev *)iodev; 96 open_dev(struct cras_iodev *iodev) argument 113 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 135 put_buffer(struct cras_iodev *iodev, unsigned frames) argument 157 flush_buffer(struct cras_iodev *iodev) argument 170 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 182 struct cras_iodev *iodev; local 236 empty_iodev_destroy(struct cras_iodev *iodev) argument [all...] |
H A D | cras_iodev.c | 42 static void cras_iodev_alloc_dsp(struct cras_iodev *iodev); 68 static int cras_iodev_start(struct cras_iodev *iodev) argument 71 if (!cras_iodev_is_open(iodev)) 73 if (!iodev->start) { 76 iodev->info.name); 79 rc = iodev->start(iodev); 82 iodev->state = CRAS_IODEV_STATE_NORMAL_RUN; 123 * iodev[in] - The output device. 260 static size_t get_best_rate(struct cras_iodev *iodev, size_ argument 288 get_best_channel_count(struct cras_iodev *iodev, size_t count) argument 314 get_best_pcm_format(struct cras_iodev *iodev, snd_pcm_format_t fmt) argument 328 set_default_channel_layout(struct cras_iodev *iodev) argument 341 apply_dsp(struct cras_iodev *iodev, uint8_t *buf, size_t frames) argument 361 cras_iodev_free_dsp(struct cras_iodev *iodev) argument 371 adjust_dev_channel_for_dsp(const struct cras_iodev *iodev) argument 398 update_channel_layout(struct cras_iodev *iodev) argument 427 cras_iodev_set_format(struct cras_iodev *iodev, const struct cras_audio_format *fmt) argument 502 cras_iodev_update_dsp(struct cras_iodev *iodev) argument 522 cras_iodev_dsp_set_swap_mode_for_node(struct cras_iodev *iodev, struct cras_ionode *node, int enable) argument 540 cras_iodev_free_format(struct cras_iodev *iodev) argument 549 cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) argument 559 cras_iodev_free_audio_area(struct cras_iodev *iodev) argument 568 cras_iodev_free_resources(struct cras_iodev *iodev) argument 576 cras_iodev_alloc_dsp(struct cras_iodev *iodev) argument 694 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 700 cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 706 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 713 cras_iodev_get_software_volume_scaler(struct cras_iodev *iodev) argument 725 cras_iodev_get_software_gain_scaler(const struct cras_iodev *iodev) argument 735 cras_iodev_add_stream(struct cras_iodev *iodev, struct dev_stream *stream) argument 750 cras_iodev_rm_stream(struct cras_iodev *iodev, const struct cras_rstream *rstream) argument 787 cras_iodev_stream_offset(struct cras_iodev *iodev, struct dev_stream *stream) argument 794 cras_iodev_stream_written(struct cras_iodev *iodev, struct dev_stream *stream, unsigned int nwritten) argument 802 cras_iodev_all_streams_written(struct cras_iodev *iodev) argument 809 cras_iodev_max_stream_offset(const struct cras_iodev *iodev) argument 823 cras_iodev_open(struct cras_iodev *iodev, unsigned int cb_level) argument 855 cras_iodev_state(const struct cras_iodev *iodev) argument 860 cras_iodev_close(struct cras_iodev *iodev) argument 875 cras_iodev_put_input_buffer(struct cras_iodev *iodev, unsigned int nframes) argument 881 cras_iodev_put_output_buffer(struct cras_iodev *iodev, uint8_t *frames, unsigned int nframes) argument 956 cras_iodev_get_input_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 987 cras_iodev_get_output_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 1004 cras_iodev_update_rate(struct cras_iodev *iodev, unsigned int level, struct timespec *level_tstamp) argument 1010 cras_iodev_reset_rate_estimator(const struct cras_iodev *iodev) argument 1017 cras_iodev_get_est_rate_ratio(const struct cras_iodev *iodev) argument 1023 cras_iodev_get_dsp_delay(const struct cras_iodev *iodev) argument 1043 cras_iodev_frames_queued(struct cras_iodev *iodev, struct timespec *hw_tstamp) argument 1058 cras_iodev_buffer_avail(struct cras_iodev *iodev, unsigned hw_level) argument 1069 cras_iodev_register_pre_dsp_hook(struct cras_iodev *iodev, loopback_hook_t loop_cb, void *cb_data) argument 1077 cras_iodev_register_post_dsp_hook(struct cras_iodev *iodev, loopback_hook_t loop_cb, void *cb_data) argument 1191 cras_iodev_get_num_underruns(const struct cras_iodev *iodev) argument 1198 cras_iodev_get_num_severe_underruns(const struct cras_iodev *iodev) argument 1205 cras_iodev_reset_request(struct cras_iodev* iodev) argument 1280 cras_iodev_set_mute(struct cras_iodev* iodev) argument [all...] |
H A D | test_iodev.c | 45 * iodev callbacks. 48 static int frames_queued(const struct cras_iodev *iodev, argument 51 struct test_iodev *testio = (struct test_iodev *)iodev; 61 static int delay_frames(const struct cras_iodev *iodev) argument 66 static int close_dev(struct cras_iodev *iodev) argument 68 struct test_iodev *testio = (struct test_iodev *)iodev; 72 cras_iodev_free_audio_area(iodev); 76 static int open_dev(struct cras_iodev *iodev) argument 78 struct test_iodev *testio = (struct test_iodev *)iodev; 80 if (iodev 91 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 108 put_buffer(struct cras_iodev *iodev, unsigned frames) argument 118 get_buffer_fd_read(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 151 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 178 struct cras_iodev *iodev; local 230 test_iodev_destroy(struct cras_iodev *iodev) argument 254 test_iodev_command(struct cras_iodev *iodev, enum CRAS_TEST_IODEV_CMD command, unsigned int data_len, const uint8_t *data) argument [all...] |
H A D | cras_loopback_iodev.c | 40 /* loopack iodev. Keep state of a loopback device. 80 struct cras_iodev *iodev, 83 if (!iodev) { 89 cras_iodev_register_pre_dsp_hook(iodev, hook, cb_data); 91 cras_iodev_register_post_dsp_hook(iodev, hook, cb_data); 94 static void device_enabled_hook(struct cras_iodev *iodev, int enabled, argument 100 if (iodev->direction != CRAS_STREAM_OUTPUT) 104 /* Unregister loopback hook from disabled iodev. */ 105 register_loopback_hook(loopdev->loopback_type, iodev, NULL, 108 /* Register loopback hook onto first enabled iodev 79 register_loopback_hook(enum CRAS_LOOPBACK_TYPE loopback_type, struct cras_iodev *iodev, loopback_hook_t hook, void *cb_data) argument 120 frames_queued(const struct cras_iodev *iodev, struct timespec *hw_tstamp) argument 149 delay_frames(const struct cras_iodev *iodev) argument 156 close_record_dev(struct cras_iodev *iodev) argument 173 open_record_dev(struct cras_iodev *iodev) argument 190 get_record_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 208 put_record_buffer(struct cras_iodev *iodev, unsigned nframes) argument 219 flush_record_buffer(struct cras_iodev *iodev) argument 228 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 236 struct cras_iodev *iodev; local 283 struct cras_iodev *iodev; local 321 loopback_iodev_destroy(struct cras_iodev *iodev) argument [all...] |
H A D | cras_device_monitor.c | 20 struct cras_iodev *iodev; member in struct:cras_device_monitor_message 26 struct cras_iodev *iodev) 32 msg->iodev = iodev; 35 int cras_device_monitor_reset_device(struct cras_iodev *iodev) argument 40 init_device_msg(&msg, RESET_DEVICE, iodev); 50 int cras_device_monitor_set_device_mute_state(struct cras_iodev *iodev) argument 55 init_device_msg(&msg, SET_MUTE_STATE, iodev); 77 struct cras_iodev *iodev = device_msg->iodev; local 23 init_device_msg( struct cras_device_monitor_message *msg, enum CRAS_DEVICE_MONITOR_MSG_TYPE type, struct cras_iodev *iodev) argument [all...] |
H A D | cras_alsa_io.h | 19 /* Initializes an alsa iodev. 26 * card_type - the type of the card this iodev belongs. 27 * is_first - if this is the first iodev on the card. 37 * A pointer to the newly created iodev if successful, NULL otherwise. 55 /* Complete initializeation of this iodev with the legacy method. 56 * Add IO nodes and find jacks for this iodev with magic sauce, then choose 59 * iodev - ALSA io device associated with the IO nodes. 64 int alsa_iodev_legacy_complete_init(struct cras_iodev *iodev); 66 /* Add IO nodes and jacks for this iodev using UCM data. 68 * iodev [all...] |
H A D | cras_a2dp_iodev.c | 60 static int update_supported_formats(struct cras_iodev *iodev) argument 62 struct a2dp_io *a2dpio = (struct a2dp_io *)iodev; 70 iodev->format->format = SND_PCM_FORMAT_S16_LE; 82 free(iodev->supported_rates); 83 iodev->supported_rates = (size_t *)malloc(2 * sizeof(rate)); 84 iodev->supported_rates[0] = rate; 85 iodev->supported_rates[1] = 0; 87 free(iodev->supported_channel_counts); 88 iodev->supported_channel_counts = (size_t *)malloc(2 * sizeof(channel)); 89 iodev 107 bt_queued_frames(const struct cras_iodev *iodev, int fr) argument 124 frames_queued(const struct cras_iodev *iodev, struct timespec *tstamp) argument 138 open_dev(struct cras_iodev *iodev) argument 193 close_dev(struct cras_iodev *iodev) argument 264 struct cras_iodev *iodev = (struct cras_iodev *)arg; local 342 delay_frames(const struct cras_iodev *iodev) argument 351 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 375 put_buffer(struct cras_iodev *iodev, unsigned nwritten) argument 403 flush_buffer(struct cras_iodev *iodev) argument 408 set_volume(struct cras_iodev *iodev) argument 424 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 447 struct cras_iodev *iodev; local 522 a2dp_iodev_destroy(struct cras_iodev *iodev) argument [all...] |
H A D | test_iodev.h | 13 /* Initializes an test iodev. The Test iodev is used to simulate hardware 19 * A pointer to the newly created iodev if successful, NULL otherwise. 25 void test_iodev_destroy(struct cras_iodev *iodev); 27 /* Handle a test commdn to the given iodev. */ 28 void test_iodev_command(struct cras_iodev *iodev,
|
H A D | cras_a2dp_iodev.h | 14 * Creates an a2dp iodev from transport object. 16 * transport - The transport to create a2dp iodev for 22 * Destroys a2dp iodev. 24 void a2dp_iodev_destroy(struct cras_iodev *iodev);
|
H A D | cras_empty_iodev.h | 13 /* Initializes an empty iodev. Empty iodevs are used when there are no other 15 * until a new iodev becomes available. 19 * A pointer to the newly created iodev if successful, NULL otherwise. 24 void empty_iodev_destroy(struct cras_iodev *iodev);
|
H A D | cras_bt_io.c | 23 * profile_dev - Pointer to the profile specific iodev. 34 * will be added to this virtual iodev for each profile supported 46 /* Returns the active profile specific iodev. */ 47 static struct cras_iodev *active_profile_dev(const struct cras_iodev *iodev) argument 49 struct bt_node *active = (struct bt_node *)iodev->active_node; 54 /* Adds a profile specific iodev to btio. */ 124 static int update_supported_formats(struct cras_iodev *iodev) argument 126 struct bt_io *btio = (struct bt_io *)iodev; 127 struct cras_iodev *dev = active_profile_dev(iodev); 133 iodev 176 open_dev(struct cras_iodev *iodev) argument 199 close_dev(struct cras_iodev *iodev) argument 223 set_bt_volume(struct cras_iodev *iodev) argument 238 frames_queued(const struct cras_iodev *iodev, struct timespec *tstamp) argument 247 delay_frames(const struct cras_iodev *iodev) argument 255 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 265 put_buffer(struct cras_iodev *iodev, unsigned nwritten) argument 273 flush_buffer(struct cras_iodev *iodev) argument 284 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 316 struct cras_iodev *iodev; local [all...] |
H A D | cras_hfp_iodev.h | 16 * Creates an hfp iodev. 25 void hfp_iodev_destroy(struct cras_iodev *iodev);
|
H A D | cras_alsa_io.c | 95 * have a unique index within the iodev. 96 * card_type - the type of the card this iodev belongs. 97 * is_first - true if this is the first iodev on the card. 158 static int alsa_iodev_set_active_node(struct cras_iodev *iodev, 248 * iodev callbacks. 251 static int frames_queued(const struct cras_iodev *iodev, argument 254 struct alsa_io *aio = (struct alsa_io *)iodev; 261 iodev->info.name, 271 if (iodev->direction == CRAS_STREAM_INPUT) 275 return iodev 278 delay_frames(const struct cras_iodev *iodev) argument 293 close_dev(struct cras_iodev *iodev) argument 322 open_dev(struct cras_iodev *iodev) argument 439 start(const struct cras_iodev *iodev) argument 466 get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 495 put_buffer(struct cras_iodev *iodev, unsigned nwritten) argument 505 flush_buffer(struct cras_iodev *iodev) argument 521 first_plugged_node(struct cras_iodev *iodev) argument 535 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 552 update_channel_layout(struct cras_iodev *iodev) argument 594 set_hotword_model(struct cras_iodev *iodev, const char *model_name) argument 603 get_hotword_models(struct cras_iodev *iodev) argument 688 set_alsa_volume(struct cras_iodev *iodev) argument 722 set_alsa_mute(struct cras_iodev *iodev) argument 734 set_alsa_capture_gain(struct cras_iodev *iodev) argument 768 set_alsa_node_swapped(struct cras_iodev *iodev, struct cras_ionode *node, int enable) argument 1559 update_supported_formats(struct cras_iodev *iodev) argument 1636 fill_whole_buffer_with_zeros(struct cras_iodev *iodev) argument 1769 get_num_underruns(const struct cras_iodev *iodev) argument 1775 get_num_severe_underruns(const struct cras_iodev *iodev) argument 1781 set_default_hotword_model(struct cras_iodev *iodev) argument 1816 struct cras_iodev *iodev; local 1957 alsa_iodev_legacy_complete_init(struct cras_iodev *iodev) argument 2042 alsa_iodev_ucm_add_nodes_and_jacks(struct cras_iodev *iodev, struct ucm_section *section) argument 2100 alsa_iodev_ucm_complete_init(struct cras_iodev *iodev) argument 2127 alsa_iodev_destroy(struct cras_iodev *iodev) argument 2149 alsa_iodev_index(struct cras_iodev *iodev) argument 2155 alsa_iodev_has_hctl_jacks(struct cras_iodev *iodev) argument 2184 alsa_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *ionode, unsigned dev_enabled) argument [all...] |
H A D | cras_a2dp_endpoint.c | 25 struct cras_iodev *iodev; member in struct:a2dp 153 if (connected_a2dp.iodev && transport) { 193 if (connected_a2dp.iodev) { 196 a2dp_iodev_destroy(connected_a2dp.iodev); 199 connected_a2dp.iodev = a2dp_iodev_create(transport); 202 if (!connected_a2dp.iodev) 203 syslog(LOG_WARNING, "Failed to create a2dp iodev"); 216 if (connected_a2dp.iodev) { 217 syslog(LOG_INFO, "Destroying iodev for A2DP device"); 218 a2dp_iodev_destroy(connected_a2dp.iodev); [all...] |
H A D | cras_bt_device.c | 69 * switch_profile_timer - The timer used to delay enabling iodev after 71 * append_iodev_cb - The callback to trigger when an iodev is appended. 379 struct cras_iodev *iodev, 384 bt_iodev = device->bt_iodevs[iodev->direction]; 387 cras_bt_io_append(bt_iodev, iodev, profile); 393 device->bt_iodevs[iodev->direction] = 394 cras_bt_io_create(device, iodev, profile); 403 struct cras_iodev *iodev) 408 bt_iodev = device->bt_iodevs[iodev->direction]; 413 try_profile = cras_bt_io_try_remove(bt_iodev, iodev); 378 cras_bt_device_append_iodev(struct cras_bt_device *device, struct cras_iodev *iodev, enum cras_bt_device_profile profile) argument 402 cras_bt_device_rm_iodev(struct cras_bt_device *device, struct cras_iodev *iodev) argument 901 struct cras_iodev *iodev; local 999 struct cras_iodev *iodev; local 1012 struct cras_iodev *iodev; local 1042 struct cras_iodev *iodev; local 1147 struct cras_iodev *iodev; local [all...] |
/external/adhd/cras/src/tests/ |
H A D | iodev_unittest.cc | 108 int update_channel_layout(struct cras_iodev *iodev) { argument 114 int set_swap_mode_for_node(struct cras_iodev *iodev, struct cras_ionode *node, argument 517 static int get_buffer(cras_iodev* iodev, struct cras_audio_area** area, argument 535 static int put_buffer(struct cras_iodev *iodev, unsigned int nframes) argument 578 struct cras_iodev iodev; local 583 memset(&iodev, 0, sizeof(iodev)); 589 iodev.format = &fmt; 590 iodev.put_buffer = put_buffer; 592 rc = cras_iodev_put_output_buffer(&iodev, frame 600 struct cras_iodev iodev; local 634 struct cras_iodev iodev; local 663 struct cras_iodev iodev; local 706 struct cras_iodev iodev; local 753 struct cras_iodev iodev; local 782 struct cras_iodev iodev; local 815 struct cras_iodev iodev; local 843 struct cras_iodev iodev; local 913 struct cras_iodev iodev; local 969 struct cras_iodev iodev; local 998 frames_queued(const struct cras_iodev *iodev, struct timespec *tstamp) argument 1006 struct cras_iodev iodev; local 1025 struct cras_iodev iodev; local 1050 update_active_node(struct cras_iodev *iodev, unsigned node_idx, unsigned dev_enabled) argument 1056 dev_set_volume(struct cras_iodev *iodev) argument 1060 dev_set_capture_gain(struct cras_iodev *iodev) argument 1064 dev_set_mute(struct cras_iodev *iodev) argument 1070 struct cras_iodev iodev; local 1097 struct cras_iodev iodev; local 1111 struct cras_iodev iodev; local 1123 struct cras_iodev iodev; local 1140 struct cras_iodev iodev; local 1161 struct cras_iodev iodev; local 1181 struct cras_iodev iodev; local 1212 struct cras_iodev iodev; local 1242 bad_get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 1254 struct cras_iodev iodev; local 1275 open_dev(struct cras_iodev *iodev) argument 1281 struct cras_iodev iodev; local 1299 fake_start(const struct cras_iodev *iodev) argument 1304 struct cras_iodev iodev; local 1324 struct cras_iodev iodev; local 1343 struct cras_iodev iodev; local 1370 struct cras_iodev iodev; local 1410 struct cras_iodev iodev; local 1442 struct cras_iodev iodev; local 1498 struct cras_iodev iodev; local 1677 struct cras_iodev iodev; local 1740 struct cras_iodev iodev; local 1792 struct cras_iodev iodev; local 1827 struct cras_iodev iodev; local 1874 get_num_underruns(const struct cras_iodev *iodev) argument 1879 struct cras_iodev iodev; local 1890 struct cras_iodev iodev; local 1920 output_underrun(struct cras_iodev *iodev) argument 1927 struct cras_iodev iodev; local 2267 cras_device_monitor_reset_device(struct cras_iodev *iodev) argument 2303 cras_device_monitor_set_device_mute_state(struct cras_iodev *iodev) argument [all...] |
H A D | a2dp_iodev_unittest.cc | 89 int iodev_set_format(struct cras_iodev *iodev, argument 95 iodev->format = fmt; 104 struct cras_iodev *iodev; local 111 iodev = a2dp_iodev_create(fake_transport); 113 ASSERT_NE(iodev, (void *)NULL); 114 ASSERT_EQ(iodev->direction, CRAS_STREAM_OUTPUT); 121 /* Assert iodev name matches the object path when bt device doesn't 123 ASSERT_STREQ(FAKE_OBJECT_PATH, iodev->info.name); 125 a2dp_iodev_destroy(iodev); 133 /* Assert iodev nam 141 struct cras_iodev *iodev; local 158 struct cras_iodev *iodev; local 177 struct cras_iodev *iodev; local 240 struct cras_iodev *iodev; local 309 struct cras_iodev *iodev; local 407 cras_iodev_free_format(struct cras_iodev *iodev) argument 412 cras_iodev_free_resources(struct cras_iodev *iodev) argument 418 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 424 cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 430 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 460 cras_bt_device_append_iodev(struct cras_bt_device *device, struct cras_iodev *iodev, enum cras_bt_device_profile profile) argument 467 cras_bt_device_rm_iodev(struct cras_bt_device *device, struct cras_iodev *iodev) argument 544 cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) argument 549 cras_iodev_free_audio_area(struct cras_iodev *iodev) argument [all...] |
H A D | hfp_iodev_unittest.cc | 15 static struct cras_iodev *iodev; variable in typeref:struct:cras_iodev 76 iodev = hfp_iodev_create(CRAS_STREAM_OUTPUT, fake_device, fake_slc, 80 ASSERT_EQ(CRAS_STREAM_OUTPUT, iodev->direction); 85 hfp_iodev_destroy(iodev); 93 iodev = hfp_iodev_create(CRAS_STREAM_INPUT, fake_device, fake_slc, 96 ASSERT_EQ(CRAS_STREAM_INPUT, iodev->direction); 101 ASSERT_EQ(0, iodev->software_volume_needed); 103 hfp_iodev_destroy(iodev); 112 iodev = hfp_iodev_create(CRAS_STREAM_OUTPUT, fake_device, fake_slc, 115 iodev 183 cras_iodev_free_format(struct cras_iodev *iodev) argument 188 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 194 cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 200 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 229 cras_bt_device_append_iodev(struct cras_bt_device *device, struct cras_iodev *iodev, enum cras_bt_device_profile profile) argument 236 cras_bt_device_rm_iodev(struct cras_bt_device *device, struct cras_iodev *iodev) argument 327 cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) argument 332 cras_iodev_free_audio_area(struct cras_iodev *iodev) argument [all...] |
H A D | audio_thread_unittest.cc | 89 virtual void SetupDevice(cras_iodev *iodev, argument 91 memset(iodev, 0, sizeof(*iodev)); 92 iodev->info.idx = ++device_id_; 93 iodev->direction = direction; 94 iodev->open_dev = open_dev; 95 iodev->close_dev = close_dev; 96 iodev->frames_queued = frames_queued; 97 iodev->delay_frames = delay_frames; 98 iodev 136 open_dev(cras_iodev* iodev) argument 141 close_dev(cras_iodev* iodev) argument 146 frames_queued(const cras_iodev* iodev, struct timespec* tstamp) argument 151 delay_frames(const cras_iodev* iodev) argument 155 get_buffer(cras_iodev* iodev, struct cras_audio_area** area, unsigned int* num) argument 177 put_buffer(cras_iodev* iodev, unsigned int num) argument 182 flush_buffer(cras_iodev *iodev) argument 209 struct cras_iodev iodev; local 225 struct cras_iodev iodev; local 257 struct cras_iodev iodev; local 326 struct cras_iodev iodev; local 372 struct cras_iodev iodev; local 413 struct cras_iodev iodev, *piodev = &iodev; local 480 struct cras_iodev iodev; local 511 struct cras_iodev iodev; local 539 struct cras_iodev iodev; local 580 struct cras_iodev iodev, *piodev = &iodev; local 616 struct cras_iodev iodev, *piodev = &iodev; local 681 cras_iodev_add_stream(struct cras_iodev *iodev, struct dev_stream *stream) argument 687 cras_iodev_all_streams_written(struct cras_iodev *iodev) argument 692 cras_iodev_close(struct cras_iodev *iodev) argument 697 cras_iodev_free_format(struct cras_iodev *iodev) argument 702 cras_iodev_get_est_rate_ratio(const struct cras_iodev *iodev) argument 707 cras_iodev_max_stream_offset(const struct cras_iodev *iodev) argument 712 cras_iodev_open(struct cras_iodev *iodev, unsigned int cb_level) argument 717 cras_iodev_put_buffer(struct cras_iodev *iodev, unsigned int nframes) argument 722 cras_iodev_rm_stream(struct cras_iodev *iodev, const struct cras_rstream *stream) argument 735 cras_iodev_set_format(struct cras_iodev *iodev, const struct cras_audio_format *fmt) argument 741 cras_iodev_stream_offset(struct cras_iodev *iodev, struct dev_stream *stream) argument 752 cras_iodev_stream_written(struct cras_iodev *iodev, struct dev_stream *stream, unsigned int nwritten) argument 758 cras_iodev_update_rate(struct cras_iodev *iodev, unsigned int level, struct timespec *level_tstamp) argument 764 cras_iodev_put_input_buffer(struct cras_iodev *iodev, unsigned int nframes) argument 769 cras_iodev_put_output_buffer(struct cras_iodev *iodev, uint8_t *frames, unsigned int nframes) argument 777 cras_iodev_get_input_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 784 cras_iodev_get_output_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, unsigned *frames) argument 793 cras_iodev_get_dsp_delay(const struct cras_iodev *iodev) argument 970 cras_iodev_frames_queued(struct cras_iodev *iodev, struct timespec *tstamp) argument 975 cras_iodev_buffer_avail(struct cras_iodev *iodev, unsigned hw_level) argument 1005 cras_iodev_get_software_gain_scaler(const struct cras_iodev *iodev) argument 1037 cras_iodev_state(const struct cras_iodev *iodev) argument 1042 cras_iodev_get_num_underruns(const struct cras_iodev *iodev) argument 1047 cras_iodev_reset_request(struct cras_iodev *iodev) argument 1054 cras_iodev_get_num_severe_underruns(const struct cras_iodev *iodev) argument [all...] |
H A D | bt_io_unittest.cc | 84 // Stub functions for the iodev structure. 85 static int update_supported_formats(struct cras_iodev *iodev) { argument 86 iodev->supported_rates = (size_t *)calloc( 87 2, sizeof(*iodev->supported_rates)); 88 iodev->supported_rates[0] = 48000; 89 iodev->supported_rates[1] = 0; 90 iodev->supported_channel_counts = (size_t *)calloc( 91 2, sizeof(*iodev->supported_channel_counts)); 92 iodev->supported_channel_counts[0] = 2; 93 iodev 101 frames_queued(const cras_iodev* iodev, struct timespec *tstamp) argument 106 delay_frames(const cras_iodev* iodev) argument 110 get_buffer(cras_iodev* iodev, struct cras_audio_area** area, unsigned int* num) argument 116 put_buffer(cras_iodev* iodev, unsigned int num) argument 121 open_dev(cras_iodev* iodev) argument 125 close_dev(cras_iodev* iodev) argument 330 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 336 cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 342 cras_iodev_free_format(struct cras_iodev *iodev) argument 347 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument [all...] |
H A D | loopback_iodev_unittest.cc | 70 struct cras_iodev iodev; local 73 iodev.direction = CRAS_STREAM_OUTPUT; 74 iodev.format = &fmt_; 75 iodev.ext_format = &fmt_; 76 enabled_dev = &iodev; 83 cras_iodev_list_set_device_enabled_callback_cb(&iodev, 1, 86 // Expect that a hook was added to the iodev 135 struct cras_iodev iodev; local 139 iodev.streams = &stream; 140 enabled_dev = &iodev; 173 cras_iodev_free_audio_area(struct cras_iodev *iodev) argument 177 cras_iodev_free_format(struct cras_iodev *iodev) argument 181 cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) argument 186 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 190 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 195 cras_iodev_register_pre_dsp_hook(struct cras_iodev *iodev, loopback_hook_t loop_cb, void *cb_data) argument 203 cras_iodev_register_post_dsp_hook(struct cras_iodev *iodev, loopback_hook_t loop_cb, void *cb_data) argument [all...] |
H A D | alsa_io_unittest.cc | 282 /* Get volume curve twice for iodev, and default node. */ 383 struct cras_iodev *iodev; local 388 iodev = alsa_iodev_create_with_default_parameters(0, NULL, 392 ASSERT_EQ(0, alsa_iodev_legacy_complete_init(iodev)); 394 aio = (struct alsa_io *)iodev; 396 cras_iodev_set_format(iodev, &format); 401 iodev->open_dev(iodev); 412 alsa_iodev_destroy(iodev); 417 struct cras_iodev *iodev; local 452 struct cras_iodev *iodev; local 482 struct cras_iodev *iodev; local 526 struct cras_iodev *iodev; local 638 struct cras_iodev *iodev; local 671 struct cras_iodev *iodev; local 707 struct cras_iodev *iodev; local 747 struct cras_iodev *iodev; local 765 struct cras_iodev *iodev; local 792 struct cras_iodev *iodev; local 1013 struct cras_iodev *iodev; local 1067 struct cras_iodev *iodev; local 1160 struct cras_iodev *iodev; local 1201 struct cras_iodev *iodev; local 1245 struct cras_iodev *iodev; local 1334 struct cras_iodev *iodev; local 1375 struct cras_iodev *iodev; local 2633 cras_iodev_free_format(struct cras_iodev *iodev) argument 2637 cras_iodev_set_format(struct cras_iodev *iodev, const struct cras_audio_format *fmt) argument 2656 cras_iodev_update_dsp(struct cras_iodev *iodev) argument 2674 cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 2680 cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 2685 cras_iodev_set_active_node(struct cras_iodev *iodev, struct cras_ionode *node) argument 2691 cras_iodev_free_resources(struct cras_iodev *iodev) argument 2726 cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) argument 2730 cras_iodev_free_audio_area(struct cras_iodev *iodev) argument 2733 cras_iodev_reset_rate_estimator(const struct cras_iodev *iodev) argument 2738 cras_iodev_frames_queued(struct cras_iodev *iodev, struct timespec *tstamp) argument 2744 cras_iodev_buffer_avail(struct cras_iodev *iodev, unsigned hw_level) argument 2800 cras_iodev_state(const struct cras_iodev *iodev) argument 2805 cras_iodev_dsp_set_swap_mode_for_node(struct cras_iodev *iodev, struct cras_ionode *node, int enable) argument [all...] |