For HP Audio Routing API design document

6
This a preliminary specification on ARApi and requirements for 3 rd party application development. Please note that this document is subject to changes and additions. Copyright 2007 Foxconn/CMCS. Revision Number Changes Author Date 0.01 Initial Create Monky Chen 4/4/07 Audio Routing API V0.01 2007/Apr

Transcript of For HP Audio Routing API design document

Page 1: For HP Audio Routing API design document

This a preliminary specification on ARApi and requirements for 3rd party application development.Please note that this document is subject to changes and additions.Copyright 2007 Foxconn/CMCS.

Revision Number

Changes Author Date

0.01 Initial Create Monky Chen 4/4/07

Audio Routing APIV0.01

2007/Apr

Page 2: For HP Audio Routing API design document

1. Glossary 42. Data Types 4

4 Definition of tier level supported 44 Definitions of the bits of the TAudioEnviromentMap bitmap. 44 Definitions of the bits of the TAudioRoutingOutMapBits bitmap. 55 Error codes returned by some of the member functions. 5

3. Audio Routing Function Description 6A. Tier0 functions 66 TAudioConfigurationMap ARApiGetAudioConfiguration (void)

66 TAudioConfigurationMap ARApiGetAudioConfigurationCaps (void) 77 TTier SkypeARApiGetTier (void) 77 TRetCode ARApiGetVersion (char* buff, __int16 buffsize) 77 TRetCode ARApiSetAudioConfiguration (TAudioConfigurationMap conf) 77 void ARApiClose (void) 8B. Tier1 functions 8

1. Glossary

Page 3: For HP Audio Routing API design document

ARApi DLL- Audio Routing API Dynamic Linked Library

Audio Configuration- Applies to only output audio routing- A simpler way for 3rd party to request device to route audio- 3rd party is free to decide which actions it will do to route audio

Audio path - Applies to only output path through designated functions.

Tier0- Mandatory and Minimum set of functionality that 3rd party can use.

Tier1 - Optional and extended set of functionality. (TBD)

2. Data TypesEnumeration Type Documentation

●Definition of tier level supported

Enumerator:enum TTierValuesARAPI_TIER0 Tier0 requirements supported.ARAPI_TIER1 Tier1 requirements supported.

●Definitions of the bits of the TAudioEnviromentMap bitmap.Enumerator:enum TAudioConfigurationMapBitsACONF_EARPIECE Telephony earpiece (receiver) type of

audio configuration.ACONF_SPEAKERPHONE Speakerphone type of audio

configuration.ACONF_ERROR Error when retrieving current audio

configuration.

●Definitions of the bits of the TAudioRoutingOutMapBits bitmap.Enumerator:enum TAudioRoutingOutMapBitsAROUT_SYSTEM System audio route. Sound can be

receivedfrom any source near the device. In practice this can be aseparate physical microphone from one used asearpiece(receiver) or the same one possibly with differentinternal(firmware/driver) configuration. Same as GSMspeakerphone configuration, if applicable.

Page 4: For HP Audio Routing API design document

AROUT_EARPIECE Earpiece audio route The telephony earpiece's receiver.Ideally sound can only be received from the person holdingthe device as a telephone. Same as GSM normal earpiece(receiver)configuration.

AROUT_ERROR Retrieval of current routing status caused an error.

●Error codes returned by some of the member functions.Enumerator:RETCODE_OK SuccessRETCODE_MAX_OK All TRetCode values above

this are errors.RETCODE_ERR_TEMPORARY_INIT Initialization failed due to a

temporary error. Try again later.

RETCODE_ERR_TEMPORARY_AUDIOROUTE Changing audio routing failed due to a temporary error. Try again later.

RETCODE_MAX_TEMPORARY All TRetCode values abovethis are non-temporary errors.

RETCODE_ERR_NO_CAPS Driver does not supportthis/these audio routes

RETCODE_ERR_AUDIOROUTE Changing audio routing failed.

RETCODE_BUFF_TOO_SMALL Buffer for version string is too small.

RETCODE_MAX_PERSISTENT All TRetCode values abovethis are undefined or criticalerrors.

RETCODE_MIN_CRITICAL All TRetCode values abovethis are critical errors. APImust not be called again.

RETCODE_ERR_CRITICAL_DRIVER Driver reported a criticalerror. API must not be called again.

RETCODE_ERR_CRITICAL_INTERNAL Internal critical erroroccurred. API must not becalled again.

3. Audio Routing Function Description

Page 5: For HP Audio Routing API design document

A.Tier0 functionsTier0 functions are MANDATORY for 3rd party application implementations.

●TAudioConfigurationMap ARApiGetAudioConfiguration(void)Returns the current audio configuration.

Parameters:None

Returns:TAudioConfigurationMap bitmap listing supported audio configurations. Seeenum for details. If an error occurs return ACONF_ERROR.

●TAudioConfigurationMap ARApiGetAudioConfigurationCaps(void)

Returns list of audio configurations supported.

Parameters:None

Returns:TAudioConfigurationMap bitmap listing supported audio configurations. Seeenum for details.

●TTier SkypeARApiGetTier(void)Returns tier support of this ARApi implementation.

Parameters:None

Returns:TTier. See enum for details.

●TRetCode ARApiGetVersion(char* buff, __int16 buffsize)Returns version of the ARApi.

Parameters:buff : Pointer to the character buffer that will receive the version string.Buffsize: Size of the buffer in bytes.

Returns:TRetCode. See enum for details.

●TRetCode ARApiSetAudioConfiguration(TAudioConfigurationMap conf)

Set the current audio configuration for output.Only single audio configuration at any time is allowed.Parameters:Audio configuration to be used.Returns:TRetCode. See enum for details.

Page 6: For HP Audio Routing API design document

●void ARApiClose(void)Prepare the ARApi to be closed.This API is going to restore the previous audio routing.No other Audio Routing API function may be called after this function is called once.

Parameters:None

Returns:None

B.Tier1 functionsTBD