Mixer and Controls


Modules

 AES/EBU Digital audio receiver controls
 The AESEBU receiver receives audio from a standard digital audio interface (AESEBU or SPDIF).
 AES/EBU Digital audio transmitter control
 The AESEBU transmitter transmits audio via a standard digital audio interface (AESEBU or SPDIF).
 Bitstream control
 Control synchronous bitstream I/O.
 Channel Mode control
 A Channel Mode allows you to swap the left and right channels, mix the left and right channels into the left or right channel only, or send the left or right channels to both left and right.
 Cobranet control
 A cobranet adapter has one cobranet control for each cobranet interface (usually only one).
 Compressor Expander control
 The compander multiplies its input signal by a factor that is dependent on the amplitude of that signal.
 Level Control
 The level control sets the full scale reference level of the line (analog) inputs and outputs The level is in units of 0.01dBu (0dBu = 0.775 VRMS).
 Meter Control
 The meter control returns information about the level of the audio signal at the position of the control.
 Microphone control
 A Microphone control of type HPI_CONTROL_MICROPHONE is always located on a source node of type HPI_SOURCE_NODE_MICROPHONE.
 Multiplexer control
 This control allows one of many sources to be connected to a destination Typically used on the instream (record) side to select a record input or on the linein to select analog or digital input.
 SampleClock control
 The SampleClock control is used to control the clock source for the adapter.
 Tone Detector control
 The tone detector monitors its inputs for the presence of any of a number of tones.
 Silence Detector Controls
 The silence detector control monitors its input for silence exceeding a set duration.
 Tuner Controls
 The tuner control sets the band and frequency of a tuner, and measures the RF level.
 PAD Control
 The PAD control supports the reading of "Program Associated Data" from a tuner node.
 Volume Control
 Volume controls are usually situated on a "connection" between a source node and a destination node.
 Vox control
 VOX controls are always situated on a destination node of type HPI_DESTNODE_ISTREAM.
 RDS analysis functions
 Parametric Equalizer control
 The parametric equalizer control consists of a series of filters that are applied successively to the signal.

Functions

HPI_ERR HPI_MixerOpen (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HPI_HMIXER *phMixer)
 Opens and initializes an adapters mixer.
HPI_ERR HPI_MixerClose (HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer)
 Closes a mixer.
HPI_ERR HPI_MixerGetControl (HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, HW16 wSrcNodeType, HW16 wSrcNodeTypeIndex, HW16 wDstNodeType, HW16 wDstNodeTypeIndex, HW16 wControlType, HPI_HCONTROL *phControl)
 Gets a mixer control.
HPI_ERR HPI_MixerGetControlByIndex (HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, HW16 wControlIndex, HW16 *pwSrcNodeType, HW16 *pwSrcNodeIndex, HW16 *pwDstNodeType, HW16 *pwDstNodeIndex, HW16 *pwControlType, HPI_HCONTROL *phControl)
 Get the location and type of a mixer control by index.
HPI_ERR HPI_MixerStore (HPI_HSUBSYS *phSubSys, HPI_HMIXER hMixer, enum HPI_MIXER_STORE_COMMAND command, HW16 wIndex)
 Execute a command on the Mixer Control store.
HPI_ERR HPI_API HPI_ControlQuery (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hControl, const HW16 wAttrib, const HW32 dwIndex, const HW32 dwParam, HW32 *pdwSetting)

Function Documentation

HPI_ERR HPI_MixerOpen HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HPI_HMIXER *  phMixer
 

Opens and initializes an adapters mixer.

An Adapter index is passed in and a Mixer handle is passed back. The handle is used for all future calls to that Mixer.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to be opened. Ranges from 0 to 15 and corresponds to the Adapter Index set on the adapter hardware.
phMixer  Returned handle to the Mixer.

HPI_ERR HPI_MixerClose HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer
 

Closes a mixer.

Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Handle to the adapter mixer to close.

HPI_ERR HPI_MixerGetControl HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
HW16  wSrcNodeType,
HW16  wSrcNodeTypeIndex,
HW16  wDstNodeType,
HW16  wDstNodeTypeIndex,
HW16  wControlType,
HPI_HCONTROL *  phControl
 

Gets a mixer control.

The control maybe located in one of three places:

  1. On a connection between a source node and a destination node.
    You specify both source and destination nodes (via type and type index).
  2. On a source node.
    You specify the source node and leave the destination node type and index as 0.
  3. On a destination node.
    You specify the destination node and leave the source node type and index as 0.

Note:
Not all adapters have controls at all nodes, or between all nodes. Consult the Mixer Map for your particular adapter to find out the location and type of controls in its mixer.
Say you have an audio adapter with a mixer that has the following layout:

