Function

void dahdi_alarm_channel (struct dahdi_chan * chan, int alarms)

Arguments

chan
the DAHDI channel
alarms
alarm bits set

Description

Notify userspace about a change in alarm status of this channel.

Note that channel drivers should only use this function directly if they have a single port per channel. Whole-span alarms should be sent using dahdi_alarm_notify .

Does nothing if alarms on the channel have not changed. If they have, triggers sending either DAHDI_EVENT_NOALARM (if they were cleared) or DAHDI_EVENT_ALARM (otherwise).

Currently it is only used by drivers of FXO ports to notify (with a red alarm) they have no battery current.


Function

int dahdi_register (struct dahdi_span * span, int prefmaster)

Arguments

span
the DAHDI span
prefmaster
will the new span be preffered as a master?

Description

Registers a span for usage with DAHDI. All the channel numbers in it will get the lowest available channel numbers.

If prefmaster is set to anything > 0, span will attempt to become the master DAHDI span at registration time. If 0: it will only become master if no other span is currently the master (i.e.: it is the first one).


Function

int dahdi_unregister (struct dahdi_span * span)

Arguments

span
the DAHDI span

Description

Unregisters a span that has been previously registered with dahdi_register.

Function

void dahdi_hooksig (struct dahdi_chan * chan, enum dahdi_rxsig rxsig)

Arguments

chan
the DAHDI channel
rxsig
signal (number) to send

Description

Called from a channel driver to send a DAHDI signal to userspace. The signal will be queued for delivery to userspace.

If the signal is the same as previous one sent, it won't be re-sent.


Function

void dahdi_rbsbits (struct dahdi_chan * chan, int cursig)

Arguments

chan
the DAHDI channel
cursig
the bits to set

Description

Set the channel's rxsig (recieved: from device to userspace) and act accordingly.

Function

void dahdi_ec_chunk (struct dahdi_chan * ss, unsigned char * rxchunk, const unsigned char * txchunk)

Arguments

ss
DAHDI channel
rxchunk
chunk of audio on which to cancel echo
txchunk
reference chunk from the other direction

Description

The echo canceller function fixes recieved (from device to userspace) audio. In order to fix it it uses the transmitted audio as a reference. This call updates the echo canceller for a single chunk (8 bytes).

Function

void dahdi_ec_span (struct dahdi_span * span)

Arguments

span
DAHDI span

Description

Similar to calling dahdi_ec_chunk for each of the channels in the span. Uses dahdi_chunk.write_chunk for the rxchunk (the chunk to fix) and dahdi_chan.readchunk as the txchunk (the reference chunk).