Merge "hal: send additional param for gapless flac"

This commit is contained in:
Linux Build Service Account 2015-02-10 02:30:04 -08:00 committed by Gerrit - the friendly Code Review server
commit c090660fdb
1 changed files with 4 additions and 0 deletions

View File

@ -1738,6 +1738,8 @@ static int parse_compress_metadata(struct stream_out *out, struct str_parms *par
struct compr_gapless_mdata tmp_mdata;
tmp_mdata.encoder_delay = 0;
tmp_mdata.encoder_padding = 0;
tmp_mdata.min_blk_size = 0;
tmp_mdata.max_blk_size = 0;
if (!out || !parms) {
ALOGE("%s: return invalid ",__func__);
@ -1756,11 +1758,13 @@ static int parse_compress_metadata(struct stream_out *out, struct str_parms *par
if (out->format == AUDIO_FORMAT_FLAC) {
ret = str_parms_get_str(parms, AUDIO_OFFLOAD_CODEC_FLAC_MIN_BLK_SIZE, value, sizeof(value));
if (ret >= 0) {
tmp_mdata.min_blk_size =
out->compr_config.codec->options.flac_dec.min_blk_size = atoi(value);
out->send_new_metadata = 1;
}
ret = str_parms_get_str(parms, AUDIO_OFFLOAD_CODEC_FLAC_MAX_BLK_SIZE, value, sizeof(value));
if (ret >= 0) {
tmp_mdata.max_blk_size =
out->compr_config.codec->options.flac_dec.max_blk_size = atoi(value);
out->send_new_metadata = 1;
}