Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/g722.h	(revision 3083)
@@ -34,10 +34,25 @@
  * @{
  *
- * This section describes functions to register and register G.722 codec
+ * This section describes functions to initialize and register G.722 codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
  *
+ * The G.722 implementation uses 16-bit PCM with sampling rate 16000Hz and 
+ * 20ms frame length resulting in 64kbps bitrate.
+ *
  * The G.722 codec implementation is provided as part of pjmedia-codec
  * library, and does not depend on external G.722 codec implementation.
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * Currently none.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/g7221.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/g7221.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/g7221.h	(revision 3083)
@@ -29,13 +29,13 @@
 
 /**
- * @defgroup PJMED_G7221_CODEC G722.1 Codec
+ * @defgroup PJMED_G7221_CODEC G.722.1 Codec (Siren7/Siren14)
  * @ingroup PJMEDIA_CODEC_CODECS
- * @brief Implementation of G722.1 codec
+ * @brief Implementation of G.722.1 codec
  * @{
  *
- * <b>G722.1 licensed from Polycom®</b>
- * <b>G722.1 Annex C licensed from Polycom®</b>
+ * <b>G.722.1 licensed from Polycom®</b><br />
+ * <b>G.722.1 Annex C licensed from Polycom®</b>
  *
- * This section describes functions to register and register G722.1 codec
+ * This section describes functions to initialize and register G.722.1 codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
@@ -44,18 +44,48 @@
  * G.722.1 (05/2005) C fixed point implementation including its Annex C.
  *
- * G722.1 is a low complexity codec that supports for 7kHz and 14kHz bandwidth
- * audio signals working at bitrates ranging from 16kbps to 48kbps. It may be
+ * G.722.1 is a low complexity codec that supports 7kHz and 14kHz audio 
+ * bandwidth working at bitrates ranging from 16kbps to 48kbps. It may be
  * used with speech or music inputs.
  *
- * The codec implementation supports for standard and non-standard bitrates.
- * By default, the standard bitrates are enabled upon initialization, i.e.:
- * - 24kbps and 32kbps for audio bandwidth 7 kHz (16kHz sampling rate),
- * - 24kbps, 32kbps, and 48kbps for audio bandwidth 14 kHz (32kHz sampling 
- *   rate).
- * The usage of non-standard bitrates must follow this requirements:
- * - for sampling rate 16kHz: 16000 to 32000 bps, it must be a multiple of 400
- * - for sampling rate 32kHz: 24000 to 48000 bps, it must be a multiple of 400
- * Note that currently it is only up to two non-standard modes can be enabled
- * at one time.
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * The following settings are applicable for this codec.
+ *
+ * \subsubsection bitrate Bitrate
+ *
+ * The codec implementation supports standard and non-standard bitrates.
+ * Use #pjmedia_codec_g7221_set_mode() to enable or disable the bitrates.
+ *
+ * By default, only standard bitrates are enabled upon initialization:
+ * - for 7kHz audio bandwidth (16kHz sampling rate): 24kbps and 32kbps,
+ * - for 14kHz audio bandwidth (32kHz sampling rate): 24kbps, 32kbps, and
+ *   48kbps.
+ *
+ * The usage of non-standard bitrates must follow these requirements:
+ * - for 7kHz audio bandwidth (16kHz sampling rate): 16000 to 32000 bps, 
+ *   multiplication of 400
+ * - for 14kHz audio bandwidth (32kHz sampling rate): 24000 to 48000 bps,
+ *   multiplication of 400
+ *
+ * \note
+ * Currently only up to two non-standard modes can be enabled.
+ *
+ * \remark
+ * There is a flaw in the codec manager as currently it could not
+ * differentiate G.722.1 codecs by bitrates, hence invoking 
+ * #pjmedia_codec_mgr_set_default_param() may only affect a G.722.1 codec
+ * with the highest priority (or first index found in codec enumeration 
+ * when they have same priority) and invoking
+ * #pjmedia_codec_mgr_set_codec_priority() will set priority of all G.722.1
+ * codecs with sampling rate as specified.
  */
 
@@ -63,5 +93,5 @@
 
 /**
- * Initialize and register G722.1 codec factory to pjmedia endpoint.
+ * Initialize and register G.722.1 codec factory to pjmedia endpoint.
  *
  * @param endpt	    The pjmedia endpoint.
@@ -73,11 +103,11 @@
 
 /**
- * Enable and disable G722.1 mode. By default, the standard modes are 
+ * Enable and disable G.722.1 mode. By default, the standard modes are 
  * enabled upon initialization, i.e.:
  * - sampling rate 16kHz, bitrate 24kbps and 32kbps.
  * - sampling rate 32kHz, bitrate 24kbps, 32kbps, and 48kbps.
  * This function can also be used for enabling non-standard modes.
- * Note that currently it is only up to two non-standard modes can be 
- * enabled at one time.
+ * Note that currently only up to two non-standard modes can be enabled
+ * at one time.
  *
  * @param sample_rate	PCM sampling rate, in Hz, valid values are only 
@@ -111,5 +141,5 @@
 
 /**
- * Unregister G722.1 codecs factory from pjmedia endpoint.
+ * Unregister G.722.1 codecs factory from pjmedia endpoint.
  *
  * @return	    PJ_SUCCESS on success.
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/gsm.h	(revision 3083)
@@ -34,7 +34,22 @@
  * @{
  *
- * This section describes functions to register and register GSM codec
+ * This section describes functions to initialize and register GSM codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The GSM codec supports 16-bit PCM with sampling rate of 8000Hz resulting
+ * in 13.2kbps bitrate.
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * Currently none.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/ilbc.h	(revision 3083)
@@ -34,7 +34,50 @@
  * @{
  *
- * This section describes functions to register and register iLBC codec
+ * This section describes functions to initialize and register iLBC codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The iLBC codec is developed by Global IP Solutions (GIPS), formerly 
+ * Global IP Sound. The iLBC offers low bitrate and graceful audio quality 
+ * degradation on frame losses.
+ *
+ * The iLBC codec supports 16-bit PCM audio signal with sampling rate of 
+ * 8000Hz operating at two modes: 20ms and 30ms frame length modes, resulting
+ * in bitrates of 15.2kbps for 20ms mode and 13.33kbps for 30ms mode.
+ *
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * The following settings are applicable for this codec.
+ *
+ * \subsubsection mode Mode
+ *
+ * The default mode should be set upon initialization, see
+ * #pjmedia_codec_ilbc_init(). After the codec is initialized, the default
+ * mode can be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, iLBC mode can be set by specifying SDP
+ * format parameter "mode" in the SDP "a=fmtp" attribute for decoding
+ * direction. Valid values are "20" and "30" (for 20ms and 30ms mode 
+ * respectively).
+ *
+ * Here is an example to set up #pjmedia_codec_param to use mode 20ms:
+ *  \code
+    pjmedia_codec_param param;
+    ...
+    // setting iLBC mode in SDP
+    param.setting.dec_fmtp.cnt = 1;
+    param.setting.dec_fmtp.param[0].name = pj_str("mode");
+    param.setting.dec_fmtp.param[0].val  = pj_str("20");
+    ...
+ \endcode
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/ipp_codecs.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/ipp_codecs.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/ipp_codecs.h	(revision 3083)
@@ -34,9 +34,258 @@
  * @{
  *
- * This section describes functions to register and register IPP codec
+ * This section describes functions to initialize and register IPP codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
- * This codec factory contains various codecs, e.g: G.729, G.723.1, G.726, 
- * G.728, G.722.1, AMR.
+ *
+ * This codec factory contains various codecs, i.e: G.729, G.723.1, G.726, 
+ * G.728, G.722.1, AMR, and AMR-WB.
+ *
+ *
+ * \section pjmedia_codec_ipp_g729 IPP G.729
+ *
+ * IPP G.729 is compliant with ITU-T G.729 and Annexes A, B, C, C+, D, 
+ * E, I specifications. However, currently the pjmedia implementation is
+ * using Annexes A and B only.
+ *
+ * IPP G.729 supports 16-bit PCM audio signal with sampling rate 8000Hz, 
+ * frame length 10ms, and resulting in bitrate 8000bps (annexes D and E
+ * introduce bitrates 6400bps and 11800bps).
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * Note that G.729 VAD status should be signalled in SDP, see more
+ * description below.
+ *
+ * \subsubsection annexb Annex B
+ *
+ * The capability of VAD/DTX is specified in Annex B.
+ *
+ * By default, Annex B is enabled. This default setting of Annex B can 
+ * be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, Annex B is configured via VAD setting and
+ * format parameter "annexb" in the SDP "a=fmtp" attribute in
+ * decoding fmtp field. Valid values are "yes" and "no",
+ * the implementation default is "yes". When this parameter is omitted
+ * in the SDP, the value will be "yes" (RFC 4856 Section 2.1.9).
+ *
+ * Here is an example of modifying default setting of Annex B to
+ * be disabled using #pjmedia_codec_mgr_set_default_param():
+ \code
+    pjmedia_codec_param param;
+
+    pjmedia_codec_mgr_get_default_param(.., &param);
+    ...
+    // Set VAD
+    param.setting.vad = 0;
+    // Set SDP format parameter
+    param.setting.dec_fmtp.cnt = 1;
+    param.setting.dec_fmtp.param[0].name = pj_str("annexb");
+    param.setting.dec_fmtp.param[0].val  = pj_str("no");
+    ...
+    pjmedia_codec_mgr_set_default_param(.., &param);
+ \endcode
+ *
+ * \note
+ * The difference of Annex B status in SDP offer/answer may be considered as 
+ * incompatible codec in SDP negotiation.
+ *
+ * 
+ * \section pjmedia_codec_ipp_g7231 IPP G.723.1
+ *
+ * IPP G.723.1 speech codec is compliant with ITU-T G.723.1 and Annex A
+ * specifications.
+ *
+ * IPP G.723.1 supports 16-bit PCM audio signal with sampling rate 8000Hz, 
+ * frame length 30ms, and resulting in bitrates 5300bps and 6300bps.
+ *
+ * By default, pjmedia implementation uses encoding bitrate of 6300bps.
+ * The bitrate is signalled in-band in G.723.1 frames and interoperable.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ *
+ * \section pjmedia_codec_ipp_g726 IPP G.726
+ *
+ * IPP G.726 is compliant with ITU-T G.726 and G.726 Annex A specifications.
+ *
+ * IPP G.726 supports 16-bit PCM audio signal with sampling rate 8000Hz,
+ * 10ms frame length and producing 16kbps, 24kbps, 32kbps, 48kbps bitrates.
+ * The bitrate is specified explicitly in its encoding name, i.e: G726-16,
+ * G726-24, G726-32, G726-48.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ *
+ * \section pjmedia_codec_ipp_g728 IPP G.728
+ *
+ * IPP G.728 is compliant with ITU-T G.728 with I, G, H Appendixes 
+ * specifications for Low-Delay CELP coder.
+ * 
+ * IPP G.728 supports 16-bit PCM audio signal with sampling rate 8000Hz,
+ * 20ms frame length and producing 9.6kbps, 12.8kbps, and 16kbps bitrates.
+ *
+ * The pjmedia implementation currently uses 16kbps bitrate only.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ *
+ * \section pjmedia_codec_ipp_g7221 IPP G.722.1
+ *
+ * The pjmedia implementation of IPP G.722.1 supports 16-bit PCM audio 
+ * signal with sampling rate 16000Hz, 20ms frame length and producing 
+ * 16kbps, 24kbps, and 32kbps bitrates.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsubsection bitrate Bitrate
+ *
+ * The codec implementation supports only standard bitrates, i.e:
+ * 24kbps and 32kbps. Both are enabled by default.
+ *
+ * \remark
+ * There is a flaw in the codec manager as currently it could not 
+ * differentiate G.722.1 codecs by bitrates, hence invoking 
+ * #pjmedia_codec_mgr_set_default_param() may only affect a G.722.1 codec
+ * with the highest priority (or first index found in codec enumeration 
+ * when they have same priority) and invoking
+ * #pjmedia_codec_mgr_set_codec_priority() will set priority of all G.722.1
+ * codecs with sampling rate as specified.
+ *
+ *
+ * \section pjmedia_codec_ipp_amr IPP AMR
+ *
+ * The IPP AMR is compliant with GSM06.90-94 specifications for GSM Adaptive
+ * Multi-Rate codec.
+ *
+ * IPP AMR supports 16-bit PCM audio signal with sampling rate 8000Hz,
+ * 20ms frame length and producing various bitrates that ranges from 4.75kbps
+ * to 12.2kbps.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsubsection bitrate Bitrate
+ *
+ * By default, encoding bitrate is 7400bps. This default setting can be 
+ * modified using #pjmedia_codec_mgr_set_default_param() by specifying 
+ * prefered AMR bitrate in field <tt>info::avg_bps</tt> of 
+ * #pjmedia_codec_param. Valid bitrates could be seen in 
+ * #pjmedia_codec_amrnb_bitrates.
+ *
+ * \subsubsection payload_format Payload Format
+ *
+ * There are two AMR payload format types, bandwidth-efficient and
+ * octet-aligned. Default setting is using octet-aligned. This default payload
+ * format can be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, payload format can be set by specifying SDP 
+ * format parameters "octet-align" in the SDP "a=fmtp" attribute for 
+ * decoding direction. Valid values are "0" (for bandwidth efficient mode)
+ * and "1" (for octet-aligned mode).
+ *
+ * \subsubsection mode_set Mode-Set
+ * 
+ * Mode-set is used for restricting AMR modes in decoding direction.
+ *
+ * By default, no mode-set restriction applied. This default setting can be 
+ * be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, mode-set could be specified via format parameters
+ * "mode-set" in the SDP "a=fmtp" attribute for decoding direction. Valid 
+ * value is a comma separated list of modes from the set 0 - 7, e.g: 
+ * "4,5,6,7". When this parameter is omitted, no mode-set restrictions applied.
+ *
+ * Here is an example of modifying AMR default codec param:
+ \code
+    pjmedia_codec_param param;
+
+    pjmedia_codec_mgr_get_default_param(.., &param);
+    ...
+    // set default encoding bitrate to the highest 12.2kbps
+    param.info.avg_bps = 12200;
+
+    // restrict decoding bitrate to 10.2kbps and 12.2kbps only
+    param.setting.dec_fmtp.param[0].name = pj_str("mode-set");
+    param.setting.dec_fmtp.param[0].val  = pj_str("6,7");
+
+    // also set to use bandwidth-efficient payload format
+    param.setting.dec_fmtp.param[1].name = pj_str("octet-align");
+    param.setting.dec_fmtp.param[1].val  = pj_str("0");
+
+    param.setting.dec_fmtp.cnt = 2;
+    ...
+    pjmedia_codec_mgr_set_default_param(.., &param);
+ \endcode
+ * 
+ *
+ * \section pjmedia_codec_ipp_amrwb IPP AMR-WB
+ *
+ * The IPP AMR-WB is compliant with 3GPP TS 26.190-192, 194, 201 
+ * specifications for Adaptive Multi-Rate WideBand codec.
+ *
+ * IPP AMR-WB supports 16-bit PCM audio signal with sampling rate 16000Hz,
+ * 20ms frame length and producing various bitrates. Valid bitrates could be
+ * seen in #pjmedia_codec_amrwb_bitrates. The pjmedia implementation default
+ * bitrate is 15850bps.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsubsection bitrate Bitrate
+ *
+ * By default, encoding bitrate is 15850bps. This default setting can be 
+ * modified using #pjmedia_codec_mgr_set_default_param() by specifying 
+ * prefered AMR bitrate in field <tt>info::avg_bps</tt> of 
+ * #pjmedia_codec_param.
+ *
+ * \subsubsection payload_format Payload Format
+ *
+ * There are two AMR payload format types, bandwidth-efficient and
+ * octet-aligned. Default setting is using octet-aligned. This default payload
+ * format can be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, payload format can be set by specifying SDP 
+ * format parameters "octet-align" in the SDP "a=fmtp" attribute for 
+ * decoding direction. Valid values are "0" (for bandwidth efficient mode)
+ * and "1" (for octet-aligned mode).
+ *
+ * \subsubsection mode_set Mode-Set
+ * 
+ * Mode-set is used for restricting AMR modes in decoding direction.
+ *
+ * By default, no mode-set restriction applied. This default setting can be 
+ * be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, mode-set could be specified via format parameters
+ * "mode-set" in the SDP "a=fmtp" attribute for decoding direction. Valid 
+ * value is a comma separated list of modes from the set 0 - 7, e.g: 
+ * "4,5,6,7". When this parameter is omitted, no mode-set restrictions applied.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/l16.h	(revision 3083)
@@ -27,8 +27,8 @@
  * @defgroup PJMED_L16 L16 Codec Family
  * @ingroup PJMEDIA_CODEC_CODECS
- * @brief PCM/16bit/linear codecs
+ * @brief Implementation of PCM/16bit/linear codecs
  * @{
  *
- * This section describes functions to register and register L16 codec
+ * This section describes functions to initialize and register L16 codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
@@ -37,4 +37,16 @@
  * L16 codec types to codec manager (different combinations of clock
  * rate and number of channels).
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * Currently none.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/passthrough.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/passthrough.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/passthrough.h	(revision 3083)
@@ -34,15 +34,186 @@
  * @{
  *
- * This section describes functions to register and register passthrough 
+ * This section describes functions to initialize and register passthrough 
  * codecs factory to the codec manager. After the codec factory has been 
  * registered, application can use @ref PJMEDIA_CODEC API to manipulate 
- * the codec. This codec factory contains various codecs, e.g: G.729, iLBC,
- * AMR, and G.711.
- *
- * Passthrough codecs are codecs wrapper that does not perform encoding 
- * or decoding, it just pack and parse encoded audio data from/into RTP 
+ * the codec.
+ *
+ * Passthrough codecs are codecs wrapper that does NOT perform encoding 
+ * or decoding, it just PACK and PARSE encoded audio data from/into RTP 
  * payload. This will accomodate pjmedia ports which work with encoded
  * audio data, e.g: encoded audio files, sound device with capability
  * of playing/recording encoded audio data.
+ *
+ * This codec factory contains various codecs, i.e: G.729, iLBC,
+ * AMR, and G.711.
+ *
+ *
+ * \section pjmedia_codec_passthrough_g729 Passthrough G.729
+ *
+ * G.729 supports 16-bit PCM audio signal with sampling rate 8000Hz, 
+ * frame length 10ms, and resulting in bitrate 8000bps.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * Note that G.729 VAD status should be signalled in SDP, see more
+ * description below.
+ *
+ * \subsubsection annexb Annex B
+ *
+ * The capability of VAD/DTX is specified in Annex B.
+ *
+ * By default, Annex B is enabled. This default setting of Annex B can 
+ * be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, Annex B is configured via VAD setting and
+ * format parameter "annexb" in the SDP "a=fmtp" attribute in
+ * decoding fmtp field. Valid values are "yes" and "no",
+ * the implementation default is "yes". When this parameter is omitted
+ * in the SDP, the value will be "yes" (RFC 4856 Section 2.1.9).
+ *
+ * Here is an example of modifying default setting of Annex B to
+ * be disabled using #pjmedia_codec_mgr_set_default_param():
+ \code
+    pjmedia_codec_param param;
+
+    pjmedia_codec_mgr_get_default_param(.., &param);
+    ...
+    // Set VAD
+    param.setting.vad = 0;
+    // Set SDP format parameter
+    param.setting.dec_fmtp.cnt = 1;
+    param.setting.dec_fmtp.param[0].name = pj_str("annexb");
+    param.setting.dec_fmtp.param[0].val  = pj_str("no");
+    ...
+    pjmedia_codec_mgr_set_default_param(.., &param);
+ \endcode
+ *
+ * \note
+ * The difference of Annex B status in SDP offer/answer may be considered as 
+ * incompatible codec in SDP negotiation.
+ *
+ * 
+ * \section pjmedia_codec_passthrough_ilbc Passthrough iLBC
+ *
+ * The iLBC codec is developed by Global IP Solutions (GIPS), formerly 
+ * Global IP Sound. The iLBC offers low bitrate and graceful audio quality 
+ * degradation on frame losses.
+ *
+ * The iLBC codec supports 16-bit PCM audio signal with sampling rate of 
+ * 8000Hz operating at two modes: 20ms and 30ms frame length modes, resulting
+ * in bitrates of 15.2kbps for 20ms mode and 13.33kbps for 30ms mode.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsubsection mode Mode
+ *
+ * The default mode should be set upon initialization, see
+ * #pjmedia_codec_passthrough_init2(). After the codec is initialized, the
+ * default mode can be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, iLBC mode can be set by specifying SDP
+ * format parameter "mode" in the SDP "a=fmtp" attribute for decoding
+ * direction. Valid values are "20" and "30" (for 20ms and 30ms mode 
+ * respectively).
+ *
+ * Here is an example to set up #pjmedia_codec_param to use mode 20ms:
+ *  \code
+    pjmedia_codec_param param;
+    ...
+    // setting iLBC mode in SDP
+    param.setting.dec_fmtp.cnt = 1;
+    param.setting.dec_fmtp.param[0].name = pj_str("mode");
+    param.setting.dec_fmtp.param[0].val  = pj_str("20");
+    ...
+ \endcode
+ *
+ *
+ * \section pjmedia_codec_passthrough_amr Passthrough AMR
+ *
+ * IPP AMR supports 16-bit PCM audio signal with sampling rate 8000Hz,
+ * 20ms frame length and producing various bitrates that ranges from 4.75kbps
+ * to 12.2kbps.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsubsection bitrate Bitrate
+ *
+ * By default, encoding bitrate is 7400bps. This default setting can be 
+ * modified using #pjmedia_codec_mgr_set_default_param() by specifying 
+ * prefered AMR bitrate in field <tt>info::avg_bps</tt> of 
+ * #pjmedia_codec_param. Valid bitrates could be seen in 
+ * #pjmedia_codec_amrnb_bitrates.
+ *
+ * \subsubsection payload_format Payload Format
+ *
+ * There are two AMR payload format types, bandwidth-efficient and
+ * octet-aligned. Default setting is using octet-aligned. This default payload
+ * format can be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, payload format can be set by specifying SDP 
+ * format parameters "octet-align" in the SDP "a=fmtp" attribute for 
+ * decoding direction. Valid values are "0" (for bandwidth efficient mode)
+ * and "1" (for octet-aligned mode).
+ *
+ * \subsubsection mode_set Mode-Set
+ * 
+ * Mode-set is used for restricting AMR modes in decoding direction.
+ *
+ * By default, no mode-set restriction applied. This default setting can be 
+ * be modified using #pjmedia_codec_mgr_set_default_param().
+ *
+ * In #pjmedia_codec_param, mode-set could be specified via format parameters
+ * "mode-set" in the SDP "a=fmtp" attribute for decoding direction. Valid 
+ * value is a comma separated list of modes from the set 0 - 7, e.g: 
+ * "4,5,6,7". When this parameter is omitted, no mode-set restrictions applied.
+ *
+ * Here is an example of modifying AMR default codec param:
+ \code
+    pjmedia_codec_param param;
+
+    pjmedia_codec_mgr_get_default_param(.., &param);
+    ...
+    // set default encoding bitrate to the highest 12.2kbps
+    param.info.avg_bps = 12200;
+
+    // restrict decoding bitrate to 10.2kbps and 12.2kbps only
+    param.setting.dec_fmtp.param[0].name = pj_str("mode-set");
+    param.setting.dec_fmtp.param[0].val  = pj_str("6,7");
+
+    // also set to use bandwidth-efficient payload format
+    param.setting.dec_fmtp.param[1].name = pj_str("octet-align");
+    param.setting.dec_fmtp.param[1].val  = pj_str("0");
+
+    param.setting.dec_fmtp.cnt = 2;
+    ...
+    pjmedia_codec_mgr_set_default_param(.., &param);
+ \endcode
+ * 
+ *
+ * \section pjmedia_codec_passthrough_g711 Passthrough G.711
+ *
+ * The G.711 is an ultra low complexity codecs and in trade-off it results
+ * in high bitrate, i.e: 64kbps for 16-bit PCM with sampling rate 8000Hz.
+ *
+ * The factory contains two main compression algorithms, PCMU/u-Law and 
+ * PCMA/A-Law.
+ *
+ * \subsection codec_setting Codec Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
  */
 
@@ -79,5 +250,5 @@
  *
  * @param endpt	    The pjmedia endpoint.
- * @param setting   The settings, see @pjmedia_codec_passthrough_setting.
+ * @param setting   The settings.
  *
  * @return	    PJ_SUCCESS on success.
Index: /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia-codec/speex.h	(revision 3083)
@@ -34,7 +34,11 @@
  * @{
  *
- * This section describes functions to register and register speex codec
+ * This section describes functions to initialize and register speex codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The Speex codec uses multiple bit rates, and supports ultra-wideband 
+ * (32 kHz sampling rate), wideband (16 kHz sampling rate) and narrowband 
+ * (telephone quality, 8 kHz sampling rate)
  *
  * By default, the speex codec factory registers three Speex codecs:
@@ -42,4 +46,29 @@
  * "speex/32000" ultra-wideband codec. This behavior can be changed by
  * specifying #pjmedia_speex_options flags during initialization.
+ *
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * The following settings are applicable for this codec.
+ *
+ * \subsubsection quality_vs_complexity Quality vs Complexity
+ *
+ * The Speex codec quality versus computational complexity and bandwidth
+ * requirement can be adjusted by modifying the quality and complexity
+ * setting, by calling #pjmedia_codec_speex_set_param(). The RFC 5574
+ * Section 5 shows the relationship between quality setting and the
+ * resulting bitrate.
+ *
+ * The default setting of quality is specified in 
+ * #PJMEDIA_CODEC_SPEEX_DEFAULT_QUALITY. And the default setting of
+ * complexity is specified in #PJMEDIA_CODEC_SPEEX_DEFAULT_COMPLEXITY.
  */
 
Index: /pjproject/trunk/pjmedia/include/pjmedia/g711.h
===================================================================
--- /pjproject/trunk/pjmedia/include/pjmedia/g711.h	(revision 3082)
+++ /pjproject/trunk/pjmedia/include/pjmedia/g711.h	(revision 3083)
@@ -29,11 +29,30 @@
 
 /**
- * @defgroup PJMED_G711 G711 G.711 Codec
+ * @defgroup PJMED_G711 G.711 Codec
  * @ingroup PJMEDIA_CODEC_CODECS
  * @brief Standard G.711/PCMA and PCMU codec.
  * @{
- * This section describes functions to register and register G.711 codec
+ *
+ * This section describes functions to initialize and register G.711 codec
  * factory to the codec manager. After the codec factory has been registered,
  * application can use @ref PJMEDIA_CODEC API to manipulate the codec.
+ *
+ * The G.711 is an ultra low complexity codecs and in trade-off it results
+ * in high bitrate, i.e: 64kbps for 16-bit PCM with sampling rate 8000Hz.
+ *
+ * The factory contains two main compression algorithms, PCMU/u-Law and 
+ * PCMA/A-Law.
+ *
+ * \section codec_setting Codec Settings
+ *
+ * \subsection general_setting General Settings
+ *
+ * General codec settings for this codec such as VAD and PLC can be 
+ * manipulated through the <tt>setting</tt> field in #pjmedia_codec_param. 
+ * Please see the documentation of #pjmedia_codec_param for more info.
+ *
+ * \subsection specific_setting Codec Specific Settings
+ *
+ * Currently none.
  */
 
