AFCodec Class Reference
The codec abstraction class of the Audio Framework.
More...
#include <AFCodec.h>
List of all members.
Detailed Description
The codec abstraction class of the Audio Framework.
Definition at line 64 of file AFCodec.h.
Constructor & Destructor Documentation
| AFCodec::AFCodec |
( |
AFCore * |
core |
) |
[inline] |
Constructor for AFCodec.
- Parameters:
-
| core | A pointer to a AFCore owning this codec. |
Definition at line 76 of file AFCodec.h.
| virtual AFCodec::~AFCodec |
( |
|
) |
[inline, virtual] |
Member Function Documentation
| virtual VOID AFCodec::Deinit |
( |
|
) |
[pure virtual] |
Abstracts the process of deinitializing a codec.
A derived class will provide the deinitialization sequence for a particular codec by overriding this member function.
| virtual AFI2SBusCaps* AFCodec::GetI2SBusCaps |
( |
|
) |
[inline, virtual] |
Abstracts the process of retrieving the capabilities of the codec.
- Returns:
- A pointer to AFI2SBusCaps.
Definition at line 287 of file AFCodec.h.
| virtual DWORD AFCodec::GetInputGain |
( |
|
) |
[pure virtual] |
Abstracts the process of getting the input gain from the codec.
- Returns:
- The current input gain used by the codec.
| virtual BOOL AFCodec::GetInputMute |
( |
|
) |
[pure virtual] |
Abstracts the process of checking whether the input stream is on mute or not.
- Returns:
- TRUE if input stream is on mute, FALSE otherwise.
| virtual AFPaths* AFCodec::GetIOPaths |
( |
|
) |
[inline, virtual] |
| virtual DWORD AFCodec::GetOutputGain |
( |
|
) |
[pure virtual] |
Abstracts the process of getting the output gain from the codec.
- Returns:
- The current output gain used by the codec.
| virtual BOOL AFCodec::GetOutputMute |
( |
|
) |
[pure virtual] |
Abstracts the process of checking whether the output stream is on mute or not.
- Returns:
- TRUE if output stream is on mute, FALSE otherwise.
| virtual DWORD AFCodec::GetPowerUsage |
( |
|
) |
[pure virtual] |
Get the power usage of the codec to be reported back to the operating system.
Member function: GetPowerUsage
- Returns:
- The power usage.
| virtual UCHAR AFCodec::GetRegisterWidth |
( |
|
) |
[pure virtual] |
Get the register width of the codec.
Member function: GetRegisterWidth
- Returns:
- The current register width.
| virtual UCHAR AFCodec::GetSlaveAddress |
( |
|
) |
[pure virtual] |
Get the slave address of the codec.
Member function: GetSlaveAddress
- Returns:
- The slave address.
Abstracts the process of initializing a codec.
A derived class will provide the initialization sequence for a particular codec by overriding this member function.
- Parameters:
-
| path | An audio path to be initialized on the codec start-up. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
Abstracts the process of initializing the I2S bus on the codec side.
- Parameters:
-
| cap | A pointer to a AFI2SBusCap providing the capabilities of the codec. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
| virtual BOOL AFCodec::PowerDown |
( |
|
) |
[pure virtual] |
Abstracts the process of powering down the codec.
This function is called by the upper layers of the driver to power-down the codec. A derived class will provide the functionality for a particular codec by overriding this member function.
- Returns:
- TRUE on success, otherwise FALSE.
| virtual BOOL AFCodec::PowerUp |
( |
|
) |
[pure virtual] |
Abstracts the process of powering up the codec.
This function is called by the upper layers of the driver to power-up the codec. A derived class will provide the functionality for a particular codec by overriding this member function.
- Returns:
- TRUE on success, otherwise FALSE.
| virtual VOID AFCodec::SetInputGain |
( |
DWORD |
gain |
) |
[pure virtual] |
Abstracts the process of setting the input gain to the codec.
- Parameters:
-
| virtual AF_STATUS AFCodec::SetInputMute |
( |
BOOL |
mute |
) |
[pure virtual] |
Abstracts the process of muting/unmuting the input stream.
- Parameters:
-
| mute | If TRUE the input stream is muted, otherwise unmuted. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
| virtual VOID AFCodec::SetInputPower |
( |
BOOL |
isOn |
) |
[pure virtual] |
Abstracts the process of turning on/off the ADCs in the codec.
- Parameters:
-
| isOn | If TRUE the ADCs are turned on, otherwise they are turned off. |
| virtual VOID AFCodec::SetOutputGain |
( |
DWORD |
gain |
) |
[pure virtual] |
Abstracts the process of setting the output gain to the codec.
- Parameters:
-
| virtual AF_STATUS AFCodec::SetOutputMute |
( |
BOOL |
mute |
) |
[pure virtual] |
Abstracts the process of muting/unmuting the output stream.
- Parameters:
-
| mute | If TRUE the output stream is muted, otherwise unmuted. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
| virtual AF_STATUS AFCodec::SetOutputPower |
( |
BOOL |
isOn |
) |
[pure virtual] |
Abstracts the process of turning on/off the DACs in the codec.
- Parameters:
-
| isOn | If TRUE the DACs are turned on, otherwise they are turned off. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
| virtual AF_STATUS AFCodec::SetSpeakerEnable |
( |
BOOL |
enable |
) |
[pure virtual] |
Enable/disable forwarding the output stream to the external speakers.
Member function: SetSpeakerEnable
- Parameters:
-
| enable | If TRUE enable forwarding, otherwise disable it. |
- Returns:
- AFS_SUCCESS on success. Check for failure using the AF_FAILURE macro in AFMessages.h.
Member Data Documentation
The register width is the maximum number of bytes needed to address all registers in the codec.
Definition at line 358 of file AFCodec.h.
The documentation for this class was generated from the following file: