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.h b/hal/audio_hw.h
index f1ceedc..f6a00c8 100644
--- a/hal/audio_hw.h
+++ b/hal/audio_hw.h
@@ -244,10 +244,16 @@
audio_format_t format;
};
+struct stream_sample_rate {
+ struct listnode list;
+ uint32_t sample_rate;
+};
+
struct streams_output_cfg {
struct listnode list;
audio_output_flags_t flags;
struct listnode format_list;
+ struct listnode sample_rate_list;
struct stream_app_type_cfg app_type_cfg;
};