[asterisk-dev] dahdi sysfs branch
tzafrir.cohen at xorcom.com
Tue Jan 20 07:20:42 CST 2009
On Sun, Dec 07, 2008 at 03:36:48AM +0200, Tzafrir Cohen wrote:
> I've created a branch for dahdi improved sysfs interface. At the moemnt
> it already implements some useful features and usable for other
> developers to look at. It has most of the main features I wanted.
> It is generally not intended for merge before 2.1.0 is released, as it
> is a major change.
> The branch:
Progress there at last.
What is currently not represented there:
pseudo channels get channel numbers allocated to them. But we don't see
them under any span. They are simply "holes". Would it make sense to
have a "span-pseudo" on the spans bus? It is a container of channels but
not a span for practically any other reason. It will also be the only
"span" with a variable number of channels, hwich might break one or two
As mentioned in the previous mail, most drivers lack a real
representation for the actual device that holds the span. Which is why
the data structure that is used to represent the span has fields such as
"irq" and "location".
While previously I hoped to see all devices under /sys/devices/dahdi , I
now realise that a separate device tree is not a good idea. I will keep
it for now, but this may change on future versions. Userspace programs
should use /sys/bus/spans/devices instead .
I have already started attributes to channels. Right now I just picked
up some fields from the dahdi_chan struct, as it was dead easy:
$ ls -F /sys/bus/spans/devices/span-003/003\:72/
blocksize chan_alarms chanpos name sig subsystem@ uevent
bus@ channo echocancel power/ sigcap tonezone
(bus, power, subsystem and uevent are generic sysfs attributes)
Note that this exposes to userspace fields from a struct that is
currently not even in dahdi/user.h . name, channo, chanpos, sig and
sigcap are probably things that should be exposed. Though maybe renamed
(trivia: what is channo and what is chanpos?)
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev