Convert all comments into "doxygen-ready" comments.

Bug: 36453077
Test: mma
Change-Id: I0b1f77dfae5d2258969e33d85ecf45401ffbdfaa
diff --git a/audio/2.0/IDevice.hal b/audio/2.0/IDevice.hal
index 2b5329b..62c2081 100644
--- a/audio/2.0/IDevice.hal
+++ b/audio/2.0/IDevice.hal
@@ -23,14 +23,14 @@
 interface IDevice {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Returns whether the audio hardware interface has been initialized.
      *
      * @return retval OK on success, NOT_INITIALIZED on failure.
      */
     initCheck() generates (Result retval);
 
-    /*
+    /**
      * Sets the audio volume for all audio activities other than voice call. If
      * NOT_SUPPORTED is returned, the software mixer will emulate this
      * capability.
@@ -40,7 +40,7 @@
      */
     setMasterVolume(float volume) generates (Result retval);
 
-    /*
+    /**
      * Get the current master volume value for the HAL, if the HAL supports
      * master volume control. For example, AudioFlinger will query this value
      * from the primary audio HAL when the service starts and use the value for
@@ -52,7 +52,7 @@
      */
     getMasterVolume() generates (Result retval, float volume);
 
-    /*
+    /**
      * Sets microphone muting state.
      *
      * @param mute whether microphone is muted.
@@ -60,7 +60,7 @@
      */
     setMicMute(bool mute) generates (Result retval);
 
-    /*
+    /**
      * Gets whether microphone is muted.
      *
      * @return retval operation completion status.
@@ -68,7 +68,7 @@
      */
     getMicMute() generates (Result retval, bool mute);
 
-    /*
+    /**
      * Set the audio mute status for all audio activities. If the return value
      * is NOT_SUPPORTED, the software mixer will emulate this capability.
      *
@@ -89,7 +89,7 @@
      */
     getMasterMute() generates (Result retval, bool mute);
 
-    /*
+    /**
      * Returns audio input buffer size according to parameters passed or
      * INVALID_ARGUMENTS if one of the parameters is not supported.
      *
@@ -100,7 +100,7 @@
     getInputBufferSize(AudioConfig config)
             generates (Result retval, uint64_t bufferSize);
 
-    /*
+    /**
      * This method creates and opens the audio hardware output stream.
      * If the stream can not be opened with the proposed audio config,
      * HAL must provide suggested values for the audio config.
@@ -122,7 +122,7 @@
                     IStreamOut outStream,
                     AudioConfig suggestedConfig);
 
-    /*
+    /**
      * This method creates and opens the audio hardware input stream.
      * If the stream can not be opened with the proposed audio config,
      * HAL must provide suggested values for the audio config.
@@ -146,14 +146,14 @@
                     IStreamIn inStream,
                     AudioConfig suggestedConfig);
 
-    /*
+    /**
      * Returns whether HAL supports audio patches.
      *
      * @return supports true if audio patches are supported.
      */
     supportsAudioPatches() generates (bool supports);
 
-    /*
+    /**
      * Creates an audio patch between several source and sink ports.  The handle
      * is allocated by the HAL and must be unique for this audio HAL module.
      *
@@ -165,7 +165,7 @@
     createAudioPatch(vec<AudioPortConfig> sources, vec<AudioPortConfig> sinks)
             generates (Result retval, AudioPatchHandle patch);
 
-    /*
+    /**
      * Release an audio patch.
      *
      * @param patch patch handle.
@@ -173,7 +173,7 @@
      */
     releaseAudioPatch(AudioPatchHandle patch) generates (Result retval);
 
-    /*
+    /**
      * Returns the list of supported attributes for a given audio port.
      *
      * As input, 'port' contains the information (type, role, address etc...)
@@ -189,7 +189,7 @@
     getAudioPort(AudioPort port)
             generates (Result retval, AudioPort resultPort);
 
-    /*
+    /**
      * Set audio port configuration.
      *
      * @param config audio port configuration.
@@ -197,7 +197,7 @@
      */
     setAudioPortConfig(AudioPortConfig config) generates (Result retval);
 
-    /*
+    /**
      * Gets the HW synchronization source of the device. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_HW_AV_SYNC on the legacy HAL.
      *
@@ -205,7 +205,7 @@
      */
     getHwAvSync() generates (AudioHwSync hwAvSync);
 
-    /*
+    /**
      * Sets whether the screen is on. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_KEY_SCREEN_STATE on the legacy HAL.
      *
@@ -214,7 +214,7 @@
      */
     setScreenState(bool turnedOn) generates (Result retval);
 
-    /*
+    /**
      * Generic method for retrieving vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -226,7 +226,7 @@
     getParameters(vec<string> keys)
             generates (Result retval, vec<ParameterValue> parameters);
 
-    /*
+    /**
      * Generic method for setting vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -236,7 +236,7 @@
      */
     setParameters(vec<ParameterValue> parameters) generates (Result retval);
 
-    /*
+    /**
      * Dumps information about the stream into the provided file descriptor.
      * This is used for the dumpsys facility.
      *
diff --git a/audio/2.0/IDevicesFactory.hal b/audio/2.0/IDevicesFactory.hal
index 0ef6bc5..6bbe7a1 100644
--- a/audio/2.0/IDevicesFactory.hal
+++ b/audio/2.0/IDevicesFactory.hal
@@ -30,7 +30,7 @@
         STUB
     };
 
-    /*
+    /**
      * Opens an audio device. To close the device, it is necessary to release
      * references to the returned device object.
      *
diff --git a/audio/2.0/IPrimaryDevice.hal b/audio/2.0/IPrimaryDevice.hal
index f1dd56e..adeb366 100644
--- a/audio/2.0/IPrimaryDevice.hal
+++ b/audio/2.0/IPrimaryDevice.hal
@@ -22,7 +22,7 @@
 interface IPrimaryDevice extends IDevice {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Sets the audio volume of a voice call.
      *
      * @param volume 1.0f means unity, 0.0f is zero.
@@ -30,7 +30,7 @@
      */
     setVoiceVolume(float volume) generates (Result retval);
 
-    /*
+    /**
      * This method is used to notify the HAL about audio mode changes.
      *
      * @param mode new mode.
@@ -38,7 +38,7 @@
      */
     setMode(AudioMode mode) generates (Result retval);
 
-    /*
+    /**
      * Gets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
      * Calling this method is equivalent to getting AUDIO_PARAMETER_KEY_BT_NREC
      * on the legacy HAL.
@@ -48,7 +48,7 @@
      */
     getBtScoNrecEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether BT SCO Noise Reduction and Echo Cancellation are enabled.
      * Calling this method is equivalent to setting AUDIO_PARAMETER_KEY_BT_NREC
      * on the legacy HAL.
@@ -58,7 +58,7 @@
      */
     setBtScoNrecEnabled(bool enabled) generates (Result retval);
 
-    /*
+    /**
      * Gets whether BT SCO Wideband mode is enabled. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
      *
@@ -67,7 +67,7 @@
      */
     getBtScoWidebandEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether BT SCO Wideband mode is enabled. Calling this method is
      * equivalent to setting AUDIO_PARAMETER_KEY_BT_SCO_WB on the legacy HAL.
      *
@@ -83,7 +83,7 @@
         FULL
     };
 
-    /*
+    /**
      * Gets current TTY mode selection. Calling this method is equivalent to
      * getting AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
      *
@@ -92,7 +92,7 @@
      */
     getTtyMode() generates (Result retval, TtyMode mode);
 
-    /*
+    /**
      * Sets current TTY mode. Calling this method is equivalent to setting
      * AUDIO_PARAMETER_KEY_TTY_MODE on the legacy HAL.
      *
@@ -101,7 +101,7 @@
      */
     setTtyMode(TtyMode mode) generates (Result retval);
 
-    /*
+    /**
      * Gets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
      * enabled. Calling this method is equivalent to getting
      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
@@ -111,7 +111,7 @@
      */
     getHacEnabled() generates (Result retval, bool enabled);
 
-    /*
+    /**
      * Sets whether Hearing Aid Compatibility - Telecoil (HAC-T) mode is
      * enabled. Calling this method is equivalent to setting
      * AUDIO_PARAMETER_KEY_HAC on the legacy HAL.
diff --git a/audio/2.0/IStream.hal b/audio/2.0/IStream.hal
index 8de7851..2b9cc06 100644
--- a/audio/2.0/IStream.hal
+++ b/audio/2.0/IStream.hal
@@ -22,14 +22,14 @@
 interface IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Return the frame size (number of bytes per sample).
      *
      * @return frameSize frame size in bytes.
      */
     getFrameSize() generates (uint64_t frameSize);
 
