Lines Matching refs:pcm
212 struct pcm *pcm; // Protected by this->lock member
421 struct pcm *pcm = NULL; in out_write_worker() local
431 if (pcm) { in out_write_worker()
432 pcm_close(pcm); // Frees pcm in out_write_worker()
433 pcm = NULL; in out_write_worker()
459 if (!pcm) { in out_write_worker()
460 pcm = pcm_open(PCM_CARD, PCM_DEVICE, in out_write_worker()
462 if (!pcm_is_ready(pcm)) { in out_write_worker()
464 pcm_get_error(pcm), in out_write_worker()
473 buffer_size = pcm_frames_to_bytes(pcm, buffer_frames); in out_write_worker()
483 int ret = pcm_write(pcm, buffer, pcm_frames_to_bytes(pcm, frames)); in out_write_worker()
485 ALOGE("pcm_write failed %s", pcm_get_error(pcm)); in out_write_worker()
980 struct pcm *pcm = NULL; in in_read_worker() local
991 if (pcm) { in in_read_worker()
992 pcm_close(pcm); // Frees pcm in in_read_worker()
993 pcm = NULL; in in_read_worker()
1013 if (!pcm) { in in_read_worker()
1014 pcm = pcm_open(PCM_CARD, PCM_DEVICE, in in_read_worker()
1016 if (!pcm_is_ready(pcm)) { in in_read_worker()
1018 pcm_get_error(pcm), in in_read_worker()
1027 buffer_size = pcm_frames_to_bytes(pcm, buffer_frames); in in_read_worker()
1036 int ret = pcm_read(pcm, buffer, pcm_frames_to_bytes(pcm, buffer_frames)); in in_read_worker()
1038 ALOGW("pcm_read failed %s", pcm_get_error(pcm)); in in_read_worker()