HomeSort by relevance Sort by last modified time
    Searched refs:iodev (Results 1 - 25 of 34) sorted by null

1 2

  /external/adhd/cras/src/server/
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);
cras_hfp_iodev.c 27 static int update_supported_formats(struct cras_iodev *iodev)
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->supported_channel_counts[1] = 0
69 struct cras_iodev *iodev = &hfpio->base; local
218 struct cras_iodev *iodev; local
    [all...]
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 was created
    [all...]
cras_empty_iodev.c 50 static unsigned int current_level(const struct cras_iodev *iodev)
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,
77 return current_level(iodev);
80 static int delay_frames(const struct cras_iodev *iodev)
85 static int close_dev(struct cras_iodev *iodev)
87 struct empty_iodev *empty_iodev = (struct empty_iodev *)iodev;
182 struct cras_iodev *iodev; local
    [all...]
cras_iodev.c 42 static void cras_iodev_alloc_dsp(struct cras_iodev *iodev);
68 static int cras_iodev_start(struct cras_iodev *iodev)
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_t rrate
    [all...]
test_iodev.c 45 * iodev callbacks.
48 static int frames_queued(const struct cras_iodev *iodev,
51 struct test_iodev *testio = (struct test_iodev *)iodev;
61 static int delay_frames(const struct cras_iodev *iodev)
66 static int close_dev(struct cras_iodev *iodev)
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)
78 struct test_iodev *testio = (struct test_iodev *)iodev;
80 if (iodev->format == NULL
178 struct cras_iodev *iodev; local
    [all...]
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,
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. *
236 struct cras_iodev *iodev; local
283 struct cras_iodev *iodev; local
    [all...]
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)
40 init_device_msg(&msg, RESET_DEVICE, iodev);
50 int cras_device_monitor_set_device_mute_state(struct cras_iodev *iodev)
55 init_device_msg(&msg, SET_MUTE_STATE, iodev);
77 struct cras_iodev *iodev = device_msg->iodev; local
    [all...]
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 - ALSA io device associated with the given section
    [all...]
cras_a2dp_iodev.c 60 static int update_supported_formats(struct cras_iodev *iodev)
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->supported_channel_counts[0] = channel
264 struct cras_iodev *iodev = (struct cras_iodev *)arg; local
447 struct cras_iodev *iodev; local
    [all...]
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,
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);
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);
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)
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)
126 struct bt_io *btio = (struct bt_io *)iodev;
127 struct cras_iodev *dev = active_profile_dev(iodev);
133 iodev->direction == CRAS_STREAM_INPUT)
316 struct cras_iodev *iodev; local
    [all...]
cras_hfp_iodev.h 16 * Creates an hfp iodev.
25 void hfp_iodev_destroy(struct cras_iodev *iodev);
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,
254 struct alsa_io *aio = (struct alsa_io *)iodev;
261 iodev->info.name,
271 if (iodev->direction == CRAS_STREAM_INPUT)
275 return iodev->buffer_size - frames
1816 struct cras_iodev *iodev; local
    [all...]
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...]
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);
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/
iodev_unittest.cc 107 // Iodev callback
108 int update_channel_layout(struct cras_iodev *iodev) {
113 // Iodev callback
114 int set_swap_mode_for_node(struct cras_iodev *iodev, struct cras_ionode *node,
517 static int get_buffer(cras_iodev* iodev, struct cras_audio_area** area,
535 static int put_buffer(struct cras_iodev *iodev, unsigned int nframes)
578 struct cras_iodev iodev; local
583 memset(&iodev, 0, sizeof(iodev));
589 iodev.format = &fmt
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
1006 struct cras_iodev iodev; local
1025 struct cras_iodev iodev; local
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
1254 struct cras_iodev iodev; local
1281 struct cras_iodev iodev; local
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
1879 struct cras_iodev iodev; local
1890 struct cras_iodev iodev; local
1927 struct cras_iodev iodev; local
    [all...]
a2dp_iodev_unittest.cc 89 int iodev_set_format(struct cras_iodev *iodev,
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 name matches the bt device's name *
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
    [all...]
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->format = &fake_format
    [all...]
audio_thread_unittest.cc 89 virtual void SetupDevice(cras_iodev *iodev,
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->get_buffer = get_buffer
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
    [all...]
bt_io_unittest.cc 84 // Stub functions for the iodev structure.
85 static int update_supported_formats(struct cras_iodev *iodev) {
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->supported_channel_counts[1] = 0
    [all...]
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;
    [all...]
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
    [all...]

Completed in 246 milliseconds

1 2