Prosody generic: API: sm_channel_info

Prototype Definition

int sm_channel_info(struct sm_channel_info_parms *infop)

Parameters

*infop
a structure of the following type:
typedef struct sm_channel_info_parms {
	tSMChannelId channel;					/* in */
	tSM_INT card;						/* out */
	tSM_INT ost;						/* out */
	tSM_INT ots;						/* out */
	/* Only in Prosody version 2 (TiNG) */
	enum kSMTimeslotType otype;				/* out */
	/* End of part only in Prosody version 2 (TiNG) */
	tSM_INT ist;						/* out */
	tSM_INT its;						/* out */
	/* Only in Prosody version 2 (TiNG) */
	enum kSMTimeslotType itype;				/* out */
	/* End of part only in Prosody version 2 (TiNG) */
	tSM_INT group;						/* out */
	tSM_INT caps_mask;					/* out */
} SM_CHANNEL_INFO_PARMS;

Description

This call allows an application to locate a previously allocated speech processing resource so that a data can be switched through to it by means of a call to the Aculab switch driver API.

If channel is an identifier for a previously allocated input, half-duplex, or full-duplex channel, then the parameters card, ist, and its returned by this call may be assigned to the ost and ots parameters of a switch driver CONNECT_MODE call to sw_set_output, with <ist, its> in the OUTPUT_PARMS parameter block being set to the source of the data to be processed by the channel.

If channel is an identifier for a previously allocated output, half-duplex, or full-duplex channel, then the parameters card, ost, and ots returned by this call may be assigned to the ist and its parameters of a switch driver CONNECT_MODE call to sw_set_output with <ost, ots> int the OUTPUT_PARMS parameter block being set to the destination for data to be generated by the channel.

The card is not the Prosody carrier card index, it is the value -1 except for implementations before the V6 API.

Only on Prosody before the V6 API: The card field is the switch driver API switch driver index for the Prosody carrier card.

Note, for channels located on Prosody modules that have no associated switch driver (eg. the Prosody ISA card), card will always be set to -1, (the stream and timeslot numbers will denote a timeslot on the MVIP bus or SCbus, or will be set to -1 if this assignment is left to the application to manage. See also sm_switch_channel_input() and sm_switch_channel_output()).

If the channel was associated with a particular group of channels, then group is set to the corresponding group identifier, otherwise it is set to zero.

The caps_mask parameter indicates the set of channel capabilities (see sm_channel_alloc() for bit definitions).

Fields

channel
The channel whose information is required.
card
Only on Prosody before the V6 API: The switch driver's card number for this channel.
ost
The channel's output stream.
ots
The channel's output timeslot.
otype (Only in Prosody version 2 (TiNG))
The output timeslot type.
One of these values:
kSMTimeslotTypeALaw
Signals encoded with A-law companding.
kSMTimeslotTypeMuLaw
Signals encoded with mu-law companding.
kSMTimeslotTypeData
Digital data - no companding used.
ist
The channel's input stream.
its
The channel's input timeslot.
itype (Only in Prosody version 2 (TiNG))
The input timeslot type.
One of these values:
kSMTimeslotTypeALaw
Signals encoded with A-law companding.
kSMTimeslotTypeMuLaw
Signals encoded with mu-law companding.
kSMTimeslotTypeData
Digital data - no companding used.
group
The channel's group number.
caps_mask
The channel's capabilities as specified when it was allocated.

Returns

0 if call completed successfully, otherwise a standard error such as:


This function is part of the Prosody generic API.