Home
last modified time | relevance | path

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

123

/external/adhd/cras/src/server/
Dcras_iodev.h31 struct cras_iodev;
120 struct cras_iodev *dev;
245 struct cras_iodev { struct
246 void (*set_volume)(struct cras_iodev *iodev); argument
247 void (*set_mute)(struct cras_iodev *iodev); argument
248 void (*set_capture_gain)(struct cras_iodev *iodev); argument
249 void (*set_capture_mute)(struct cras_iodev *iodev); argument
250 int (*set_swap_mode_for_node)(struct cras_iodev *iodev, argument
252 int (*open_dev)(struct cras_iodev *iodev); argument
253 int (*configure_dev)(struct cras_iodev *iodev); argument
[all …]
Dcras_hfp_alsa_iodev.c29 struct cras_iodev base;
32 struct cras_iodev *aio;
35 static int hfp_alsa_get_valid_frames(struct cras_iodev *iodev, in hfp_alsa_get_valid_frames()
39 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_get_valid_frames()
44 static int hfp_alsa_open_dev(struct cras_iodev *iodev) in hfp_alsa_open_dev()
47 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_open_dev()
52 static int hfp_alsa_update_supported_formats(struct cras_iodev *iodev) in hfp_alsa_update_supported_formats()
81 static int hfp_alsa_configure_dev(struct cras_iodev *iodev) in hfp_alsa_configure_dev()
84 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_configure_dev()
116 static int hfp_alsa_close_dev(struct cras_iodev *iodev) in hfp_alsa_close_dev()
[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);
22 struct cras_ionode *cras_bt_io_get_profile(struct cras_iodev *bt_iodev,
26 int cras_bt_io_append(struct cras_iodev *bt_iodev, struct cras_iodev *dev,
30 int cras_bt_io_on_profile(struct cras_iodev *bt_iodev,
37 cras_bt_io_profile_to_log(struct cras_iodev *bt_iodev);
45 unsigned int cras_bt_io_try_remove(struct cras_iodev *bt_iodev,
46 struct cras_iodev *dev);
[all …]
Dcras_bt_io.c30 struct cras_iodev *profile_dev;
43 struct cras_iodev base;
49 static struct cras_iodev *active_profile_dev(const struct cras_iodev *iodev) in active_profile_dev()
57 static struct cras_ionode *add_profile_dev(struct cras_iodev *bt_iodev, in add_profile_dev()
58 struct cras_iodev *dev, in add_profile_dev()
135 static int open_dev(struct cras_iodev *iodev) in open_dev()
138 struct cras_iodev *dev = active_profile_dev(iodev); in open_dev()
165 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
167 struct cras_iodev *dev = active_profile_dev(iodev); in update_supported_formats()
209 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
[all …]
Dcras_iodev.c70 static void cras_iodev_alloc_dsp(struct cras_iodev *iodev);
72 static int default_no_stream_playback(struct cras_iodev *odev) in default_no_stream_playback()
108 static int cras_iodev_start(struct cras_iodev *iodev) in cras_iodev_start()
129 static unsigned int dev_playback_frames(struct cras_iodev *odev) in dev_playback_frames()
172 static int cras_iodev_no_stream_playback_transition(struct cras_iodev *odev, in cras_iodev_no_stream_playback_transition()
207 static int output_should_mute(struct cras_iodev *odev) in output_should_mute()
217 int cras_iodev_is_zero_volume(const struct cras_iodev *odev) in cras_iodev_is_zero_volume()
260 static int cras_iodev_output_event_sample_ready(struct cras_iodev *odev) in cras_iodev_output_event_sample_ready()
303 static size_t get_best_rate(struct cras_iodev *iodev, size_t rrate) in get_best_rate()
330 static size_t get_best_channel_count(struct cras_iodev *iodev, size_t count) in get_best_channel_count()
[all …]
Dcras_iodev_list.h22 typedef void (*device_enabled_callback_t)(struct cras_iodev *dev,
24 typedef void (*device_disabled_callback_t)(struct cras_iodev *dev,
39 int cras_iodev_list_add_output(struct cras_iodev *output);
47 int cras_iodev_list_add_input(struct cras_iodev *input);
55 int cras_iodev_list_rm_output(struct cras_iodev *output);
63 int cras_iodev_list_rm_input(struct cras_iodev *input);
91 struct cras_iodev *
100 struct cras_iodev *
163 int cras_iodev_list_dev_is_enabled(const struct cras_iodev *dev);
167 void cras_iodev_list_enable_dev(struct cras_iodev *dev);
[all …]
Dcras_iodev_list.c31 struct cras_iodev *iodevs;
40 struct cras_iodev *dev;
66 static struct cras_iodev *fallback_devs[CRAS_NUM_DIRECTIONS];
68 static struct cras_iodev *empty_hotword_dev;
70 static struct cras_iodev *loopdev_post_mix;
71 static struct cras_iodev *loopdev_post_dsp;
100 static struct cras_iodev *find_dev(size_t dev_index) in find_dev()
102 struct cras_iodev *dev; in find_dev()
115 static struct cras_ionode *find_node(struct cras_iodev *iodev, in find_node()
124 static int add_dev_to_list(struct cras_iodev *dev) in add_dev_to_list()
[all …]
Dcras_alsa_io.h40 struct cras_iodev *
59 int alsa_iodev_legacy_complete_init(struct cras_iodev *iodev);
68 int alsa_iodev_ucm_add_nodes_and_jacks(struct cras_iodev *iodev,
77 void alsa_iodev_ucm_complete_init(struct cras_iodev *iodev);
80 void alsa_iodev_destroy(struct cras_iodev *iodev);
83 unsigned alsa_iodev_index(struct cras_iodev *iodev);
86 int alsa_iodev_has_hctl_jacks(struct cras_iodev *iodev);
Dcras_loopback_iodev.c46 struct cras_iodev base;
98 struct cras_iodev *edev; in update_first_output_to_loopback()
110 static void device_enabled_hook(struct cras_iodev *iodev, void *cb_data) in device_enabled_hook()
120 static void device_disabled_hook(struct cras_iodev *iodev, void *cb_data) in device_disabled_hook()
138 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
166 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
173 static int close_record_dev(struct cras_iodev *iodev) in close_record_dev()
191 static int configure_record_dev(struct cras_iodev *iodev) in configure_record_dev()
194 struct cras_iodev *edev; in configure_record_dev()
214 static int get_record_buffer(struct cras_iodev *iodev, in get_record_buffer()
[all …]
Dcras_a2dp_iodev.c57 struct cras_iodev base;
68 static int encode_and_flush(const struct cras_iodev *iodev);
70 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
109 static unsigned int bt_local_queued_frames(const struct cras_iodev *iodev) in bt_local_queued_frames()
117 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
130 static int fill_zeros_to_target_level(struct cras_iodev *iodev, in fill_zeros_to_target_level()
148 static int output_underrun(struct cras_iodev *iodev) in output_underrun()
178 struct cras_iodev *odev = &a2dpio->base; in enter_no_stream()
198 struct cras_iodev *odev = &a2dpio->base; in leave_no_stream()
214 static int no_stream(struct cras_iodev *odev, int enable) in no_stream()
[all …]
Dcras_empty_iodev.c32 struct cras_iodev base;
43 static unsigned int current_level(const struct cras_iodev *iodev) in current_level()
69 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
76 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
81 static int close_dev(struct cras_iodev *iodev) in close_dev()
91 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
108 static int get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, in get_buffer()
133 static int put_buffer(struct cras_iodev *iodev, unsigned frames) in put_buffer()
149 static int flush_buffer(struct cras_iodev *iodev) in flush_buffer()
162 static void update_active_node(struct cras_iodev *iodev, unsigned node_idx, in update_active_node()
[all …]
Dcras_hfp_iodev.c34 struct cras_iodev base;
42 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
70 static int no_stream(struct cras_iodev *iodev, int enable) in no_stream()
111 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
125 static int output_underrun(struct cras_iodev *iodev) in output_underrun()
131 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
179 static int close_dev(struct cras_iodev *iodev) in close_dev()
194 static void set_hfp_volume(struct cras_iodev *iodev) in set_hfp_volume()
207 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
214 static int get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, in get_buffer()
[all …]
Dtest_iodev.c31 struct cras_iodev base;
41 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
54 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
59 static int close_dev(struct cras_iodev *iodev) in close_dev()
69 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
84 static int get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, in get_buffer()
100 static int put_buffer(struct cras_iodev *iodev, unsigned frames) in put_buffer()
111 static int get_buffer_fd_read(struct cras_iodev *iodev, in get_buffer_fd_read()
143 static void update_active_node(struct cras_iodev *iodev, unsigned node_idx, in update_active_node()
165 struct cras_iodev *test_iodev_create(enum CRAS_STREAM_DIRECTION direction, in test_iodev_create()
[all …]
Dtest_iodev.h11 struct cras_iodev;
21 struct cras_iodev *test_iodev_create(enum CRAS_STREAM_DIRECTION direction,
25 void test_iodev_destroy(struct cras_iodev *iodev);
28 void test_iodev_command(struct cras_iodev *iodev,
/external/adhd/cras/src/tests/
Diodev_stub.cc21 std::unordered_map<cras_iodev*, cb_data> frames_queued_map;
22 std::unordered_map<cras_iodev*, cb_data> valid_frames_map;
23 std::unordered_map<cras_iodev*, timespec> drop_time_map;
24 std::unordered_map<const cras_iodev*, double> est_rate_ratio_map;
25 std::unordered_map<const cras_iodev*, int> update_rate_map;
38 void iodev_stub_est_rate_ratio(cras_iodev* iodev, double ratio) { in iodev_stub_est_rate_ratio()
42 void iodev_stub_update_rate(cras_iodev* iodev, int data) { in iodev_stub_update_rate()
50 void iodev_stub_frames_queued(cras_iodev* iodev, int ret, timespec ts) { in iodev_stub_frames_queued()
55 void iodev_stub_valid_frames(cras_iodev* iodev, int ret, timespec ts) { in iodev_stub_valid_frames()
60 bool iodev_stub_get_drop_time(cras_iodev* iodev, timespec* ts) { in iodev_stub_get_drop_time()
[all …]
Dhfp_alsa_iodev_unittest.cc16 struct cras_iodev base;
19 struct cras_iodev* aio;
22 static struct cras_iodev fake_sco_out, fake_sco_in;
86 (int (*)(struct cras_iodev*))fake_open_dev; in ResetStubData()
90 (int (*)(struct cras_iodev*))fake_update_supported_formats; in ResetStubData()
94 (int (*)(struct cras_iodev*))fake_configure_dev; in ResetStubData()
98 (int (*)(struct cras_iodev*))fake_close_dev; in ResetStubData()
102 (int (*)(const struct cras_iodev*, struct timespec*))fake_frames_queued; in ResetStubData()
106 (int (*)(const struct cras_iodev*))fake_delay_frames; in ResetStubData()
110 struct cras_iodev*, struct cras_audio_area**, unsigned*))fake_get_buffer; in ResetStubData()
[all …]
Dbt_io_unittest.cc76 static void SetUpIodev(struct cras_iodev* d, enum CRAS_STREAM_DIRECTION dir) { 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, struct timespec* tstamp) { in frames_queued()
114 static int delay_frames(const cras_iodev* iodev) { in delay_frames()
118 static int get_buffer(cras_iodev* iodev, in get_buffer()
124 static int put_buffer(cras_iodev* iodev, unsigned int num) { in put_buffer()
128 static int configure_dev(cras_iodev* iodev) { in configure_dev()
132 static int close_dev(cras_iodev* iodev) { in close_dev()
139 static struct cras_iodev* bt_iodev;
140 static struct cras_iodev iodev_;
[all …]
Daudio_thread_unittest.cc49 static struct cras_iodev* cras_iodev_reset_request_iodev;
54 static struct cras_iodev* cras_device_monitor_reset_device_iodev;
55 static struct cras_iodev* cras_iodev_start_ramp_odev;
151 virtual void SetupDevice(cras_iodev* iodev, in SetupDevice()
183 cras_iodev* pin_to_dev) { in SetupPinnedStream()
189 static int configure_dev(cras_iodev* iodev) { in configure_dev()
194 static int close_dev(cras_iodev* iodev) { in close_dev()
199 static int frames_queued(const cras_iodev* iodev, struct timespec* tstamp) { in frames_queued()
204 static int delay_frames(const cras_iodev* iodev) { return delay_frames_; } in delay_frames()
206 static int get_buffer(cras_iodev* iodev, in get_buffer()
[all …]
Dempty_iodev_unittest.cc21 struct cras_iodev* iodev; in TEST()
53 void cras_iodev_free_format(struct cras_iodev* iodev) {} in cras_iodev_free_format()
55 int cras_iodev_default_no_stream_playback(struct cras_iodev* odev, int enable) { in cras_iodev_default_no_stream_playback()
59 void cras_iodev_init_audio_area(struct cras_iodev* iodev, int num_channels) { in cras_iodev_init_audio_area()
63 void cras_iodev_free_audio_area(struct cras_iodev* iodev) {} in cras_iodev_free_audio_area()
69 int cras_iodev_list_rm_input(struct cras_iodev* input) { in cras_iodev_list_rm_input()
73 int cras_iodev_list_rm_output(struct cras_iodev* output) { in cras_iodev_list_rm_output()
77 void cras_iodev_free_resources(struct cras_iodev* iodev) {} in cras_iodev_free_resources()
79 void cras_iodev_add_node(struct cras_iodev* iodev, struct cras_ionode* node) { in cras_iodev_add_node()
83 void cras_iodev_set_active_node(struct cras_iodev* iodev, in cras_iodev_set_active_node()
Dloopback_iodev_unittest.cc34 static struct cras_iodev* enabled_dev;
87 struct cras_iodev* loop_in_;
91 struct cras_iodev iodev; in TEST_F()
130 struct cras_iodev iodev1, iodev2; in TEST_F()
193 struct cras_iodev iodev; in TEST_F()
230 void cras_iodev_free_audio_area(struct cras_iodev* iodev) {} in cras_iodev_free_audio_area()
232 void cras_iodev_free_format(struct cras_iodev* iodev) {} in cras_iodev_free_format()
234 void cras_iodev_init_audio_area(struct cras_iodev* iodev, int num_channels) { in cras_iodev_init_audio_area()
238 void cras_iodev_add_node(struct cras_iodev* iodev, struct cras_ionode* node) { in cras_iodev_add_node()
242 void cras_iodev_set_active_node(struct cras_iodev* iodev, in cras_iodev_set_active_node()
[all …]
Diodev_stub.h13 void iodev_stub_est_rate_ratio(cras_iodev* iodev, double ratio);
15 void iodev_stub_update_rate(cras_iodev* iodev, int data);
19 void iodev_stub_frames_queued(cras_iodev* iodev, int ret, timespec ts);
21 void iodev_stub_valid_frames(cras_iodev* iodev, int ret, timespec ts);
23 bool iodev_stub_get_drop_time(cras_iodev* iodev, timespec* ts);
Dbt_device_unittest.cc20 static struct cras_iodev* cras_bt_io_create_profile_ret;
21 static struct cras_iodev* cras_bt_io_append_btio_val;
128 static void update_active_node(struct cras_iodev* iodev, in update_active_node()
132 struct cras_iodev bt_iodev1;
133 struct cras_iodev bt_iodev2;
134 struct cras_iodev d3_;
135 struct cras_iodev d2_;
136 struct cras_iodev d1_;
548 struct cras_iodev* cras_bt_io_create(struct cras_bt_device* device, in cras_bt_io_create()
549 struct cras_iodev* dev, in cras_bt_io_create()
[all …]
Dalsa_io_unittest.cc238 static struct cras_iodev* alsa_iodev_create_with_default_parameters( in alsa_iodev_create_with_default_parameters()
271 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev*)aio)); in TEST()
287 alsa_iodev_destroy((struct cras_iodev*)aio); in TEST()
299 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev*)aio)); in TEST()
305 alsa_iodev_destroy((struct cras_iodev*)aio); in TEST()
310 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev*)aio)); in TEST()
316 alsa_iodev_destroy((struct cras_iodev*)aio); in TEST()
321 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev*)aio)); in TEST()
328 alsa_iodev_destroy((struct cras_iodev*)aio); in TEST()
333 ASSERT_EQ(0, alsa_iodev_legacy_complete_init((struct cras_iodev*)aio)); in TEST()
[all …]
Dhfp_iodev_unittest.cc16 static struct cras_iodev* iodev;
226 void cras_iodev_free_format(struct cras_iodev* iodev) { in cras_iodev_free_format()
230 void cras_iodev_add_node(struct cras_iodev* iodev, struct cras_ionode* node) { in cras_iodev_add_node()
235 void cras_iodev_rm_node(struct cras_iodev* iodev, struct cras_ionode* node) { in cras_iodev_rm_node()
240 void cras_iodev_set_active_node(struct cras_iodev* iodev, in cras_iodev_set_active_node()
269 struct cras_iodev* iodev, in cras_bt_device_append_iodev()
275 struct cras_iodev* iodev) { in cras_bt_device_rm_iodev()
360 void cras_iodev_init_audio_area(struct cras_iodev* iodev, int num_channels) { in cras_iodev_init_audio_area()
364 void cras_iodev_free_audio_area(struct cras_iodev* iodev) {} in cras_iodev_free_audio_area()
366 void cras_iodev_free_resources(struct cras_iodev* iodev) { in cras_iodev_free_resources()
[all …]
Dhfp_ag_profile_unittest.cc16 static struct cras_iodev fake_sco_out, fake_sco_in;
128 struct cras_iodev* cras_iodev_list_get_sco_pcm_iodev( in cras_iodev_list_get_sco_pcm_iodev()
140 struct cras_iodev* hfp_alsa_iodev_create(enum CRAS_STREAM_DIRECTION dir, in hfp_alsa_iodev_create()
145 return (struct cras_iodev*)0xdeadbeef; in hfp_alsa_iodev_create()
148 void hfp_alsa_iodev_destroy(struct cras_iodev* iodev) { in hfp_alsa_iodev_destroy()
152 struct cras_iodev* hfp_iodev_create(enum CRAS_STREAM_DIRECTION dir, in hfp_iodev_create()
158 return (struct cras_iodev*)0xdeadbeef; in hfp_iodev_create()
161 void hfp_iodev_destroy(struct cras_iodev* iodev) { in hfp_iodev_destroy()

123