• Home
  • Raw
  • Download

Lines Matching refs:pcm

407                              out->pcm, &out->config);  in register_out_stream()
427 in->pcm, in register_in_stream()
1952 if (in->pcm == NULL || !pcm_is_ready(in->pcm)) { in start_input_stream()
1956 ret = pcm_start(in->pcm); in start_input_stream()
1976 in->pcm = pcm_open(adev->snd_card, in->pcm_device_id, in start_input_stream()
1978 if (in->pcm == NULL || !pcm_is_ready(in->pcm)) { in start_input_stream()
1979 ALOGE("%s: %s", __func__, pcm_get_error(in->pcm)); in start_input_stream()
1980 if (in->pcm != NULL) { in start_input_stream()
1981 pcm_close(in->pcm); in start_input_stream()
1982 in->pcm = NULL; in start_input_stream()
1995 ret = pcm_prepare(in->pcm); in start_input_stream()
1998 pcm_close(in->pcm); in start_input_stream()
1999 in->pcm = NULL; in start_input_stream()
2003 ret = pcm_start(in->pcm); in start_input_stream()
2006 pcm_close(in->pcm); in start_input_stream()
2007 in->pcm = NULL; in start_input_stream()
2397 struct pcm* pcm_open_prepare_helper(unsigned int snd_card, unsigned int pcm_device_id, in pcm_open_prepare_helper()
2401 struct pcm* pcm = NULL; in pcm_open_prepare_helper() local
2404 pcm = pcm_open(snd_card, pcm_device_id, flags, config); in pcm_open_prepare_helper()
2405 if (pcm == NULL || !pcm_is_ready(pcm)) { in pcm_open_prepare_helper()
2406 ALOGE("%s: %s", __func__, pcm_get_error(pcm)); in pcm_open_prepare_helper()
2407 if (pcm != NULL) { in pcm_open_prepare_helper()
2408 pcm_close(pcm); in pcm_open_prepare_helper()
2409 pcm = NULL; in pcm_open_prepare_helper()
2420 if (pcm_is_ready(pcm)) { in pcm_open_prepare_helper()
2421 int ret = pcm_prepare(pcm); in pcm_open_prepare_helper()
2424 pcm_close(pcm); in pcm_open_prepare_helper()
2425 pcm = NULL; in pcm_open_prepare_helper()
2429 return pcm; in pcm_open_prepare_helper()
2531 out->pcm = NULL; in start_output_stream()
2554 if (out->pcm == NULL || !pcm_is_ready(out->pcm)) { in start_output_stream()
2558 ret = pcm_start(out->pcm); in start_output_stream()
2574 out->pcm = pcm_open_prepare_helper(adev->snd_card, out->pcm_device_id, in start_output_stream()
2577 if (out->pcm == NULL) { in start_output_stream()
2596 ret = pcm_start(out->pcm); in start_output_stream()
2599 pcm_close(out->pcm); in start_output_stream()
2600 out->pcm = NULL; in start_output_stream()
2800 if (out->pcm) { in out_standby_l()
2801 pcm_close(out->pcm); in out_standby_l()
2802 out->pcm = NULL; in out_standby_l()
3523 if (out->pcm) { in out_write()
3574 ret = pcm_mmap_write(out->pcm, (void *)buffer, bytes_to_write); in out_write()
3630 ret = pcm_write(out->pcm, in out_write()
3641 ret = pcm_write(out->pcm, (void *)buffer, bytes_to_write); in out_write()
3660 ALOGE_IF(out->pcm != NULL, in out_write()
3661 "%s: error %zd - %s", __func__, ret, pcm_get_error(out->pcm)); in out_write()
3745 if (out->pcm) { in out_get_presentation_position()
3747 if (pcm_get_htimestamp(out->pcm, &avail, timestamp) == 0) { in out_get_presentation_position()
3879 out->playback_started && out->pcm != NULL) { in out_stop()
3880 pcm_stop(out->pcm); in out_stop()
3897 !out->playback_started && out->pcm != NULL) { in out_start()
3977 out->pcm = pcm_open(adev->snd_card, out->pcm_device_id, in out_create_mmap_buffer()
3979 if (out->pcm == NULL || !pcm_is_ready(out->pcm)) { in out_create_mmap_buffer()
3984 ret = pcm_mmap_begin(out->pcm, &info->shared_memory_address, &offset1, &frames1); in out_create_mmap_buffer()
3989 info->buffer_size_frames = pcm_get_buffer_size(out->pcm); in out_create_mmap_buffer()
3990 buffer_size = pcm_frames_to_bytes(out->pcm, info->buffer_size_frames); in out_create_mmap_buffer()
3998 info->shared_memory_fd = pcm_get_poll_fd(out->pcm); in out_create_mmap_buffer()
4012 ret = pcm_mmap_commit(out->pcm, 0, MMAP_PERIOD_SIZE); in out_create_mmap_buffer()
4028 if (out->pcm == NULL) { in out_create_mmap_buffer()
4031 ALOGE("%s: %s %s", __func__, step, pcm_get_error(out->pcm)); in out_create_mmap_buffer()
4032 pcm_close(out->pcm); in out_create_mmap_buffer()
4033 out->pcm = NULL; in out_create_mmap_buffer()
4052 out->pcm == NULL) { in out_get_mmap_position()
4058 ret = pcm_mmap_get_hw_ptr(out->pcm, (unsigned int *)&position->position_frames, &ts); in out_get_mmap_position()
4060 ALOGE("%s: %s", __func__, pcm_get_error(out->pcm)); in out_get_mmap_position()
4145 if (in->pcm) { in in_standby()
4146 pcm_close(in->pcm); in in_standby()
4147 in->pcm = NULL; in in_standby()
4402 long ns = pcm_bytes_to_frames(in->pcm, bytes)*1000000000LL/ in in_read()
4407 if (in->pcm) { in in_read()
4409 ret = pcm_mmap_read(in->pcm, buffer, bytes); in in_read()
4411 ret = pcm_read(in->pcm, buffer, bytes); in in_read()
4482 ALOGE_IF(in->pcm != NULL && !(in->flags & AUDIO_INPUT_FLAG_HW_HOTWORD), in in_get_capture_position()
4486 if (in->pcm) { in in_get_capture_position()
4489 if (pcm_get_htimestamp(in->pcm, &avail, &timestamp) == 0) { in in_get_capture_position()
4635 in->capture_started && in->pcm != NULL) { in in_stop()
4636 pcm_stop(in->pcm); in in_stop()
4653 !in->capture_started && in->pcm != NULL) { in in_start()
4716 in->pcm = pcm_open(adev->snd_card, in->pcm_device_id, in in_create_mmap_buffer()
4718 if (in->pcm == NULL || !pcm_is_ready(in->pcm)) { in in_create_mmap_buffer()
4724 ret = pcm_mmap_begin(in->pcm, &info->shared_memory_address, &offset1, &frames1); in in_create_mmap_buffer()
4729 info->buffer_size_frames = pcm_get_buffer_size(in->pcm); in in_create_mmap_buffer()
4730 buffer_size = pcm_frames_to_bytes(in->pcm, info->buffer_size_frames); in in_create_mmap_buffer()
4738 info->shared_memory_fd = pcm_get_poll_fd(in->pcm); in in_create_mmap_buffer()
4753 ret = pcm_mmap_commit(in->pcm, 0, MMAP_PERIOD_SIZE); in in_create_mmap_buffer()
4769 if (in->pcm == NULL) { in in_create_mmap_buffer()
4772 ALOGE("%s: %s %s", __func__, step, pcm_get_error(in->pcm)); in in_create_mmap_buffer()
4773 pcm_close(in->pcm); in in_create_mmap_buffer()
4774 in->pcm = NULL; in in_create_mmap_buffer()
4793 in->pcm == NULL) { in in_get_mmap_position()
4798 ret = pcm_mmap_get_hw_ptr(in->pcm, (unsigned int *)&position->position_frames, &ts); in in_get_mmap_position()
4800 ALOGE("%s: %s", __func__, pcm_get_error(in->pcm)); in in_get_mmap_position()