diff options
author | Misael Lopez Cruz | 2013-10-22 23:45:12 -0500 |
---|---|---|
committer | Misael Lopez Cruz | 2013-10-23 14:47:55 -0500 |
commit | 8998f381f3a073c00c7eed64d7423a548ed4faca (patch) | |
tree | 3646ecdb5f4a29086ede6fe2bd4311a3d164b71d | |
parent | 050dd03d3f3128433ec2a9f023a7085c6a9dc16c (diff) | |
download | device-ti-common-open-8998f381f3a073c00c7eed64d7423a548ed4faca.tar.gz device-ti-common-open-8998f381f3a073c00c7eed64d7423a548ed4faca.tar.xz device-ti-common-open-8998f381f3a073c00c7eed64d7423a548ed4faca.zip |
audio: hdmi: More descriptive write error messages
Add more descriptive messages for write errors can be caused by
the PCM write itself or PCM device open failures.
Change-Id: I0eaafa0feb170ce369515fd19bee125270ba8019
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
-rw-r--r-- | audio/hdmi_audio_hw.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/audio/hdmi_audio_hw.c b/audio/hdmi_audio_hw.c index afde5ac..2e8cb49 100644 --- a/audio/hdmi_audio_hw.c +++ b/audio/hdmi_audio_hw.c | |||
@@ -404,11 +404,8 @@ ssize_t hdmi_out_write(struct audio_stream_out *stream, const void* buffer, | |||
404 | } | 404 | } |
405 | exit: | 405 | exit: |
406 | if (ret != 0) { | 406 | if (ret != 0) { |
407 | if (out->pcm) { | 407 | ALOGE("Error writing to HDMI pcm: %s", |
408 | ALOGE("Error writing to HDMI pcm: %s", pcm_get_error(out->pcm)); | 408 | out->pcm ? pcm_get_error(out->pcm) : "failed to open PCM device"); |
409 | } else { | ||
410 | ALOGE("Error: pcm == 0, err = %d", ret); | ||
411 | } | ||
412 | hdmi_out_standby((struct audio_stream*)stream); | 409 | hdmi_out_standby((struct audio_stream*)stream); |
413 | unsigned int usecs = bytes * 1000000 / | 410 | unsigned int usecs = bytes * 1000000 / |
414 | audio_stream_frame_size((struct audio_stream*)stream) / | 411 | audio_stream_frame_size((struct audio_stream*)stream) / |