Home | History | Annotate | Download | only in alsa_sound

Lines Matching refs:handle

364 status_t AudioUsbALSA::closeDevice(pcm *handle)
366 ALOGD("closeDevice handle %p", handle);
368 if (handle) {
369 err = pcm_close(handle);
374 handle = NULL;
592 struct pcm * handle = NULL;
593 handle = pcm_open(flags, hw);
594 if (!handle || handle->fd < 0) {
599 if (!pcm_ready(handle)) {
601 closeDevice(handle);
606 err = setHardwareParams(handle, sampleRate, channelCount,periodSize);
609 closeDevice(handle);
613 err = setSoftwareParams(handle, playback);
616 closeDevice(handle);
620 err = mmap_buffer(handle);
623 closeDevice(handle);
627 err = pcm_prepare(handle);
630 closeDevice(handle);
634 return handle;
637 status_t AudioUsbALSA::startDevice(pcm *handle, bool *killThread) {
639 if (ioctl(handle->fd, SNDRV_PCM_IOCTL_START)) {
643 handle->underruns++;
644 handle->running = 0;
645 handle->start = 0;
653 handle->start = 1;
654 if (handle == musbRecordingHandle) {
656 } else if (handle == mproxyRecordingHandle) {
658 } else if (handle == musbPlaybackHandle) {
660 } else if (handle == mproxyPlaybackHandle) {
666 status_t AudioUsbALSA::syncPtr(struct pcm *handle, bool *killThread) {
668 err = sync_ptr(handle);
671 handle->running = 0;
672 handle->underruns++;
673 handle->start = 0;