-    /*
+    /**
      * Return the frame count of the buffer. Calling this method is equivalent
      * to getting AUDIO_PARAMETER_STREAM_FRAME_COUNT on the legacy HAL.
      *
@@ -37,7 +37,7 @@
      */
     getFrameCount() generates (uint64_t count);
 
-    /*
+    /**
      * Return the size of input/output buffer in bytes for this stream.
      * It must be a multiple of the frame size.
      *
@@ -45,14 +45,14 @@
      */
     getBufferSize() generates (uint64_t bufferSize);
 
-    /*
+    /**
      * Return the sampling rate in Hz.
      *
      * @return sampleRateHz sample rate in Hz.
      */
     getSampleRate() generates (uint32_t sampleRateHz);
 
-    /*
+    /**
      * Return supported sampling rates of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES on the
      * legacy HAL.
@@ -61,7 +61,7 @@
      */
     getSupportedSampleRates() generates (vec<uint32_t> sampleRates);
 
-    /*
+    /**
      * Sets the sampling rate of the stream. Calling this method is equivalent
      * to setting AUDIO_PARAMETER_STREAM_SAMPLING_RATE on the legacy HAL.
      *
@@ -70,14 +70,14 @@
      */
     setSampleRate(uint32_t sampleRateHz) generates (Result retval);
 
-    /*
+    /**
      * Return the channel mask of the stream.
      *
      * @return mask channel mask.
      */
     getChannelMask() generates (AudioChannelMask mask);
 
-    /*
+    /**
      * Return supported channel masks of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_CHANNELS on the legacy
      * HAL.
@@ -86,7 +86,7 @@
      */
     getSupportedChannelMasks() generates (vec<AudioChannelMask> masks);
 
-    /*
+    /**
      * Sets the channel mask of the stream. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_CHANNELS on the legacy HAL.
      *
@@ -95,14 +95,14 @@
      */
     setChannelMask(AudioChannelMask mask) generates (Result retval);
 
-    /*
+    /**
      * Return the audio format of the stream.
      *
      * @return format audio format.
      */
     getFormat() generates (AudioFormat format);
 
-    /*
+    /**
      * Return supported audio formats of the stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_SUP_FORMATS on the legacy
      * HAL.
@@ -111,7 +111,7 @@
      */
     getSupportedFormats() generates (vec<AudioFormat> formats);
 
-    /*
+    /**
      * Sets the audio format of the stream. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_FORMAT on the legacy HAL.
      *
@@ -120,7 +120,7 @@
      */
     setFormat(AudioFormat format) generates (Result retval);
 
-    /*
+    /**
      * Convenience method for retrieving several stream parameters in
      * one transaction.
      *
@@ -131,7 +131,7 @@
     getAudioProperties() generates (
             uint32_t sampleRateHz, AudioChannelMask mask, AudioFormat format);
 
-    /*
+    /**
      * Applies audio effect to the stream.
      *
      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
@@ -140,7 +140,7 @@
      */
     addEffect(uint64_t effectId) generates (Result retval);
 
