hardware/libaudio
リビジョン | 5ead7ae2b30990fbcca1672ec7d77c2117720190 (tree) |
---|---|
日時 | 2015-01-20 12:45:11 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
コミッター | Chih-Wei Huang |
improve the log
@@ -729,7 +729,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, | ||
729 | 729 | break; |
730 | 730 | total_sleep_time_us += sleep_time_us; |
731 | 731 | if (total_sleep_time_us > MAX_WRITE_SLEEP_US) { |
732 | - ALOGW("out_write() limiting sleep time %d to %d", | |
732 | + ALOGV("out_write() limiting sleep time %d to %d", | |
733 | 733 | total_sleep_time_us, MAX_WRITE_SLEEP_US); |
734 | 734 | sleep_time_us = MAX_WRITE_SLEEP_US - |
735 | 735 | (total_sleep_time_us - sleep_time_us); |
@@ -769,6 +769,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, | ||
769 | 769 | if (ret == -EPIPE) { |
770 | 770 | /* In case of underrun, don't sleep since we want to catch up asap */ |
771 | 771 | pthread_mutex_unlock(&out->lock); |
772 | + ALOGW("out_write underrun: %d", ret); | |
772 | 773 | return ret; |
773 | 774 | } |
774 | 775 |
@@ -776,6 +777,7 @@ exit: | ||
776 | 777 | pthread_mutex_unlock(&out->lock); |
777 | 778 | |
778 | 779 | if (ret != 0) { |
780 | + ALOGW("out_write error: %d, sleeping...", ret); | |
779 | 781 | usleep(bytes * 1000000 / audio_stream_frame_size(&stream->common) / |
780 | 782 | out_get_sample_rate(&stream->common)); |
781 | 783 | } |