Home
last modified time | relevance | path

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

123

/external/adhd/cras/src/server/
Dcras_iodev.h30 struct cras_iodev;
119 struct cras_iodev *dev;
236 struct cras_iodev { struct
237 void (*set_volume)(struct cras_iodev *iodev); argument
238 void (*set_mute)(struct cras_iodev *iodev); argument
239 void (*set_capture_gain)(struct cras_iodev *iodev); argument
240 void (*set_capture_mute)(struct cras_iodev *iodev); argument
241 int (*set_swap_mode_for_node)(struct cras_iodev *iodev, argument
243 int (*open_dev)(struct cras_iodev *iodev); argument
244 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);
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,
39 unsigned int cras_bt_io_try_remove(struct cras_iodev *bt_iodev,
40 struct cras_iodev *dev);
46 int cras_bt_io_remove(struct cras_iodev *bt_iodev, struct cras_iodev *dev);
Dcras_hfp_alsa_iodev.c30 struct cras_iodev base;
33 struct cras_iodev *aio;
36 static int hfp_alsa_open_dev(struct cras_iodev *iodev) in hfp_alsa_open_dev()
39 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_open_dev()
44 static int hfp_alsa_update_supported_formats(struct cras_iodev *iodev) in hfp_alsa_update_supported_formats()
47 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_update_supported_formats()
107 static int hfp_alsa_configure_dev(struct cras_iodev *iodev) in hfp_alsa_configure_dev()
110 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_configure_dev()
133 static int hfp_alsa_close_dev(struct cras_iodev *iodev) in hfp_alsa_close_dev()
136 struct cras_iodev *aio = hfp_alsa_io->aio; in hfp_alsa_close_dev()
[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()
127 struct cras_iodev *dev = active_profile_dev(iodev); in open_dev()
145 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
147 struct cras_iodev *dev = active_profile_dev(iodev); in update_supported_formats()
192 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
[all …]
Dcras_iodev.c67 static void cras_iodev_alloc_dsp(struct cras_iodev *iodev);
69 static int default_no_stream_playback(struct cras_iodev *odev) in default_no_stream_playback()
105 static int cras_iodev_start(struct cras_iodev *iodev) in cras_iodev_start()
126 static unsigned int dev_playback_frames(struct cras_iodev *odev) in dev_playback_frames()
169 static int cras_iodev_no_stream_playback_transition(struct cras_iodev *odev, in cras_iodev_no_stream_playback_transition()
204 static int output_should_mute(struct cras_iodev *odev) in output_should_mute()
214 int cras_iodev_is_zero_volume(const struct cras_iodev *odev) in cras_iodev_is_zero_volume()
257 static int cras_iodev_output_event_sample_ready(struct cras_iodev *odev) in cras_iodev_output_event_sample_ready()
301 static size_t get_best_rate(struct cras_iodev *iodev, size_t rrate) in get_best_rate()
328 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.c29 struct cras_iodev *iodevs;
38 struct cras_iodev *dev;
62 static struct cras_iodev *fallback_devs[CRAS_NUM_DIRECTIONS];
64 static struct cras_iodev *empty_hotword_dev;
66 static struct cras_iodev *loopdev_post_mix;
67 static struct cras_iodev *loopdev_post_dsp;
93 static struct cras_iodev *find_dev(size_t dev_index) in find_dev()
95 struct cras_iodev *dev; in find_dev()
108 static struct cras_ionode *find_node(struct cras_iodev *iodev, in find_node()
117 static int add_dev_to_list(struct cras_iodev *dev) in add_dev_to_list()
[all …]
Dcras_alsa_io.h39 struct cras_iodev *
58 int alsa_iodev_legacy_complete_init(struct cras_iodev *iodev);
67 int alsa_iodev_ucm_add_nodes_and_jacks(struct cras_iodev *iodev,
76 void alsa_iodev_ucm_complete_init(struct cras_iodev *iodev);
79 void alsa_iodev_destroy(struct cras_iodev *iodev);
82 unsigned alsa_iodev_index(struct cras_iodev *iodev);
85 int alsa_iodev_has_hctl_jacks(struct cras_iodev *iodev);
Dcras_loopback_iodev.c45 struct cras_iodev base;
85 struct cras_iodev *edev; in update_first_output_to_loopback()
97 static void device_enabled_hook(struct cras_iodev *iodev, void *cb_data) in device_enabled_hook()
107 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()
153 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
160 static int close_record_dev(struct cras_iodev *iodev) in close_record_dev()
178 static int configure_record_dev(struct cras_iodev *iodev) in configure_record_dev()
181 struct cras_iodev *edev; in configure_record_dev()
201 static int get_record_buffer(struct cras_iodev *iodev, in get_record_buffer()
[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 …]
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()
110 static int get_buffer_fd_read(struct cras_iodev *iodev, in get_buffer_fd_read()
142 static void update_active_node(struct cras_iodev *iodev, unsigned node_idx, in update_active_node()
164 struct cras_iodev *test_iodev_create(enum CRAS_STREAM_DIRECTION direction, in test_iodev_create()
[all …]
Dcras_hfp_iodev.c35 struct cras_iodev base;
43 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
73 static int no_stream(struct cras_iodev *iodev, int enable) in no_stream()
114 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
128 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
169 static int close_dev(struct cras_iodev *iodev) in close_dev()
184 static void set_hfp_volume(struct cras_iodev *iodev) in set_hfp_volume()
197 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
204 static int get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, in get_buffer()
225 static int put_buffer(struct cras_iodev *iodev, unsigned nwritten) in put_buffer()
[all …]
Dcras_a2dp_iodev.c56 struct cras_iodev base;
70 static int update_supported_formats(struct cras_iodev *iodev) in update_supported_formats()
116 static int bt_queued_frames(const struct cras_iodev *iodev, int fr) in bt_queued_frames()
132 static int frames_queued(const struct cras_iodev *iodev, in frames_queued()
145 static int no_stream(struct cras_iodev *iodev, int enable) in no_stream()
190 static int configure_dev(struct cras_iodev *iodev) in configure_dev()
249 static int close_dev(struct cras_iodev *iodev) in close_dev()
283 struct cras_iodev *iodev = (struct cras_iodev *)arg; in flush_data()
356 static int delay_frames(const struct cras_iodev *iodev) in delay_frames()
365 static int get_buffer(struct cras_iodev *iodev, struct cras_audio_area **area, in get_buffer()
[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;
32 void iodev_stub_frames_queued(cras_iodev* iodev, int ret, timespec ts) { in iodev_stub_frames_queued()
37 void iodev_stub_valid_frames(cras_iodev* iodev, int ret, timespec ts) { in iodev_stub_valid_frames()
42 bool iodev_stub_get_drop_time(cras_iodev* iodev, timespec* ts) { in iodev_stub_get_drop_time()
53 int cras_iodev_add_stream(struct cras_iodev* iodev, struct dev_stream* stream) { in cras_iodev_add_stream()
58 int cras_iodev_get_valid_frames(struct cras_iodev* iodev, in cras_iodev_get_valid_frames()
69 double cras_iodev_get_est_rate_ratio(const struct cras_iodev* iodev) { in cras_iodev_get_est_rate_ratio()
73 int cras_iodev_get_dsp_delay(const struct cras_iodev* iodev) { in cras_iodev_get_dsp_delay()
[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;
83 (int (*)(struct cras_iodev*))fake_open_dev; in ResetStubData()
87 (int (*)(struct cras_iodev*))fake_update_supported_formats; in ResetStubData()
91 (int (*)(struct cras_iodev*))fake_configure_dev; in ResetStubData()
95 (int (*)(struct cras_iodev*))fake_close_dev; in ResetStubData()
99 (int (*)(const struct cras_iodev*, struct timespec*))fake_frames_queued; in ResetStubData()
103 (int (*)(const struct cras_iodev*))fake_delay_frames; in ResetStubData()
107 struct cras_iodev*, struct cras_audio_area**, unsigned*))fake_get_buffer; in ResetStubData()
[all …]
Daudio_thread_unittest.cc48 static struct cras_iodev* cras_iodev_reset_request_iodev;
53 static struct cras_iodev* cras_device_monitor_reset_device_iodev;
54 static struct cras_iodev* cras_iodev_start_ramp_odev;
149 virtual void SetupDevice(cras_iodev* iodev, in SetupDevice()
181 cras_iodev* pin_to_dev) { in SetupPinnedStream()
187 static int configure_dev(cras_iodev* iodev) { in configure_dev()
192 static int close_dev(cras_iodev* iodev) { in close_dev()
197 static int frames_queued(const cras_iodev* iodev, struct timespec* tstamp) { in frames_queued()
202 static int delay_frames(const cras_iodev* iodev) { return delay_frames_; } in delay_frames()
204 static int get_buffer(cras_iodev* iodev, in get_buffer()
[all …]
Dbt_io_unittest.cc74 static void SetUpIodev(struct cras_iodev* d, enum CRAS_STREAM_DIRECTION dir) { in SetUpIodev()
89 static int update_supported_formats(struct cras_iodev* iodev) { in update_supported_formats()
108 static int frames_queued(const cras_iodev* iodev, struct timespec* tstamp) { in frames_queued()
112 static int delay_frames(const cras_iodev* iodev) { in delay_frames()
116 static int get_buffer(cras_iodev* iodev, in get_buffer()
122 static int put_buffer(cras_iodev* iodev, unsigned int num) { in put_buffer()
126 static int configure_dev(cras_iodev* iodev) { in configure_dev()
130 static int close_dev(cras_iodev* iodev) { in close_dev()
137 static struct cras_iodev* bt_iodev;
138 static struct cras_iodev iodev_;
[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.cc29 static struct cras_iodev* enabled_dev;
73 struct cras_iodev* loop_in_;
77 struct cras_iodev iodev; in TEST_F()
116 struct cras_iodev iodev1, iodev2; in TEST_F()
179 struct cras_iodev iodev; in TEST_F()
216 void cras_iodev_free_audio_area(struct cras_iodev* iodev) {} in cras_iodev_free_audio_area()
218 void cras_iodev_free_format(struct cras_iodev* iodev) {} in cras_iodev_free_format()
220 void cras_iodev_init_audio_area(struct cras_iodev* iodev, int num_channels) { in cras_iodev_init_audio_area()
224 void cras_iodev_add_node(struct cras_iodev* iodev, struct cras_ionode* node) { in cras_iodev_add_node()
228 void cras_iodev_set_active_node(struct cras_iodev* iodev, in cras_iodev_set_active_node()
[all …]
Dbt_device_unittest.cc18 static struct cras_iodev* cras_bt_io_create_profile_ret;
19 static struct cras_iodev* cras_bt_io_append_btio_val;
118 static void update_active_node(struct cras_iodev* iodev, in update_active_node()
122 struct cras_iodev bt_iodev1;
123 struct cras_iodev bt_iodev2;
124 struct cras_iodev d3_;
125 struct cras_iodev d2_;
126 struct cras_iodev d1_;
452 struct cras_iodev* cras_bt_io_create(struct cras_bt_device* device, in cras_bt_io_create()
453 struct cras_iodev* dev, in cras_bt_io_create()
[all …]
Da2dp_iodev_unittest.cc90 int iodev_set_format(struct cras_iodev* iodev, struct cras_audio_format* fmt) { in iodev_set_format()
116 struct cras_iodev* iodev; in TEST_F()
149 struct cras_iodev* iodev; in TEST_F()
164 struct cras_iodev* iodev; in TEST_F()
182 struct cras_iodev* iodev; in TEST_F()
242 struct cras_iodev* iodev; in TEST_F()
310 struct cras_iodev* iodev; in TEST_F()
355 struct cras_iodev* iodev; in TEST_F()
435 void cras_iodev_free_format(struct cras_iodev* iodev) { in cras_iodev_free_format()
439 void cras_iodev_free_resources(struct cras_iodev* iodev) { in cras_iodev_free_resources()
[all …]
Dalsa_io_unittest.cc258 static struct cras_iodev* alsa_iodev_create_with_default_parameters( in alsa_iodev_create_with_default_parameters()
291 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 …]
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()
Diodev_list_unittest.cc35 static cras_iodev* audio_thread_remove_streams_active_dev;
36 static cras_iodev* audio_thread_set_active_dev_val;
38 static cras_iodev* audio_thread_add_open_dev_dev;
43 static struct cras_iodev loopback_input;
45 static struct cras_iodev* cras_iodev_close_dev;
46 static struct cras_iodev dummy_hotword_iodev;
47 static struct cras_iodev dummy_empty_iodev[2];
60 static struct cras_iodev* device_enabled_dev;
62 static struct cras_iodev* device_disabled_dev;
67 static struct cras_iodev* audio_thread_add_stream_dev;
[all …]

123