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

PMIC_STATUS pmic_audio_output_disable_mono_adder ( const PMIC_AUDIO_HANDLE  handle  ) 

Disable the output mono adder.

This function disables the output mono adder.

Parameters:
handle Device handle from pmic_audio_open() call.
Return values:
PMIC_SUCCESS If the mono adder was successfully disabled.
PMIC_PARAMETER_ERROR If the handle was invalid.
PMIC_ERROR If the mono adder could not be disabled.

Definition at line 5085 of file pmic_audio.c.

References PMIC_AUDIO_EXT_STEREO_IN_STATE::handle, PMIC_AUDIO_VCODEC_STATE::handle, PMIC_AUDIO_STDAC_STATE::handle, HANDLE_IN_USE, PMIC_AUDIO_EXT_STEREO_IN_STATE::handleState, PMIC_AUDIO_VCODEC_STATE::handleState, PMIC_AUDIO_STDAC_STATE::handleState, pmic_write_reg(), and SET_BITS.

{
      PMIC_STATUS rc = PMIC_PARAMETER_ERROR;
      const unsigned int reg_write = 0;
      const unsigned int reg_mask = SET_BITS(regAUDIO_RX_1, MONO, 3);

      /* No critical section required here since we are not updating any
       * global data.
       */

      if (((handle == stDAC.handle) &&
           (stDAC.handleState == HANDLE_IN_USE)) ||
          ((handle == vCodec.handle) &&
           (vCodec.handleState == HANDLE_IN_USE)) ||
          ((handle == extStereoIn.handle) &&
           (extStereoIn.handleState == HANDLE_IN_USE))) {
            rc = pmic_write_reg(REG_AUDIO_RX_1, reg_write, reg_mask);
      }

      return rc;
}


Generated by  Doxygen 1.6.0   Back to index