Loading...
Searching...
No Matches
VTCore Class Reference
Internal API functions » VTCore HostDSP implementation

Support for cards using the `vtcore` driver. More...

`#include <vtcore.h>`

Inheritance diagram for VTCore:
Collaboration diagram for VTCore:

## Public Member Functions

| VTCore (VPBREG &reg)
| Constructor.
| ~VTCore ()
| Destructor.
void | Reset (unsigned int port)
| Reset port to its default cold-start state.
void | SetCountry (int port, const Country *country)
| Configure the hardware for country on port of this board.
void | SetHookState (int port, HookState hookstate)
| Set the hook state of port.
void | SetFlashTime (int port, uint16_t min, uint16_t max)
| Configure the hook-flash detection window.
void | PadTxFrame (int port)
| Pad a partial transmit frame for forwarding to the hardware.
void | WaitForTxEmpty (int port)
| Block until the transmit buffers for port are empty.
void | SetPSImpedance (int port, int impedance)
| Override the default impedance for ProSLIC ports.
void | SetVDAAImpedance (int port, int impedance)
| Override the default impedance for VDAA ports.
float | GetHWPlayGain (unsigned int port)
float | GetHWRecordGain (unsigned int port)
void | TapListen (unsigned int port, unsigned int srcboard, unsigned int srcport)
| Create a full duplex tap to port of the audio from srcport on srcboard.
void | UNListen (unsigned int port)
| Remove a half duplex bridge or full duplex tap from port.
int | chan_state (int ch)
| Get the current state of a port.
VPB_PORT | chan_type (int ch)
| Get the type of a port.
HookState | hook_state (int ch)
| Get the hook state of a port.
Public Member Functions inherited from HostDSP
| HostDSP (VPBREG &reg)
| Constructor.
virtual | ~HostDSP ()
| Destructor.

## Additional Inherited Members

Protected Member Functions inherited from HostDSP
| HostDSP (bool, VPBREG &reg)
| Bare bones constructor for hardware DSP implementations.
Protected Attributes inherited from HostDSP
VPBREG & | m_reg
| Reference to the `VPBREG` structure for this `HostDSP`.

## Detailed Description

Support for cards using the `vtcore` driver.

## Member Function Documentation

## GetHWPlayGain()

float VTCore::GetHWPlayGain | ( | unsigned int | port | ) |

virtual

Reimplemented from HostDSP.

## GetHWRecordGain()

float VTCore::GetHWRecordGain | ( | unsigned int | port | ) |

virtual

Reimplemented from HostDSP.

## PadTxFrame()

void VTCore::PadTxFrame | ( | int | port | ) |

virtual

Pad a partial transmit frame for forwarding to the hardware.

Implements HostDSP.

References HostDSP::m_reg.

## Reset()

void VTCore::Reset | ( | unsigned int | port | ) |

virtual

Reset port to its default cold-start state.

Implements HostDSP.

References get_country(), HostDSP::m_reg, play_reset_hw_gain(), record_reset_hw_gain(), set_country(), UNListen(), vpb_c, and vpb_get_country_data().

## SetCountry()

void VTCore::SetCountry | ( | int | port,
|  | const Country * | country )

virtual

Configure the hardware for country on port of this board.

Implements HostDSP.

References Country::drop_max, Country::drop_min, Country::flash_max, Country::flash_min, Country::lv_offhook, Country::lv_onhook, HostDSP::m_reg, Country::name, VPB_FXO, and VPB_FXS.

Referenced by SetPSImpedance(), and SetVDAAImpedance().

## SetFlashTime()

void VTCore::SetFlashTime | ( | int | port,
|  | uint16_t | min,
|  | uint16_t | max )

virtual

Configure the hook-flash detection window.

Reimplemented from HostDSP.

References HostDSP::m_reg.

## SetHookState()

void VTCore::SetHookState | ( | int | port,
|  | HookState | hookstate )

virtual

Set the hook state of port.

Implements HostDSP.

References HostDSP::m_reg, VPB_FASTOFFHOOK, VPB_OFFHOOK, and VPB_ONHOOK.

## SetPSImpedance()

void VTCore::SetPSImpedance | ( | int | port,
|  | int | impedance )

virtual

Override the default impedance for ProSLIC ports.

Reimplemented from HostDSP.

References get_country(), HostDSP::m_reg, and SetCountry().

## SetVDAAImpedance()

void VTCore::SetVDAAImpedance | ( | int | port,
|  | int | impedance )

virtual

Override the default impedance for VDAA ports.

Reimplemented from HostDSP.

References get_country(), HostDSP::m_reg, and SetCountry().

## TapListen()

void VTCore::TapListen | ( | unsigned int | port,
|  | unsigned int | srcboard,
|  | unsigned int | srcport )

virtual

Create a full duplex tap to port of the audio from srcport on srcboard.

Reimplemented from HostDSP.

References HostDSP::m_reg.

## UNListen()

void VTCore::UNListen | ( | unsigned int | port | ) |

virtual

Remove a half duplex bridge or full duplex tap from port.

Reimplemented from HostDSP.

References HostDSP::m_reg.

Referenced by Reset().

## WaitForTxEmpty()

void VTCore::WaitForTxEmpty | ( | int | port | ) |

virtual

Block until the transmit buffers for port are empty.

Implements HostDSP.

References HostDSP::m_reg.