Lines Matching refs:pcm
86 static int get_pcm_timestamp(struct pcm* pcm, uint32_t sample_rate, struct aec_info* info, in get_pcm_timestamp() argument
89 if (pcm_get_htimestamp(pcm, &info->available, &info->timestamp) < 0) { in get_pcm_timestamp()
97 frames = pcm_get_buffer_size(pcm) - info->available; in get_pcm_timestamp()
171 out->pcm = pcm_open(CARD_OUT, out_port, PCM_OUT | PCM_MONOTONIC, &out->config); in start_output_stream()
172 if ((out->pcm != NULL) && pcm_is_ready(out->pcm)) { in start_output_stream()
175 ALOGE("cannot open pcm_out driver: %s", pcm_get_error(out->pcm)); in start_output_stream()
176 if (out->pcm != NULL) { in start_output_stream()
177 pcm_close(out->pcm); in start_output_stream()
178 out->pcm = NULL; in start_output_stream()
242 pcm_close(out->pcm); in do_output_standby()
243 out->pcm = NULL; in do_output_standby()
352 ret = pcm_write(out->pcm, buffer, out_frames * frame_size); in out_write()
357 get_pcm_timestamp(out->pcm, out->config.rate, &info, true /*isOutput*/); in out_write()
431 in->pcm = pcm_open(CARD_IN, PORT_BUILTIN_MIC, PCM_IN | PCM_MONOTONIC, &in->config); in start_input_stream()
432 if ((in->pcm != NULL) && pcm_is_ready(in->pcm)) { in start_input_stream()
435 ALOGE("cannot open pcm_in driver: %s", pcm_get_error(in->pcm)); in start_input_stream()
436 if (in->pcm != NULL) { in start_input_stream()
437 pcm_close(in->pcm); in start_input_stream()
438 in->pcm = NULL; in start_input_stream()
552 pcm_close(in->pcm); in do_input_standby()
553 in->pcm = NULL; in do_input_standby()
695 ret = pcm_read(in->pcm, buffer, in_frames * frame_size); in in_read()
697 get_pcm_timestamp(in->pcm, in->config.rate, &info, false /*isOutput*/); in in_read()