-    /*
+    /**
      * Stops application of the effect to the stream.
      *
      * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
@@ -149,7 +149,7 @@
      */
     removeEffect(uint64_t effectId) generates (Result retval);
 
-    /*
+    /**
      * Put the audio hardware input/output into standby mode.
      * Driver must exit from standby mode at the next I/O operation.
      *
@@ -157,14 +157,14 @@
      */
     standby() generates (Result retval);
 
-    /*
+    /**
      * Return the set of device(s) which this stream is connected to.
      *
      * @return device set of device(s) which this stream is connected to.
      */
     getDevice() generates (AudioDevice device);
 
-    /*
+    /**
      * Connects the stream to the device.
      *
      * This method must only be used for HALs that do not support
@@ -177,7 +177,7 @@
      */
     setDevice(DeviceAddress address) generates (Result retval);
 
-    /*
+    /**
      * Notifies the stream about device connection state. Calling this method is
      * equivalent to setting AUDIO_PARAMETER_DEVICE_[DIS]CONNECT on the legacy
      * HAL.
@@ -189,7 +189,7 @@
     setConnectedState(DeviceAddress address, bool connected)
             generates (Result retval);
 
-    /*
+    /**
      * Sets the HW synchronization source. Calling this method is equivalent to
      * setting AUDIO_PARAMETER_STREAM_HW_AV_SYNC on the legacy HAL.
      *
@@ -198,7 +198,7 @@
      */
     setHwAvSync(AudioHwSync hwAvSync) generates (Result retval);
 
-    /*
+    /**
      * Generic method for retrieving vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -210,7 +210,7 @@
     getParameters(vec<string> keys)
             generates (Result retval, vec<ParameterValue> parameters);
 
-    /*
+    /**
      * Generic method for setting vendor-specific parameter values.
      * The framework does not interpret the parameters, they are passed
      * in an opaque manner between a vendor application and HAL.
@@ -220,7 +220,7 @@
      */
     setParameters(vec<ParameterValue> parameters) generates (Result retval);
 
-    /*
+    /**
      * Dumps information about the stream into the provided file descriptor.
      * This is used for the dumpsys facility.
      *
@@ -228,7 +228,7 @@
      */
     debugDump(handle fd);
 
-    /*
+    /**
      * Called by the framework to start a stream operating in mmap mode.
      * createMmapBuffer() must be called before calling start().
      * Function only implemented by streams operating in mmap mode.
@@ -249,7 +249,7 @@
      */
     stop() generates (Result retval) ;
 
-    /*
+    /**
      * Called by the framework to retrieve information on the mmap buffer used for audio
      * samples transfer.
      * Function only implemented by streams operating in mmap mode.
@@ -266,7 +266,7 @@
     createMmapBuffer(int32_t minSizeFrames)
             generates (Result retval, MmapBufferInfo info);
 
-    /*
+    /**
      * Called by the framework to read current read/write position in the mmap buffer
      * with associated time stamp.
      * Function only implemented by streams operating in mmap mode.
@@ -280,7 +280,7 @@
     getMmapPosition()
             generates (Result retval, MmapPosition position);
 
-    /*
+    /**
      * Called by the framework to deinitialize the stream and free up
      * all the currently allocated resources. It is recommended to close
      * the stream on the client side as soon as it is becomes unused.
diff --git a/audio/2.0/IStreamIn.hal b/audio/2.0/IStreamIn.hal
index 6f1f9df..6b79f48 100644
--- a/audio/2.0/IStreamIn.hal
+++ b/audio/2.0/IStreamIn.hal
@@ -22,7 +22,7 @@
 interface IStreamIn extends IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Returns the source descriptor of the input stream. Calling this method is
      * equivalent to getting AUDIO_PARAMETER_STREAM_INPUT_SOURCE on the legacy
      * HAL.
@@ -32,7 +32,7 @@
      */
     getAudioSource() generates (Result retval, AudioSource source);
 
