[Asterisk-Dev] Question about wctdm.c
Nick Bachmann
asterisk at not-real.org
Fri Apr 22 17:37:52 MST 2005
Robert Webb wrote:
> I was perusing the wctdm.c code trying to understand it better as I
> am still having issues with ringing on an fxs module. I am pretty
> much able to follow the coding, even though I am certainly not a
> programmer, and had a question about a particular line of code.
>
> The line is:
>
> wctdm_setreg(wc, card, 34, (3-card) * 8);
>
> I am assuming this is the line of code sets register 34 on the
> proslic to setup sinusodial ringing. What I have not been able to
> figure out is where the value for "card" is defined.
Look at the function header:
static int wctdm_init_voicedaa(struct wctdm *wc, int card, int fast, int
manual, int sane) {
card is passed as an int from whatever functions call
wctdm_int_voicedaa(). A quick search reveals that wctdm_hardware_init()
is one of those, and you can probably follow most of the logic in there
as to how it figures card (it's using the variable 'x').
Nick
More information about the asterisk-dev
mailing list