Lines Matching refs:musbPlaybackHandle

242         err = closeDevice(musbPlaybackHandle);  in exitPlaybackThread()
244 ALOGE("Info: Could not close USB device %p", musbPlaybackHandle); in exitPlaybackThread()
658 } else if (handle == musbPlaybackHandle) { in startDevice()
800 musbPlaybackHandle = configureDevice(PCM_OUT|PCM_STEREO|PCM_MMAP, (char *)"hw:1,0", in PlaybackThreadEntry()
802 if (!musbPlaybackHandle) { in PlaybackThreadEntry()
804 closeDevice(musbPlaybackHandle); in PlaybackThreadEntry()
811 pfdUsbPlayback[0].fd = musbPlaybackHandle->timer_fd; in PlaybackThreadEntry()
822 closeDevice(musbPlaybackHandle); in PlaybackThreadEntry()
829 usbPeriod = musbPlaybackHandle->period_size; in PlaybackThreadEntry()
841 int usbframes = (musbPlaybackHandle->flags & PCM_MONO) ? (usbPeriod / 2) : (usbPeriod / 4); in PlaybackThreadEntry()
858 if (!musbPlaybackHandle->running) { in PlaybackThreadEntry()
859 if (pcm_prepare(musbPlaybackHandle)) { in PlaybackThreadEntry()
950 if (!musbPlaybackHandle->running) { in PlaybackThreadEntry()
951 if (pcm_prepare(musbPlaybackHandle)) { in PlaybackThreadEntry()
958 musbPlaybackHandle->sync_ptr->flags = SNDRV_PCM_SYNC_PTR_APPL | in PlaybackThreadEntry()
961 err = syncPtr(musbPlaybackHandle, &mkillPlayBackThread); in PlaybackThreadEntry()
967 avail = pcm_avail(musbPlaybackHandle); in PlaybackThreadEntry()
971 if (avail < musbPlaybackHandle->sw_p->avail_min && !mkillPlayBackThread) { in PlaybackThreadEntry()
987 mdstUsb_addr = dst_address(musbPlaybackHandle); in PlaybackThreadEntry()
997 musbPlaybackHandle->sync_ptr->c.control.appl_ptr += usbframes; in PlaybackThreadEntry()
998 musbPlaybackHandle->sync_ptr->flags = 0; in PlaybackThreadEntry()
1000 err = syncPtr(musbPlaybackHandle, &mkillPlayBackThread); in PlaybackThreadEntry()
1008 …bytes_written = musbPlaybackHandle->sync_ptr->c.control.appl_ptr - musbPlaybackHandle->sync_ptr->s… in PlaybackThreadEntry()
1009 …("Appl ptr %d , hw_ptr %d, difference %d",musbPlaybackHandle->sync_ptr->c.control.appl_ptr, musbPl… in PlaybackThreadEntry()
1016 if (bytes_written <= usbPeriod && musbPlaybackHandle->start) { in PlaybackThreadEntry()
1017 ioctl(musbPlaybackHandle->fd, SNDRV_PCM_IOCTL_PAUSE,1); in PlaybackThreadEntry()
1018 pcm_prepare(musbPlaybackHandle); in PlaybackThreadEntry()
1019 musbPlaybackHandle->start = false; in PlaybackThreadEntry()
1022 …if ((bytes_written >= musbPlaybackHandle->sw_p->start_threshold) && (!musbPlaybackHandle->start)) { in PlaybackThreadEntry()
1024 err = startDevice(musbPlaybackHandle, &mkillPlayBackThread); in PlaybackThreadEntry()
1044 closeDevice(musbPlaybackHandle); in PlaybackThreadEntry()