Lines Matching refs:pcm
829 in->pcm = pcm_open(adev->snd_card, in->pcm_device_id, in start_input_stream()
831 if (in->pcm == NULL || !pcm_is_ready(in->pcm)) { in start_input_stream()
832 ALOGE("%s: %s", __func__, pcm_get_error(in->pcm)); in start_input_stream()
833 if (in->pcm != NULL) { in start_input_stream()
834 pcm_close(in->pcm); in start_input_stream()
835 in->pcm = NULL; in start_input_stream()
848 pcm_prepare(in->pcm); in start_input_stream()
1189 out->pcm = pcm_open(adev->snd_card, out->pcm_device_id, in start_output_stream()
1191 if (out->pcm == NULL || !pcm_is_ready(out->pcm)) { in start_output_stream()
1192 ALOGE("%s: %s", __func__, pcm_get_error(out->pcm)); in start_output_stream()
1193 if (out->pcm != NULL) { in start_output_stream()
1194 pcm_close(out->pcm); in start_output_stream()
1195 out->pcm = NULL; in start_output_stream()
1207 if (pcm_is_ready(out->pcm)) in start_output_stream()
1208 pcm_prepare(out->pcm); in start_output_stream()
1211 out->pcm = NULL; in start_output_stream()
1359 if (out->pcm) { in out_standby()
1360 pcm_close(out->pcm); in out_standby()
1361 out->pcm = NULL; in out_standby()
1655 if (out->pcm) { in out_write()
1664 ret = pcm_mmap_write(out->pcm, (void *)buffer, bytes); in out_write()
1667 ret = pcm_write(out->pcm, (void *)buffer, bytes); in out_write()
1681 if (out->pcm) in out_write()
1682 ALOGE("%s: error %zu - %s", __func__, ret, pcm_get_error(out->pcm)); in out_write()
1748 if (out->pcm) { in out_get_presentation_position()
1750 if (pcm_get_htimestamp(out->pcm, &avail, timestamp) == 0) { in out_get_presentation_position()
1906 if (in->pcm) { in in_standby()
1907 pcm_close(in->pcm); in in_standby()
1908 in->pcm = NULL; in in_standby()
2014 if (in->pcm) { in in_read()
2016 ret = pcm_mmap_read(in->pcm, buffer, bytes); in in_read()
2018 ret = pcm_read(in->pcm, buffer, bytes); in in_read()