⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 headset_volume.h

📁 BlueLab 3.5.2 单声道耳机源码
💻 H
字号:
/****************************************************************************
Copyright (C) Cambridge Silicon Radio Ltd. 2004-2006
Part of BlueLab 3.6.2-release

FILE NAME
    headset_volume.h
    
DESCRIPTION

    
*/

#ifndef HEADSET_SOUND_MANAGER_VOL_H
#define HEADSET_SOUND_MANAGER_VOL_H


#include "headset_private.h"
#include "headset_volume.h"

#define SOM_VOLUME_PSKEY_BASE  (32)

#define SOM_DEFAULT_MIC_LEVEL   (0x0a)
#define SOM_DEFAULT_VOLUME_LEVEL (0x08)


/****************************************************************************
NAME 
    VolumeConfigureVolumeSettings

DESCRIPTION
 Configures the volume settings - via config manager -
    
RETURNS
 void
    
*/
void VolumeConfigureVolumeSettings ( hsTaskData * pApp ,
                                           uint16 pProfileVolume , 
                                           uint16 pIncLevel , 
                                           uint16 pDecLevel ,
                                           uint16 pMicLevel , 
                                           HeadsetTone_t pTone ,
                                           uint16 pVolGain ,
                                           uint16 pMicGain ) ;

/****************************************************************************
NAME 
 VolumeDefault

DESCRIPTION
 sets a default volume

RETURNS
 void
    
*/ 
void VolumeDefault ( hsTaskData * pApp, uint16 level) ;

/*************************************************************************
NAME    
    VolumeHandleVolumeInd
    
DESCRIPTION
    Handles a volume indication from an AG - does not send a response back

RETURNS
    void
*/
void VolumeHandleVolumeInd ( hsTaskData * pApp , uint16 pProfileVolume ) ;
 
/*************************************************************************
NAME    
    VolumeHandleSetMicLevel
    
DESCRIPTION
    Sets the Mic gain level
    
RETURNS
    void
*/
void VolumeSetMicLevel ( hsTaskData * pApp , uint16 pMicGain ) ;

/****************************************************************************
NAME 
 VolumeUp

DESCRIPTION
 Increments voulme

RETURNS
 void
    
*/
void VolumeUp ( hsTaskData   * pApp ) ;

/****************************************************************************
NAME 
 VolumeDown

DESCRIPTION
 Decrements volume - sends a response to the AG

RETURNS
 void
    
*/
void VolumeDown ( hsTaskData * pApp ) ;

/****************************************************************************
NAME 
 VolumeToggleMute

DESCRIPTION
 Toggles the mute state

RETURNS
 void
    
*/
void VolumeToggleMute ( hsTaskData * pApp );

/****************************************************************************
NAME 
 VolumeMuteOn

DESCRIPTION
 Enables Mute

RETURNS
 void
    
*/
void VolumeMuteOn ( hsTaskData * pApp ) ;

/****************************************************************************
NAME 
 VolumeMuteOff

DESCRIPTION
 Disables Mute

RETURNS
 void
    
*/
void VolumeMuteOff ( hsTaskData * pApp ) ;

/****************************************************************************
NAME 
 VolumeCompleteUnmuteMicrophone

DESCRIPTION
 method to complete the unmute action - ramps the vol up to the desired level
    This should occur after the delay between setting the mic bias and beginning the #
    mic gain increase

RETURNS

*/
void VolumeCompleteUnmuteMicrophone ( hsTaskData * pApp ) ;
/****************************************************************************
NAME 
 VolumeSetForTonePlayback

DESCRIPTION
 Sets a VOlume Level to be used for the Tone playback. This level is just set to the
    codecs and notused as an internal volume level. This can be restored once the tone 
    playback is complete
 
RETURNS
    
*/
void VolumeSetForTonePlayback (hsTaskData * pApp , uint16 pNewVolume );

/****************************************************************************
NAME 
 VolumeRestoreAfterTonePlayback

DESCRIPTION
 After the tone has been played - this restores the volume to the internal level used
 
RETURNS
    
*/
void VolumeRestoreAfterTonePlayback ( hsTaskData * pApp  ) ;

/****************************************************************************
NAME 
 VolumeGetStoredAGVolumeLevel

DESCRIPTION
 Get the stored volume level of the device with the specified bdaddr
 
RETURNS
 volume level (0-15)
    
*/
void VolumeGetStoredAGVolumeLevel(const bdaddr* bd_addr);


/****************************************************************************
NAME 
 VolumeSetStoredAGVolumeLevel

DESCRIPTION
 Set the stored volume level of the device with the specified bdaddr
 
RETURNS
 
*/
void VolumeSetStoredAGVolumeLevel(const bdaddr* bd_addr, uint16 level);

/****************************************************************************
NAME 
 VolumeMuteRemind

DESCRIPTION
 Sends a mute reminder message
 
RETURNS
 
*/
void VolumeMuteRemind ( hsTaskData * pApp ) ;

/****************************************************************************
NAME 
 VolumeZero

DESCRIPTION
 Set the volume to zero
 
RETURNS
    
*/
void VolumeZero ( hsTaskData * pApp  ) ;

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -