hal: configure playback stream rendering based on output policy

For the usecases where individual streams have to be rendered
through different post processing chain on DSP an output policy
is defined. The output configuration is read from the
output policy file based on the stream atrributes to render the
playback appropriately.

Change-Id: I095592013ffa5b04bea69254026ebb78e2934822
diff --git a/hal/audio_hw.h b/hal/audio_hw.h
index 3f780d3..7d8d924 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -152,6 +152,12 @@
     int data[];
 };
 
+struct stream_app_type_cfg {
+    int sample_rate;
+    int bit_width;
+    int app_type;
+};
+
 struct stream_out {
     struct audio_stream_out stream;
     pthread_mutex_t lock; /* see note below on mutex acquisition order */
@@ -173,6 +179,7 @@
     bool muted;
     uint64_t written; /* total frames written, not cleared when entering standby */
     audio_io_handle_t handle;
+    struct stream_app_type_cfg app_type_cfg;
 
     int non_blocking;
     int playback_started;
@@ -238,6 +245,18 @@
     int state;
 };
 
+struct stream_format {
+    struct listnode list;
+    audio_format_t format;
+};
+
+struct streams_output_cfg {
+    struct listnode list;
+    audio_output_flags_t flags;
+    struct listnode format_list;
+    struct stream_app_type_cfg app_type_cfg;
+};
+
 struct audio_device {
     struct audio_hw_device device;
     pthread_mutex_t lock; /* see note below on mutex acquisition order */
@@ -250,6 +269,7 @@
     bool screen_off;
     int *snd_dev_ref_cnt;
     struct listnode usecase_list;
+    struct listnode streams_output_cfg_list;
     struct audio_route *audio_route;
     int acdb_settings;
     bool speaker_lr_swap;