hal: Fix policy conf parser for FLAC playback on multiple sample rate

-Apptype update for FLAC format fails as it is not listed as
supported format. By adding AUDIO_FORMAT_FLAC, corresponding apptype
is selected which enables correct audio_output profile.
-During config structure population, add logic to identify output
profile according to sampling rate in addition to format and flag.
-Currently, output policy parser sends mixer command containing
acdb id and app type only. As a result, adm opens at only one fixed
sampling rate. By sending sample rate, it enables adm open at
appropriate sample rate obtained from audio output policy conf file.

Change-Id: I014e1c139f7905d799003add43e1b74715c4367d
diff --git a/hal/audio_hw.c b/hal/audio_hw.c
index c394391..3d53df0 100644
--- a/hal/audio_hw.c
+++ b/hal/audio_hw.c
@@ -2489,7 +2489,8 @@
             out->compr_config.codec->format = SNDRV_PCM_FORMAT_S16_LE;
         }
 
-        out->compr_config.codec->options.flac_dec.sample_size = out->bit_width;
+        if (config->offload_info.format == AUDIO_FORMAT_FLAC)
+            out->compr_config.codec->options.flac_dec.sample_size = config->offload_info.bit_width;
 
         if (flags & AUDIO_OUTPUT_FLAG_NON_BLOCKING)
             out->non_blocking = 1;
@@ -2527,7 +2528,8 @@
 
     audio_extn_utils_update_stream_app_type_cfg(adev->platform,
                                                 &adev->streams_output_cfg_list,
-                                                flags, format, &out->app_type_cfg);
+                                                flags, format, out->sample_rate,
+                                                out->bit_width, &out->app_type_cfg);
     if ((out->usecase == USECASE_AUDIO_PLAYBACK_PRIMARY) ||
         (flags & AUDIO_OUTPUT_FLAG_PRIMARY)) {
         /* Ensure the default output is not selected twice */