Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

PMIC_STATUS pmic_audio_vcodec_get_config ( const PMIC_AUDIO_HANDLE  handle,
PMIC_AUDIO_VCODEC_CONFIG *const   config 
)

Get the current Voice CODEC options.

Get the current Voice CODEC options.

Parameters:
handle Device handle from pmic_audio_open() call.
config The current set of Voice CODEC options.
Return values:
PMIC_SUCCESS If the Voice CODEC options were successfully retrieved.
PMIC_PARAMETER_ERROR If the handle was invalid.
PMIC_ERROR If the Voice CODEC options could not be retrieved.

Definition at line 2586 of file pmic_audio.c.

References PMIC_AUDIO_VCODEC_STATE::config, PMIC_AUDIO_VCODEC_STATE::handle, HANDLE_IN_USE, and PMIC_AUDIO_VCODEC_STATE::handleState.

{
      PMIC_STATUS rc = PMIC_PARAMETER_ERROR;

      /* Use a critical section to ensure a consistent hardware state. */
      if (down_interruptible(&mutex))
            return PMIC_SYSTEM_ERROR_EINTR;

      if ((handle == vCodec.handle) &&
          (vCodec.handleState == HANDLE_IN_USE) &&
          (config != (PMIC_AUDIO_VCODEC_CONFIG *) NULL)) {
            *config = vCodec.config;

            rc = PMIC_SUCCESS;
      }

      /* Exit the critical section. */
      up(&mutex);

      return rc;
}


Generated by  Doxygen 1.6.0   Back to index