# PMi_GetSoundVolume

## C Specification

      #include <nitro/spi.h>

      u32 PMi_GetSoundVolume( PMSoundVolumeSwitch* swBuf );

## Arguments

swBuf | The buffer that stores the obtained results of sound unit power switch.

## Return Values

The `PM_RESULT_SUCCESS` return value indicates that the execution of the command has succeeded. The `PM_RESULT_ERROR` return value indicates that an error has occurred with the ARM7 processor.

## Description

This function gets the currently set values of the effective switch of the external sound volume.
The `PMSoundVolumeSwitch` enumerator type value is stored in the swBuf argument and can contain either one of the following values: &nbsp;

`PM_SOUND_VOLUME_OFF` | Turns off the external sound volume and forces the speaker output at maximum volume.
`PM_SOUND_VOLUME_ON` | Turns on the external sound volume.

This function uses PXI to send the command that performs the corresponding operation in the ARM7 processor. The ARM7 side that receives that command is executed by operating the PMIC. Before you use this function, initialize the PM library by using the `PM_Init()` function. The `PM_Init()` function has to be called only once. Also, when you call `OS_Init()`, there is no need to call `PM_Init()` separately since it is called from within `OS_Init()`.)

## Internal Operation

This function reads the PMIC_CTL value of the PMIC register.

## See Also

`PM_Init`, `PMi_SetSoundVolume*`

## Revision History

08/09/2004 Initial version

CONFIDENTIAL