audiopolicy: Add AudioSessionInfo API

 * This patch introduces a new API which allows applications to
   query the state of the audio effects system, and receive
   callbacks with the necessary information to attach effects
   to any stream.
 * In the future, this may come as part of the AudioPort system,
   but since that's an active area of development by Google, we
   will dodge it for now.
 * The policy now simply keeps a refcounted list of objects which
   hold various bits of stream metadata. Callbacks are sent on
   stream open/close to applications which might be listening
   for them.

Change-Id: I2d554d36e1378f4eb7b276010a3bfe8345c22ecd

audiopolicy: Constrain session events to music streams

 * We're really only interested in music streams right now, but
   events are being generated for all streams (system sounds, etc).
 * Constrain for now, in the future we will filter based on client
   registrations.

Change-Id: Ic445052028c454eed146addebcdb28c4b26c4f20

Author: Zhao Wei Liew <zhaoweiliew@gmail.com>
audiopolicy: Use audio_session_t consistently for AudioSessionInfo

In N, the usage of audio_session_t was made more consistent in the
commit d848eb48c121c119e8ba7583efc75415fe102570.

Do the same for the AudioSessionInfo API.

Change-Id: I8732225ec6788777e7be9ed42f2ca4002af47c3b

Author: Luca Stefani <luca.stefani.ge1@gmail.com>
Date:   Thu Apr 2 18:11:25 2020 +0200

    Adapt session API for newly added AudioPolicyService code

    Co-authored-by: Demon000 <demonsingur@gmail.com>
    Change-Id: Ie74a5cd0ecc7b097fe94b29ef6cc3a89d189aad5

[mikeioannina]: Update for Oreo
[bgcngm]: Update for Pie
[sam3000]: Update for 10
[LuK1337]: Update for 11

Change-Id: I2d554d36e1378f4eb7b276010a3bfe8345c22ecd
16 files changed