hal: Audio HAL / APM changes for HDMI passthrough

-Add support for HDMI passthrough for DD/DDP contents to HAL and
 APM.
-Add mixer control to set volume on volume module on passthrough
 COPP. The mixer control  takes zero volume for mute and unity
 volume for max volume.
-DDP content requires sample rate to be four times native sample
 rate. HAL sample rate is changed to four times native rate from
 start output stream. During rapid pause/resume offload thread
 calls standby when there is no active track and no activity for
 over a second. On resume start output steam is called and
 sample rate is converted to four times its current value.
 This results in session to be started with invalid sampling
 rate and playback failures.
-Add HDMI passthrough support for JOC format.
 Expose DDP/JOC as pass-through supported format if sink
 supports either DD or DDP. This is to allow support for
 pass-through convert based on edid data.
-Deep buffer music stream does not switch back to HDMI after
 ringtone playback ends. Ringtone, alarm, notification etc are
 played on speaker if HDMI pass-through is enabled. The
 decision is taken based on stream or strategy. The decision
 to change the device from HDMI to speaker is taken based on
 the stream type. When a patricular stream ends use the
 reference count instead of stream type.
-DAP is not turned on when switching from passthrough stream to
 deep buffer stream.DAP bypass call from HAL to DAP HAL expects
 integer pointer. Address of a bool variable is passed into the
 function. Corrupt value is set on driver instead of turn on/off
 causing random failures in DAP on/DAP bypass. Use same data type
 and use enumeration to make the function call readable.

CRs-Fixed: 761339
Change-Id: Ided9439ec5e87233a1fec3ff9f50a1e9ba4cb788
10 files changed