Lines Matching refs:dev

58 					   struct cras_iodev *dev,  in add_profile_dev()  argument
68 n->base.dev = bt_iodev; in add_profile_dev()
72 n->base.stable_id = dev->info.stable_id; in add_profile_dev()
76 strcpy(n->base.name, dev->info.name); in add_profile_dev()
77 n->profile_dev = dev; in add_profile_dev()
138 struct cras_iodev *dev = active_profile_dev(iodev); in open_dev() local
151 if (dev && dev->open_dev) { in open_dev()
152 rc = dev->open_dev(dev); in open_dev()
167 struct cras_iodev *dev = active_profile_dev(iodev); in update_supported_formats() local
170 if (!dev) in update_supported_formats()
173 if (dev->update_supported_formats) { in update_supported_formats()
174 rc = dev->update_supported_formats(dev); in update_supported_formats()
180 for (length = 0; dev->supported_rates[length]; length++) in update_supported_formats()
186 iodev->supported_rates[i] = dev->supported_rates[i]; in update_supported_formats()
188 for (length = 0; dev->supported_channel_counts[length]; length++) in update_supported_formats()
194 dev->supported_channel_counts[i]; in update_supported_formats()
196 for (length = 0; dev->supported_formats[length]; length++) in update_supported_formats()
202 iodev->supported_formats[i] = dev->supported_formats[i]; in update_supported_formats()
205 iodev->info.max_supported_channels = dev->info.max_supported_channels; in update_supported_formats()
212 struct cras_iodev *dev = active_profile_dev(iodev); in configure_dev() local
213 if (!dev) in configure_dev()
217 if (dev->format == NULL) { in configure_dev()
218 dev->format = (struct cras_audio_format *)malloc( in configure_dev()
219 sizeof(*dev->format)); in configure_dev()
220 if (!dev->format) in configure_dev()
222 *dev->format = *iodev->format; in configure_dev()
225 rc = dev->configure_dev(dev); in configure_dev()
229 iodev->buffer_size = dev->buffer_size; in configure_dev()
230 iodev->min_buffer_level = dev->min_buffer_level; in configure_dev()
231 if (dev->start) in configure_dev()
232 dev->state = CRAS_IODEV_STATE_OPEN; in configure_dev()
234 dev->state = CRAS_IODEV_STATE_NO_STREAM_RUN; in configure_dev()
243 struct cras_iodev *dev = active_profile_dev(iodev); in close_dev() local
244 if (!dev) in close_dev()
257 rc = dev->close_dev(dev); in close_dev()
261 dev->state = CRAS_IODEV_STATE_CLOSE; in close_dev()
267 struct cras_iodev *dev = active_profile_dev(iodev); in set_bt_volume() local
268 if (!dev) in set_bt_volume()
271 if (dev->active_node) in set_bt_volume()
272 dev->active_node->volume = iodev->active_node->volume; in set_bt_volume()
278 if (dev->set_volume && !iodev->software_volume_needed) in set_bt_volume()
279 dev->set_volume(dev); in set_bt_volume()
285 struct cras_iodev *dev = active_profile_dev(iodev); in frames_queued() local
286 if (!dev) in frames_queued()
288 return dev->frames_queued(dev, tstamp); in frames_queued()
293 struct cras_iodev *dev = active_profile_dev(iodev); in delay_frames() local
294 if (!dev) in delay_frames()
296 return dev->delay_frames(dev); in delay_frames()
302 struct cras_iodev *dev = active_profile_dev(iodev); in get_buffer() local
303 if (!dev) in get_buffer()
305 return dev->get_buffer(dev, area, frames); in get_buffer()
310 struct cras_iodev *dev = active_profile_dev(iodev); in put_buffer() local
311 if (!dev) in put_buffer()
313 return dev->put_buffer(dev, nwritten); in put_buffer()
318 struct cras_iodev *dev = active_profile_dev(iodev); in flush_buffer() local
319 if (!dev) in flush_buffer()
321 return dev->flush_buffer(dev); in flush_buffer()
333 struct cras_iodev *dev; in update_active_node() local
355 dev = active_profile_dev(iodev); in update_active_node()
356 if (dev && dev->update_active_node) in update_active_node()
357 dev->update_active_node(dev, node_idx, dev_enabled); in update_active_node()
371 struct cras_iodev *dev = active_profile_dev(iodev); in output_underrun() local
372 if (!dev) in output_underrun()
375 if (dev->output_underrun) { in output_underrun()
376 dev->min_cb_level = iodev->min_cb_level; in output_underrun()
377 dev->max_cb_level = iodev->max_cb_level; in output_underrun()
378 dev->buffer_size = iodev->buffer_size; in output_underrun()
379 return dev->output_underrun(dev); in output_underrun()
387 struct cras_iodev *dev = active_profile_dev(iodev); in no_stream() local
390 if (!dev) in no_stream()
393 if (dev->no_stream) { in no_stream()
401 dev->min_cb_level = iodev->min_cb_level; in no_stream()
402 dev->max_cb_level = iodev->max_cb_level; in no_stream()
403 dev->buffer_size = iodev->buffer_size; in no_stream()
404 rc = dev->no_stream(dev, enable); in no_stream()
409 dev->state = CRAS_IODEV_STATE_NO_STREAM_RUN; in no_stream()
411 dev->state = CRAS_IODEV_STATE_NORMAL_RUN; in no_stream()
418 struct cras_iodev *dev = active_profile_dev(iodev); in is_free_running() local
419 if (!dev) in is_free_running()
422 if (dev->is_free_running) in is_free_running()
423 return dev->is_free_running(dev); in is_free_running()
430 struct cras_iodev *dev = active_profile_dev(iodev); in start() local
433 if (!dev) in start()
436 if (dev->start) { in start()
437 rc = dev->start(dev); in start()
441 dev->state = CRAS_IODEV_STATE_NORMAL_RUN; in start()
449 struct cras_iodev *dev = active_profile_dev(iodev); in frames_to_play_in_sleep() local
450 if (!dev || !dev->frames_to_play_in_sleep) in frames_to_play_in_sleep()
454 return dev->frames_to_play_in_sleep(dev, hw_level, hw_tstamp); in frames_to_play_in_sleep()
460 struct cras_iodev *dev = active_profile_dev(iodev); in get_valid_frames() local
461 if (!dev) in get_valid_frames()
464 if (dev->get_valid_frames) in get_valid_frames()
465 return dev->get_valid_frames(dev, hw_tstamp); in get_valid_frames()
471 struct cras_iodev *dev, in cras_bt_io_create() argument
480 if (!dev) in cras_bt_io_create()
489 iodev->direction = dev->direction; in cras_bt_io_create()
490 strcpy(iodev->info.name, dev->info.name); in cras_bt_io_create()
491 iodev->info.stable_id = dev->info.stable_id; in cras_bt_io_create()
515 if (dev->direction == CRAS_STREAM_OUTPUT) { in cras_bt_io_create()
526 active->base.dev = iodev; in cras_bt_io_create()
528 active->base.type = dev->active_node->type; in cras_bt_io_create()
538 (dev->direction == CRAS_STREAM_INPUT)) in cras_bt_io_create()
544 active->profile_dev = dev; in cras_bt_io_create()
545 strcpy(active->base.name, dev->info.name); in cras_bt_io_create()
551 node = add_profile_dev(&btio->base, dev, profile); in cras_bt_io_create()
623 int cras_bt_io_append(struct cras_iodev *bt_iodev, struct cras_iodev *dev, in cras_bt_io_append() argument
632 node = add_profile_dev(bt_iodev, dev, profile); in cras_bt_io_append()
668 struct cras_iodev *dev) in cras_bt_io_try_remove() argument
676 if (active->profile_dev == dev) { in cras_bt_io_try_remove()
681 if (btnode == active || btnode->profile_dev == dev) in cras_bt_io_try_remove()
692 int cras_bt_io_remove(struct cras_iodev *bt_iodev, struct cras_iodev *dev) in cras_bt_io_remove() argument
699 if (btnode->profile_dev != dev) in cras_bt_io_remove()