mixer_get_control.png

You can see that the mixer has two meter controls, located on each of the Outstream source nodes, two volume controls, located between the OutStream sources and the LineOut destination nodes and one level control located on the LineOut destination node.

You would use the following code to obtain a handle to the volume control that lies on the connection between OutStream#1 and LineOut#0:

Example:
wHE = HPI_MixerGetControl(
                &hSubSys,
                hMixer,
                HPI_SOURCENODE_OSTREAM,
                1,
                HPI_DESTNODE_LINEOUT,
                0,
                HPI_CONTROL_VOLUME,
                &hVolControl
                );
You would use the following code to obtain a handle to the level control that lies on the LineOut#0 node:
Example:
        wHE = HPI_MixerGetControl(
                        &hSubSys,
                        hMixer,
                        0,
                        0,
                        HPI_DESTNODE_LINEOUT,
                        0,
                        HPI_CONTROL_LEVEL,
                        &hLevControl
                        );
Returns:
0 on success, or one of the HPI Error codes.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
wSrcNodeType  Source node type i.e. HPI_SOURCENODE_OSTREAM.
wSrcNodeTypeIndex  Index of particular source node type i.e. the 2nd HPI_SOURCENODE_OSTREAM would be specified as index=1.
wDstNodeType  Destination node type i.e. HPI_DESTNODE_LINEOUT.
wDstNodeTypeIndex  Index of particular source node type i.e. the 3rd HPI_DESTNODE_LINEOUT would be specified as index=2
wControlType  Type of mixer control i.e. HPI_CONTROL_METER, VOLUME, METER or LEVEL. See additional HPI_CONTROL_xxxx types defined in section Mixer control types of HPI.H
phControl  Handle to the particular control

HPI_ERR HPI_MixerGetControlByIndex HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
HW16  wControlIndex,
HW16 *  pwSrcNodeType,
HW16 *  pwSrcNodeIndex,
HW16 *  pwDstNodeType,
HW16 *  pwDstNodeIndex,
HW16 *  pwControlType,
HPI_HCONTROL *  phControl
 

Get the location and type of a mixer control by index.

This function is primarily intended to be used to enumerate all the controls in a mixer. To enumerate all the mixer controls of an adapter, iterate wControlIndex from 0 until the function returns HPI_ERROR_INVALID_OBJ_INDEX. The iteration should not be terminated if error HPI_ERROR_CONTROL_DISABLED is returned. This indicates that a control that normally exists is disabled for some reason (possibly hardware failure). The application should not access such controls, but may for instance display a grayed-out GUI control.

A control may exist between two nodes, or on a single node in which case either source or destination node type is set to XXX_BASE. An invalid source node returns HPI_SOURCENODE_BASE, while an invalid destination node will return HPI_DESTNODE_BASE.

Returns:
0 on success, or one of the HPI Error codes.
Return values:
HPI_ERROR_INVALID_OBJ_INDEX when wControlIndex > number of mixer controls
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
wControlIndex  Control Index to query.
pwSrcNodeType  Returned source node type for control at index wControlIndex.
pwSrcNodeIndex  Returned source node index for control at index wControlIndex.
pwDstNodeType  Returned destination node type for control at index wControlIndex.
pwDstNodeIndex  Returned destination node index for control at index wControlIndex.
pwControlType  Returned control type for control at index wControlIndex.
phControl  Returned control handle for control at index wControlIndex.

HPI_ERR HPI_MixerStore HPI_HSUBSYS *  phSubSys,
HPI_HMIXER  hMixer,
enum HPI_MIXER_STORE_COMMAND  command,
HW16  wIndex
 

Execute a command on the Mixer Control store.

Valid commands are members of HPI_MIXER_STORE_COMMAND

Returns:
0 on success, or one of the HPI Error codes.
Return values:
HPI_ERROR_INVALID_OBJ_INDEX when wControlIndex > number of mixer controls
Parameters:
phSubSys  Pointer to HPI subsystem handle.
hMixer  Mixer handle.
command  Command to execute.
wIndex  Optional index.

HPI_ERR HPI_API HPI_ControlQuery const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hControl,
const HW16  wAttrib,
const HW32  dwIndex,
const HW32  dwParam,
HW32 *  pdwSetting
 

Parameters:
phSubSys  Pointer to HPI subsystem handle
hControl  Control to query
wAttrib  An attribute of the control
dwIndex  Index for possible attribute values
dwParam  Supplementary parameter
pdwSetting  One of N possible settings for the control attribute, specified by dwIndex=0..N-1(and possibly depending on the value of the supplementary parameter)


Generated on Tue Nov 18 12:59:30 2008 for AudioScience HPI by  doxygen 1.4.6-NO