Loading hal/audio_hw.c +9 −1 Original line number Diff line number Diff line Loading @@ -1746,6 +1746,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, } ret = compress_write(out->compr, buffer, bytes); if (ret < 0) ret = -errno; ALOGVV("%s: writing buffer (%d bytes) to compress device returned %d", __func__, bytes, ret); if (ret >= 0 && ret < (ssize_t)bytes) { send_offload_cmd_l(out, OFFLOAD_CMD_WAIT_FOR_BUFFER); Loading @@ -1772,7 +1774,9 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, ret = pcm_mmap_write(out->pcm, (void *)buffer, bytes); else ret = pcm_write(out->pcm, (void *)buffer, bytes); if (ret == 0) if (ret < 0) ret = -errno; else if (ret == 0) out->written += bytes / (out->config.channels * sizeof(short)); } } Loading Loading @@ -1814,6 +1818,8 @@ static int out_get_render_position(const struct audio_stream_out *stream, if (out->compr != NULL) { ret = compress_get_tstamp(out->compr, (unsigned long *)dsp_frames, &out->sample_rate); if (ret < 0) ret = -errno; ALOGVV("%s rendered frames %d sample_rate %d", __func__, *dsp_frames, out->sample_rate); } Loading Loading @@ -2188,6 +2194,8 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, ret = pcm_mmap_read(in->pcm, buffer, bytes); else ret = pcm_read(in->pcm, buffer, bytes); if (ret < 0) ret = -errno; } /* Loading Loading
hal/audio_hw.c +9 −1 Original line number Diff line number Diff line Loading @@ -1746,6 +1746,8 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, } ret = compress_write(out->compr, buffer, bytes); if (ret < 0) ret = -errno; ALOGVV("%s: writing buffer (%d bytes) to compress device returned %d", __func__, bytes, ret); if (ret >= 0 && ret < (ssize_t)bytes) { send_offload_cmd_l(out, OFFLOAD_CMD_WAIT_FOR_BUFFER); Loading @@ -1772,7 +1774,9 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer, ret = pcm_mmap_write(out->pcm, (void *)buffer, bytes); else ret = pcm_write(out->pcm, (void *)buffer, bytes); if (ret == 0) if (ret < 0) ret = -errno; else if (ret == 0) out->written += bytes / (out->config.channels * sizeof(short)); } } Loading Loading @@ -1814,6 +1818,8 @@ static int out_get_render_position(const struct audio_stream_out *stream, if (out->compr != NULL) { ret = compress_get_tstamp(out->compr, (unsigned long *)dsp_frames, &out->sample_rate); if (ret < 0) ret = -errno; ALOGVV("%s rendered frames %d sample_rate %d", __func__, *dsp_frames, out->sample_rate); } Loading Loading @@ -2188,6 +2194,8 @@ static ssize_t in_read(struct audio_stream_in *stream, void *buffer, ret = pcm_mmap_read(in->pcm, buffer, bytes); else ret = pcm_read(in->pcm, buffer, bytes); if (ret < 0) ret = -errno; } /* Loading