Posted: Sat Jan 22, 2000 7:34 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Quote:
So this should be first version usefull to telephony people. I hope
they are listening.
I'm delighted to hear you have DTMF tone detection and RING detection
working!
How hard would it be to turn this into a kernel level driver?
Asterisk wants to have an fd for each device, and when select() on the fd
shows that it's ready for reading or has an exception, it calls the read
function of the appropriate channel driver to read from the fd.
The most likely target API would be the new Linux Telephony API
contributed by QuickNet.
Another option *might* be to use the /dev/irq stuff as the file descriptor
and link a significant part of the ltmodem stuff into the Asterisk itself.
If you use hard IRQ's, does /dev/irq have some event every time the modem
has some important event, or is it still necessary to poll?
Posted: Sat Jan 22, 2000 8:56 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Mark Spencer wrote:
Quote:
Another option *might* be to use the /dev/irq stuff as the file descriptor
and link a significant part of the ltmodem stuff into the Asterisk itself.
If you use hard IRQ's, does /dev/irq have some event every time the modem
has some important event, or is it still necessary to poll?
You don't need irqs at all for ltmodem, at least not for voice mode.
Posted: Sat Jan 22, 2000 8:59 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Quote:
You don't need irqs at all for ltmodem, at least not for voice mode.
I know you don't *need* IRQ's, but I'm looking for a way to select() on
something and have an event trigger a read. If it can be configured such
that an irq is genereated with each event, and /dev/irq reports that
either by exception or by having something to read, that would be the
minimum needed, in theory, to do it.
Also, has ltmodem been mindful of keeping states for multiple winmodems,
or do you use lots of global variables?
Posted: Sat Jan 22, 2000 9:16 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Quote:
Global variables, lots of them.
Gack. That's bad practice in general.
Greg
/********************************************************************
Greg Herlein Quicknet Technologies, Inc.
Member of Technical Staff 415-864-5225 x541
gherlein@quicknet.nethttp://www.quicknet.net
*********************************************************************/
Posted: Sat Jan 22, 2000 10:17 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Quote:
> Global variables, lots of them.
Gack. That's bad practice in general.
It took me *three days* to make the mp3 code re-entrant (of course, it was
quite literally the worst code I've ever seen in my entire life -- look
for yourself if you don't believe me). It's definitely worth it to start
out with reentrancy early on. Note that reentrancy doesn't mean you have
to use threads, only that you have to be sure that you keep all your state
in structs that are passed around.
Posted: Sun Jan 23, 2000 6:34 am Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Greg Herlein wrote:
Quote:
> Global variables, lots of them.
Gack. That's bad practice in general.
We started by copying the structure of Lucent's driver, which of course
uses all global variables. It's quite enough work getting it going from
reading the original machine code, without trying to abstractify as you
go...
For kernel drivers global variables aren't a problem: you can load the
driver multiple times in the rare event that you actually have more
ltmodems. In fact it's slightly more efficient for the single-user case
that way.
Turning globals into structure members need only be a matter of a few
macros and an extra argument to every function. No big deal should it
be required.
Posted: Sun Jan 23, 2000 7:42 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Hi!
Quote:
> So this should be first version usefull to telephony people. I hope
> they are listening.
I'm delighted to hear you have DTMF tone detection and RING detection
working!
Who said we have dtmf detection working? Not me. But yes, dtmf
detection is possible with multimon package.
Quote:
How hard would it be to turn this into a kernel level driver?
Not hard. But I'm not sure it is good idea. It does not _need_ to be
in kernel, so it should not be in kernel.
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org
Posted: Sun Jan 23, 2000 7:43 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Hi!
Quote:
> You don't need irqs at all for ltmodem, at least not for voice mode.
I know you don't *need* IRQ's, but I'm looking for a way to select() on
something and have an event trigger a read. If it can be configured such
that an irq is genereated with each event, and /dev/irq reports that
either by exception or by having something to read, that would be the
minimum needed, in theory, to do it.
Also, has ltmodem been mindful of keeping states for multiple winmodems,
or do you use lots of global variables?
You simply launch one ltmodem instance for each winmodem, no problem
here.
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org
Posted: Mon Jan 24, 2000 11:34 pm Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Would Asterisk work if the ltmodem driver created an entry in the
/proc filesystem? It could be kept user-space that way.
Pavel Machek wrote:
Quote:
Hi!
> > So this should be first version usefull to telephony people. I hope
> > they are listening.
>
> I'm delighted to hear you have DTMF tone detection and RING detection
> working!
Who said we have dtmf detection working? Not me. But yes, dtmf
detection is possible with multimon package.
> How hard would it be to turn this into a kernel level driver?
Not hard. But I'm not sure it is good idea. It does not _need_ to be
in kernel, so it should not be in kernel.
Pavel
--
I'm pavel@ucw.cz. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents me at discuss@linmodems.org
--
-----------------------------
Jon 'the maddman' Frederick
-----------------------------
Posted: Tue Jan 25, 2000 2:52 am Post subject: [Asterisk] Re: OS ltmodem 0.9.8 -- works!
Quote:
Would Asterisk work if the ltmodem driver created an entry in the
/proc filesystem? It could be kept user-space that way.
/proc is done only by the kernel. If anything one would make a named
pipe, but I feel that the driver should be either in the kernel, in
Asterisk, or both, with my preference being having something in the
kernel.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum