Loading system/audio_a2dp_hw/audio_a2dp_hw.c +8 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ *****************************************************************************/ #include <errno.h> #include <inttypes.h> #include <pthread.h> #include <stdint.h> #include <sys/time.h> Loading @@ -47,7 +48,7 @@ #define LOG_TAG "audio_a2dp_hw" /* #define LOG_NDEBUG 0 */ #include <cutils/log.h> #include <log/log.h> /***************************************************************************** ** Constants & Macros Loading Loading @@ -443,7 +444,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; int sent; DEBUG("write %d bytes (fd %d)", bytes, out->audio_fd); DEBUG("write %zu bytes (fd %d)", bytes, out->audio_fd); if (out->state == AUDIO_A2DP_STATE_SUSPENDED) { Loading Loading @@ -488,7 +489,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, out->state = AUDIO_A2DP_STATE_STOPPED; } DEBUG("wrote %d bytes out of %d bytes", sent, bytes); DEBUG("wrote %d bytes out of %zu bytes", sent, bytes); return sent; } Loading @@ -497,7 +498,7 @@ static uint32_t out_get_sample_rate(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("rate %d", out->cfg.rate); DEBUG("rate %" PRIu32, out->cfg.rate); return out->cfg.rate; } Loading @@ -506,7 +507,7 @@ static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("out_set_sample_rate : %d", rate); DEBUG("out_set_sample_rate : %" PRIu32, rate); if (rate != AUDIO_STREAM_DEFAULT_RATE) { Loading @@ -523,7 +524,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("buffer_size : %d", out->buffer_sz); DEBUG("buffer_size : %zu", out->buffer_sz); return out->buffer_sz; } Loading @@ -532,7 +533,7 @@ static uint32_t out_get_channels(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("channels 0x%x", out->cfg.channel_flags); DEBUG("channels 0x%" PRIx32, out->cfg.channel_flags); return out->cfg.channel_flags; } Loading Loading
system/audio_a2dp_hw/audio_a2dp_hw.c +8 −7 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ *****************************************************************************/ #include <errno.h> #include <inttypes.h> #include <pthread.h> #include <stdint.h> #include <sys/time.h> Loading @@ -47,7 +48,7 @@ #define LOG_TAG "audio_a2dp_hw" /* #define LOG_NDEBUG 0 */ #include <cutils/log.h> #include <log/log.h> /***************************************************************************** ** Constants & Macros Loading Loading @@ -443,7 +444,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; int sent; DEBUG("write %d bytes (fd %d)", bytes, out->audio_fd); DEBUG("write %zu bytes (fd %d)", bytes, out->audio_fd); if (out->state == AUDIO_A2DP_STATE_SUSPENDED) { Loading Loading @@ -488,7 +489,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer, out->state = AUDIO_A2DP_STATE_STOPPED; } DEBUG("wrote %d bytes out of %d bytes", sent, bytes); DEBUG("wrote %d bytes out of %zu bytes", sent, bytes); return sent; } Loading @@ -497,7 +498,7 @@ static uint32_t out_get_sample_rate(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("rate %d", out->cfg.rate); DEBUG("rate %" PRIu32, out->cfg.rate); return out->cfg.rate; } Loading @@ -506,7 +507,7 @@ static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("out_set_sample_rate : %d", rate); DEBUG("out_set_sample_rate : %" PRIu32, rate); if (rate != AUDIO_STREAM_DEFAULT_RATE) { Loading @@ -523,7 +524,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("buffer_size : %d", out->buffer_sz); DEBUG("buffer_size : %zu", out->buffer_sz); return out->buffer_sz; } Loading @@ -532,7 +533,7 @@ static uint32_t out_get_channels(const struct audio_stream *stream) { struct a2dp_stream_out *out = (struct a2dp_stream_out *)stream; DEBUG("channels 0x%x", out->cfg.channel_flags); DEBUG("channels 0x%" PRIx32, out->cfg.channel_flags); return out->cfg.channel_flags; } Loading