hal: set proper bitwidth and format values
Set bitwidth as per the value in offloadInfo and
define the values of audio formats to be consistent
with those in audio.h.
Change-Id: I49a3355eb51a4ba2fdcef0e68482ee5078e7798a
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index 4271ef0..3286e6b 100755
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2897,7 +2897,7 @@
out->compr_config.codec->ch_in =
audio_channel_count_from_out_mask(config->channel_mask);
out->compr_config.codec->ch_out = out->compr_config.codec->ch_in;
- out->bit_width = PCM_OUTPUT_BIT_WIDTH;
+ out->bit_width = AUDIO_OUTPUT_BIT_WIDTH;
/*TODO: Do we need to change it for passthrough */
out->compr_config.codec->format = SND_AUDIOSTREAMFORMAT_RAW;
@@ -2913,7 +2913,7 @@
}
if (config->offload_info.format == AUDIO_FORMAT_FLAC)
- out->compr_config.codec->options.flac_dec.sample_size = PCM_OUTPUT_BIT_WIDTH;
+ out->compr_config.codec->options.flac_dec.sample_size = AUDIO_OUTPUT_BIT_WIDTH;
if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING)
out->non_blocking = 1;