-    /*
+    /**
      * Set the input gain for the audio driver.
      *
      * @param gain 1.0f is unity, 0.0f is zero.
@@ -40,7 +40,7 @@
      */
     setGain(float gain) generates (Result retval);
 
-    /*
+    /**
      * Commands that can be executed on the driver reader thread.
      */
     enum ReadCommand : int32_t {
@@ -48,7 +48,7 @@
         GET_CAPTURE_POSITION
     };
 
-    /*
+    /**
      * Data structure passed to the driver for executing commands
      * on the driver reader thread.
      */
@@ -60,7 +60,7 @@
         } params;
     };
 
-    /*
+    /**
      * Data structure passed back to the client via status message queue
      * of 'read' operation.
      *
@@ -81,7 +81,7 @@
         } reply;
     };
 
-    /*
+    /**
      * Set up required transports for receiving audio buffers from the driver.
      *
      * The transport consists of three message queues:
@@ -119,7 +119,7 @@
             fmq_sync<ReadStatus> statusMQ,
             ThreadInfo threadInfo);
 
-    /*
+    /**
      * Return the amount of input frames lost in the audio driver since the last
      * call of this function.
      *
diff --git a/audio/2.0/IStreamOut.hal b/audio/2.0/IStreamOut.hal
index 9ee32c5..84b7447 100644
--- a/audio/2.0/IStreamOut.hal
+++ b/audio/2.0/IStreamOut.hal
@@ -23,14 +23,14 @@
 interface IStreamOut extends IStream {
     typedef android.hardware.audio@2.0::Result Result;
 
-    /*
+    /**
      * Return the audio hardware driver estimated latency in milliseconds.
      *
      * @return latencyMs latency in milliseconds.
      */
     getLatency() generates (uint32_t latencyMs);
 
-    /*
+    /**
      * This method is used in situations where audio mixing is done in the
      * hardware. This method serves as a direct interface with hardware,
      * allowing to directly set the volume as apposed to via the framework.
@@ -43,7 +43,7 @@
      */
     setVolume(float left, float right) generates (Result retval);
 
-    /*
+    /**
      * Commands that can be executed on the driver writer thread.
      */
     enum WriteCommand : int32_t {
@@ -52,7 +52,7 @@
         GET_LATENCY
     };
 
-    /*
+    /**
      * Data structure passed back to the client via status message queue
      * of 'write' operation.
      *
@@ -75,7 +75,7 @@
         } reply;
     };
 
-    /*
+    /**
      * Set up required transports for passing audio buffers to the driver.
      *
      * The transport consists of three message queues:
@@ -112,7 +112,7 @@
             fmq_sync<WriteStatus> statusMQ,
             ThreadInfo threadInfo);
 
-    /*
+    /**
      * Return the number of audio frames written by the audio DSP to DAC since
      * the output has exited standby.
      *
@@ -121,7 +121,7 @@
      */
     getRenderPosition() generates (Result retval, uint32_t dspFrames);
 
-    /*
+    /**
      * Get the local time at which the next write to the audio driver will be
      * presented. The units are microseconds, where the epoch is decided by the
      * local audio HAL.
@@ -131,7 +131,7 @@
      */
     getNextWriteTimestamp() generates (Result retval, int64_t timestampUs);
 
-    /*
+    /**
      * Set the callback interface for notifying completion of non-blocking
      * write and drain.
      *
@@ -146,7 +146,7 @@
      */
     setCallback(IStreamOutCallback callback) generates (Result retval);
 
-    /*
+    /**
      * Clears the callback previously set via 'setCallback' method.
      *
      * Warning: failure to call this method results in callback implementation
@@ -156,7 +156,7 @@
      */
     clearCallback() generates (Result retval);
 
