Home
last modified time | relevance | path

Searched refs:cras_iodev (Results 1 – 25 of 54) sorted by relevance

123

/external/adhd/cras/src/server/
Dcras_iodev.h28 struct cras_iodev;
80 struct cras_iodev *dev;
194 struct cras_iodev { struct
195 void (*set_volume)(struct cras_iodev *iodev); argument
196 void (*set_mute)(struct cras_iodev *iodev); argument
197 void (*set_capture_gain)(struct cras_iodev *iodev); argument
198 void (*set_capture_mute)(struct cras_iodev *iodev); argument
199 int (*set_swap_mode_for_node)(struct cras_iodev *iodev, argument
202 int (*open_dev)(struct cras_iodev *iodev); argument
203 int (*configure_dev)(struct cras_iodev *iodev); argument
[all …]
Dcras_bt_io.h11 struct cras_iodev;
14 struct cras_iodev *cras_bt_io_create(struct cras_bt_device *device,
15 struct cras_iodev *dev,
19 void cras_bt_io_destroy(struct cras_iodev *bt_iodev);
23 struct cras_iodev *bt_iodev,
27 int cras_bt_io_append(struct cras_iodev *bt_iodev,
28 struct cras_iodev *dev,
32 int cras_bt_io_on_profile(struct cras_iodev *bt_iodev,
36 int cras_bt_io_update_buffer_size(struct cras_iodev *bt_iodev);
44 unsigned int cras_bt_io_try_remove(struct cras_iodev *bt_iodev,
[all …]
Dcras_bt_io.c29 struct cras_iodev *profile_dev;
42 struct cras_iodev base;
48 static struct cras_iodev *active_profile_dev(const struct cras_iodev *iodev) in active_profile_dev()
56 static struct cras_ionode *add_profile_dev(struct cras_iodev *bt_iodev, in add_profile_dev()
57 struct cras_iodev *dev, in add_profile_dev()
124 static int open_dev(struct cras_iodev *iodev) in open_dev()
141 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
143 struct cras_iodev *dev = active_profile_dev(iodev); in update_supported_formats()
182 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
185 struct cras_iodev *dev = active_profile_dev(iodev); in configure_dev()
[all …]
Dcras_iodev.c49 static void cras_iodev_alloc_dsp(struct cras_iodev *iodev);
51 static int default_no_stream_playback(struct cras_iodev *odev) in default_no_stream_playback()
87 static int cras_iodev_start(struct cras_iodev *iodev) in cras_iodev_start()
108 static unsigned int dev_playback_frames(struct cras_iodev* odev) in dev_playback_frames()
147 static int cras_iodev_no_stream_playback_transition(struct cras_iodev *odev, in cras_iodev_no_stream_playback_transition()
182 static int output_should_mute(struct cras_iodev *odev) in output_should_mute()
192 int cras_iodev_is_zero_volume(const struct cras_iodev *odev) in cras_iodev_is_zero_volume()
235 static int cras_iodev_output_event_sample_ready(struct cras_iodev *odev) in cras_iodev_output_event_sample_ready()
279 static size_t get_best_rate(struct cras_iodev *iodev, size_t rrate) in get_best_rate()
307 static size_t get_best_channel_count(struct cras_iodev *iodev, size_t count) in get_best_channel_count()
[all …]
Dcras_iodev_list.h17 struct cras_iodev;
26 typedef void (*device_enabled_callback_t)(struct cras_iodev *dev, void *cb_data);
27 typedef void (*device_disabled_callback_t)(struct cras_iodev *dev, void *cb_data);
41 int cras_iodev_list_add_output(struct cras_iodev *output);
49 int cras_iodev_list_add_input(struct cras_iodev *input);
57 int cras_iodev_list_rm_output(struct cras_iodev *output);
65 int cras_iodev_list_rm_input(struct cras_iodev *input);
93 struct cras_iodev *cras_iodev_list_get_first_enabled_iodev(
153 int cras_iodev_list_dev_is_enabled(const struct cras_iodev *dev);
157 void cras_iodev_list_enable_dev(struct cras_iodev *dev);
[all …]
Dcras_loopback_iodev.c44 struct cras_iodev base;
58 struct cras_iodev *edev = cras_iodev_list_get_first_enabled_iodev( in sample_hook()
80 struct cras_iodev *iodev, in register_loopback_hook()
94 static void device_enabled_hook(struct cras_iodev *iodev, void *cb_data) in device_enabled_hook()
97 struct cras_iodev *edev; in device_enabled_hook()
109 static void device_disabled_hook(struct cras_iodev *iodev, void *cb_data) in device_disabled_hook()
125 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
131 struct cras_iodev *edev = cras_iodev_list_get_first_enabled_iodev( in frames_queued()
154 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
161 static int close_record_dev(struct cras_iodev *iodev) in close_record_dev()
[all …]
Dcras_iodev_list.c32 struct cras_iodev *iodevs;
41 struct cras_iodev *dev;
65 static struct cras_iodev *fallback_devs[CRAS_NUM_DIRECTIONS];
67 static struct cras_iodev *empty_hotword_dev;
69 static struct cras_iodev *loopdev_post_mix;
70 static struct cras_iodev *loopdev_post_dsp;
96 static struct cras_iodev *find_dev(size_t dev_index) in find_dev()
98 struct cras_iodev *dev; in find_dev()
113 struct cras_iodev *dev; in find_node()
132 static int add_dev_to_list(struct cras_iodev *dev) in add_dev_to_list()
[all …]
Dcras_alsa_io.h39 struct cras_iodev *alsa_iodev_create(size_t card_index,
64 int alsa_iodev_legacy_complete_init(struct cras_iodev *iodev);
73 int alsa_iodev_ucm_add_nodes_and_jacks(struct cras_iodev *iodev,
82 void alsa_iodev_ucm_complete_init(struct cras_iodev *iodev);
85 void alsa_iodev_destroy(struct cras_iodev *iodev);
88 unsigned alsa_iodev_index(struct cras_iodev *iodev);
91 int alsa_iodev_has_hctl_jacks(struct cras_iodev *iodev);
Dcras_hfp_iodev.c22 struct cras_iodev base;
28 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
52 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
70 struct cras_iodev *iodev = &hfpio->base; in hfp_packet_size_changed()
78 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
115 static int close_dev(struct cras_iodev *iodev) in close_dev()
130 static void set_hfp_volume(struct cras_iodev *iodev) in set_hfp_volume()
142 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
149 static int get_buffer(struct cras_iodev *iodev, in get_buffer()
171 static int put_buffer(struct cras_iodev *iodev, unsigned nwritten) in put_buffer()
[all …]
Dcras_empty_iodev.c39 struct cras_iodev base;
50 static unsigned int current_level(const struct cras_iodev *iodev) in current_level()
76 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
83 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
88 static int close_dev(struct cras_iodev *iodev) in close_dev()
99 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
116 static int get_buffer(struct cras_iodev *iodev, in get_buffer()
138 static int put_buffer(struct cras_iodev *iodev, unsigned frames) in put_buffer()
160 static int flush_buffer(struct cras_iodev *iodev) in flush_buffer()
173 static void update_active_node(struct cras_iodev *iodev, unsigned node_idx, in update_active_node()
[all …]
Dtest_iodev.c38 struct cras_iodev base;
48 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
61 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
66 static int close_dev(struct cras_iodev *iodev) in close_dev()
76 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
91 static int get_buffer(struct cras_iodev *iodev, in get_buffer()
108 static int put_buffer(struct cras_iodev *iodev, unsigned frames) in put_buffer()
118 static int get_buffer_fd_read(struct cras_iodev *iodev, in get_buffer_fd_read()
151 static void update_active_node(struct cras_iodev *iodev, unsigned node_idx, in update_active_node()
174 struct cras_iodev *test_iodev_create(enum CRAS_STREAM_DIRECTION direction, in test_iodev_create()
[all …]
Daudio_thread.h18 struct cras_iodev;
67 struct cras_iodev *dev);
75 struct cras_iodev *dev);
83 struct cras_iodev *dev);
147 struct cras_iodev **devs,
172 struct cras_iodev *iodev);
209 struct cras_iodev *dev,
Dcras_hfp_info.h52 int hfp_buf_queued(struct hfp_info *info, const struct cras_iodev *dev);
60 int hfp_buf_size(struct hfp_info *info, struct cras_iodev *dev);
71 void hfp_buf_acquire(struct hfp_info *info, struct cras_iodev *dev,
81 void hfp_buf_release(struct hfp_info *info, struct cras_iodev *dev,
88 int hfp_info_add_iodev(struct hfp_info *info, struct cras_iodev *dev);
94 int hfp_info_rm_iodev(struct hfp_info *info, struct cras_iodev *dev);
Dcras_a2dp_iodev.c48 struct cras_iodev base;
61 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
108 static int bt_queued_frames(const struct cras_iodev *iodev, int fr) in bt_queued_frames()
125 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
139 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
194 static int close_dev(struct cras_iodev *iodev) in close_dev()
265 struct cras_iodev *iodev = (struct cras_iodev *)arg; in flush_data()
343 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
352 static int get_buffer(struct cras_iodev *iodev, in get_buffer()
376 static int put_buffer(struct cras_iodev *iodev, unsigned nwritten) in put_buffer()
[all …]
/external/adhd/cras/src/tests/
Diodev_stub.cc18 std::unordered_map<cras_iodev*, cb_data> data_map;
25 void iodev_stub_frames_queued(cras_iodev* iodev, int ret, timespec ts) { in iodev_stub_frames_queued()
32 double cras_iodev_get_est_rate_ratio(const struct cras_iodev *iodev) { in cras_iodev_get_est_rate_ratio()
36 int cras_iodev_get_dsp_delay(const struct cras_iodev *iodev) { in cras_iodev_get_dsp_delay()
40 int cras_iodev_frames_queued(struct cras_iodev *iodev, in cras_iodev_frames_queued()
51 struct dev_stream *cras_iodev_rm_stream(struct cras_iodev *iodev, in cras_iodev_rm_stream()
56 int cras_iodev_update_rate(struct cras_iodev *iodev, unsigned int level, in cras_iodev_update_rate()
61 enum CRAS_IODEV_STATE cras_iodev_state(const struct cras_iodev *iodev) { in cras_iodev_state()
65 unsigned int cras_iodev_all_streams_written(struct cras_iodev *iodev) { in cras_iodev_all_streams_written()
69 int cras_iodev_put_input_buffer(struct cras_iodev *iodev) { in cras_iodev_put_input_buffer()
[all …]
Dbt_device_unittest.cc16 static struct cras_iodev *cras_bt_io_create_profile_ret;
17 static struct cras_iodev *cras_bt_io_append_btio_val;
64 static void update_active_node(struct cras_iodev *iodev, in update_active_node()
69 struct cras_iodev bt_iodev1;
70 struct cras_iodev bt_iodev2;
71 struct cras_iodev d3_;
72 struct cras_iodev d2_;
73 struct cras_iodev d1_;
167 struct cras_iodev *cras_bt_io_create( in cras_bt_io_create()
169 struct cras_iodev *dev, in cras_bt_io_create()
[all …]
Daudio_thread_unittest.cc38 static struct cras_iodev *cras_iodev_reset_request_iodev;
41 static struct cras_iodev *cras_device_monitor_reset_device_iodev;
42 static struct cras_iodev *cras_iodev_start_ramp_odev;
95 virtual void SetupDevice(cras_iodev *iodev, in SetupDevice()
136 cras_iodev* pin_to_dev) { in SetupPinnedStream()
142 static int configure_dev(cras_iodev* iodev) { in configure_dev()
147 static int close_dev(cras_iodev* iodev) { in close_dev()
152 static int frames_queued(const cras_iodev* iodev, struct timespec* tstamp) { in frames_queued()
157 static int delay_frames(const cras_iodev* iodev) { in delay_frames()
161 static int get_buffer(cras_iodev* iodev, in get_buffer()
[all …]
Dbt_io_unittest.cc75 static void SetUpIodev(struct cras_iodev *d, in SetUpIodev()
91 static int update_supported_formats(struct cras_iodev *iodev) { in update_supported_formats()
110 static int frames_queued(const cras_iodev* iodev, in frames_queued()
115 static int delay_frames(const cras_iodev* iodev) { in delay_frames()
119 static int get_buffer(cras_iodev* iodev, in get_buffer()
125 static int put_buffer(cras_iodev* iodev, in put_buffer()
130 static int configure_dev(cras_iodev* iodev) { in configure_dev()
134 static int close_dev(cras_iodev* iodev) { in close_dev()
143 static struct cras_iodev *bt_iodev;
144 static struct cras_iodev iodev_;
[all …]
Dloopback_iodev_unittest.cc30 static struct cras_iodev *enabled_dev;
70 struct cras_iodev *loop_in_;
74 struct cras_iodev iodev; in TEST_F()
139 struct cras_iodev iodev; in TEST_F()
177 void cras_iodev_free_audio_area(struct cras_iodev *iodev) in cras_iodev_free_audio_area()
181 void cras_iodev_free_format(struct cras_iodev *iodev) in cras_iodev_free_format()
185 void cras_iodev_init_audio_area(struct cras_iodev *iodev, int num_channels) in cras_iodev_init_audio_area()
190 void cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) in cras_iodev_add_node()
195 void cras_iodev_set_active_node(struct cras_iodev *iodev, in cras_iodev_set_active_node()
200 void cras_iodev_register_pre_dsp_hook(struct cras_iodev *iodev, in cras_iodev_register_pre_dsp_hook()
[all …]
Dhfp_iodev_unittest.cc15 static struct cras_iodev *iodev;
199 void cras_iodev_free_format(struct cras_iodev *iodev) in cras_iodev_free_format()
204 void cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) in cras_iodev_add_node()
210 void cras_iodev_rm_node(struct cras_iodev *iodev, struct cras_ionode *node) in cras_iodev_rm_node()
216 void cras_iodev_set_active_node(struct cras_iodev *iodev, in cras_iodev_set_active_node()
246 struct cras_iodev *iodev, in cras_bt_device_append_iodev()
253 struct cras_iodev *iodev) in cras_bt_device_rm_iodev()
271 int hfp_info_add_iodev(struct hfp_info *info, struct cras_iodev *dev) in hfp_info_add_iodev()
277 int hfp_info_rm_iodev(struct hfp_info *info, struct cras_iodev *dev) in hfp_info_rm_iodev()
307 int hfp_buf_queued(struct hfp_info *info, const struct cras_iodev *dev) in hfp_buf_queued()
[all …]
Ddevice_monitor_unittest.cc17 static cras_iodev *enable_dev;
19 static cras_iodev *disable_dev;
21 static cras_iodev *mute_dev;
44 struct cras_iodev dev; in TEST()
60 struct cras_iodev dev; in TEST()
81 struct cras_iodev dev; in TEST()
97 struct cras_iodev dev; in TEST()
130 void cras_iodev_list_enable_dev(struct cras_iodev *dev) { in cras_iodev_list_enable_dev()
135 void cras_iodev_list_disable_dev(struct cras_iodev *dev, bool force) { in cras_iodev_list_disable_dev()
140 int cras_iodev_set_mute(struct cras_iodev *dev) { in cras_iodev_set_mute()
Dalsa_io_unittest.cc256 static struct cras_iodev *alsa_iodev_create_with_default_parameters( in alsa_iodev_create_with_default_parameters()
290 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev *)aio)); in TEST()
306 alsa_iodev_destroy((struct cras_iodev *)aio); in TEST()
318 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev *)aio)); in TEST()
324 alsa_iodev_destroy((struct cras_iodev *)aio); in TEST()
329 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev *)aio)); in TEST()
335 alsa_iodev_destroy((struct cras_iodev *)aio); in TEST()
340 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev *)aio)); in TEST()
347 alsa_iodev_destroy((struct cras_iodev *)aio); in TEST()
352 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev *)aio)); in TEST()
[all …]
Diodev_list_unittest.cc33 static cras_iodev *audio_thread_remove_streams_active_dev;
34 static cras_iodev *audio_thread_set_active_dev_val;
36 static cras_iodev *audio_thread_add_open_dev_dev;
41 static struct cras_iodev loopback_input;
43 static struct cras_iodev *cras_iodev_close_dev;
44 static struct cras_iodev dummy_hotword_iodev;
45 static struct cras_iodev dummy_empty_iodev[2];
58 static struct cras_iodev *device_enabled_dev;
60 static struct cras_iodev *device_disabled_dev;
65 static struct cras_iodev *audio_thread_add_stream_dev;
[all …]
Da2dp_iodev_unittest.cc89 int iodev_set_format(struct cras_iodev *iodev, in iodev_set_format()
119 struct cras_iodev *iodev; in TEST_F()
152 struct cras_iodev *iodev; in TEST_F()
167 struct cras_iodev *iodev; in TEST_F()
185 struct cras_iodev *iodev; in TEST_F()
248 struct cras_iodev *iodev; in TEST_F()
318 struct cras_iodev *iodev; in TEST_F()
417 void cras_iodev_free_format(struct cras_iodev *iodev) in cras_iodev_free_format()
422 void cras_iodev_free_resources(struct cras_iodev *iodev) in cras_iodev_free_resources()
428 void cras_iodev_add_node(struct cras_iodev *iodev, struct cras_ionode *node) in cras_iodev_add_node()
[all …]
Diodev_unittest.cc102 static struct cras_iodev* cras_device_monitor_set_device_mute_state_dev;
116 int update_channel_layout(struct cras_iodev *iodev) { in update_channel_layout()
122 int set_swap_mode_for_node(struct cras_iodev *iodev, struct cras_ionode *node, in set_swap_mode_for_node()
276 struct cras_iodev iodev_;
534 static int get_buffer(cras_iodev* iodev, struct cras_audio_area** area, in get_buffer()
552 static int put_buffer(struct cras_iodev *iodev, unsigned int nframes) in put_buffer()
562 static int no_stream(struct cras_iodev *odev, int enable) in no_stream()
570 static int output_should_wake(const struct cras_iodev *odev) in output_should_wake()
595 struct cras_iodev iodev; in TEST()
617 struct cras_iodev iodev; in TEST()
[all …]

123