Audio: Rearrange types in V7

Update channel mask and SR lists to conform to XSD.
Added a script for converting existing APM XML files.

Bug: 142480271
Test: m
Change-Id: I986b9bccdade5fa850b06b033143388715a656af
diff --git a/audio/effect/7.0/IEffect.hal b/audio/effect/7.0/IEffect.hal
index 5b176dc..aa94f6d 100644
--- a/audio/effect/7.0/IEffect.hal
+++ b/audio/effect/7.0/IEffect.hal
@@ -56,7 +56,6 @@
      *
      * @return retval operation completion status.
      */
-    @callflow(next={"prepareForProcessing"})
     enable() generates (Result retval);
 
     /**
@@ -64,7 +63,6 @@
      *
      * @return retval operation completion status.
      */
-    @callflow(next={"close"})
     disable() generates (Result retval);
 
     /**
@@ -78,7 +76,7 @@
      * @param device output device specification.
      * @return retval operation completion status.
      */
-    setDevice(bitfield<AudioDevice> device) generates (Result retval);
+    setDevice(DeviceAddress device) generates (Result retval);
 
     /**
      * Set and get volume. Used by audio framework to delegate volume control to
@@ -147,7 +145,7 @@
      * @param device input device specification.
      * @return retval operation completion status.
      */
-    setInputDevice(bitfield<AudioDevice> device) generates (Result retval);
+    setInputDevice(DeviceAddress device) generates (Result retval);
 
     /**
      * Read audio parameters configurations for input and output buffers.
@@ -251,7 +249,6 @@
      *                                  the queue.
      * @return statusMQ a message queue used for passing status from the effect.
      */
-    @callflow(next={"setProcessBuffers"})
     prepareForProcessing() generates (Result retval, fmq_sync<Result> statusMQ);
 
     /**
@@ -416,6 +413,5 @@
      * @return retval OK in case the success.
      *                INVALID_STATE if the effect was already closed.
      */
-    @exit
     close() generates (Result retval);
 };
diff --git a/audio/effect/7.0/IVirtualizerEffect.hal b/audio/effect/7.0/IVirtualizerEffect.hal
index 0e6ff54..141b4e6 100644
--- a/audio/effect/7.0/IVirtualizerEffect.hal
+++ b/audio/effect/7.0/IVirtualizerEffect.hal
@@ -48,7 +48,7 @@
 
     struct SpeakerAngle {
         /** Speaker channel mask */
-        bitfield<AudioChannelMask> mask;
+        vec<AudioChannelMask> mask;
         // all angles are expressed in degrees and
         // are relative to the listener.
         int16_t azimuth; // 0 is the direction the listener faces
@@ -61,17 +61,17 @@
      * Retrieves virtual speaker angles for the given channel mask on the
      * specified device.
      */
-    getVirtualSpeakerAngles(bitfield<AudioChannelMask> mask, AudioDevice device)
+    getVirtualSpeakerAngles(vec<AudioChannelMask> mask, DeviceAddress device)
             generates (Result retval, vec<SpeakerAngle> speakerAngles);
 
     /**
      * Forces the virtualizer effect for the given output device.
      */
-    forceVirtualizationMode(AudioDevice device) generates (Result retval);
+    forceVirtualizationMode(DeviceAddress device) generates (Result retval);
 
     /**
      * Returns audio device reflecting the current virtualization mode,
-     * AUDIO_DEVICE_NONE when not virtualizing.
+     * Device type can be empty when not virtualizing.
      */
-    getVirtualizationMode() generates (Result retval, AudioDevice device);
+    getVirtualizationMode() generates (Result retval, DeviceAddress device);
 };
diff --git a/audio/effect/7.0/types.hal b/audio/effect/7.0/types.hal
index 7f5a382..fe4ee51 100644
--- a/audio/effect/7.0/types.hal
+++ b/audio/effect/7.0/types.hal
@@ -257,7 +257,7 @@
 struct EffectBufferConfig {
     AudioBuffer buffer;
     uint32_t samplingRateHz;
-    bitfield<AudioChannelMask> channels;
+    AudioChannelMask channels;
     AudioFormat format;
     EffectBufferAccess accessMode;
     bitfield<EffectConfigParameters> mask;
@@ -276,8 +276,8 @@
 };
 
 struct EffectAuxChannelsConfig {
-    bitfield<AudioChannelMask> mainChannels;  // channel mask for main channels
-    bitfield<AudioChannelMask> auxChannels;   // channel mask for auxiliary channels
+    vec<AudioChannelMask> mainChannels;  // channel mask for main channels
+    vec<AudioChannelMask> auxChannels;   // channel mask for auxiliary channels
 };
 
 struct EffectOffloadParameter {