-    /*
+    /**
      * Returns whether HAL supports pausing and resuming of streams.
      *
      * @return supportsPause true if pausing is supported.
@@ -179,7 +179,7 @@
      */
     pause() generates (Result retval);
 
-    /*
+    /**
      * Notifies to the audio driver to resume playback following a pause.
      * Returns error INVALID_STATE if called without matching pause.
      *
@@ -189,7 +189,7 @@
      */
     resume() generates (Result retval);
 
-    /*
+    /**
      * Returns whether HAL supports draining of streams.
      *
      * @return supports true if draining is supported.
@@ -220,7 +220,7 @@
      */
     drain(AudioDrain type) generates (Result retval);
 
-    /*
+    /**
      * Notifies to the audio driver to flush the queued data. Stream must
      * already be paused before calling 'flush'.
      *
@@ -230,7 +230,7 @@
      */
     flush() generates (Result retval);
 
-    /*
+    /**
      * Return a recent count of the number of audio frames presented to an
      * external observer. This excludes frames which have been written but are
      * still in the pipeline. The count is not reset to zero when output enters
diff --git a/audio/2.0/IStreamOutCallback.hal b/audio/2.0/IStreamOutCallback.hal
index cdb38de..01e123c 100644
--- a/audio/2.0/IStreamOutCallback.hal
+++ b/audio/2.0/IStreamOutCallback.hal
@@ -16,21 +16,21 @@
 
 package android.hardware.audio@2.0;
 
-/*
+/**
  * Asynchronous write callback interface.
  */
 interface IStreamOutCallback {
-    /*
+    /**
      * Non blocking write completed.
      */
     oneway onWriteReady();
 
-    /*
+    /**
      * Drain completed.
      */
     oneway onDrainReady();
 
-    /*
+    /**
      * Stream hit an error.
      */
     oneway onError();
diff --git a/audio/2.0/types.hal b/audio/2.0/types.hal
index 8e9ff14..93118c2 100644
--- a/audio/2.0/types.hal
+++ b/audio/2.0/types.hal
@@ -28,14 +28,16 @@
 
 @export(name="audio_drain_type_t", value_prefix="AUDIO_DRAIN_")
 enum AudioDrain : int32_t {
-    /* drain() returns when all data has been played. */
+    /** drain() returns when all data has been played. */
     ALL,
-    /* drain() returns a short time before all data from the current track has
-       been played to give time for gapless track switch. */
+    /**
+     * drain() returns a short time before all data from the current track has
+     * been played to give time for gapless track switch.
+     */
     EARLY_NOTIFY
 };
 
-/*
+/**
  * A substitute for POSIX timespec.
  */
 struct TimeSpec {
@@ -43,7 +45,7 @@
     uint64_t tvNSec;  // nanoseconds
 };
 
-/*
+/**
  * IEEE 802 MAC address.
  */
 typedef uint8_t[6] MacAddress;
@@ -53,7 +55,7 @@
     string value;
 };
 
-/*
+/**
  * Specifies a device in case when several devices of the same type
  * can be connected (e.g. BT A2DP, USB).
  */
@@ -71,7 +73,7 @@
     string rSubmixAddress;  // used for REMOTE_SUBMIX
 };
 
-/*
+/**
  * Mmap buffer descriptor returned by IStream.createMmapBuffer().
  * Used by streams opened in mmap mode.
  */
@@ -81,7 +83,7 @@
     int32_t burstSizeFrames;      // transfer size granularity in frames
 };
 
-/*
+/**
  * Mmap buffer read/write position returned by IStream.getMmapPosition().
  * Used by streams opened in mmap mode.
  */
@@ -90,7 +92,7 @@
     int32_t  positionFrames;  // increasing 32 bit frame count reset when IStream.stop() is called
 };
 
-/*
+/**
  * The message queue flags used to synchronize reads and writes from
  * message queues used by StreamIn and StreamOut.
  */