Import Upstream version 2.1.2
This commit is contained in:
commit
fdc5ebc302
|
@ -0,0 +1,13 @@
|
|||
Current maintainer: Stefan Richter. Send questions, bug reports, patches to:
|
||||
<linux1394-devel@lists.sourceforge.net>
|
||||
|
||||
Prior maintainer: Dan Dennedy <dan@dennedy.org>
|
||||
Original author: Andreas Bombe <andreas.bombe@munich.netsurf.de>
|
||||
or <bombe@informatik.tu-muenchen.de>
|
||||
Contributors:
|
||||
Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
Christian Toegel <christian.toegel@gmx.at>
|
||||
Dan Maas <dmaas@maasdigital.com>
|
||||
Ben Collins <bcollins@debian.org>
|
||||
Pieter Palmers <pieterp@joow.be>
|
||||
and others, see git log.
|
|
@ -0,0 +1,515 @@
|
|||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it
|
||||
does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper
|
||||
mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
|
@ -0,0 +1,370 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
Copying and distribution of this file, with or without modification,
|
||||
are permitted in any medium without royalty provided the copyright
|
||||
notice and this notice are preserved. This file is offered as-is,
|
||||
without warranty of any kind.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell command `./configure && make && make install'
|
||||
should configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package. Some packages provide this
|
||||
`INSTALL' file but do not implement all of the features documented
|
||||
below. The lack of an optional feature in a given package is not
|
||||
necessarily a bug. More recommendations for GNU packages can be found
|
||||
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package, generally using the just-built uninstalled binaries.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation. When installing into a prefix owned by root, it is
|
||||
recommended that the package be configured and built as a regular
|
||||
user, and only the `make install' phase executed with root
|
||||
privileges.
|
||||
|
||||
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||
this time using the binaries in their final installed location.
|
||||
This target does not install anything. Running this target as a
|
||||
regular user, particularly if the prior `make install' required
|
||||
root privileges, verifies that the installation completed
|
||||
correctly.
|
||||
|
||||
6. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
7. Often, you can also type `make uninstall' to remove the installed
|
||||
files again. In practice, not all packages have tested that
|
||||
uninstallation works correctly, even though it is required by the
|
||||
GNU Coding Standards.
|
||||
|
||||
8. Some packages, particularly those that use Automake, provide `make
|
||||
distcheck', which can by used by developers to test that all other
|
||||
targets like `make install' and `make uninstall' work correctly.
|
||||
This target is generally not run by end users.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. Run `./configure --help'
|
||||
for details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'. This
|
||||
is known as a "VPATH" build.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
On MacOS X 10.5 and later systems, you can create libraries and
|
||||
executables that work on multiple system types--known as "fat" or
|
||||
"universal" binaries--by specifying multiple `-arch' options to the
|
||||
compiler but only a single `-arch' option to the preprocessor. Like
|
||||
this:
|
||||
|
||||
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||
CPP="gcc -E" CXXCPP="g++ -E"
|
||||
|
||||
This is not guaranteed to produce working output in all cases, you
|
||||
may have to build one architecture at a time and combine the results
|
||||
using the `lipo' tool if you have problems.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||
absolute file name.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them. In general, the
|
||||
default for these options is expressed in terms of `${prefix}', so that
|
||||
specifying just `--prefix' will affect all of the other directory
|
||||
specifications that were not explicitly provided.
|
||||
|
||||
The most portable way to affect installation locations is to pass the
|
||||
correct locations to `configure'; however, many packages provide one or
|
||||
both of the following shortcuts of passing variable assignments to the
|
||||
`make install' command line to change installation locations without
|
||||
having to reconfigure or recompile.
|
||||
|
||||
The first method involves providing an override variable for each
|
||||
affected directory. For example, `make install
|
||||
prefix=/alternate/directory' will choose an alternate location for all
|
||||
directory configuration variables that were expressed in terms of
|
||||
`${prefix}'. Any directories that were specified during `configure',
|
||||
but not in terms of `${prefix}', must each be overridden at install
|
||||
time for the entire installation to be relocated. The approach of
|
||||
makefile variable overrides for each directory variable is required by
|
||||
the GNU Coding Standards, and ideally causes no recompilation.
|
||||
However, some platforms have known limitations with the semantics of
|
||||
shared libraries that end up requiring recompilation when using this
|
||||
method, particularly noticeable in packages that use GNU Libtool.
|
||||
|
||||
The second method involves providing the `DESTDIR' variable. For
|
||||
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||
`/alternate/directory' before all installation names. The approach of
|
||||
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||
does not work on platforms that have drive letters. On the other hand,
|
||||
it does better at avoiding recompilation issues, and works well even
|
||||
when some directory options were not specified in terms of `${prefix}'
|
||||
at `configure' time.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Some packages offer the ability to configure how verbose the
|
||||
execution of `make' will be. For these packages, running `./configure
|
||||
--enable-silent-rules' sets the default to minimal output, which can be
|
||||
overridden with `make V=1'; while running `./configure
|
||||
--disable-silent-rules' sets the default to verbose, which can be
|
||||
overridden with `make V=0'.
|
||||
|
||||
Particular systems
|
||||
==================
|
||||
|
||||
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||
CC is not installed, it is recommended to use the following options in
|
||||
order to use an ANSI C compiler:
|
||||
|
||||
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||
|
||||
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||
|
||||
HP-UX `make' updates targets which have the same time stamps as
|
||||
their prerequisites, which makes it generally unusable when shipped
|
||||
generated files such as `configure' are involved. Use GNU `make'
|
||||
instead.
|
||||
|
||||
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||
to try
|
||||
|
||||
./configure CC="cc"
|
||||
|
||||
and if that doesn't work, try
|
||||
|
||||
./configure CC="cc -nodtk"
|
||||
|
||||
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||
directory contains several dysfunctional programs; working variants of
|
||||
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||
in your `PATH', put it _after_ `/usr/bin'.
|
||||
|
||||
On Haiku, software installed for all users goes in `/boot/common',
|
||||
not `/usr/local'. It is recommended to use the following options:
|
||||
|
||||
./configure --prefix=/boot/common
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out
|
||||
automatically, but needs to determine by the type of machine the package
|
||||
will run on. Usually, assuming the package is built to be run on the
|
||||
_same_ architectures, `configure' can figure that out, but if it prints
|
||||
a message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS
|
||||
KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf limitation. Until the limitation is lifted, you can use
|
||||
this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of all of the options to `configure', and exit.
|
||||
|
||||
`--help=short'
|
||||
`--help=recursive'
|
||||
Print a summary of the options unique to this package's
|
||||
`configure', and exit. The `short' variant lists options used
|
||||
only in the top level, while the `recursive' variant lists options
|
||||
also present in any nested packages.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--prefix=DIR'
|
||||
Use DIR as the installation prefix. *note Installation Names::
|
||||
for more details, including other options available for fine-tuning
|
||||
the installation locations.
|
||||
|
||||
`--no-create'
|
||||
`-n'
|
||||
Run the configure checks, but stop before creating any output
|
||||
files.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
|
@ -0,0 +1,27 @@
|
|||
# process this file with automake to create a Makefile.in
|
||||
|
||||
SUBDIRS = src tools doc
|
||||
|
||||
pkgconfigdir = @libdir@/pkgconfig
|
||||
pkgconfig_DATA = libraw1394.pc
|
||||
|
||||
EXTRA_DIST = libraw1394.pc libraw1394.spec
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in stamp-h.in \
|
||||
depcomp install-sh missing mkinstalldirs config.guess ltmain.sh
|
||||
|
||||
doc: psdoc pdfdoc htmldoc
|
||||
|
||||
psdoc:
|
||||
$(MAKE) -C doc psdoc
|
||||
|
||||
pdfdoc:
|
||||
$(MAKE) -C doc pdfdoc
|
||||
|
||||
htmldoc:
|
||||
$(MAKE) -C doc htmldoc
|
||||
|
||||
.PHONY: doc psdoc pdfdoc htmldoc
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) && gitlog2changelog.py && cd -
|
|
@ -0,0 +1,903 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# process this file with automake to create a Makefile.in
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
|
||||
$(am__configure_deps) $(am__DIST_COMMON)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES = libraw1394.pc libraw1394.spec
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(pkgconfigdir)"
|
||||
DATA = $(pkgconfig_DATA)
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(srcdir)/libraw1394.pc.in $(srcdir)/libraw1394.spec.in \
|
||||
AUTHORS COPYING.LIB ChangeLog INSTALL NEWS README compile \
|
||||
config.guess config.sub install-sh ltmain.sh missing
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_age = @lt_age@
|
||||
lt_major = @lt_major@
|
||||
lt_revision = @lt_revision@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
SUBDIRS = src tools doc
|
||||
pkgconfigdir = @libdir@/pkgconfig
|
||||
pkgconfig_DATA = libraw1394.pc
|
||||
EXTRA_DIST = libraw1394.pc libraw1394.spec
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure config.h.in stamp-h.in \
|
||||
depcomp install-sh missing mkinstalldirs config.guess ltmain.sh
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
libraw1394.pc: $(top_builddir)/config.status $(srcdir)/libraw1394.pc.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
libraw1394.spec: $(top_builddir)/config.status $(srcdir)/libraw1394.spec.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-pkgconfigDATA: $(pkgconfig_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgconfigDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@case `sed 15q $(srcdir)/NEWS` in \
|
||||
*"$(VERSION)"*) : ;; \
|
||||
*) \
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1;; \
|
||||
esac
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build/sub \
|
||||
&& ../../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=../.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile $(DATA) config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(pkgconfigdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgconfigDATA
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-pkgconfigDATA
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
|
||||
dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
installdirs-am maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
|
||||
ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-pkgconfigDATA
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
doc: psdoc pdfdoc htmldoc
|
||||
|
||||
psdoc:
|
||||
$(MAKE) -C doc psdoc
|
||||
|
||||
pdfdoc:
|
||||
$(MAKE) -C doc pdfdoc
|
||||
|
||||
htmldoc:
|
||||
$(MAKE) -C doc htmldoc
|
||||
|
||||
.PHONY: doc psdoc pdfdoc htmldoc
|
||||
|
||||
dist-hook:
|
||||
cd $(distdir) && gitlog2changelog.py && cd -
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,197 @@
|
|||
libraw1394 Release Notes
|
||||
|
||||
Version 2.1.2:
|
||||
- Fix build with some alternative C libraries and with some older
|
||||
build environments. No functional changes.
|
||||
|
||||
Version 2.1.1:
|
||||
- Fix backwards moving cycle timer in isochronous transmit.
|
||||
The problem has been observed with audio I/O on different systems.
|
||||
- Fix crash with SIGBUS on SPARC and similar architectures.
|
||||
- Fix memory leak in address range mapping response handler.
|
||||
- Fix errno reporting to applications which relied on behavior of
|
||||
libraw1394 1.x.
|
||||
- Fix errno checking in the dumpiso and sendiso example programs.
|
||||
- Minor documentation improvement.
|
||||
|
||||
Version 2.1.0:
|
||||
- Behavior changes of the backend to firewire-core:
|
||||
- The isochronous reception buffer is now mapped read/writable
|
||||
rather than read-only. The raw1394 backend already maps the
|
||||
buffer read/writable too. Note that writing into the buffer
|
||||
will go wrong on architectures without cache-coherent DMA if
|
||||
the CPU and the OHCI write within the same cacheline region,
|
||||
so use this feature with caution.
|
||||
- Decrease memory footprint of IR and IT buffers by avoiding
|
||||
some internal rounding up of the buffer size.
|
||||
- New APIs in <libraw1394/raw1394.h>:
|
||||
- raw1394_add_config_rom_descriptor():
|
||||
Add contents to the Configuration ROM of the local node(s).
|
||||
At runtime, this API is only available if running on top of
|
||||
firewire-core. It could probably also be implemented with
|
||||
the raw1394 kernel driver if anybody cared.
|
||||
- raw1394_remove_config_rom_descriptor():
|
||||
Counterpart to raw1394_add_config_rom_descriptor().
|
||||
- raw1394_read_cycle_timer_and_clock():
|
||||
Like the existing raw1394_read_cycle_timer(), but lets the
|
||||
caller choose between CLOCK_REALTIME (which the former call
|
||||
is always using), CLOCK_MONOTONIC, or CLOCK_MONOTONIC_RAW.
|
||||
For example, this enables libffado's audio streaming to run
|
||||
undisturbed by resets of CLOCK_REALTIME.
|
||||
At runtime, this call requires firewire-core underneath.
|
||||
- raw1394_get_speed():
|
||||
Returns the speed code of the maximum possible transmission
|
||||
speed between a given node and the local node. This takes
|
||||
maximum speeds of all participating PHYs and the two links
|
||||
into account. This can be used to configure the speed of
|
||||
isochronous streams.
|
||||
At runtime, this call requires firewire-core underneath.
|
||||
- enum raw1394_iso_speed was extended by
|
||||
RAW1394_ISO_SPEED_800, _1600, and _3200.
|
||||
- New APIs in <libraw1394/ieee1394.h>:
|
||||
- Added preprocessor constants
|
||||
L1394_SPEED_BETA, L1394_SPEED_800, _1600, and _3200.
|
||||
- testlibraw1394:
|
||||
Added unit tests of the new APIs.
|
||||
|
||||
Version 2.0.9:
|
||||
- Fix that raw1394_iso_recv_flush() did not have any effect when running
|
||||
on firewire-core alias juju kernel drivers. Requires kernel 3.4 or
|
||||
later.
|
||||
- Remove build-time dependency on linux-headers. Before, if too old
|
||||
kernel headers were present on the build system, features and fixes
|
||||
would be silently omitted from the build.
|
||||
- Remove --with-fw-dir configure switch which is no longer useful.
|
||||
- Janitorial fixes.
|
||||
|
||||
Version 2.0.8:
|
||||
- Configuration ROM access via raw1394_read() is dramatically faster and
|
||||
very robust now. We read the kernel's Configuration ROM cache instead
|
||||
of the actual register of the FireWire device.
|
||||
- Internally retry raw1394_read/write/lock/lock64() after ack-busy
|
||||
response. Most notably this fixes control of some older Panasonic and
|
||||
Grundig camcorders.
|
||||
- small bug fixes
|
||||
|
||||
Version 2.0.7:
|
||||
- Fix playback to some audio devices based on the DICE chipset.
|
||||
|
||||
Version 2.0.6:
|
||||
- Bug fixes, notably for FCP and request reception on firewire-core.
|
||||
Note, several of these updates are only built into libraw1394 if
|
||||
linux-headers 2.6.36 or later are present at build time.
|
||||
|
||||
Version 2.0.5:
|
||||
- Bug fixes, in particular, for isochronous transmission and FFADO project.
|
||||
|
||||
Version 2.0.4:
|
||||
- Fix build due to incomplete tarball.
|
||||
|
||||
Version 2.0.3:
|
||||
- various bug fixes, in particular for firewire stack
|
||||
|
||||
Version 2.0.2:
|
||||
- Fixed license headers on new files introduced in v2.0.0 to be consistent
|
||||
with LGPL v2.1.
|
||||
|
||||
Version 2.0.1:
|
||||
- Optimized usage of /dev/fw? nodes based upon user permissions.
|
||||
- many good bugfixes
|
||||
|
||||
Version 2.0.0:
|
||||
- added support for new firewire subsystem.
|
||||
- removed deprecated isochronous functions.
|
||||
|
||||
Version 1.3.0:
|
||||
- added raw1394_read_cycle_timer() as used by FFADO project.
|
||||
- added support for environment variable RAW1394DEV to override default
|
||||
device node /dev/raw1394.
|
||||
- added --with-valgrind to configure script.
|
||||
- other optimizations and bugfixes - see ChangeLog.
|
||||
|
||||
Version 1.2.1:
|
||||
- generate compiler warnings on deprecated functions (legacy isochronous).
|
||||
- bugfixes and optimizations.
|
||||
|
||||
Version 1.2.0:
|
||||
- added constants useful for ARM: transaction and response return codes.
|
||||
- added raw1394_bandwidth_modify() and raw1394_channel_modify().
|
||||
|
||||
Version 1.1.0:
|
||||
- added ability to specify the isochronous receive mode in the new
|
||||
rawiso (raw1394_iso_*) API. Therefore, the signature of
|
||||
raw1394_iso_recv_init() changed, and likewise, the libtool/.so version
|
||||
numbers changed to reflect a new interface that is not backwards compatible!
|
||||
- added raw1394_arm_set_buf() and raw1394_arm_get_buf() functions.
|
||||
- added raw1394_new_handle_on_port() to make initialization simpler.
|
||||
- make versioning consistent and updated. 1.0.0 was reported by pkg-config in
|
||||
0.10 series; hence, 1.1.0 in this release.
|
||||
- removed outdated, bogus "linking required only" version symbols in
|
||||
version.c - use pkg-config now.
|
||||
- dropped libraw1394.m4 - use pkg-config now.
|
||||
- added RPM spec file.
|
||||
- deprecate old isochronous API.
|
||||
- move API comment documentation to header and reformat header comments as
|
||||
kernel-doc (use linux/scripts/kernel-doc to extract and format them).
|
||||
- updated tools/dumpiso and tools/sendiso to new isochronous API.
|
||||
|
||||
Version 0.10:
|
||||
|
||||
- merged in the rawiso branch
|
||||
- add sendiso and dumpiso tools with man files
|
||||
- fix wrong error mapping on local transactions in raw1394_errcode_to_errno().
|
||||
- added comment headers for most exported functions
|
||||
- merged in weihs branch which brings new functionality including address
|
||||
range mapping, reading and writing configROM images, additional bus reset
|
||||
handling, and others.
|
||||
|
||||
Version 0.9:
|
||||
|
||||
- error reporting reworked to be more C library style; functions affected are
|
||||
mainly raw1394_read(), raw1394_write(), raw1394_lock;
|
||||
Source incompatibility! Parts need to be adapted in application code, but
|
||||
it's well worth it.
|
||||
- the generation number is not unconditionally updated on bus reset in the event
|
||||
loop anymore, the new function raw1394_update_generation() has to be used
|
||||
(unless the default bus reset handler is used) so that transactions won't fail
|
||||
- iso handlers used to get the iso header quadlet in host endian, now they get
|
||||
it in big endian like the rest of the packet for consistency
|
||||
- testlibraw gets installed now, man page also included
|
||||
- (not yet complete) documentation in Docbook format included
|
||||
- libraw1394.m4 autoconf macro added
|
||||
|
||||
Version 0.8:
|
||||
|
||||
- added libraw1394/ieee1394.h with useful defines (especially ack and rcodes)
|
||||
- function to query isochronous resource manager ID
|
||||
- functions for isochronous sending
|
||||
- new raw1394_reset_bus() function to reset the bus
|
||||
|
||||
Version 0.7:
|
||||
|
||||
- added support for environments where the kernel runs in 64 bit mode whereas
|
||||
user space runs in 32 bit mode
|
||||
- fixed lock transaction to actually return the required response; these
|
||||
functions are actually useful now, prototypes for raw1394_start_lock and
|
||||
raw1394_lock changed
|
||||
- a void pointer can now be stored as user data with a handle
|
||||
|
||||
Version 0.6:
|
||||
|
||||
- FCP monitoring added
|
||||
- not really libraw1394 news: the subsystem doesn't swap data anymore,
|
||||
everything is to be kept big endian now on all architectures
|
||||
|
||||
Version 0.5:
|
||||
|
||||
- there are now separate iso handlers for each channel
|
||||
|
||||
Version 0.4:
|
||||
|
||||
- isochronous receive support
|
||||
|
||||
Version 0.3:
|
||||
|
||||
- first release of new libraw1394 for new raw1394 driver
|
||||
- supports 1394 async reads/writes
|
||||
- maintainer: Andreas Bombe <andreas.bombe@munich.netsurf.de>
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
libraw1394
|
||||
==========
|
||||
|
||||
1. About libraw1394
|
||||
|
||||
libraw1394 is the only supported interface to the kernel side raw1394 of
|
||||
the Linux IEEE-1394 subsystem, which provides direct access to the connected
|
||||
1394 buses to user space. Through libraw1394/raw1394, applications can directly
|
||||
send to and receive from other nodes without requiring a kernel driver for the
|
||||
protocol in question.
|
||||
|
||||
The reason for making a library the interface to the kernel is to avoid
|
||||
a program dependency on the kernel version, which would hinder development and
|
||||
optimization of raw1394. If development changed the protocol and made it
|
||||
incompatible with previous versions only the libraw1394 has to be upgraded to
|
||||
match the kernel version (instead of all applications).
|
||||
|
||||
Since version 2, libraw1394 also works with the kernel driver
|
||||
firewire-core. libraw1394's role has thus become that of a raw1394
|
||||
compatibility layer for existing applications when running on firewire-core.
|
||||
|
||||
|
||||
2. Copyleft
|
||||
|
||||
libraw1394 itself is licensed under the Lesser General Public License
|
||||
(short LGPL, see file COPYING.LIB in the source distribution). Other files in
|
||||
the source archives not belonging to but being part of the build procedure of
|
||||
libraw1394 are under their own licenses, as stated at the top of the individual
|
||||
files.
|
||||
|
||||
|
||||
3. API documentation
|
||||
|
||||
Finally there is something, in the doc subdirectory. The file is
|
||||
libraw1394.sgml (it's Docbook format), and there are preformatted PostScript and
|
||||
HTML available. This documentation is not complete yet.
|
||||
|
||||
|
||||
4. Multithreading
|
||||
|
||||
This library should be multithreadable with the restriction that one
|
||||
raw1394handle_t may be used only within a single thread. Multiple threads
|
||||
operating on the same handle would royally mess up the kernel-user protocol.
|
||||
Simply use separate handles for each thread in which you need to use libraw1394.
|
||||
|
||||
|
||||
5. Pkg-config
|
||||
|
||||
The library comes with a pkg-config .pc file, so you can check for
|
||||
libraw1394 and its version in your configure script. For example, here is how
|
||||
to use the autoconf macro:
|
||||
|
||||
PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 1.1.0)
|
||||
|
||||
This macro sets the variables LIBRAW1394_CFLAGS and LIBRAW1394_LIBS. You
|
||||
have to include those into your build variables so that the build process
|
||||
correctly links with libraw1394.
|
||||
|
||||
|
||||
6. Contact
|
||||
|
||||
Send questions, suggestions, bug reports and patches to the mailing
|
||||
list linux1394-devel@lists.sourceforge.net. This list is open for posting
|
||||
without prior subscription, and replies will usually be Cc'd to you. Visit
|
||||
http://ieee1394.wiki.kernel.org/ for links to list subscription interfaces and
|
||||
list archives.
|
||||
|
||||
Maintainer of libraw1394 is currently Stefan Richter. See the file
|
||||
AUTHORS for a complete list of contributors to libraw1394.
|
||||
|
||||
Source repository:
|
||||
git://git.kernel.org/pub/scm/libs/ieee1394/libraw1394.git
|
||||
http://git.kernel.org/pub/scm/libs/ieee1394/libraw1394.git
|
||||
https://git.kernel.org/pub/scm/libs/ieee1394/libraw1394.git
|
||||
|
||||
Gitweb:
|
||||
http://git.kernel.org/?p=libs/ieee1394/libraw1394.git
|
||||
|
||||
Release tarballs:
|
||||
https://www.kernel.org/pub/linux/libs/ieee1394/
|
||||
ftp://ftp.kernel.org/pub/linux/libs/ieee1394/
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,91 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Directory to watch for firewire device files. */
|
||||
#undef FW_DEVICE_DIR
|
||||
|
||||
/* Prefix of firewire device file names. */
|
||||
#undef FW_DEVICE_PREFIX
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to 1 if you have the <valgrind/valgrind.h> header file. */
|
||||
#undef HAVE_VALGRIND_VALGRIND_H
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* The size of `void *', as computed by sizeof. */
|
||||
#undef SIZEOF_VOID_P
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
#undef const
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,57 @@
|
|||
# process this file with autoconf to get a configure script
|
||||
|
||||
AC_INIT(libraw1394, 2.1.2)
|
||||
AC_CONFIG_SRCDIR(src/raw1394.h)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Checking if the NEWS file has been updated to reflect the current version.
|
||||
AM_INIT_AUTOMAKE(check-news)
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_LIBTOOL
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_CHECK_SIZEOF(void *, 8)
|
||||
AC_C_CONST
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
# set the libtool so version numbers
|
||||
lt_major=12
|
||||
lt_revision=0
|
||||
lt_age=1
|
||||
|
||||
AC_SUBST(lt_major)
|
||||
AC_SUBST(lt_revision)
|
||||
AC_SUBST(lt_age)
|
||||
|
||||
dnl Check to see if valgrind is available
|
||||
AC_ARG_WITH(valgrind, AC_HELP_STRING([--with-valgrind],[compile with valgrind support]))
|
||||
if test x$with_valgrind = xyes ; then
|
||||
AC_CHECK_HEADERS(valgrind/valgrind.h)
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(fw-device-prefix,
|
||||
[ --with-fw-device-prefix=<prefix> Prefix of firewire device file names (default "fw").],
|
||||
[FW_DEVICE_PREFIX="\"$withval\""], [FW_DEVICE_PREFIX="\"fw\""])
|
||||
AC_ARG_WITH(fw-device-dir,
|
||||
[ --with-fw-device-dir=<dir> Directory to watch for firewire device files (default "/dev").],
|
||||
[FW_DEVICE_DIR="\"$withval\""], [FW_DEVICE_DIR="\"/dev\""])
|
||||
|
||||
AC_DEFINE_UNQUOTED(FW_DEVICE_PREFIX, $FW_DEVICE_PREFIX,
|
||||
[Prefix of firewire device file names.])
|
||||
AC_DEFINE_UNQUOTED(FW_DEVICE_DIR, $FW_DEVICE_DIR,
|
||||
[Directory to watch for firewire device files.])
|
||||
|
||||
#CFLAGS=${CFLAGS:-"-Wall"}
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
libraw1394.pc
|
||||
libraw1394.spec
|
||||
src/Makefile
|
||||
tools/Makefile
|
||||
doc/Makefile
|
||||
doc/testlibraw.1
|
||||
doc/sendiso.1
|
||||
doc/dumpiso.1
|
||||
doc/isodump.5
|
||||
])
|
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,33 @@
|
|||
EXTRA_DIST = testlibraw.1.in sendiso.1.in dumpiso.1.in isodump.5.in \
|
||||
libraw1394.sgml
|
||||
|
||||
# man files for testlibraw
|
||||
man_MANS = testlibraw.1 sendiso.1 dumpiso.1 isodump.5
|
||||
|
||||
# libraw1394 docbook documentation
|
||||
|
||||
CLEANFILES = libraw1394.aux libraw1394.dvi libraw1394.log libraw1394.out \
|
||||
libraw1394.tex libraw1394.pdf *.html
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in libraw1394.ps
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -rf libraw1394
|
||||
|
||||
doc: psdoc pdfdoc htmldoc
|
||||
psdoc: libraw1394.ps
|
||||
pdfdoc: libraw1394.pdf
|
||||
htmldoc: libraw1394
|
||||
|
||||
.PHONY: doc psdoc pdfdoc htmldoc
|
||||
|
||||
libraw1394.ps: libraw1394.sgml
|
||||
db2ps $<
|
||||
|
||||
libraw1394.pdf: libraw1394.sgml
|
||||
db2pdf $<
|
||||
|
||||
libraw1394: libraw1394.sgml
|
||||
db2html $<
|
||||
# rm -rf $@
|
||||
# mv libraw1394 $@
|
|
@ -0,0 +1,605 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = doc
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES = testlibraw.1 sendiso.1 dumpiso.1 isodump.5
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"
|
||||
man5dir = $(mandir)/man5
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/dumpiso.1.in \
|
||||
$(srcdir)/isodump.5.in $(srcdir)/sendiso.1.in \
|
||||
$(srcdir)/testlibraw.1.in
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_age = @lt_age@
|
||||
lt_major = @lt_major@
|
||||
lt_revision = @lt_revision@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = testlibraw.1.in sendiso.1.in dumpiso.1.in isodump.5.in \
|
||||
libraw1394.sgml
|
||||
|
||||
|
||||
# man files for testlibraw
|
||||
man_MANS = testlibraw.1 sendiso.1 dumpiso.1 isodump.5
|
||||
|
||||
# libraw1394 docbook documentation
|
||||
CLEANFILES = libraw1394.aux libraw1394.dvi libraw1394.log libraw1394.out \
|
||||
libraw1394.tex libraw1394.pdf *.html
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in libraw1394.ps
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu doc/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
testlibraw.1: $(top_builddir)/config.status $(srcdir)/testlibraw.1.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
sendiso.1: $(top_builddir)/config.status $(srcdir)/sendiso.1.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
dumpiso.1: $(top_builddir)/config.status $(srcdir)/dumpiso.1.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
isodump.5: $(top_builddir)/config.status $(srcdir)/isodump.5.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-man1: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man1dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.1[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man1dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.1[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
|
||||
install-man5: $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list1=''; \
|
||||
list2='$(man_MANS)'; \
|
||||
test -n "$(man5dir)" \
|
||||
&& test -n "`echo $$list1$$list2`" \
|
||||
|| exit 0; \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
|
||||
{ for i in $$list1; do echo "$$i"; done; \
|
||||
if test -n "$$list2"; then \
|
||||
for i in $$list2; do echo "$$i"; done \
|
||||
| sed -n '/\.5[a-z]*$$/p'; \
|
||||
fi; \
|
||||
} | while read p; do \
|
||||
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; echo "$$p"; \
|
||||
done | \
|
||||
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
|
||||
sed 'N;N;s,\n, ,g' | { \
|
||||
list=; while read file base inst; do \
|
||||
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
|
||||
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
|
||||
fi; \
|
||||
done; \
|
||||
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
|
||||
done; }
|
||||
|
||||
uninstall-man5:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list=''; test -n "$(man5dir)" || exit 0; \
|
||||
files=`{ for i in $$list; do echo "$$i"; done; \
|
||||
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
|
||||
sed -n '/\.5[a-z]*$$/p'; \
|
||||
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
|
||||
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
|
||||
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
|
||||
tags TAGS:
|
||||
|
||||
ctags CTAGS:
|
||||
|
||||
cscope cscopelist:
|
||||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man: install-man1 install-man5
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic \
|
||||
maintainer-clean-local
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man1 uninstall-man5
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||
cscopelist-am ctags-am distclean distclean-generic \
|
||||
distclean-libtool distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man1 install-man5 install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-local mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags-am uninstall uninstall-am uninstall-man uninstall-man1 \
|
||||
uninstall-man5
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -rf libraw1394
|
||||
|
||||
doc: psdoc pdfdoc htmldoc
|
||||
psdoc: libraw1394.ps
|
||||
pdfdoc: libraw1394.pdf
|
||||
htmldoc: libraw1394
|
||||
|
||||
.PHONY: doc psdoc pdfdoc htmldoc
|
||||
|
||||
libraw1394.ps: libraw1394.sgml
|
||||
db2ps $<
|
||||
|
||||
libraw1394.pdf: libraw1394.sgml
|
||||
db2pdf $<
|
||||
|
||||
libraw1394: libraw1394.sgml
|
||||
db2html $<
|
||||
# rm -rf $@
|
||||
# mv libraw1394 $@
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,38 @@
|
|||
.TH dumpiso 1 "libraw1394 @VERSION@" "" "Linux IEEE 1394"
|
||||
.SH NAME
|
||||
dumpiso \- dump IEEE 1394 isochronous channel packets
|
||||
.SH SYNOPSIS
|
||||
.B dumpiso
|
||||
[ \fIoptions\fR ] [ \fIFILE\fR ]
|
||||
.SH DESCRIPTION
|
||||
dumpiso listens on a selected range of channels and dumps all received
|
||||
packets into the file \fIFILE\fR or, if not given, to standard output.
|
||||
While dumping, the current number of received packets is written to
|
||||
standard error and updated with every packet.
|
||||
.PP
|
||||
It uses a simple file format for the dumps which is described in
|
||||
\fBisodump\fR(5). The dumped packets can be sent out again with
|
||||
\fBsendiso\fR(1).
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -c\fR,\fB --channels=\fICHANNELS
|
||||
Sets the channels to listen on. \fICHANNELS\fR can be either a single
|
||||
number, in which case this is the only channel to listen on, or a
|
||||
range of channels in the form X-Y. Channel numbers can range from 0
|
||||
to 63. You can give this option multiple times, new channels are
|
||||
added to the list of already set channels. Defaults to all channels.
|
||||
.TP
|
||||
.B -p\fR,\fB --port=\fIPORT
|
||||
Choose port \fIPORT\fR for receiving. A port is a 1394 card or chip
|
||||
and represents one connected bus, therefore this is only relevant when
|
||||
you have multiple of these. Defaults to 0.
|
||||
.TP
|
||||
.B -h\fR,\fB --help
|
||||
Show help text and exit.
|
||||
.SH BUGS
|
||||
None known.
|
||||
.SH SEE ALSO
|
||||
.B sendiso\fR(1),
|
||||
.B isodump\fR(5)
|
||||
.SH AUTHOR
|
||||
Andreas Bombe <aeb@debian.org>
|
|
@ -0,0 +1,35 @@
|
|||
.TH isodump 5 "isodump v1" "libraw1394 @VERSION@" "Linux IEEE 1394"
|
||||
.SH NAME
|
||||
isodump \- format of IEEE 1394 isochronous packets dump file
|
||||
.SH DESCRIPTION
|
||||
The isodump format stores a series of IEEE 1394 isochronous stream
|
||||
packets (possibly from multiple channels), including their headers.
|
||||
Its main use is as the output format of \fBdumpiso\fR(1) and the input
|
||||
format of \fBsendiso\fR(1).
|
||||
.PP
|
||||
The 32 byte header starts at offset 0 with the string "1394 isodump
|
||||
v1" followed by a zero byte. The next 8 bytes form a 64 bit big
|
||||
endian integer, which represents a bit mask of the channels that were
|
||||
dumped. A set bit at position (1 << x) signifies that channel x was
|
||||
being listened on. The following 8 bytes are set to zero.
|
||||
.PP
|
||||
The iso packets follow the header and are appended to the data stream
|
||||
in the order they were received. The packets consist of the header
|
||||
quadlet as originally received and the data quadlets following
|
||||
directly. The CRC quadlets after header and data do not appear and
|
||||
everything is in big endian, as seen on the bus.
|
||||
.PP
|
||||
There is no further framing of the packets in the format, packet
|
||||
boundaries can be found by looking at the data size field in the
|
||||
header quadlet of each packet. The data size field appears in the
|
||||
most significant 16 bits of the header quadlet, contain the size in
|
||||
bytes (the actual packet is padded to a multiple of four bytes) and do
|
||||
not include the header packet.
|
||||
.SH COMPATIBILITY
|
||||
This format was introduced with the iso send and dump tools
|
||||
distributed with libraw1394. No one else uses it so far.
|
||||
.SH SEE ALSO
|
||||
.B sendiso\fR(1),
|
||||
.B dumpiso\fR(1)
|
||||
.SH AUTHOR
|
||||
Andreas Bombe <aeb@debian.org>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,42 @@
|
|||
.TH sendiso 1 "libraw1394 @VERSION@" "" "Linux IEEE 1394"
|
||||
.SH NAME
|
||||
sendiso \- send IEEE 1394 isochronous packets from dump file
|
||||
.SH SYNOPSIS
|
||||
.B sendiso
|
||||
[ \fIoptions\fR ] \fIFILE\fR
|
||||
.SH DESCRIPTION
|
||||
sendiso takes the dump file \fIFILE\fR as generated by
|
||||
\fBdumpiso\fR(1), extracts the packets and sends them as they were
|
||||
received (in the same order, with the same channel numbers) as fast as
|
||||
possible - timing of the original dump is not preserved.
|
||||
.PP
|
||||
This program does not allocate any isochronous resources but just
|
||||
starts sending. It should not be used in live environments where it
|
||||
might interfere with properly set up isochronous transmissions, it is
|
||||
a debug and performance benchmarking tool.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
.B -l\fR,\fB --loop=\fICOUNT
|
||||
Send dump file \fICOUNT\fR times. Defaults to 1.
|
||||
.TP
|
||||
.B -i\fR,\fB --infinite
|
||||
Send dump file in an endless loop.
|
||||
.TP
|
||||
.B -s\fR,\fB --speed=\fISPEED
|
||||
Send packets at speed \fISPEED\fR, which can be given as 100, 200 and
|
||||
400 (in Mbit/s) or abbreviated as 1, 2 and 4. Defaults to 100.
|
||||
.TP
|
||||
.B -p\fR,\fB --port=\fIPORT
|
||||
Choose port \fIPORT\fR for sending. A port is a 1394 card or chip and
|
||||
represents one connected bus, therefore this is only relevant when you
|
||||
have multiple of these. Defaults to 0.
|
||||
.TP
|
||||
.B -h\fR,\fB --help
|
||||
Show help text and exit.
|
||||
.SH BUGS
|
||||
None known.
|
||||
.SH SEE ALSO
|
||||
.B dumpiso\fR(1),
|
||||
.B isodump\fR(5)
|
||||
.SH AUTHOR
|
||||
Andreas Bombe <aeb@debian.org>
|
|
@ -0,0 +1,30 @@
|
|||
.TH testlibraw 1 "libraw1394 @VERSION@" "" "Linux IEEE 1394"
|
||||
.SH NAME
|
||||
testlibraw \- run basic functionality tests on libraw1394
|
||||
.SH SYNOPSIS
|
||||
.B testlibraw
|
||||
.SH DESCRIPTION
|
||||
testlibraw attaches to the Linux IEEE 1394 subsystem through libraw1394 and
|
||||
tries to read data from all connected nodes. It therefore acts as a check that:
|
||||
.IP *
|
||||
libraw1394 is installed correctly
|
||||
.IP *
|
||||
the IEEE 1394 subsystem is loaded in the kernel and of a supported version
|
||||
.IP *
|
||||
libraw1394 and kernel side raw1394 can communicate
|
||||
.IP *
|
||||
connected nodes can be reached and do respond.
|
||||
.PP
|
||||
The read transactions are of a form that all powered up nodes conforming to the
|
||||
IEEE 1394 standard have to be able to respond to.
|
||||
.PP
|
||||
The source of this program also acts as a demonstration of libraw1394
|
||||
programming, including initialization, transactions and the event loop.
|
||||
.SH EXAMPLE RUN
|
||||
FIXME: insert example here
|
||||
.SH BUGS
|
||||
None known.
|
||||
.SH SEE ALSO
|
||||
http://linux1394.sourceforge.net/
|
||||
.SH AUTHOR
|
||||
Andreas Bombe <aeb@debian.org>
|
|
@ -0,0 +1,501 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,10 @@
|
|||
prefix=/usr/local
|
||||
exec_prefix=${prefix}
|
||||
libdir=${exec_prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libraw1394
|
||||
Description: Interface library for the Linux IEEE1394 drivers.
|
||||
Version: 2.1.2
|
||||
Libs: -L${libdir} -lraw1394
|
||||
Cflags: -I${includedir}
|
|
@ -0,0 +1,10 @@
|
|||
prefix=@prefix@
|
||||
exec_prefix=@exec_prefix@
|
||||
libdir=@libdir@
|
||||
includedir=@includedir@
|
||||
|
||||
Name: libraw1394
|
||||
Description: Interface library for the Linux IEEE1394 drivers.
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lraw1394
|
||||
Cflags: -I${includedir}
|
|
@ -0,0 +1,79 @@
|
|||
%define prefix /usr
|
||||
|
||||
Name: libraw1394
|
||||
Version: 2.1.2
|
||||
Release: 1
|
||||
Copyright: LGPL
|
||||
Group: Libraries
|
||||
Source: http://linux1394.org/libraw1394/libraw1394-2.1.2.tar.gz
|
||||
URL: http://linux1394.org
|
||||
BuildRoot: /var/tmp/libraw1394-2.1.2-root
|
||||
Summary: Streaming library for IEEE1394
|
||||
BuildRequires: openjade
|
||||
|
||||
%changelog
|
||||
|
||||
%description
|
||||
|
||||
The Linux kernel's IEEE 1394 subsystem provides access to the raw 1394
|
||||
bus through the raw1394 module. This includes the standard 1394
|
||||
transactions (read, write, lock) on the active side, isochronous
|
||||
stream receiving and sending and dumps of data written to the
|
||||
FCP_COMMAND and FCP_RESPONSE registers. raw1394 uses a character
|
||||
device to communicate to user programs using a special protocol.
|
||||
|
||||
libraw1394 was created with the intent to hide that protocol from
|
||||
applications so that
|
||||
|
||||
- the protocol has to be implemented correctly only once.
|
||||
|
||||
- all work can be done using easy to understand functions instead of
|
||||
handling a complicated command structure.
|
||||
|
||||
- only libraw1394 has to be changed when raw1394's interface changes.
|
||||
|
||||
%package devel
|
||||
Summary: Development libs for libraw1394
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
|
||||
%description devel
|
||||
Development libraries needed to build applications against libraw1394
|
||||
|
||||
%changelog
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS COPYING.LIB NEWS README
|
||||
%{prefix}/lib/libraw1394.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{prefix}/bin/*
|
||||
%{prefix}/lib/*.so
|
||||
%{prefix}/lib/*a
|
||||
%{prefix}/include/*
|
||||
%{prefix}/man/*
|
||||
%{prefix}/lib/pkgconfig/libraw1394.pc
|
|
@ -0,0 +1,79 @@
|
|||
%define prefix /usr
|
||||
|
||||
Name: @PACKAGE@
|
||||
Version: @VERSION@
|
||||
Release: 1
|
||||
Copyright: LGPL
|
||||
Group: Libraries
|
||||
Source: http://linux1394.org/@PACKAGE@/@PACKAGE@-@VERSION@.tar.gz
|
||||
URL: http://linux1394.org
|
||||
BuildRoot: /var/tmp/@PACKAGE@-@VERSION@-root
|
||||
Summary: Streaming library for IEEE1394
|
||||
BuildRequires: openjade
|
||||
|
||||
%changelog
|
||||
|
||||
%description
|
||||
|
||||
The Linux kernel's IEEE 1394 subsystem provides access to the raw 1394
|
||||
bus through the raw1394 module. This includes the standard 1394
|
||||
transactions (read, write, lock) on the active side, isochronous
|
||||
stream receiving and sending and dumps of data written to the
|
||||
FCP_COMMAND and FCP_RESPONSE registers. raw1394 uses a character
|
||||
device to communicate to user programs using a special protocol.
|
||||
|
||||
libraw1394 was created with the intent to hide that protocol from
|
||||
applications so that
|
||||
|
||||
- the protocol has to be implemented correctly only once.
|
||||
|
||||
- all work can be done using easy to understand functions instead of
|
||||
handling a complicated command structure.
|
||||
|
||||
- only libraw1394 has to be changed when raw1394's interface changes.
|
||||
|
||||
%package devel
|
||||
Summary: Development libs for libraw1394
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
|
||||
%description devel
|
||||
Development libraries needed to build applications against libraw1394
|
||||
|
||||
%changelog
|
||||
|
||||
%prep
|
||||
%setup
|
||||
|
||||
%build
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
make prefix=$RPM_BUILD_ROOT%{prefix} install
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%post -p /sbin/ldconfig
|
||||
|
||||
%postun -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
|
||||
%doc AUTHORS COPYING.LIB NEWS README
|
||||
%{prefix}/lib/libraw1394.so.*
|
||||
|
||||
%files devel
|
||||
%defattr(-, root, root)
|
||||
|
||||
%{prefix}/bin/*
|
||||
%{prefix}/lib/*.so
|
||||
%{prefix}/lib/*a
|
||||
%{prefix}/include/*
|
||||
%{prefix}/man/*
|
||||
%{prefix}/lib/pkgconfig/libraw1394.pc
|
|
@ -0,0 +1,215 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,29 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# the libraw1394 itself
|
||||
|
||||
lib_LTLIBRARIES = libraw1394.la
|
||||
|
||||
libraw1394_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@
|
||||
|
||||
libraw1394_la_SOURCES = \
|
||||
main.c \
|
||||
eventloop.c \
|
||||
errors.c \
|
||||
readwrite.c \
|
||||
iso.c \
|
||||
fcp.c \
|
||||
arm.c \
|
||||
version.c \
|
||||
kernel-raw1394.h \
|
||||
raw1394_private.h \
|
||||
ieee1394-ioctl.h \
|
||||
dispatch.c \
|
||||
fw.c \
|
||||
fw-iso.c \
|
||||
fw.h \
|
||||
firewire-cdev.h \
|
||||
firewire-constants.h
|
||||
|
||||
# headers to be installed
|
||||
pkginclude_HEADERS = raw1394.h csr.h ieee1394.h
|
|
@ -0,0 +1,703 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = src
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(pkginclude_HEADERS) \
|
||||
$(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
libraw1394_la_LIBADD =
|
||||
am_libraw1394_la_OBJECTS = main.lo eventloop.lo errors.lo readwrite.lo \
|
||||
iso.lo fcp.lo arm.lo version.lo dispatch.lo fw.lo fw-iso.lo
|
||||
libraw1394_la_OBJECTS = $(am_libraw1394_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
libraw1394_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libraw1394_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libraw1394_la_SOURCES)
|
||||
DIST_SOURCES = $(libraw1394_la_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
HEADERS = $(pkginclude_HEADERS)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_age = @lt_age@
|
||||
lt_major = @lt_major@
|
||||
lt_revision = @lt_revision@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# the libraw1394 itself
|
||||
lib_LTLIBRARIES = libraw1394.la
|
||||
libraw1394_la_LDFLAGS = -version-info @lt_major@:@lt_revision@:@lt_age@
|
||||
libraw1394_la_SOURCES = \
|
||||
main.c \
|
||||
eventloop.c \
|
||||
errors.c \
|
||||
readwrite.c \
|
||||
iso.c \
|
||||
fcp.c \
|
||||
arm.c \
|
||||
version.c \
|
||||
kernel-raw1394.h \
|
||||
raw1394_private.h \
|
||||
ieee1394-ioctl.h \
|
||||
dispatch.c \
|
||||
fw.c \
|
||||
fw-iso.c \
|
||||
fw.h \
|
||||
firewire-cdev.h \
|
||||
firewire-constants.h
|
||||
|
||||
|
||||
# headers to be installed
|
||||
pkginclude_HEADERS = raw1394.h csr.h ieee1394.h
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu src/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
list2=; for p in $$list; do \
|
||||
if test -f $$p; then \
|
||||
list2="$$list2 $$p"; \
|
||||
else :; fi; \
|
||||
done; \
|
||||
test -z "$$list2" || { \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
|
||||
}
|
||||
|
||||
uninstall-libLTLIBRARIES:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
|
||||
for p in $$list; do \
|
||||
$(am__strip_dir) \
|
||||
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
|
||||
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
@list='$(lib_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
libraw1394.la: $(libraw1394_la_OBJECTS) $(libraw1394_la_DEPENDENCIES) $(EXTRA_libraw1394_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libraw1394_la_LINK) -rpath $(libdir) $(libraw1394_la_OBJECTS) $(libraw1394_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dispatch.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errors.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eventloop.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcp.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fw-iso.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fw.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iso.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readwrite.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/version.Plo@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-pkgincludeHEADERS: $(pkginclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \
|
||||
$(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-pkgincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES) $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-pkgincludeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-libLTLIBRARIES
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
|
||||
ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-libLTLIBRARIES install-man install-pdf \
|
||||
install-pdf-am install-pkgincludeHEADERS install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-libLTLIBRARIES \
|
||||
uninstall-pkgincludeHEADERS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 2002 Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* Christian Toegel <christian.toegel@gmx.at>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
/*
|
||||
* AdressRangeMapping REGISTERING:
|
||||
* start, length .... identifies addressrange
|
||||
* *initial_value ... pointer to buffer containing (if necessary) initial value
|
||||
* NULL means undefined
|
||||
* arm_tag .......... identifier for arm_tag_handler
|
||||
* (usually pointer to raw1394_arm_reqhandle)
|
||||
* access_rights .... access-rights for registered addressrange handled
|
||||
* by kernel-part. Value is one or more binary or of the
|
||||
* following flags: ARM_READ, ARM_WRITE, ARM_LOCK
|
||||
* notification_options ... identifies for which type of request you want
|
||||
* to be notified. Value is one or more binary or of the
|
||||
* following flags: ARM_READ, ARM_WRITE, ARM_LOCK
|
||||
* client_transactions ... identifies for which type of request you want
|
||||
* to handle the request by the client application.
|
||||
* for those requests no response will be generated, but
|
||||
* has to be generated by the application.
|
||||
* Value is one or more binary or of the
|
||||
* following flags: ARM_READ, ARM_WRITE, ARM_LOCK
|
||||
* For each bit set here, notification_options and
|
||||
* access_rights will be ignored.
|
||||
* returnvalue: 0 ... success
|
||||
* <0 ... failure
|
||||
*/
|
||||
int ieee1394_arm_register(struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, byte_t *initial_value,
|
||||
octlet_t arm_tag, arm_options_t access_rights,
|
||||
arm_options_t notification_options,
|
||||
arm_options_t client_transactions)
|
||||
{
|
||||
int retval=0;
|
||||
struct raw1394_request req;
|
||||
|
||||
if (((start & ~(0xFFFFFFFF)) != 0) ||
|
||||
(((start + length) & ~(0xFFFFFFFF)) != 0)) {
|
||||
errno = EINVAL;
|
||||
return (-1);
|
||||
}
|
||||
CLEAR_REQ(&req);
|
||||
req.type = RAW1394_REQ_ARM_REGISTER;
|
||||
req.generation = handle->generation; /* not necessary */
|
||||
req.address = start;
|
||||
req.length = length;
|
||||
req.tag = arm_tag;
|
||||
req.recvb = ptr2int(handle->buffer); /* arm_handle on success */
|
||||
req.misc = ((client_transactions & 0x0f) << 8)|((notification_options & 0x0F) << 4)|(access_rights & 0x0F)
|
||||
|((ARM_REC_LENGTH & 0xFFFF) << 16);
|
||||
req.sendb = ptr2int(initial_value);
|
||||
retval = (int) write(handle->fd, &req, sizeof(req));
|
||||
return (retval == sizeof(req)) ? 0:-1;
|
||||
}
|
||||
|
||||
/*
|
||||
* AdressRangeMapping UNREGISTERING:
|
||||
* start ............ identifies addressrange for unregistering
|
||||
* (value of start have to be the same value
|
||||
* used for registering this adressrange)
|
||||
* returnvalue: 0 ... success
|
||||
* <0 ... failure
|
||||
*/
|
||||
int ieee1394_arm_unregister (struct ieee1394_handle *handle, nodeaddr_t start)
|
||||
{
|
||||
int retval;
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
req.type = RAW1394_REQ_ARM_UNREGISTER;
|
||||
req.generation = handle->generation; /* not necessary */
|
||||
req.address = start;
|
||||
retval = write(handle->fd, &req, sizeof(req));
|
||||
return (retval == sizeof(req)) ? 0:-1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* AdressRangeMapping SET BUFFER:
|
||||
* start, length .... identifies addressrange
|
||||
* buf .............. pointer to buffer
|
||||
*
|
||||
* This function copies 'length' bytes from user memory area 'buf'
|
||||
* to one ARM block in kernel memory area
|
||||
* with start offset 'start'.
|
||||
*
|
||||
* returnvalue: 0 ... success
|
||||
* <0 ... failure, and errno - error code
|
||||
*/
|
||||
int ieee1394_arm_set_buf (struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, void *buf)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ARM_SET_BUF;
|
||||
req.sendb = ptr2int(buf);
|
||||
req.length = length;
|
||||
req.address = start;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* AdressRangeMapping GET BUFFER:
|
||||
* start, length .... identifies addressrange
|
||||
* buf .............. pointer to buffer
|
||||
*
|
||||
* This function copies 'length' bytes from one
|
||||
* ARM block in kernel memory area with start offset `start`
|
||||
* to user memory area 'buf'
|
||||
*
|
||||
* returnvalue: 0 ... success
|
||||
* <0 ... failure, and errno - error code
|
||||
*/
|
||||
int ieee1394_arm_get_buf (struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, void *buf)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ARM_GET_BUF;
|
||||
req.recvb = ptr2int(buf);
|
||||
req.length = length;
|
||||
req.address = start;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef _LIBRAW1394_CSR_H
|
||||
#define _LIBRAW1394_CSR_H
|
||||
|
||||
#define CSR_REGISTER_BASE 0xfffff0000000ULL
|
||||
|
||||
/* register offsets relative to CSR_REGISTER_BASE */
|
||||
#define CSR_STATE_CLEAR 0x0
|
||||
#define CSR_STATE_SET 0x4
|
||||
#define CSR_NODE_IDS 0x8
|
||||
#define CSR_RESET_START 0xc
|
||||
#define CSR_SPLIT_TIMEOUT_HI 0x18
|
||||
#define CSR_SPLIT_TIMEOUT_LO 0x1c
|
||||
#define CSR_CYCLE_TIME 0x200
|
||||
#define CSR_BUS_TIME 0x204
|
||||
#define CSR_BUSY_TIMEOUT 0x210
|
||||
#define CSR_BUS_MANAGER_ID 0x21c
|
||||
#define CSR_BANDWIDTH_AVAILABLE 0x220
|
||||
#define CSR_CHANNELS_AVAILABLE_HI 0x224
|
||||
#define CSR_CHANNELS_AVAILABLE_LO 0x228
|
||||
#define CSR_CONFIG_ROM 0x400
|
||||
#define CSR_CONFIG_ROM_END 0x800
|
||||
#define CSR_FCP_COMMAND 0xB00
|
||||
#define CSR_FCP_RESPONSE 0xD00
|
||||
#define CSR_FCP_END 0xF00
|
||||
#define CSR_TOPOLOGY_MAP 0x1000
|
||||
#define CSR_TOPOLOGY_MAP_END 0x1400
|
||||
#define CSR_SPEED_MAP 0x2000
|
||||
#define CSR_SPEED_MAP_END 0x3000
|
||||
|
||||
#endif /* _LIBRAW1394_CSR_H */
|
|
@ -0,0 +1,833 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 2008 Dan Dennedy <dan@dennedy.org>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "csr.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
#include "fw.h"
|
||||
|
||||
int raw1394_errcode_to_errno(raw1394_errcode_t errcode)
|
||||
{
|
||||
return ieee1394_errcode_to_errno(errcode);
|
||||
}
|
||||
|
||||
raw1394handle_t raw1394_new_handle(void)
|
||||
{
|
||||
ieee1394handle_t ieee1394_handle;
|
||||
fw_handle_t fw_handle;
|
||||
raw1394handle_t handle;
|
||||
struct raw1394_portinfo port;
|
||||
int errno_bak;
|
||||
|
||||
handle = (raw1394handle_t) malloc(sizeof(struct raw1394_handle));
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
errno_bak = errno; /* workaround for faulty legacy applications */
|
||||
|
||||
ieee1394_handle = ieee1394_new_handle();
|
||||
if (!ieee1394_handle)
|
||||
goto try_fw;
|
||||
|
||||
if (ieee1394_get_port_info(ieee1394_handle, &port, 1) >= 1) {
|
||||
handle->is_fw = 0;
|
||||
handle->mode.ieee1394 = ieee1394_handle;
|
||||
return handle;
|
||||
}
|
||||
ieee1394_destroy_handle(ieee1394_handle);
|
||||
try_fw:
|
||||
errno = errno_bak;
|
||||
|
||||
fw_handle = fw_new_handle();
|
||||
if (fw_handle) {
|
||||
handle->is_fw = 1;
|
||||
handle->mode.fw = fw_handle;
|
||||
return handle;
|
||||
}
|
||||
|
||||
free(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void raw1394_destroy_handle(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
fw_destroy_handle(handle->mode.fw);
|
||||
else
|
||||
ieee1394_destroy_handle(handle->mode.ieee1394);
|
||||
free(handle);
|
||||
}
|
||||
|
||||
raw1394handle_t raw1394_new_handle_on_port(int port)
|
||||
{
|
||||
ieee1394handle_t ieee1394_handle;
|
||||
fw_handle_t fw_handle;
|
||||
raw1394handle_t handle;
|
||||
int errno_bak;
|
||||
|
||||
handle = (raw1394handle_t) malloc(sizeof(struct raw1394_handle));
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
errno_bak = errno; /* workaround for faulty legacy applications */
|
||||
|
||||
ieee1394_handle = ieee1394_new_handle_on_port(port);
|
||||
if (ieee1394_handle) {
|
||||
handle->is_fw = 0;
|
||||
handle->mode.ieee1394 = ieee1394_handle;
|
||||
return handle;
|
||||
}
|
||||
|
||||
errno = errno_bak;
|
||||
|
||||
fw_handle = fw_new_handle_on_port(port);
|
||||
if (fw_handle) {
|
||||
handle->is_fw = 1;
|
||||
handle->mode.fw = fw_handle;
|
||||
return handle;
|
||||
}
|
||||
|
||||
free(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int raw1394_busreset_notify (raw1394handle_t handle, int off_on_switch)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_busreset_notify(handle->mode.fw, off_on_switch);
|
||||
else
|
||||
return ieee1394_busreset_notify(handle->mode.ieee1394, off_on_switch);
|
||||
}
|
||||
|
||||
int raw1394_get_fd(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_fd(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_get_fd(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
nodeid_t raw1394_get_local_id(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return 0xFFFF;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_local_id(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_get_local_id(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
nodeid_t raw1394_get_irm_id(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return 0xFFFF;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_irm_id(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_get_irm_id(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
int raw1394_get_nodecount(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_nodecount(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_get_nodecount(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
int raw1394_get_speed(raw1394handle_t handle, nodeid_t node)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_speed(handle->mode.fw, node);
|
||||
else {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int raw1394_get_port_info(raw1394handle_t handle, struct raw1394_portinfo *pinf,
|
||||
int maxports)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_port_info(handle->mode.fw, pinf, maxports);
|
||||
else
|
||||
return ieee1394_get_port_info(handle->mode.ieee1394, pinf, maxports);
|
||||
}
|
||||
|
||||
int raw1394_set_port(raw1394handle_t handle, int port)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_set_port(handle->mode.fw, port);
|
||||
else
|
||||
return ieee1394_set_port(handle->mode.ieee1394, port);
|
||||
}
|
||||
|
||||
int raw1394_reset_bus_new(raw1394handle_t handle, int type)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_reset_bus_new(handle->mode.fw, type);
|
||||
else
|
||||
return ieee1394_reset_bus_new(handle->mode.ieee1394, type);
|
||||
}
|
||||
|
||||
int raw1394_loop_iterate(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_loop_iterate(handle);
|
||||
else
|
||||
return ieee1394_loop_iterate(handle);
|
||||
}
|
||||
|
||||
int raw1394_arm_register(raw1394handle_t handle, nodeaddr_t start,
|
||||
size_t length, byte_t *initial_value,
|
||||
octlet_t arm_tag, arm_options_t access_rights,
|
||||
arm_options_t notification_options,
|
||||
arm_options_t client_transactions)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_arm_register(handle->mode.fw, start, length, initial_value,
|
||||
arm_tag, access_rights, notification_options, client_transactions);
|
||||
else
|
||||
return ieee1394_arm_register(handle->mode.ieee1394, start, length,
|
||||
initial_value, arm_tag, access_rights, notification_options,
|
||||
client_transactions);
|
||||
}
|
||||
|
||||
int raw1394_arm_unregister(raw1394handle_t handle, nodeaddr_t start)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_arm_unregister(handle->mode.fw, start);
|
||||
else
|
||||
return ieee1394_arm_unregister(handle->mode.ieee1394, start);
|
||||
}
|
||||
|
||||
int raw1394_arm_set_buf (raw1394handle_t handle, nodeaddr_t start,
|
||||
size_t length, void *buf)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_arm_set_buf(handle->mode.fw, start, length, buf);
|
||||
else
|
||||
return ieee1394_arm_set_buf(handle->mode.ieee1394, start, length, buf);
|
||||
}
|
||||
|
||||
int raw1394_arm_get_buf (raw1394handle_t handle, nodeaddr_t start,
|
||||
size_t length, void *buf)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_arm_get_buf(handle->mode.fw, start, length, buf);
|
||||
else
|
||||
return ieee1394_arm_get_buf(handle->mode.ieee1394, start, length, buf);
|
||||
}
|
||||
|
||||
int raw1394_echo_request(raw1394handle_t handle, quadlet_t data)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_echo_request(handle->mode.fw, data);
|
||||
else
|
||||
return ieee1394_echo_request(handle->mode.ieee1394, data);
|
||||
}
|
||||
|
||||
int raw1394_wake_up(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_wake_up(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_wake_up(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
int raw1394_phy_packet_write (raw1394handle_t handle, quadlet_t data)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_phy_packet_write(handle, data);
|
||||
else
|
||||
return ieee1394_phy_packet_write(handle, data);
|
||||
}
|
||||
|
||||
int raw1394_start_phy_packet_write(raw1394handle_t handle,
|
||||
quadlet_t data, unsigned long tag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_phy_packet_write(handle->mode.fw, data, tag);
|
||||
else
|
||||
return ieee1394_start_phy_packet_write(handle->mode.ieee1394, data, tag);
|
||||
}
|
||||
|
||||
int raw1394_start_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer, unsigned long tag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_read(handle->mode.fw, node, addr, length, buffer, tag);
|
||||
else
|
||||
return ieee1394_start_read(handle->mode.ieee1394, node, addr, length, buffer, tag);
|
||||
}
|
||||
|
||||
int raw1394_start_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data, unsigned long tag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_write(handle->mode.fw, node, addr, length, data, tag);
|
||||
else
|
||||
return ieee1394_start_write(handle->mode.ieee1394, node, addr, length, data, tag);
|
||||
}
|
||||
|
||||
int raw1394_start_lock(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result, unsigned long tag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_lock(handle->mode.fw, node, addr, extcode, data, arg, result, tag);
|
||||
else
|
||||
return ieee1394_start_lock(handle->mode.ieee1394, node, addr, extcode, data, arg, result, tag);
|
||||
}
|
||||
|
||||
int raw1394_start_lock64(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result, unsigned long tag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_lock64(handle->mode.fw, node, addr, extcode, data, arg, result, tag);
|
||||
else
|
||||
return ieee1394_start_lock64(handle->mode.ieee1394, node, addr, extcode, data, arg, result, tag);
|
||||
}
|
||||
|
||||
int raw1394_start_async_stream(raw1394handle_t handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy,
|
||||
unsigned int speed, size_t length, quadlet_t *data,
|
||||
unsigned long rawtag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_async_stream(handle->mode.fw, channel, tag, sy, speed, length, data, rawtag);
|
||||
else
|
||||
return ieee1394_start_async_stream(handle->mode.ieee1394, channel, tag, sy, speed, length, data, rawtag);
|
||||
}
|
||||
|
||||
int raw1394_start_async_send(raw1394handle_t handle,
|
||||
size_t length, size_t header_length,
|
||||
unsigned int expect_response,
|
||||
quadlet_t *data, unsigned long rawtag)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_async_send(handle->mode.fw, length, header_length,
|
||||
expect_response, data, rawtag);
|
||||
else
|
||||
return ieee1394_start_async_send(handle->mode.ieee1394, length,
|
||||
header_length, expect_response, data, rawtag);
|
||||
}
|
||||
|
||||
int raw1394_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_read(handle, node, addr, length, buffer);
|
||||
else
|
||||
return ieee1394_read(handle, node, addr, length, buffer);
|
||||
}
|
||||
|
||||
int raw1394_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_write(handle, node, addr, length, data);
|
||||
else
|
||||
return ieee1394_write(handle, node, addr, length, data);
|
||||
}
|
||||
|
||||
int raw1394_lock(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_lock(handle, node, addr, extcode, data, arg, result);
|
||||
else
|
||||
return ieee1394_lock(handle, node, addr, extcode, data, arg, result);
|
||||
}
|
||||
|
||||
int raw1394_lock64(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_lock64(handle, node, addr, extcode, data, arg, result);
|
||||
else
|
||||
return ieee1394_lock64(handle, node, addr, extcode, data, arg, result);
|
||||
}
|
||||
|
||||
int raw1394_async_stream(raw1394handle_t handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy, unsigned int speed,
|
||||
size_t length, quadlet_t *data)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_async_stream(handle, channel, tag, sy, speed, length, data);
|
||||
else
|
||||
return ieee1394_async_stream(handle, channel, tag, sy, speed, length, data);
|
||||
}
|
||||
|
||||
int raw1394_async_send(raw1394handle_t handle,
|
||||
size_t length, size_t header_length,
|
||||
unsigned int expect_response,
|
||||
quadlet_t *data)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_async_send(handle->mode.fw, length, header_length,
|
||||
expect_response, data);
|
||||
else
|
||||
return ieee1394_async_send(handle, length, header_length,
|
||||
expect_response, data);
|
||||
}
|
||||
|
||||
int raw1394_start_fcp_listen(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_start_fcp_listen(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_start_fcp_listen(handle);
|
||||
}
|
||||
|
||||
int raw1394_stop_fcp_listen(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_stop_fcp_listen(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_stop_fcp_listen(handle);
|
||||
}
|
||||
|
||||
int raw1394_update_config_rom(raw1394handle_t handle, const quadlet_t
|
||||
*new_rom, size_t size, unsigned char rom_version)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_update_config_rom(handle->mode.fw, new_rom, size, rom_version);
|
||||
else
|
||||
return ieee1394_update_config_rom(handle->mode.ieee1394,
|
||||
new_rom, size, rom_version);
|
||||
}
|
||||
|
||||
int raw1394_add_config_rom_descriptor(raw1394handle_t handle, u_int32_t *token,
|
||||
quadlet_t immediate_key, quadlet_t key,
|
||||
const quadlet_t *data, size_t size)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_add_config_rom_descriptor(handle->mode.fw, token,
|
||||
immediate_key, key, data, size);
|
||||
else {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int raw1394_remove_config_rom_descriptor(raw1394handle_t handle, u_int32_t token)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_remove_config_rom_descriptor(handle->mode.fw, token);
|
||||
else {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int raw1394_get_config_rom(raw1394handle_t handle, quadlet_t *buffer,
|
||||
size_t buffersize, size_t *rom_size, unsigned char *rom_version)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_get_config_rom(handle->mode.fw, buffer, buffersize,
|
||||
rom_size, rom_version);
|
||||
else
|
||||
return ieee1394_get_config_rom(handle->mode.ieee1394, buffer,
|
||||
buffersize, rom_size, rom_version);
|
||||
}
|
||||
|
||||
int raw1394_bandwidth_modify (raw1394handle_t handle, unsigned int bandwidth,
|
||||
enum raw1394_modify_mode mode)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_bandwidth_modify(handle, bandwidth, mode);
|
||||
else
|
||||
return ieee1394_bandwidth_modify(handle, bandwidth, mode);
|
||||
}
|
||||
|
||||
int raw1394_channel_modify (raw1394handle_t handle, unsigned int channel,
|
||||
enum raw1394_modify_mode mode)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_channel_modify(handle, channel, mode);
|
||||
else
|
||||
return ieee1394_channel_modify(handle, channel, mode);
|
||||
}
|
||||
|
||||
int raw1394_iso_xmit_init(raw1394handle_t handle,
|
||||
raw1394_iso_xmit_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_xmit_init(handle->mode.fw, handler, buf_packets,
|
||||
max_packet_size, channel, speed, irq_interval);
|
||||
else
|
||||
return ieee1394_iso_xmit_init(handle->mode.ieee1394, handler, buf_packets,
|
||||
max_packet_size, channel, speed, irq_interval);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_init(raw1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_init(handle->mode.fw, handler, buf_packets,
|
||||
max_packet_size, channel, mode, irq_interval);
|
||||
else
|
||||
return ieee1394_iso_recv_init(handle->mode.ieee1394, handler, buf_packets,
|
||||
max_packet_size, channel, mode, irq_interval);
|
||||
}
|
||||
|
||||
int raw1394_iso_multichannel_recv_init(raw1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int irq_interval)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_multichannel_recv_init(handle->mode.fw, handler, buf_packets,
|
||||
max_packet_size, irq_interval);
|
||||
else
|
||||
return ieee1394_iso_multichannel_recv_init(handle->mode.ieee1394, handler,
|
||||
buf_packets, max_packet_size, irq_interval);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_listen_channel(raw1394handle_t handle,
|
||||
unsigned char channel)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_listen_channel(handle->mode.fw, channel);
|
||||
else
|
||||
return ieee1394_iso_recv_listen_channel(handle->mode.ieee1394, channel);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_unlisten_channel(raw1394handle_t handle,
|
||||
unsigned char channel)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_unlisten_channel(handle->mode.fw, channel);
|
||||
else
|
||||
return ieee1394_iso_recv_unlisten_channel(handle->mode.ieee1394, channel);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_set_channel_mask(raw1394handle_t handle, u_int64_t mask)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_set_channel_mask(handle->mode.fw, mask);
|
||||
else
|
||||
return ieee1394_iso_recv_set_channel_mask(handle->mode.ieee1394, mask);
|
||||
}
|
||||
|
||||
int raw1394_iso_xmit_start(raw1394handle_t handle, int start_on_cycle,
|
||||
int prebuffer_packets)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_xmit_start(handle,
|
||||
start_on_cycle, prebuffer_packets);
|
||||
else
|
||||
return ieee1394_iso_xmit_start(handle->mode.ieee1394,
|
||||
start_on_cycle, prebuffer_packets);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_start(raw1394handle_t handle, int start_on_cycle,
|
||||
int tag_mask, int sync)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_start(handle->mode.fw,
|
||||
start_on_cycle, tag_mask, sync);
|
||||
else
|
||||
return ieee1394_iso_recv_start(handle->mode.ieee1394,
|
||||
start_on_cycle, tag_mask, sync);
|
||||
}
|
||||
|
||||
int raw1394_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
|
||||
unsigned int len, unsigned char tag,
|
||||
unsigned char sy)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_xmit_write(handle, data, len, tag, sy);
|
||||
else
|
||||
return ieee1394_iso_xmit_write(handle, data, len, tag, sy);
|
||||
}
|
||||
|
||||
int raw1394_iso_xmit_sync(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_xmit_sync(handle);
|
||||
else
|
||||
return ieee1394_iso_xmit_sync(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
int raw1394_iso_recv_flush(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_iso_recv_flush(handle->mode.fw);
|
||||
else
|
||||
return ieee1394_iso_recv_flush(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
void raw1394_iso_stop(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
fw_iso_stop(handle->mode.fw);
|
||||
else
|
||||
ieee1394_iso_stop(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
void raw1394_iso_shutdown(raw1394handle_t handle)
|
||||
{
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
fw_iso_shutdown(handle->mode.fw);
|
||||
else
|
||||
ieee1394_iso_shutdown(handle->mode.ieee1394);
|
||||
}
|
||||
|
||||
int raw1394_read_cycle_timer(raw1394handle_t handle,
|
||||
u_int32_t *cycle_timer, u_int64_t *local_time)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_read_cycle_timer(handle->mode.fw,
|
||||
cycle_timer, local_time);
|
||||
else
|
||||
return ieee1394_read_cycle_timer(handle->mode.ieee1394,
|
||||
cycle_timer, local_time);
|
||||
}
|
||||
|
||||
int raw1394_read_cycle_timer_and_clock(raw1394handle_t handle,
|
||||
u_int32_t *cycle_timer, u_int64_t *local_time, clockid_t clk_id)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return fw_read_cycle_timer_and_clock(handle->mode.fw,
|
||||
cycle_timer, local_time, clk_id);
|
||||
else {
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
#include "ieee1394.h"
|
||||
|
||||
|
||||
raw1394_errcode_t raw1394_get_errcode(struct raw1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
return RAW1394_ERROR_INVALID_ARG;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return handle->mode.fw->err;
|
||||
else
|
||||
return handle->mode.ieee1394->err;
|
||||
}
|
||||
|
||||
int ieee1394_errcode_to_errno(raw1394_errcode_t errcode)
|
||||
{
|
||||
static const int ack2errno[16] = {
|
||||
0xdead, /* invalid ack code */
|
||||
0, /* ack_complete */
|
||||
0xdead, /* ack_pending, should not be used here */
|
||||
EAGAIN, /* busy_x, busy_a and busy_b acks */
|
||||
EAGAIN,
|
||||
EAGAIN,
|
||||
0xdead, /* invalid ack codes */
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
EREMOTEIO, /* ack_data_error */
|
||||
EPERM, /* ack_type_error */
|
||||
0xdead /* invalid ack code */
|
||||
};
|
||||
static const int rcode2errno[16] = {
|
||||
0, /* rcode_complete */
|
||||
0xdead, /* invalid rcodes */
|
||||
0xdead,
|
||||
0xdead,
|
||||
EAGAIN, /* rcode_conflict_error */
|
||||
EREMOTEIO, /* rcode_data_error */
|
||||
EPERM, /* rcode_type_error */
|
||||
EINVAL, /* rcode_address_error */
|
||||
0xdead, /* invalid rcodes */
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead,
|
||||
0xdead
|
||||
};
|
||||
|
||||
if (!raw1394_internal_err(errcode)) {
|
||||
if (raw1394_get_ack(errcode) == 0x10
|
||||
|| raw1394_get_ack(errcode) == L1394_ACK_PENDING)
|
||||
return rcode2errno[raw1394_get_rcode(errcode)];
|
||||
else
|
||||
return ack2errno[raw1394_get_ack(errcode)];
|
||||
}
|
||||
|
||||
switch (raw1394_get_internal(errcode)) {
|
||||
case RAW1394_ERROR_GENERATION:
|
||||
case RAW1394_ERROR_SEND_ERROR:
|
||||
case RAW1394_ERROR_ABORTED:
|
||||
case RAW1394_ERROR_TIMEOUT:
|
||||
return EAGAIN;
|
||||
|
||||
case RAW1394_ERROR_MEMFAULT:
|
||||
return EFAULT;
|
||||
|
||||
case RAW1394_ERROR_COMPAT:
|
||||
case RAW1394_ERROR_STATE_ORDER:
|
||||
case RAW1394_ERROR_INVALID_ARG:
|
||||
case RAW1394_ERROR_ALREADY:
|
||||
case RAW1394_ERROR_EXCESSIVE:
|
||||
case RAW1394_ERROR_UNTIDY_LEN:
|
||||
default:
|
||||
return EINVAL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
* 2002 Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* 2002 Christian Toegel <christian.toegel@gmx.at>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*
|
||||
*
|
||||
* Contributions:
|
||||
*
|
||||
* Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* address range mapping
|
||||
* Christian Toegel <christian.toegel@gmx.at>
|
||||
* address range mapping
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <unistd.h>
|
||||
#include <byteswap.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
|
||||
int ieee1394_loop_iterate(struct raw1394_handle *handle)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
int retval = 0;
|
||||
|
||||
while (read(ihandle->fd, &req, sizeof(req)) < 0) {
|
||||
if (errno != EINTR) return -1;
|
||||
}
|
||||
|
||||
switch (req.type) {
|
||||
case RAW1394_REQ_BUS_RESET:
|
||||
if (ihandle->protocol_version == 3) {
|
||||
ihandle->num_of_nodes = req.misc & 0xffff;
|
||||
ihandle->local_id = req.misc >> 16;
|
||||
} else {
|
||||
ihandle->num_of_nodes = req.misc & 0xff;
|
||||
ihandle->irm_id = ((req.misc >> 8) & 0xff) | 0xffc0;
|
||||
ihandle->local_id = req.misc >> 16;
|
||||
}
|
||||
|
||||
if (ihandle->bus_reset_handler) {
|
||||
retval = ihandle->bus_reset_handler(handle,
|
||||
req.generation);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAW1394_REQ_FCP_REQUEST:
|
||||
if (ihandle->fcp_handler) {
|
||||
retval = ihandle->fcp_handler(handle, req.misc & 0xffff,
|
||||
req.misc >> 16,
|
||||
req.length,
|
||||
(unsigned char *)ihandle->buffer);
|
||||
}
|
||||
break;
|
||||
|
||||
case RAW1394_REQ_ARM:
|
||||
if (ihandle->arm_tag_handler) {
|
||||
retval = ihandle->arm_tag_handler(handle, req.tag,
|
||||
(req.misc & (0xFF)),
|
||||
((req.misc >> 16) & (0xFFFF)),
|
||||
int2ptr(req.recvb));
|
||||
}
|
||||
break;
|
||||
|
||||
case RAW1394_REQ_ECHO:
|
||||
retval=req.misc;
|
||||
break;
|
||||
|
||||
case RAW1394_REQ_RAWISO_ACTIVITY:
|
||||
retval = _ieee1394_iso_iterate(handle);
|
||||
break;
|
||||
|
||||
default:
|
||||
if (ihandle->tag_handler) {
|
||||
retval = ihandle->tag_handler(handle, req.tag,
|
||||
req.error);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
bus_reset_handler_t raw1394_set_bus_reset_handler(struct raw1394_handle *handle,
|
||||
bus_reset_handler_t new)
|
||||
{
|
||||
bus_reset_handler_t old;
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (handle->is_fw) {
|
||||
old = handle->mode.fw->bus_reset_handler;
|
||||
handle->mode.fw->bus_reset_handler = new;
|
||||
}
|
||||
else {
|
||||
old = handle->mode.ieee1394->bus_reset_handler;
|
||||
handle->mode.ieee1394->bus_reset_handler = new;
|
||||
}
|
||||
return old;
|
||||
}
|
||||
|
||||
tag_handler_t raw1394_set_tag_handler(struct raw1394_handle *handle,
|
||||
tag_handler_t new)
|
||||
{
|
||||
tag_handler_t old;
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (handle->is_fw) {
|
||||
old = handle->mode.fw->tag_handler;
|
||||
handle->mode.fw->tag_handler = new;
|
||||
}
|
||||
else {
|
||||
old = handle->mode.ieee1394->tag_handler;
|
||||
handle->mode.ieee1394->tag_handler = new;
|
||||
}
|
||||
return old;
|
||||
}
|
||||
|
||||
arm_tag_handler_t raw1394_set_arm_tag_handler(struct raw1394_handle *handle,
|
||||
arm_tag_handler_t new)
|
||||
{
|
||||
arm_tag_handler_t old;
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (handle->is_fw) {
|
||||
old = handle->mode.fw->arm_tag_handler;
|
||||
handle->mode.fw->arm_tag_handler = new;
|
||||
}
|
||||
else {
|
||||
old = handle->mode.ieee1394->arm_tag_handler;
|
||||
handle->mode.ieee1394->arm_tag_handler = new;
|
||||
}
|
||||
return old;
|
||||
}
|
||||
|
||||
fcp_handler_t raw1394_set_fcp_handler(struct raw1394_handle *handle,
|
||||
fcp_handler_t new)
|
||||
{
|
||||
fcp_handler_t old;
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (handle->is_fw) {
|
||||
old = handle->mode.fw->fcp_handler;
|
||||
handle->mode.fw->fcp_handler = new;
|
||||
}
|
||||
else {
|
||||
old = handle->mode.ieee1394->fcp_handler;
|
||||
handle->mode.ieee1394->fcp_handler = new;
|
||||
}
|
||||
return old;
|
||||
}
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
static int do_fcp_listen(struct raw1394_handle *handle, int startstop)
|
||||
{
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
struct sync_cb_data sd = { 0, 0 };
|
||||
struct raw1394_reqhandle rh = { (req_callback_t)_raw1394_sync_cb, &sd };
|
||||
int err;
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
req.type = RAW1394_REQ_FCP_LISTEN;
|
||||
req.generation = ihandle->generation;
|
||||
req.misc = startstop;
|
||||
req.tag = ptr2int(&rh);
|
||||
req.recvb = ptr2int(ihandle->buffer);
|
||||
req.length = 512;
|
||||
|
||||
err = write(ihandle->fd, &req, sizeof(req));
|
||||
while (!sd.done) {
|
||||
if (err < 0) return err;
|
||||
err = ieee1394_loop_iterate(handle);
|
||||
}
|
||||
|
||||
switch (sd.errcode) {
|
||||
case RAW1394_ERROR_ALREADY:
|
||||
errno = EALREADY;
|
||||
return -1;
|
||||
|
||||
case RAW1394_ERROR_INVALID_ARG:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
|
||||
default:
|
||||
errno = 0;
|
||||
return sd.errcode;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_start_fcp_listen(struct raw1394_handle *handle)
|
||||
{
|
||||
return do_fcp_listen(handle, 1);
|
||||
}
|
||||
|
||||
int ieee1394_stop_fcp_listen(struct raw1394_handle *handle)
|
||||
{
|
||||
return do_fcp_listen(handle, 0);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* IEEE 1394 constants.
|
||||
*
|
||||
* Copyright (C) 2005-2007 Kristian Hoegsberg <krh@bitplanet.net>
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _LINUX_FIREWIRE_CONSTANTS_H
|
||||
#define _LINUX_FIREWIRE_CONSTANTS_H
|
||||
|
||||
#define TCODE_WRITE_QUADLET_REQUEST 0x0
|
||||
#define TCODE_WRITE_BLOCK_REQUEST 0x1
|
||||
#define TCODE_WRITE_RESPONSE 0x2
|
||||
#define TCODE_READ_QUADLET_REQUEST 0x4
|
||||
#define TCODE_READ_BLOCK_REQUEST 0x5
|
||||
#define TCODE_READ_QUADLET_RESPONSE 0x6
|
||||
#define TCODE_READ_BLOCK_RESPONSE 0x7
|
||||
#define TCODE_CYCLE_START 0x8
|
||||
#define TCODE_LOCK_REQUEST 0x9
|
||||
#define TCODE_STREAM_DATA 0xa
|
||||
#define TCODE_LOCK_RESPONSE 0xb
|
||||
|
||||
#define EXTCODE_MASK_SWAP 0x1
|
||||
#define EXTCODE_COMPARE_SWAP 0x2
|
||||
#define EXTCODE_FETCH_ADD 0x3
|
||||
#define EXTCODE_LITTLE_ADD 0x4
|
||||
#define EXTCODE_BOUNDED_ADD 0x5
|
||||
#define EXTCODE_WRAP_ADD 0x6
|
||||
#define EXTCODE_VENDOR_DEPENDENT 0x7
|
||||
|
||||
/* Linux firewire-core (Juju) specific tcodes */
|
||||
#define TCODE_LOCK_MASK_SWAP (0x10 | EXTCODE_MASK_SWAP)
|
||||
#define TCODE_LOCK_COMPARE_SWAP (0x10 | EXTCODE_COMPARE_SWAP)
|
||||
#define TCODE_LOCK_FETCH_ADD (0x10 | EXTCODE_FETCH_ADD)
|
||||
#define TCODE_LOCK_LITTLE_ADD (0x10 | EXTCODE_LITTLE_ADD)
|
||||
#define TCODE_LOCK_BOUNDED_ADD (0x10 | EXTCODE_BOUNDED_ADD)
|
||||
#define TCODE_LOCK_WRAP_ADD (0x10 | EXTCODE_WRAP_ADD)
|
||||
#define TCODE_LOCK_VENDOR_DEPENDENT (0x10 | EXTCODE_VENDOR_DEPENDENT)
|
||||
|
||||
#define RCODE_COMPLETE 0x0
|
||||
#define RCODE_CONFLICT_ERROR 0x4
|
||||
#define RCODE_DATA_ERROR 0x5
|
||||
#define RCODE_TYPE_ERROR 0x6
|
||||
#define RCODE_ADDRESS_ERROR 0x7
|
||||
|
||||
/* Linux firewire-core (Juju) specific rcodes */
|
||||
#define RCODE_SEND_ERROR 0x10
|
||||
#define RCODE_CANCELLED 0x11
|
||||
#define RCODE_BUSY 0x12
|
||||
#define RCODE_GENERATION 0x13
|
||||
#define RCODE_NO_ACK 0x14
|
||||
|
||||
#define SCODE_100 0x0
|
||||
#define SCODE_200 0x1
|
||||
#define SCODE_400 0x2
|
||||
#define SCODE_800 0x3
|
||||
#define SCODE_1600 0x4
|
||||
#define SCODE_3200 0x5
|
||||
#define SCODE_BETA 0x3
|
||||
|
||||
#define ACK_COMPLETE 0x1
|
||||
#define ACK_PENDING 0x2
|
||||
#define ACK_BUSY_X 0x4
|
||||
#define ACK_BUSY_A 0x5
|
||||
#define ACK_BUSY_B 0x6
|
||||
#define ACK_DATA_ERROR 0xd
|
||||
#define ACK_TYPE_ERROR 0xe
|
||||
|
||||
#define RETRY_1 0x00
|
||||
#define RETRY_X 0x01
|
||||
#define RETRY_A 0x02
|
||||
#define RETRY_B 0x03
|
||||
|
||||
#endif /* _LINUX_FIREWIRE_CONSTANTS_H */
|
|
@ -0,0 +1,654 @@
|
|||
/* -*- c-basic-offset: 8 -*-
|
||||
*
|
||||
* fw-iso.c -- Emulation of the raw1394 rawiso API on the firewire stack
|
||||
*
|
||||
* Copyright (C) 2007 Kristian Hoegsberg <krh@bitplanet.net>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <sys/mman.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/epoll.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "fw.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
static int calculate_start_cycle(fw_handle_t handle)
|
||||
{
|
||||
int cycle;
|
||||
u_int32_t cycle_timer;
|
||||
u_int64_t local_time;
|
||||
|
||||
cycle = handle->iso.start_on_cycle;
|
||||
if (cycle < 0)
|
||||
return cycle;
|
||||
|
||||
/* libraw1394's cycle is always mod 8000 */
|
||||
cycle &= 0x1fff;
|
||||
|
||||
/* get the seconds from the current value of the cycle timer */
|
||||
if (fw_read_cycle_timer(handle, &cycle_timer, &local_time) != 0)
|
||||
return cycle;
|
||||
cycle += (cycle_timer & 0xfe000000) >> 12;
|
||||
|
||||
/*
|
||||
* For compatibility with raw1394, add one second
|
||||
* "to give some extra time for DMA to start".
|
||||
* TODO: are there still races due to cycle rollover?
|
||||
*/
|
||||
cycle += 1 << 13;
|
||||
|
||||
return cycle & 0x7fff;
|
||||
}
|
||||
|
||||
static int
|
||||
queue_packet(fw_handle_t handle,
|
||||
unsigned int length, unsigned int header_length,
|
||||
unsigned char tag, unsigned char sy)
|
||||
{
|
||||
struct fw_cdev_queue_iso queue_iso;
|
||||
struct fw_cdev_iso_packet *p;
|
||||
int err;
|
||||
|
||||
p = &handle->iso.packets[handle->iso.packet_index];
|
||||
p->control =
|
||||
FW_CDEV_ISO_PAYLOAD_LENGTH(length) |
|
||||
FW_CDEV_ISO_TAG(tag) |
|
||||
FW_CDEV_ISO_SY(sy) |
|
||||
FW_CDEV_ISO_HEADER_LENGTH(header_length);
|
||||
|
||||
if (handle->iso.packet_phase == handle->iso.irq_interval - 1)
|
||||
p->control |= FW_CDEV_ISO_INTERRUPT;
|
||||
|
||||
handle->iso.head += length;
|
||||
handle->iso.packet_count++;
|
||||
handle->iso.packet_phase++;
|
||||
handle->iso.packet_index++;
|
||||
|
||||
if (handle->iso.packet_phase == handle->iso.irq_interval)
|
||||
handle->iso.packet_phase = 0;
|
||||
|
||||
if (handle->iso.head + handle->iso.max_packet_size > handle->iso.buffer_end)
|
||||
handle->iso.head = handle->iso.buffer;
|
||||
|
||||
/* queue each packet individually */
|
||||
if (1) {
|
||||
queue_iso.packets = ptr_to_u64(handle->iso.packets);
|
||||
queue_iso.size = handle->iso.packet_index * sizeof handle->iso.packets[0];
|
||||
queue_iso.data = ptr_to_u64(handle->iso.first_payload);
|
||||
queue_iso.handle = handle->iso.kernel_handle;
|
||||
handle->iso.packet_index = 0;
|
||||
handle->iso.first_payload = handle->iso.head;
|
||||
|
||||
err = ioctl(handle->iso.fd, FW_CDEV_IOC_QUEUE_ISO, &queue_iso);
|
||||
if (err < 0)
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
queue_xmit_packets(raw1394handle_t handle, int limit, int cycle)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
enum raw1394_iso_disposition d;
|
||||
unsigned char tag, sy;
|
||||
unsigned int len;
|
||||
unsigned int dropped = 0;
|
||||
|
||||
if (fwhandle->iso.xmit_handler == NULL)
|
||||
return 0;
|
||||
|
||||
while (fwhandle->iso.packet_count < limit) {
|
||||
|
||||
d = fwhandle->iso.xmit_handler(handle, fwhandle->iso.head,
|
||||
&len, &tag, &sy, cycle, dropped);
|
||||
|
||||
switch (d) {
|
||||
case RAW1394_ISO_OK:
|
||||
queue_packet(fwhandle, len, 0, tag, sy);
|
||||
if (cycle >= 0) {
|
||||
cycle++;
|
||||
if (cycle >= 8000)
|
||||
cycle %= 8000;
|
||||
}
|
||||
break;
|
||||
case RAW1394_ISO_DEFER:
|
||||
case RAW1394_ISO_AGAIN:
|
||||
default:
|
||||
return 0;
|
||||
case RAW1394_ISO_ERROR:
|
||||
return -1;
|
||||
case RAW1394_ISO_STOP:
|
||||
fw_iso_stop(fwhandle);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fw_iso_xmit_start(raw1394handle_t handle, int start_on_cycle,
|
||||
int prebuffer_packets)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
struct fw_cdev_start_iso start_iso;
|
||||
int retval;
|
||||
|
||||
if (prebuffer_packets == -1)
|
||||
prebuffer_packets = fwhandle->iso.irq_interval;
|
||||
|
||||
fwhandle->iso.prebuffer = prebuffer_packets;
|
||||
fwhandle->iso.start_on_cycle = start_on_cycle;
|
||||
|
||||
retval = queue_xmit_packets(handle, prebuffer_packets, start_on_cycle);
|
||||
if (retval)
|
||||
return -1;
|
||||
|
||||
if (start_on_cycle >= 0) {
|
||||
int tmp;
|
||||
|
||||
tmp = start_on_cycle + prebuffer_packets;
|
||||
tmp %= 8000;
|
||||
retval = queue_xmit_packets(handle, fwhandle->iso.buf_packets, tmp);
|
||||
} else {
|
||||
retval = queue_xmit_packets(handle, fwhandle->iso.buf_packets, -1);
|
||||
}
|
||||
if (retval)
|
||||
return -1;
|
||||
|
||||
if (fwhandle->iso.prebuffer <= fwhandle->iso.packet_count) {
|
||||
start_iso.sync = 0; /* unused */
|
||||
start_iso.tags = 0; /* unused */
|
||||
start_iso.cycle = calculate_start_cycle(fwhandle);
|
||||
start_iso.handle = fwhandle->iso.kernel_handle;
|
||||
|
||||
retval = ioctl(fwhandle->iso.fd,
|
||||
FW_CDEV_IOC_START_ISO, &start_iso);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
}
|
||||
|
||||
fwhandle->iso.state = ISO_ACTIVE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int abi_has_iso_rx_timestamps(fw_handle_t handle)
|
||||
{
|
||||
return handle->abi_version >= 2;
|
||||
}
|
||||
|
||||
static inline int recv_header_length(fw_handle_t handle)
|
||||
{
|
||||
return abi_has_iso_rx_timestamps(handle) ? 8 : 4;
|
||||
}
|
||||
|
||||
static int
|
||||
queue_recv_packets(fw_handle_t handle)
|
||||
{
|
||||
while (handle->iso.packet_count <= handle->iso.buf_packets)
|
||||
queue_packet(handle, handle->iso.max_packet_size,
|
||||
recv_header_length(handle), 0, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum raw1394_iso_disposition
|
||||
flush_recv_packets(raw1394handle_t handle,
|
||||
struct fw_cdev_event_iso_interrupt *interrupt)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
enum raw1394_iso_disposition d;
|
||||
quadlet_t header, *p, *end;
|
||||
unsigned int len, cycle, dropped;
|
||||
unsigned char channel, tag, sy;
|
||||
|
||||
p = interrupt->header;
|
||||
end = (void *) interrupt->header + interrupt->header_length;
|
||||
/*
|
||||
* This is bogus, but it's the best we can do without accurate
|
||||
* timestamps. Assume that the first packet was received
|
||||
* {number of packets} before the cycle recorded in the interrupt
|
||||
* event, and that each subsequent packet was received one cycle
|
||||
* later. This also assumes that the interrupt event happened
|
||||
* immediately after the last packet was received.
|
||||
*/
|
||||
if (!abi_has_iso_rx_timestamps(fwhandle)) {
|
||||
cycle = interrupt->cycle;
|
||||
cycle &= 0x1fff;
|
||||
cycle += 8000;
|
||||
cycle -= interrupt->header_length / 4;
|
||||
}
|
||||
|
||||
dropped = 0;
|
||||
d = RAW1394_ISO_OK;
|
||||
|
||||
while (p < end) {
|
||||
header = be32_to_cpu(*p++);
|
||||
len = header >> 16;
|
||||
tag = (header >> 14) & 0x3;
|
||||
channel = (header >> 8) & 0x3f;
|
||||
sy = header & 0x0f;
|
||||
|
||||
if (abi_has_iso_rx_timestamps(fwhandle))
|
||||
cycle = be32_to_cpu(*p++) & 0x1fff;
|
||||
else {
|
||||
cycle++;
|
||||
if (cycle >= 8000)
|
||||
cycle -= 8000;
|
||||
}
|
||||
|
||||
d = fwhandle->iso.recv_handler(handle, fwhandle->iso.tail, len,
|
||||
channel, tag, sy, cycle, dropped);
|
||||
if (d != RAW1394_ISO_OK)
|
||||
/* FIXME: we need to save the headers so we
|
||||
* can restart this loop. */
|
||||
break;
|
||||
|
||||
fwhandle->iso.tail += fwhandle->iso.max_packet_size;
|
||||
fwhandle->iso.packet_count--;
|
||||
|
||||
if (fwhandle->iso.tail + fwhandle->iso.max_packet_size > fwhandle->iso.buffer_end)
|
||||
fwhandle->iso.tail = fwhandle->iso.buffer;
|
||||
}
|
||||
|
||||
switch (d) {
|
||||
case RAW1394_ISO_OK:
|
||||
case RAW1394_ISO_DEFER:
|
||||
default:
|
||||
break;
|
||||
|
||||
case RAW1394_ISO_ERROR:
|
||||
return -1;
|
||||
|
||||
case RAW1394_ISO_STOP:
|
||||
fw_iso_stop(fwhandle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
queue_recv_packets(fwhandle);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fw_iso_recv_start(fw_handle_t handle, int start_on_cycle,
|
||||
int tag_mask, int sync)
|
||||
{
|
||||
struct fw_cdev_start_iso start_iso;
|
||||
|
||||
queue_recv_packets(handle);
|
||||
|
||||
handle->iso.start_on_cycle = start_on_cycle;
|
||||
start_iso.cycle = calculate_start_cycle(handle);
|
||||
start_iso.tags =
|
||||
tag_mask == -1 ? FW_CDEV_ISO_CONTEXT_MATCH_ALL_TAGS : tag_mask;
|
||||
/* sync is documented as 'not used' */
|
||||
start_iso.sync = 0;
|
||||
start_iso.handle = handle->iso.kernel_handle;
|
||||
|
||||
if (ioctl(handle->iso.fd, FW_CDEV_IOC_START_ISO, &start_iso))
|
||||
return -1;
|
||||
else
|
||||
handle->iso.state = ISO_ACTIVE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int handle_iso_event(raw1394handle_t handle,
|
||||
struct epoll_closure *closure, uint32_t events)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
struct fw_cdev_event_iso_interrupt *interrupt;
|
||||
int len;
|
||||
|
||||
len = read(fwhandle->iso.fd, fwhandle->buffer, sizeof fwhandle->buffer);
|
||||
if (len < 0)
|
||||
return -1;
|
||||
|
||||
interrupt = (struct fw_cdev_event_iso_interrupt *) fwhandle->buffer;
|
||||
if (interrupt->type != FW_CDEV_EVENT_ISO_INTERRUPT)
|
||||
return 0;
|
||||
|
||||
switch (fwhandle->iso.type) {
|
||||
case FW_CDEV_ISO_CONTEXT_TRANSMIT:
|
||||
{
|
||||
int cycle;
|
||||
|
||||
/* Check whether the ABI version provides iso tx timestamps. */
|
||||
if (interrupt->header_length) {
|
||||
fwhandle->iso.packet_count -= interrupt->header_length/4;
|
||||
/*
|
||||
* Take the cycle of the last packet transmitted, add
|
||||
* the number of packets currently queued, plus one, and
|
||||
* that's the cycle number of the next packet to ask
|
||||
* for.
|
||||
*/
|
||||
cycle = be32_to_cpu(interrupt->header[interrupt->header_length/4 - 1]);
|
||||
cycle &= 0x1fff;
|
||||
} else {
|
||||
fwhandle->iso.packet_count -= fwhandle->iso.irq_interval;
|
||||
/*
|
||||
* Bogusly faking it again. Assume that the last packet
|
||||
* transmitted was transmitted on interrupt->cycle.
|
||||
*/
|
||||
cycle = interrupt->cycle;
|
||||
}
|
||||
cycle += fwhandle->iso.packet_count;
|
||||
cycle++;
|
||||
cycle %= 8000;
|
||||
return queue_xmit_packets(handle, fwhandle->iso.buf_packets, cycle);
|
||||
}
|
||||
case FW_CDEV_ISO_CONTEXT_RECEIVE:
|
||||
return flush_recv_packets(handle, interrupt);
|
||||
default:
|
||||
/* Doesn't happen. */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int fw_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
|
||||
unsigned int len, unsigned char tag,
|
||||
unsigned char sy)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
struct fw_cdev_start_iso start_iso;
|
||||
int retval;
|
||||
|
||||
if (len > fwhandle->iso.max_packet_size) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Block until we have space for another packet. */
|
||||
while (fwhandle->iso.packet_count + fwhandle->iso.irq_interval >
|
||||
fwhandle->iso.buf_packets)
|
||||
fw_loop_iterate(handle);
|
||||
|
||||
memcpy(fwhandle->iso.head, data, len);
|
||||
if (queue_packet(fwhandle, len, 0, tag, sy) < 0)
|
||||
return -1;
|
||||
|
||||
/* Start the streaming if it's not already running and if
|
||||
* we've buffered up enough packets. */
|
||||
if (fwhandle->iso.prebuffer > 0 &&
|
||||
fwhandle->iso.packet_count >= fwhandle->iso.prebuffer) {
|
||||
/* Set this to 0 to indicate that we're running. */
|
||||
fwhandle->iso.prebuffer = 0;
|
||||
start_iso.cycle = calculate_start_cycle(fwhandle);
|
||||
start_iso.handle = fwhandle->iso.kernel_handle;
|
||||
|
||||
retval = ioctl(fwhandle->iso.fd,
|
||||
FW_CDEV_IOC_START_ISO, &start_iso);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fw_iso_xmit_sync(raw1394handle_t handle)
|
||||
{
|
||||
fw_handle_t fwhandle = handle->mode.fw;
|
||||
struct fw_cdev_iso_packet skip;
|
||||
struct fw_cdev_queue_iso queue_iso;
|
||||
int len;
|
||||
|
||||
skip.control = FW_CDEV_ISO_INTERRUPT | FW_CDEV_ISO_SKIP;
|
||||
queue_iso.packets = ptr_to_u64(&skip);
|
||||
queue_iso.size = sizeof skip;
|
||||
queue_iso.data = 0;
|
||||
queue_iso.handle = fwhandle->iso.kernel_handle;
|
||||
|
||||
len = ioctl(fwhandle->iso.fd, FW_CDEV_IOC_QUEUE_ISO, &queue_iso);
|
||||
if (len < 0)
|
||||
return -1;
|
||||
|
||||
/* Now that we've queued the skip packet, we'll get an
|
||||
* interrupt when the transmit buffer is flushed, so all we do
|
||||
* here is wait. */
|
||||
while (fwhandle->iso.packet_count > 0)
|
||||
fw_loop_iterate(handle);
|
||||
|
||||
/* The iso mainloop thinks that interrutps indicate another
|
||||
* irq_interval number of packets was sent, so the skip
|
||||
* interrupt makes it go out of whack. We just reset it. */
|
||||
fwhandle->iso.head = fwhandle->iso.buffer;
|
||||
fwhandle->iso.tail = fwhandle->iso.buffer;
|
||||
fwhandle->iso.first_payload = fwhandle->iso.buffer;
|
||||
fwhandle->iso.packet_phase = 0;
|
||||
fwhandle->iso.packet_count = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fw_iso_recv_flush(fw_handle_t handle)
|
||||
{
|
||||
struct fw_cdev_flush_iso flush;
|
||||
|
||||
flush.handle = handle->iso.kernel_handle;
|
||||
return ioctl(handle->iso.fd, FW_CDEV_IOC_FLUSH_ISO, &flush);
|
||||
}
|
||||
|
||||
static int
|
||||
iso_init(fw_handle_t handle, int type,
|
||||
raw1394_iso_xmit_handler_t xmit_handler,
|
||||
raw1394_iso_recv_handler_t recv_handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval)
|
||||
{
|
||||
struct fw_cdev_create_iso_context create;
|
||||
struct epoll_event ep;
|
||||
int retval;
|
||||
|
||||
if (handle->iso.fd != -1) {
|
||||
errno = EBUSY;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* set irq_interval from < 1 to default values like ieee1394 rawiso */
|
||||
if (irq_interval < 0)
|
||||
irq_interval = buf_packets / 4;
|
||||
if (irq_interval == 0)
|
||||
irq_interval = 1;
|
||||
|
||||
handle->iso.type = type;
|
||||
handle->iso.irq_interval = irq_interval;
|
||||
handle->iso.xmit_handler = xmit_handler;
|
||||
handle->iso.recv_handler = recv_handler;
|
||||
handle->iso.buf_packets = buf_packets;
|
||||
handle->iso.max_packet_size = max_packet_size;
|
||||
handle->iso.packet_phase = 0;
|
||||
handle->iso.packet_count = 0;
|
||||
handle->iso.packets =
|
||||
malloc(handle->iso.irq_interval * sizeof handle->iso.packets[0]);
|
||||
if (handle->iso.packets == NULL) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle->iso.fd = open(handle->iso.filename, O_RDWR);
|
||||
if (handle->iso.fd < 0) {
|
||||
free(handle->iso.packets);
|
||||
handle->iso.packets = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle->iso.closure.func = handle_iso_event;
|
||||
memset(&ep, 0, sizeof(ep));
|
||||
ep.events = EPOLLIN;
|
||||
ep.data.ptr = &handle->iso.closure;
|
||||
if (epoll_ctl(handle->epoll_fd, EPOLL_CTL_ADD,
|
||||
handle->iso.fd, &ep) < 0) {
|
||||
close(handle->iso.fd);
|
||||
free(handle->iso.packets);
|
||||
handle->iso.packets = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
memset(&create, 0, sizeof(create));
|
||||
create.type = type;
|
||||
create.channel = channel;
|
||||
create.speed = speed;
|
||||
create.header_size = recv_header_length(handle);
|
||||
|
||||
retval = ioctl(handle->iso.fd,
|
||||
FW_CDEV_IOC_CREATE_ISO_CONTEXT, &create);
|
||||
if (retval < 0) {
|
||||
close(handle->iso.fd);
|
||||
free(handle->iso.packets);
|
||||
handle->iso.packets = NULL;
|
||||
return retval;
|
||||
}
|
||||
handle->iso.kernel_handle = create.handle;
|
||||
|
||||
handle->iso.buffer =
|
||||
mmap(NULL, buf_packets * handle->iso.max_packet_size,
|
||||
PROT_READ | PROT_WRITE, MAP_SHARED, handle->iso.fd, 0);
|
||||
|
||||
if (handle->iso.buffer == MAP_FAILED) {
|
||||
close(handle->iso.fd);
|
||||
free(handle->iso.packets);
|
||||
handle->iso.packets = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle->iso.buffer_end = handle->iso.buffer +
|
||||
buf_packets * handle->iso.max_packet_size;
|
||||
handle->iso.head = handle->iso.buffer;
|
||||
handle->iso.tail = handle->iso.buffer;
|
||||
handle->iso.first_payload = handle->iso.buffer;
|
||||
handle->iso.state = ISO_STOPPED;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fw_iso_xmit_init(fw_handle_t handle,
|
||||
raw1394_iso_xmit_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval)
|
||||
{
|
||||
return iso_init(handle, FW_CDEV_ISO_CONTEXT_TRANSMIT,
|
||||
handler, NULL, buf_packets, max_packet_size,
|
||||
channel, speed, irq_interval);
|
||||
}
|
||||
|
||||
int fw_iso_recv_init(fw_handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval)
|
||||
{
|
||||
return iso_init(handle, FW_CDEV_ISO_CONTEXT_RECEIVE,
|
||||
NULL, handler, buf_packets, max_packet_size,
|
||||
channel, 0, irq_interval);
|
||||
}
|
||||
|
||||
int fw_iso_multichannel_recv_init(fw_handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int irq_interval)
|
||||
{
|
||||
/* FIXME: gah */
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int fw_iso_recv_listen_channel(fw_handle_t handle,
|
||||
unsigned char channel)
|
||||
{
|
||||
/* FIXME: multichannel */
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int fw_iso_recv_unlisten_channel(fw_handle_t handle,
|
||||
unsigned char channel)
|
||||
{
|
||||
/* FIXME: multichannel */
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int fw_iso_recv_set_channel_mask(fw_handle_t handle, u_int64_t mask)
|
||||
{
|
||||
/* FIXME: multichannel */
|
||||
errno = ENOSYS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
void fw_iso_stop(fw_handle_t handle)
|
||||
{
|
||||
struct fw_cdev_stop_iso stop_iso;
|
||||
|
||||
stop_iso.handle = handle->iso.kernel_handle;
|
||||
ioctl(handle->iso.fd, FW_CDEV_IOC_STOP_ISO, &stop_iso);
|
||||
|
||||
handle->iso.head = handle->iso.buffer;
|
||||
handle->iso.tail = handle->iso.buffer;
|
||||
handle->iso.first_payload = handle->iso.buffer;
|
||||
handle->iso.packet_phase = 0;
|
||||
handle->iso.packet_count = 0;
|
||||
handle->iso.packet_index = 0;
|
||||
handle->iso.state = ISO_STOPPED;
|
||||
}
|
||||
|
||||
void fw_iso_shutdown(fw_handle_t handle)
|
||||
{
|
||||
if (handle->iso.packets == NULL)
|
||||
return;
|
||||
|
||||
munmap(handle->iso.buffer,
|
||||
handle->iso.buf_packets * handle->iso.max_packet_size);
|
||||
if (handle->iso.state != ISO_STOPPED)
|
||||
fw_iso_stop(handle);
|
||||
close(handle->iso.fd);
|
||||
free(handle->iso.packets);
|
||||
handle->iso.packets = NULL;
|
||||
handle->iso.fd = -1;
|
||||
}
|
||||
|
||||
int fw_read_cycle_timer(fw_handle_t handle, u_int32_t *cycle_timer,
|
||||
u_int64_t *local_time)
|
||||
{
|
||||
int err;
|
||||
struct fw_cdev_get_cycle_timer ctr = { 0 };
|
||||
|
||||
err = ioctl(handle->ioctl_fd, FW_CDEV_IOC_GET_CYCLE_TIMER, &ctr);
|
||||
if (!err) {
|
||||
*cycle_timer = ctr.cycle_timer;
|
||||
*local_time = ctr.local_time;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
int fw_read_cycle_timer_and_clock(fw_handle_t handle, u_int32_t *cycle_timer,
|
||||
u_int64_t *local_time, clockid_t clk_id)
|
||||
{
|
||||
int err;
|
||||
struct fw_cdev_get_cycle_timer2 ctr = {.clk_id = clk_id};
|
||||
|
||||
err = ioctl(handle->ioctl_fd, FW_CDEV_IOC_GET_CYCLE_TIMER2, &ctr);
|
||||
if (!err) {
|
||||
*cycle_timer = ctr.cycle_timer;
|
||||
*local_time = ctr.tv_sec * 1000000ULL +
|
||||
ctr.tv_nsec / 1000;
|
||||
}
|
||||
return err;
|
||||
}
|
|
@ -0,0 +1,261 @@
|
|||
/* -*- c-basic-offset: 8 -*-
|
||||
*
|
||||
* fw.h -- Internal header file for firewire raw1394 emulation
|
||||
*
|
||||
* Copyright (C) 2007 Kristian Hoegsberg <krh@bitplanet.net>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#ifndef LIBRAW1394_FW_H
|
||||
#define LIBRAW1394_FW_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <byteswap.h>
|
||||
|
||||
#include "firewire-constants.h"
|
||||
#include "firewire-cdev.h"
|
||||
#include "raw1394.h"
|
||||
#include "csr.h"
|
||||
#include "config.h"
|
||||
|
||||
#define ptr_to_u64(p) ((__u64)(unsigned long)(p))
|
||||
#define u64_to_ptr(p) ((void *)(unsigned long)(p))
|
||||
|
||||
static inline __u32
|
||||
be32_to_cpu(__u32 q)
|
||||
{
|
||||
union { char c[4]; __u32 q; } u = { { 1, 0, 0, 0 } };
|
||||
|
||||
return u.q == 1 ? bswap_32(q) : q;
|
||||
}
|
||||
|
||||
static inline __u32
|
||||
cpu_to_be32(__u32 q)
|
||||
{
|
||||
return be32_to_cpu(q);
|
||||
}
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
#define BUFFER_SIZE (16 * 1024)
|
||||
|
||||
#define MAX_PORTS 16
|
||||
|
||||
struct fw_handle;
|
||||
|
||||
struct epoll_closure {
|
||||
int (*func)(raw1394handle_t handle,
|
||||
struct epoll_closure *closure, uint32_t events);
|
||||
};
|
||||
|
||||
struct port {
|
||||
char device_file[32];
|
||||
char *name;
|
||||
int node_count;
|
||||
int card;
|
||||
};
|
||||
|
||||
#define MAX_DEVICES 63
|
||||
#define FILENAME_SIZE 16
|
||||
|
||||
struct device {
|
||||
struct epoll_closure closure;
|
||||
int fd;
|
||||
int node_id;
|
||||
int generation;
|
||||
char filename[FILENAME_SIZE];
|
||||
};
|
||||
|
||||
struct request_closure {
|
||||
void *data;
|
||||
unsigned long tag;
|
||||
};
|
||||
|
||||
struct allocation;
|
||||
|
||||
struct fw_handle {
|
||||
struct port ports[MAX_PORTS];
|
||||
int port_count;
|
||||
int err;
|
||||
int card;
|
||||
int generation;
|
||||
int abi_version;
|
||||
void *userdata;
|
||||
int notify_bus_reset;
|
||||
|
||||
bus_reset_handler_t bus_reset_handler;
|
||||
tag_handler_t tag_handler;
|
||||
arm_tag_handler_t arm_tag_handler;
|
||||
fcp_handler_t fcp_handler;
|
||||
__u32 fcp_allocation_handle;
|
||||
struct allocation *allocations;
|
||||
|
||||
int ioctl_fd;
|
||||
int epoll_fd;
|
||||
int inotify_fd;
|
||||
int inotify_watch;
|
||||
int pipe_fds[2];
|
||||
|
||||
struct epoll_closure pipe_closure;
|
||||
struct epoll_closure inotify_closure;
|
||||
|
||||
struct device devices[MAX_DEVICES];
|
||||
struct device *local_device;
|
||||
int nodes[MAX_DEVICES];
|
||||
struct fw_cdev_event_bus_reset reset;
|
||||
|
||||
struct {
|
||||
char *filename;
|
||||
struct epoll_closure closure;
|
||||
int fd;
|
||||
unsigned kernel_handle;
|
||||
int type;
|
||||
int irq_interval;
|
||||
int packet_phase;
|
||||
int packet_count;
|
||||
int packet_index;
|
||||
int buf_packets;
|
||||
int max_packet_size;
|
||||
int prebuffer;
|
||||
int start_on_cycle;
|
||||
enum raw1394_iso_dma_recv_mode recv_mode;
|
||||
enum { ISO_STOPPED, ISO_ACTIVE } state;
|
||||
raw1394_iso_xmit_handler_t xmit_handler;
|
||||
raw1394_iso_recv_handler_t recv_handler;
|
||||
unsigned char *buffer, *buffer_end, *head;
|
||||
unsigned char *tail, *first_payload;
|
||||
|
||||
struct fw_cdev_iso_packet *packets;
|
||||
} iso;
|
||||
|
||||
__u64 buffer[BUFFER_SIZE / sizeof(__u64)];
|
||||
};
|
||||
typedef struct fw_handle *fw_handle_t;
|
||||
|
||||
int fw_loop_iterate(raw1394handle_t handle);
|
||||
fw_handle_t fw_new_handle(void);
|
||||
void fw_destroy_handle(fw_handle_t handle);
|
||||
fw_handle_t fw_new_handle_on_port(int port);
|
||||
int fw_busreset_notify (fw_handle_t handle, int off_on_switch);
|
||||
int fw_get_fd(fw_handle_t handle);
|
||||
nodeid_t fw_get_local_id(fw_handle_t handle);
|
||||
nodeid_t fw_get_irm_id(fw_handle_t handle);
|
||||
int fw_get_nodecount(fw_handle_t handle);
|
||||
int fw_get_speed(fw_handle_t handle, nodeid_t node);
|
||||
int fw_get_port_info(fw_handle_t handle, struct raw1394_portinfo *pinf,
|
||||
int maxports);
|
||||
int fw_set_port(fw_handle_t handle, int port);
|
||||
int fw_reset_bus_new(fw_handle_t handle, int type);
|
||||
int fw_arm_register(fw_handle_t handle, nodeaddr_t start,
|
||||
size_t length, byte_t *initial_value,
|
||||
octlet_t arm_tag, arm_options_t access_rights,
|
||||
arm_options_t notification_options,
|
||||
arm_options_t client_transactions);
|
||||
int fw_arm_unregister(fw_handle_t handle, nodeaddr_t start);
|
||||
int fw_arm_set_buf(fw_handle_t handle, nodeaddr_t start,
|
||||
size_t length, void *buf);
|
||||
int fw_arm_get_buf(fw_handle_t handle, nodeaddr_t start,
|
||||
size_t length, void *buf);
|
||||
int fw_echo_request(fw_handle_t handle, quadlet_t data);
|
||||
int fw_wake_up(fw_handle_t handle);
|
||||
int fw_start_read(fw_handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer, unsigned long tag);
|
||||
int fw_start_write(fw_handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data, unsigned long tag);
|
||||
int fw_start_lock(fw_handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result, unsigned long tag);
|
||||
int fw_start_lock64(fw_handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result, unsigned long tag);
|
||||
int fw_start_async_stream(fw_handle_t handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy,
|
||||
unsigned int speed, size_t length, quadlet_t *data,
|
||||
unsigned long rawtag);
|
||||
int fw_start_phy_packet_write(fw_handle_t handle,
|
||||
quadlet_t data, unsigned long tag);
|
||||
int fw_start_async_send(fw_handle_t handle,
|
||||
size_t length, size_t header_length,
|
||||
unsigned int expect_response,
|
||||
quadlet_t *data, unsigned long rawtag);
|
||||
int fw_read(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer);
|
||||
int fw_write(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data);
|
||||
int fw_lock(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result);
|
||||
int fw_lock64(raw1394handle_t handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result);
|
||||
int fw_async_stream(raw1394handle_t handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy, unsigned int speed,
|
||||
size_t length, quadlet_t *data);
|
||||
int fw_phy_packet_write(raw1394handle_t handle, quadlet_t data);
|
||||
int fw_async_send(fw_handle_t handle,
|
||||
size_t length, size_t header_length,
|
||||
unsigned int expect_response,
|
||||
quadlet_t *data);
|
||||
int fw_start_fcp_listen(fw_handle_t handle);
|
||||
int fw_stop_fcp_listen(fw_handle_t handle);
|
||||
int fw_update_config_rom(fw_handle_t handle, const quadlet_t *new_rom,
|
||||
size_t size, unsigned char rom_version);
|
||||
int fw_add_config_rom_descriptor(fw_handle_t handle, u_int32_t *token,
|
||||
quadlet_t immediate_key, quadlet_t key,
|
||||
const quadlet_t *data, size_t size);
|
||||
int fw_remove_config_rom_descriptor(fw_handle_t handle, u_int32_t token);
|
||||
int fw_get_config_rom(fw_handle_t handle, quadlet_t *buffer,
|
||||
size_t buffersize, size_t *rom_size,
|
||||
unsigned char *rom_version);
|
||||
int fw_bandwidth_modify(raw1394handle_t handle,
|
||||
unsigned int bandwidth,
|
||||
enum raw1394_modify_mode mode);
|
||||
int fw_channel_modify(raw1394handle_t handle,
|
||||
unsigned int channel,
|
||||
enum raw1394_modify_mode mode);
|
||||
|
||||
int fw_iso_xmit_start(raw1394handle_t handle, int start_on_cycle,
|
||||
int prebuffer_packets);
|
||||
int fw_iso_recv_start(fw_handle_t handle, int start_on_cycle,
|
||||
int tag_mask, int sync);
|
||||
int fw_iso_xmit_write(raw1394handle_t handle, unsigned char *data,
|
||||
unsigned int len, unsigned char tag,
|
||||
unsigned char sy);
|
||||
int fw_iso_xmit_sync(raw1394handle_t handle);
|
||||
int fw_iso_recv_flush(fw_handle_t handle);
|
||||
int fw_iso_xmit_init(fw_handle_t handle,
|
||||
raw1394_iso_xmit_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval);
|
||||
int fw_iso_recv_init(fw_handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval);
|
||||
int fw_iso_multichannel_recv_init(fw_handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int irq_interval);
|
||||
int fw_iso_recv_listen_channel(fw_handle_t handle,
|
||||
unsigned char channel);
|
||||
int fw_iso_recv_unlisten_channel(fw_handle_t handle,
|
||||
unsigned char channel);
|
||||
int fw_iso_recv_set_channel_mask(fw_handle_t handle, u_int64_t mask);
|
||||
void fw_iso_stop(fw_handle_t handle);
|
||||
void fw_iso_shutdown(fw_handle_t handle);
|
||||
int fw_read_cycle_timer(fw_handle_t handle, u_int32_t *cycle_timer,
|
||||
u_int64_t *local_time);
|
||||
int fw_read_cycle_timer_and_clock(fw_handle_t handle, u_int32_t *cycle_timer,
|
||||
u_int64_t *local_time, clockid_t clk_id);
|
||||
|
||||
#endif
|
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* Base file for all ieee1394 ioctl's.
|
||||
* Linux-1394 has allocated base '#' with a range of 0x00-0x3f.
|
||||
*/
|
||||
|
||||
#ifndef __IEEE1394_IOCTL_H
|
||||
#define __IEEE1394_IOCTL_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
/* DV1394 Gets 10 */
|
||||
|
||||
/* Get the driver ready to transmit video. pass a struct dv1394_init* as
|
||||
* the parameter (see below), or NULL to get default parameters */
|
||||
#define DV1394_IOC_INIT _IOW('#', 0x06, struct dv1394_init)
|
||||
|
||||
/* Stop transmitting video and free the ringbuffer */
|
||||
#define DV1394_IOC_SHUTDOWN _IO ('#', 0x07)
|
||||
|
||||
/* Submit N new frames to be transmitted, where the index of the first new
|
||||
* frame is first_clear_buffer, and the index of the last new frame is
|
||||
* (first_clear_buffer + N) % n_frames */
|
||||
#define DV1394_IOC_SUBMIT_FRAMES _IO ('#', 0x08)
|
||||
|
||||
/* Block until N buffers are clear (pass N as the parameter) Because we
|
||||
* re-transmit the last frame on underrun, there will at most be n_frames
|
||||
* - 1 clear frames at any time */
|
||||
#define DV1394_IOC_WAIT_FRAMES _IO ('#', 0x09)
|
||||
|
||||
/* Capture new frames that have been received, where the index of the
|
||||
* first new frame is first_clear_buffer, and the index of the last new
|
||||
* frame is (first_clear_buffer + N) % n_frames */
|
||||
#define DV1394_IOC_RECEIVE_FRAMES _IO ('#', 0x0a)
|
||||
|
||||
/* Tell card to start receiving DMA */
|
||||
#define DV1394_IOC_START_RECEIVE _IO ('#', 0x0b)
|
||||
|
||||
/* Pass a struct dv1394_status* as the parameter */
|
||||
#define DV1394_IOC_GET_STATUS _IOR('#', 0x0c, struct dv1394_status)
|
||||
|
||||
|
||||
/* Video1394 Gets 10 */
|
||||
|
||||
#define VIDEO1394_IOC_LISTEN_CHANNEL \
|
||||
_IOWR('#', 0x10, struct video1394_mmap)
|
||||
#define VIDEO1394_IOC_UNLISTEN_CHANNEL \
|
||||
_IOW ('#', 0x11, int)
|
||||
#define VIDEO1394_IOC_LISTEN_QUEUE_BUFFER \
|
||||
_IOW ('#', 0x12, struct video1394_wait)
|
||||
#define VIDEO1394_IOC_LISTEN_WAIT_BUFFER \
|
||||
_IOWR('#', 0x13, struct video1394_wait)
|
||||
#define VIDEO1394_IOC_TALK_CHANNEL \
|
||||
_IOWR('#', 0x14, struct video1394_mmap)
|
||||
#define VIDEO1394_IOC_UNTALK_CHANNEL \
|
||||
_IOW ('#', 0x15, int)
|
||||
/*
|
||||
* This one is broken: it really wanted
|
||||
* "sizeof (struct video1394_wait) + sizeof (struct video1394_queue_variable)"
|
||||
* but got just a "size_t"
|
||||
*/
|
||||
#define VIDEO1394_IOC_TALK_QUEUE_BUFFER \
|
||||
_IOW ('#', 0x16, size_t)
|
||||
#define VIDEO1394_IOC_TALK_WAIT_BUFFER \
|
||||
_IOW ('#', 0x17, struct video1394_wait)
|
||||
#define VIDEO1394_IOC_LISTEN_POLL_BUFFER \
|
||||
_IOWR('#', 0x18, struct video1394_wait)
|
||||
|
||||
|
||||
/* Raw1394's ISO interface */
|
||||
#define RAW1394_IOC_ISO_XMIT_INIT \
|
||||
_IOW ('#', 0x1a, struct raw1394_iso_status)
|
||||
#define RAW1394_IOC_ISO_RECV_INIT \
|
||||
_IOWR('#', 0x1b, struct raw1394_iso_status)
|
||||
#define RAW1394_IOC_ISO_RECV_START \
|
||||
_IOC (_IOC_WRITE, '#', 0x1c, sizeof(int) * 3)
|
||||
#define RAW1394_IOC_ISO_XMIT_START \
|
||||
_IOC (_IOC_WRITE, '#', 0x1d, sizeof(int) * 2)
|
||||
#define RAW1394_IOC_ISO_XMIT_RECV_STOP \
|
||||
_IO ('#', 0x1e)
|
||||
#define RAW1394_IOC_ISO_GET_STATUS \
|
||||
_IOR ('#', 0x1f, struct raw1394_iso_status)
|
||||
#define RAW1394_IOC_ISO_SHUTDOWN \
|
||||
_IO ('#', 0x20)
|
||||
#define RAW1394_IOC_ISO_QUEUE_ACTIVITY \
|
||||
_IO ('#', 0x21)
|
||||
#define RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL \
|
||||
_IOW ('#', 0x22, unsigned char)
|
||||
#define RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL \
|
||||
_IOW ('#', 0x23, unsigned char)
|
||||
#define RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK \
|
||||
_IOW ('#', 0x24, __u64)
|
||||
#define RAW1394_IOC_ISO_RECV_PACKETS \
|
||||
_IOW ('#', 0x25, struct raw1394_iso_packets)
|
||||
#define RAW1394_IOC_ISO_RECV_RELEASE_PACKETS \
|
||||
_IOW ('#', 0x26, unsigned int)
|
||||
#define RAW1394_IOC_ISO_XMIT_PACKETS \
|
||||
_IOW ('#', 0x27, struct raw1394_iso_packets)
|
||||
#define RAW1394_IOC_ISO_XMIT_SYNC \
|
||||
_IO ('#', 0x28)
|
||||
#define RAW1394_IOC_ISO_RECV_FLUSH \
|
||||
_IO ('#', 0x29)
|
||||
#define RAW1394_IOC_GET_CYCLE_TIMER \
|
||||
_IOR ('#', 0x30, struct raw1394_cycle_timer)
|
||||
|
||||
#endif /* __IEEE1394_IOCTL_H */
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef _LIBRAW1394_IEEE1394_H
|
||||
#define _LIBRAW1394_IEEE1394_H
|
||||
|
||||
#define L1394_RCODE_COMPLETE 0x0
|
||||
#define L1394_RCODE_CONFLICT_ERROR 0x4
|
||||
#define L1394_RCODE_DATA_ERROR 0x5
|
||||
#define L1394_RCODE_TYPE_ERROR 0x6
|
||||
#define L1394_RCODE_ADDRESS_ERROR 0x7
|
||||
|
||||
#define L1394_ACK_COMPLETE 0x1
|
||||
#define L1394_ACK_PENDING 0x2
|
||||
#define L1394_ACK_BUSY_X 0x4
|
||||
#define L1394_ACK_BUSY_A 0x5
|
||||
#define L1394_ACK_BUSY_B 0x6
|
||||
#define L1394_ACK_DATA_ERROR 0xd
|
||||
#define L1394_ACK_TYPE_ERROR 0xe
|
||||
|
||||
#define L1394_SPEED_100 0x0
|
||||
#define L1394_SPEED_200 0x1
|
||||
#define L1394_SPEED_400 0x2
|
||||
/* added in libraw1394 v2.1.0: */
|
||||
#define L1394_SPEED_BETA 0x3
|
||||
#define L1394_SPEED_800 0x3
|
||||
#define L1394_SPEED_1600 0x4
|
||||
#define L1394_SPEED_3200 0x5
|
||||
|
||||
#define L1394_SELFID_PWRCL_NO_POWER 0x0
|
||||
#define L1394_SELFID_PWRCL_PROVIDE_15W 0x1
|
||||
#define L1394_SELFID_PWRCL_PROVIDE_30W 0x2
|
||||
#define L1394_SELFID_PWRCL_PROVIDE_45W 0x3
|
||||
#define L1394_SELFID_PWRCL_USE_1W 0x4
|
||||
#define L1394_SELFID_PWRCL_USE_3W 0x5
|
||||
#define L1394_SELFID_PWRCL_USE_6W 0x6
|
||||
#define L1394_SELFID_PWRCL_USE_10W 0x7
|
||||
|
||||
#define L1394_SELFID_PORT_CHILD 0x3
|
||||
#define L1394_SELFID_PORT_PARENT 0x2
|
||||
#define L1394_SELFID_PORT_NCONN 0x1
|
||||
#define L1394_SELFID_PORT_NONE 0x0
|
||||
|
||||
#endif /* _LIBRAW1394_IEEE1394_H */
|
|
@ -0,0 +1,549 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
* new ISO API by Dan Maas
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <malloc.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
/* This implements
|
||||
x = (x+1) % n
|
||||
using a branch based implementation
|
||||
*/
|
||||
static inline int increment_and_wrap(int x, int n)
|
||||
{
|
||||
++x;
|
||||
if (x >= n)
|
||||
x = 0;
|
||||
return x;
|
||||
}
|
||||
|
||||
/* reset the dropped counter each time it is seen */
|
||||
static unsigned int _iso_dropped(ieee1394handle_t handle)
|
||||
{
|
||||
unsigned int retval = handle->iso_packets_dropped;
|
||||
handle->iso_packets_dropped = 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
/* common code for iso_xmit_init and iso_recv_init */
|
||||
static int do_iso_init(ieee1394handle_t handle,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval,
|
||||
int cmd)
|
||||
{
|
||||
unsigned int stride;
|
||||
int result;
|
||||
|
||||
/* already initialized? */
|
||||
if(handle->iso_mode != ISO_INACTIVE)
|
||||
return -1;
|
||||
|
||||
/* choose a power-of-two stride for the packet data buffer,
|
||||
so that an even number of packets fits on one page */
|
||||
for(stride = 4; stride < max_packet_size; stride *= 2);
|
||||
|
||||
if(stride > getpagesize()) {
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle->iso_buf_stride = stride;
|
||||
|
||||
handle->iso_status.config.data_buf_size = stride * buf_packets;
|
||||
handle->iso_status.config.buf_packets = buf_packets;
|
||||
handle->iso_status.config.channel = channel;
|
||||
handle->iso_status.config.speed = speed;
|
||||
handle->iso_status.config.irq_interval = irq_interval;
|
||||
handle->iso_status.config.dma_mode = mode;
|
||||
|
||||
if(ioctl(handle->fd, cmd, &handle->iso_status))
|
||||
return -1;
|
||||
|
||||
/* mmap the DMA buffer */
|
||||
/* (we assume the kernel sets buf_size to an even number of pages) */
|
||||
handle->iso_buffer = mmap(NULL,
|
||||
handle->iso_status.config.data_buf_size,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_SHARED, handle->fd, 0);
|
||||
|
||||
if(handle->iso_buffer == (unsigned char*) MAP_FAILED) {
|
||||
handle->iso_buffer = NULL;
|
||||
ioctl(handle->fd, RAW1394_IOC_ISO_SHUTDOWN, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
handle->iso_status.overflows = 0;
|
||||
handle->iso_packets_dropped = 0;
|
||||
|
||||
handle->iso_xmit_handler = NULL;
|
||||
handle->iso_recv_handler = NULL;
|
||||
|
||||
handle->iso_state = ISO_STOP;
|
||||
|
||||
handle->iso_packet_infos = malloc(buf_packets * sizeof(struct raw1394_iso_packet_info));
|
||||
if(handle->iso_packet_infos == NULL) {
|
||||
munmap(handle->iso_buffer, handle->iso_status.config.data_buf_size);
|
||||
handle->iso_buffer = NULL;
|
||||
ioctl(handle->fd, RAW1394_IOC_ISO_SHUTDOWN, 0);
|
||||
return -1;
|
||||
}
|
||||
#if _POSIX_MEMLOCK > 0
|
||||
result = mlock(handle->iso_packet_infos, buf_packets * sizeof(struct raw1394_iso_packet_info));
|
||||
/* Ignore a permission error - app is responsible for that, */
|
||||
if (result < 0 && result != -EPERM) {
|
||||
munmap(handle->iso_buffer, handle->iso_status.config.data_buf_size);
|
||||
handle->iso_buffer = NULL;
|
||||
ioctl(handle->fd, RAW1394_IOC_ISO_SHUTDOWN, 0);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_xmit_init(ieee1394handle_t handle,
|
||||
raw1394_iso_xmit_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval)
|
||||
{
|
||||
if (do_iso_init(handle, buf_packets, max_packet_size, channel, speed, RAW1394_DMA_DEFAULT,
|
||||
irq_interval, RAW1394_IOC_ISO_XMIT_INIT))
|
||||
return -1;
|
||||
|
||||
handle->iso_mode = ISO_XMIT;
|
||||
handle->iso_xmit_handler = handler;
|
||||
handle->next_packet = 0;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_init(ieee1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval)
|
||||
{
|
||||
/* any speed will work */
|
||||
if (do_iso_init(handle, buf_packets, max_packet_size, channel, RAW1394_ISO_SPEED_100, mode,
|
||||
irq_interval, RAW1394_IOC_ISO_RECV_INIT))
|
||||
return -1;
|
||||
|
||||
handle->iso_mode = ISO_RECV;
|
||||
handle->iso_recv_handler = handler;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_multichannel_recv_init(ieee1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int irq_interval)
|
||||
{
|
||||
/* any speed will work */
|
||||
if (do_iso_init(handle, buf_packets, max_packet_size, -1, RAW1394_ISO_SPEED_100,
|
||||
RAW1394_DMA_BUFFERFILL,
|
||||
irq_interval, RAW1394_IOC_ISO_RECV_INIT))
|
||||
return -1;
|
||||
|
||||
handle->iso_mode = ISO_RECV;
|
||||
handle->iso_recv_handler = handler;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_listen_channel(ieee1394handle_t handle, unsigned char channel)
|
||||
{
|
||||
if (handle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ioctl(handle->fd, RAW1394_IOC_ISO_RECV_LISTEN_CHANNEL, channel);
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_unlisten_channel(ieee1394handle_t handle, unsigned char channel)
|
||||
{
|
||||
if (handle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ioctl(handle->fd, RAW1394_IOC_ISO_RECV_UNLISTEN_CHANNEL, channel);
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_flush(ieee1394handle_t handle)
|
||||
{
|
||||
if (handle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ioctl(handle->fd, RAW1394_IOC_ISO_RECV_FLUSH, 0);
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_set_channel_mask(ieee1394handle_t handle, u_int64_t mask)
|
||||
{
|
||||
if (handle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return ioctl(handle->fd, RAW1394_IOC_ISO_RECV_SET_CHANNEL_MASK, (void*) &mask);
|
||||
}
|
||||
|
||||
int ieee1394_iso_recv_start(ieee1394handle_t handle, int start_on_cycle, int tag_mask, int sync)
|
||||
{
|
||||
int args[3];
|
||||
|
||||
if(handle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
args[0] = start_on_cycle;
|
||||
args[1] = tag_mask;
|
||||
args[2] = sync;
|
||||
|
||||
if(ioctl(handle->fd, RAW1394_IOC_ISO_RECV_START, &args[0]))
|
||||
return -1;
|
||||
|
||||
handle->iso_state = ISO_GO;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int _iso_xmit_queue_packets(raw1394handle_t handle)
|
||||
{
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
struct raw1394_iso_status *stat = &ihandle->iso_status;
|
||||
struct raw1394_iso_packets packets;
|
||||
int retval = -1;
|
||||
int stop_sync = 0;
|
||||
|
||||
if(ihandle->iso_mode != ISO_XMIT) {
|
||||
errno = EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* ensure stat->n_packets is sane */
|
||||
if (stat->n_packets > stat->config.buf_packets)
|
||||
stat->n_packets = stat->config.buf_packets;
|
||||
|
||||
/* we could potentially send up to stat->n_packets packets */
|
||||
packets.n_packets = 0;
|
||||
packets.infos = ihandle->iso_packet_infos;
|
||||
if(packets.infos == NULL)
|
||||
goto out;
|
||||
|
||||
while(stat->n_packets > 1) {
|
||||
enum raw1394_iso_disposition disp;
|
||||
unsigned int len;
|
||||
|
||||
struct raw1394_iso_packet_info *info = &packets.infos[packets.n_packets];
|
||||
|
||||
info->offset = ihandle->iso_buf_stride * ihandle->next_packet;
|
||||
|
||||
/* call handler */
|
||||
disp = ihandle->iso_xmit_handler(handle,
|
||||
ihandle->iso_buffer + info->offset,
|
||||
&len,
|
||||
&info->tag, &info->sy,
|
||||
stat->xmit_cycle,
|
||||
_iso_dropped(ihandle));
|
||||
info->len = len;
|
||||
|
||||
/* advance packet cursors and cycle counter */
|
||||
stat->n_packets--;
|
||||
ihandle->next_packet = increment_and_wrap(ihandle->next_packet, stat->config.buf_packets);
|
||||
if(stat->xmit_cycle != -1)
|
||||
stat->xmit_cycle = increment_and_wrap(stat->xmit_cycle, 8000);
|
||||
packets.n_packets++;
|
||||
|
||||
if(disp == RAW1394_ISO_DEFER) {
|
||||
/* queue an event so that we don't hang in the next read() */
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0))
|
||||
goto out_produce;
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_AGAIN) {
|
||||
/* the last packet was not ready, decrement counter */
|
||||
packets.n_packets--;
|
||||
|
||||
/* queue an event so that we don't hang in the next read() */
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0))
|
||||
goto out_produce;
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_STOP) {
|
||||
stop_sync = 1;
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_STOP_NOSYNC) {
|
||||
ieee1394_iso_stop(ihandle);
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_ERROR) {
|
||||
goto out_produce;
|
||||
}
|
||||
}
|
||||
|
||||
/* success */
|
||||
retval = 0;
|
||||
|
||||
out_produce:
|
||||
if(packets.n_packets > 0) {
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_XMIT_PACKETS, &packets))
|
||||
retval = -1;
|
||||
}
|
||||
out:
|
||||
if(stop_sync) {
|
||||
if(ieee1394_iso_xmit_sync(ihandle))
|
||||
return -1;
|
||||
ieee1394_iso_stop(ihandle);
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
int ieee1394_iso_xmit_write(raw1394handle_t handle, unsigned char *data, unsigned int len,
|
||||
unsigned char tag, unsigned char sy)
|
||||
{
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
struct raw1394_iso_status *stat = &ihandle->iso_status;
|
||||
struct raw1394_iso_packets packets;
|
||||
struct raw1394_iso_packet_info info;
|
||||
|
||||
if(ihandle->iso_mode != ISO_XMIT || ihandle->iso_xmit_handler != NULL) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* wait until buffer space is available */
|
||||
while(ihandle->iso_status.n_packets <= 1) {
|
||||
/* if the file descriptor has been set non-blocking,
|
||||
return immediately */
|
||||
if(fcntl(ihandle->fd, F_GETFL) & O_NONBLOCK) {
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if(ieee1394_loop_iterate(handle)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/* copy the data to the packet buffer */
|
||||
info.offset = ihandle->next_packet * ihandle->iso_buf_stride;
|
||||
info.len = len;
|
||||
info.tag = tag;
|
||||
info.sy = sy;
|
||||
|
||||
memcpy(ihandle->iso_buffer + info.offset, data, len);
|
||||
|
||||
packets.n_packets = 1;
|
||||
packets.infos = &info;
|
||||
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_XMIT_PACKETS, &packets))
|
||||
return -1;
|
||||
|
||||
stat->n_packets--;
|
||||
ihandle->next_packet = increment_and_wrap(ihandle->next_packet, stat->config.buf_packets);
|
||||
if(stat->xmit_cycle != -1)
|
||||
stat->xmit_cycle = increment_and_wrap(stat->xmit_cycle, 8000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_xmit_start(ieee1394handle_t handle, int start_on_cycle, int prebuffer_packets)
|
||||
{
|
||||
int args[2];
|
||||
|
||||
if(handle->iso_mode != ISO_XMIT) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
args[0] = start_on_cycle;
|
||||
args[1] = prebuffer_packets;
|
||||
|
||||
if(ioctl(handle->fd, RAW1394_IOC_ISO_XMIT_START, &args[0]))
|
||||
return -1;
|
||||
|
||||
handle->iso_state = ISO_GO;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_iso_xmit_sync(ieee1394handle_t handle)
|
||||
{
|
||||
if(handle->iso_mode != ISO_XMIT) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
return ioctl(handle->fd, RAW1394_IOC_ISO_XMIT_SYNC, 0);
|
||||
}
|
||||
|
||||
void ieee1394_iso_stop(ieee1394handle_t handle)
|
||||
{
|
||||
if(handle->iso_mode == ISO_INACTIVE) {
|
||||
return;
|
||||
}
|
||||
|
||||
ioctl(handle->fd, RAW1394_IOC_ISO_XMIT_RECV_STOP, 0);
|
||||
handle->iso_state = ISO_STOP;
|
||||
}
|
||||
|
||||
void ieee1394_iso_shutdown(ieee1394handle_t handle)
|
||||
{
|
||||
if(handle->iso_buffer) {
|
||||
munmap(handle->iso_buffer, handle->iso_status.config.data_buf_size);
|
||||
handle->iso_buffer = NULL;
|
||||
}
|
||||
|
||||
if(handle->iso_mode != ISO_INACTIVE) {
|
||||
ieee1394_iso_stop(handle);
|
||||
ioctl(handle->fd, RAW1394_IOC_ISO_SHUTDOWN, 0);
|
||||
}
|
||||
|
||||
if(handle->iso_packet_infos) {
|
||||
#if _POSIX_MEMLOCK > 0
|
||||
munlock(handle->iso_packet_infos,
|
||||
handle->iso_status.config.buf_packets *
|
||||
sizeof(struct raw1394_iso_packet_info));
|
||||
#endif
|
||||
free(handle->iso_packet_infos);
|
||||
handle->iso_packet_infos = NULL;
|
||||
}
|
||||
|
||||
handle->iso_mode = ISO_INACTIVE;
|
||||
}
|
||||
|
||||
int ieee1394_read_cycle_timer(ieee1394handle_t handle,
|
||||
u_int32_t *cycle_timer, u_int64_t *local_time)
|
||||
{
|
||||
int err;
|
||||
struct raw1394_cycle_timer ctr = { 0 };
|
||||
|
||||
err = ioctl(handle->fd, RAW1394_IOC_GET_CYCLE_TIMER, &ctr);
|
||||
if (!err) {
|
||||
*cycle_timer = ctr.cycle_timer;
|
||||
*local_time = ctr.local_time;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
static int _iso_recv_packets(raw1394handle_t handle)
|
||||
{
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
struct raw1394_iso_status *stat = &ihandle->iso_status;
|
||||
struct raw1394_iso_packets packets;
|
||||
|
||||
int retval = -1, packets_done = 0;
|
||||
|
||||
if(ihandle->iso_mode != ISO_RECV) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* ask the kernel to fill an array with packet info structs */
|
||||
packets.n_packets = stat->n_packets;
|
||||
packets.infos = ihandle->iso_packet_infos;
|
||||
if(packets.infos == NULL)
|
||||
goto out;
|
||||
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_RECV_PACKETS, &packets) < 0)
|
||||
goto out;
|
||||
|
||||
while(stat->n_packets > 0) {
|
||||
struct raw1394_iso_packet_info *info;
|
||||
enum raw1394_iso_disposition disp;
|
||||
|
||||
info = &packets.infos[packets_done];
|
||||
|
||||
/* call handler */
|
||||
disp = ihandle->iso_recv_handler(handle,
|
||||
ihandle->iso_buffer + info->offset,
|
||||
info->len, info->channel,
|
||||
info->tag, info->sy,
|
||||
info->cycle,
|
||||
_iso_dropped(ihandle));
|
||||
|
||||
/* advance packet cursors */
|
||||
stat->n_packets--;
|
||||
packets_done++;
|
||||
|
||||
if(disp == RAW1394_ISO_DEFER) {
|
||||
/* queue an event so that we don't hang in the next read() */
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_QUEUE_ACTIVITY, 0))
|
||||
goto out_consume;
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_STOP || disp == RAW1394_ISO_STOP_NOSYNC) {
|
||||
ieee1394_iso_stop(ihandle);
|
||||
break;
|
||||
} else if(disp == RAW1394_ISO_ERROR) {
|
||||
goto out_consume;
|
||||
}
|
||||
}
|
||||
|
||||
/* success */
|
||||
retval = 0;
|
||||
|
||||
out_consume:
|
||||
if(packets_done > 0) {
|
||||
if(ioctl(ihandle->fd, RAW1394_IOC_ISO_RECV_RELEASE_PACKETS, packets_done))
|
||||
retval = -1;
|
||||
}
|
||||
out:
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* run the ISO state machine; called from raw1394_loop_iterate() */
|
||||
int _ieee1394_iso_iterate(raw1394handle_t handle)
|
||||
{
|
||||
ieee1394handle_t ihandle = handle->mode.ieee1394;
|
||||
int err;
|
||||
|
||||
if(ihandle->iso_mode == ISO_INACTIVE)
|
||||
return 0;
|
||||
|
||||
err = ioctl(ihandle->fd, RAW1394_IOC_ISO_GET_STATUS, &ihandle->iso_status);
|
||||
if(err != 0)
|
||||
return err;
|
||||
|
||||
ihandle->iso_packets_dropped += ihandle->iso_status.overflows;
|
||||
|
||||
if(ihandle->iso_state == ISO_GO) {
|
||||
if(ihandle->iso_mode == ISO_XMIT) {
|
||||
if(ihandle->iso_xmit_handler) {
|
||||
return _iso_xmit_queue_packets(handle);
|
||||
}
|
||||
}
|
||||
|
||||
if(ihandle->iso_mode == ISO_RECV) {
|
||||
if(ihandle->iso_recv_handler) {
|
||||
return _iso_recv_packets(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,190 @@
|
|||
#ifndef IEEE1394_RAW1394_H
|
||||
#define IEEE1394_RAW1394_H
|
||||
|
||||
/* header for the raw1394 API that is exported to user-space */
|
||||
|
||||
#define RAW1394_KERNELAPI_VERSION 4
|
||||
|
||||
/* state: opened */
|
||||
#define RAW1394_REQ_INITIALIZE 1
|
||||
|
||||
/* state: initialized */
|
||||
#define RAW1394_REQ_LIST_CARDS 2
|
||||
#define RAW1394_REQ_SET_CARD 3
|
||||
|
||||
/* state: connected */
|
||||
#define RAW1394_REQ_ASYNC_READ 100
|
||||
#define RAW1394_REQ_ASYNC_WRITE 101
|
||||
#define RAW1394_REQ_LOCK 102
|
||||
#define RAW1394_REQ_LOCK64 103
|
||||
#define RAW1394_REQ_ISO_SEND 104
|
||||
#define RAW1394_REQ_ASYNC_SEND 105
|
||||
#define RAW1394_REQ_ASYNC_STREAM 106
|
||||
|
||||
#define RAW1394_REQ_ISO_LISTEN 200
|
||||
#define RAW1394_REQ_FCP_LISTEN 201
|
||||
#define RAW1394_REQ_RESET_BUS 202
|
||||
#define RAW1394_REQ_GET_ROM 203
|
||||
#define RAW1394_REQ_UPDATE_ROM 204
|
||||
#define RAW1394_REQ_ECHO 205
|
||||
|
||||
#define RAW1394_REQ_ARM_REGISTER 300
|
||||
#define RAW1394_REQ_ARM_UNREGISTER 301
|
||||
#define RAW1394_REQ_ARM_SET_BUF 302
|
||||
#define RAW1394_REQ_ARM_GET_BUF 303
|
||||
|
||||
#define RAW1394_REQ_RESET_NOTIFY 400
|
||||
|
||||
#define RAW1394_REQ_PHYPACKET 500
|
||||
|
||||
/* kernel to user */
|
||||
#define RAW1394_REQ_BUS_RESET 10000
|
||||
#define RAW1394_REQ_ISO_RECEIVE 10001
|
||||
#define RAW1394_REQ_FCP_REQUEST 10002
|
||||
#define RAW1394_REQ_ARM 10003
|
||||
#define RAW1394_REQ_RAWISO_ACTIVITY 10004
|
||||
|
||||
/* error codes */
|
||||
#define RAW1394_ERROR_NONE 0
|
||||
#define RAW1394_ERROR_COMPAT (-1001)
|
||||
#define RAW1394_ERROR_STATE_ORDER (-1002)
|
||||
#define RAW1394_ERROR_GENERATION (-1003)
|
||||
#define RAW1394_ERROR_INVALID_ARG (-1004)
|
||||
#define RAW1394_ERROR_MEMFAULT (-1005)
|
||||
#define RAW1394_ERROR_ALREADY (-1006)
|
||||
|
||||
#define RAW1394_ERROR_EXCESSIVE (-1020)
|
||||
#define RAW1394_ERROR_UNTIDY_LEN (-1021)
|
||||
|
||||
#define RAW1394_ERROR_SEND_ERROR (-1100)
|
||||
#define RAW1394_ERROR_ABORTED (-1101)
|
||||
#define RAW1394_ERROR_TIMEOUT (-1102)
|
||||
|
||||
/* arm_codes */
|
||||
#define ARM_READ 1
|
||||
#define ARM_WRITE 2
|
||||
#define ARM_LOCK 4
|
||||
|
||||
#define RAW1394_LONG_RESET 0
|
||||
#define RAW1394_SHORT_RESET 1
|
||||
|
||||
/* busresetnotify ... */
|
||||
#define RAW1394_NOTIFY_OFF 0
|
||||
#define RAW1394_NOTIFY_ON 1
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
struct raw1394_request {
|
||||
__u32 type;
|
||||
__s32 error;
|
||||
__u32 misc;
|
||||
|
||||
__u32 generation;
|
||||
__u32 length;
|
||||
|
||||
__u64 address;
|
||||
|
||||
__u64 tag;
|
||||
|
||||
__u64 sendb;
|
||||
__u64 recvb;
|
||||
};
|
||||
|
||||
struct raw1394_khost_list {
|
||||
__u32 nodes;
|
||||
__u8 name[32];
|
||||
};
|
||||
|
||||
typedef struct arm_request {
|
||||
__u16 destination_nodeid;
|
||||
__u16 source_nodeid;
|
||||
__u64 destination_offset;
|
||||
__u8 tlabel;
|
||||
__u8 tcode;
|
||||
__u8 extended_transaction_code;
|
||||
__u32 generation;
|
||||
__u16 buffer_length;
|
||||
__u8 *buffer;
|
||||
} *arm_request_t;
|
||||
|
||||
typedef struct arm_response {
|
||||
__s32 response_code;
|
||||
__u16 buffer_length;
|
||||
__u8 *buffer;
|
||||
} *arm_response_t;
|
||||
|
||||
typedef struct arm_request_response {
|
||||
struct arm_request *request;
|
||||
struct arm_response *response;
|
||||
} *arm_request_response_t;
|
||||
|
||||
/* rawiso API */
|
||||
#include "ieee1394-ioctl.h"
|
||||
|
||||
/* per-packet metadata embedded in the ringbuffer */
|
||||
/* must be identical to hpsb_iso_packet_info in iso.h! */
|
||||
struct raw1394_iso_packet_info {
|
||||
__u32 offset;
|
||||
__u16 len;
|
||||
__u16 cycle; /* recv only */
|
||||
__u8 channel; /* recv only */
|
||||
__u8 tag;
|
||||
__u8 sy;
|
||||
};
|
||||
|
||||
/* argument for RAW1394_ISO_RECV/XMIT_PACKETS ioctls */
|
||||
struct raw1394_iso_packets {
|
||||
__u32 n_packets;
|
||||
struct raw1394_iso_packet_info *infos;
|
||||
};
|
||||
|
||||
struct raw1394_iso_config {
|
||||
/* size of packet data buffer, in bytes (will be rounded up to PAGE_SIZE) */
|
||||
__u32 data_buf_size;
|
||||
|
||||
/* # of packets to buffer */
|
||||
__u32 buf_packets;
|
||||
|
||||
/* iso channel (set to -1 for multi-channel recv) */
|
||||
__s32 channel;
|
||||
|
||||
/* xmit only - iso transmission speed */
|
||||
__u8 speed;
|
||||
|
||||
/* The mode of the dma when receiving iso data. Must be supported by chip */
|
||||
__u8 dma_mode;
|
||||
|
||||
/* max. latency of buffer, in packets (-1 if you don't care) */
|
||||
__s32 irq_interval;
|
||||
};
|
||||
|
||||
/* argument to RAW1394_ISO_XMIT/RECV_INIT and RAW1394_ISO_GET_STATUS */
|
||||
struct raw1394_iso_status {
|
||||
/* current settings */
|
||||
struct raw1394_iso_config config;
|
||||
|
||||
/* number of packets waiting to be filled with data (ISO transmission)
|
||||
or containing data received (ISO reception) */
|
||||
__u32 n_packets;
|
||||
|
||||
/* approximate number of packets dropped due to overflow or
|
||||
underflow of the packet buffer (a value of zero guarantees
|
||||
that no packets have been dropped) */
|
||||
__u32 overflows;
|
||||
|
||||
/* cycle number at which next packet will be transmitted;
|
||||
-1 if not known */
|
||||
__s16 xmit_cycle;
|
||||
};
|
||||
|
||||
/* argument to RAW1394_IOC_GET_CYCLE_TIMER ioctl */
|
||||
struct raw1394_cycle_timer {
|
||||
/* contents of Isochronous Cycle Timer register,
|
||||
as in OHCI 1.1 clause 5.13 (also with non-OHCI hosts) */
|
||||
__u32 cycle_timer;
|
||||
|
||||
/* local time in microseconds since Epoch,
|
||||
simultaneously read with cycle timer */
|
||||
__u64 local_time;
|
||||
};
|
||||
#endif /* IEEE1394_RAW1394_H */
|
|
@ -0,0 +1,530 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
* 2001, 2002 Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* 2002 Christian Toegel <christian.toegel@gmx.at>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*
|
||||
*
|
||||
* Contributions:
|
||||
*
|
||||
* Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* configuration ROM manipulation
|
||||
* address range mapping
|
||||
* Christian Toegel <christian.toegel@gmx.at>
|
||||
* address range mapping
|
||||
* reset notification control (switch on/off)
|
||||
* reset with selection of type (short/long)
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <netinet/in.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "csr.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
|
||||
static int bus_reset_default(struct raw1394_handle *handle, unsigned int gen)
|
||||
{
|
||||
raw1394_update_generation(handle, gen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int tag_handler_default(struct raw1394_handle *handle, unsigned long tag,
|
||||
int error)
|
||||
{
|
||||
struct raw1394_reqhandle *rh;
|
||||
|
||||
if (tag) {
|
||||
rh = (struct raw1394_reqhandle *)tag;
|
||||
return rh->callback(handle, rh->data, error);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int arm_tag_handler_default(struct raw1394_handle *handle, unsigned long tag,
|
||||
byte_t request_type, unsigned int requested_length,
|
||||
void *data)
|
||||
{
|
||||
struct raw1394_arm_reqhandle *rh;
|
||||
struct raw1394_arm_request_response *arm_req_resp;
|
||||
|
||||
if (tag) {
|
||||
rh = (struct raw1394_arm_reqhandle *)tag;
|
||||
arm_req_resp = (struct raw1394_arm_request_response *) data;
|
||||
return rh->arm_callback(handle, arm_req_resp,
|
||||
requested_length, rh->pcontext,
|
||||
request_type);
|
||||
} else {
|
||||
/* error ... */
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
int _raw1394_sync_cb(struct raw1394_handle *unused, struct sync_cb_data *data,
|
||||
int error)
|
||||
{
|
||||
data->errcode = error;
|
||||
data->done = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static unsigned int init_rawdevice(struct ieee1394_handle *h)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
req.type = RAW1394_REQ_INITIALIZE;
|
||||
req.misc = RAW1394_KERNELAPI_VERSION;
|
||||
h->protocol_version = RAW1394_KERNELAPI_VERSION;
|
||||
|
||||
if (write(h->fd, &req, sizeof(req)) < 0) return -1;
|
||||
if (read(h->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
if (req.error == RAW1394_ERROR_COMPAT && req.misc == 3) {
|
||||
h->protocol_version = 3;
|
||||
if (write(h->fd, &req, sizeof(req)) < 0) return -1;
|
||||
if (read(h->fd, &req, sizeof(req)) < 0) return -1;
|
||||
}
|
||||
|
||||
if (req.error) {
|
||||
errno = EPROTO;
|
||||
return -1;
|
||||
}
|
||||
memset(h->buffer, 0, HBUF_SIZE);
|
||||
|
||||
return req.generation;
|
||||
}
|
||||
|
||||
|
||||
struct ieee1394_handle *ieee1394_new_handle(void)
|
||||
{
|
||||
struct ieee1394_handle *handle;
|
||||
const char *defaultDevice = "/dev/raw1394";
|
||||
|
||||
handle = malloc(sizeof(struct ieee1394_handle));
|
||||
if (!handle) {
|
||||
errno = ENOMEM;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
handle->fd = open(getenv("RAW1394DEV") ? getenv("RAW1394DEV"): defaultDevice, O_RDWR);
|
||||
if (handle->fd < 0) {
|
||||
/* failover to default in attempt to idiot proof */
|
||||
handle->fd = open(defaultDevice, O_RDWR);
|
||||
if (handle->fd < 0) {
|
||||
free(handle);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
handle->generation = init_rawdevice(handle);
|
||||
if (handle->generation == -1) {
|
||||
/* failover to default in attempt to idiot proof */
|
||||
close(handle->fd);
|
||||
handle->fd = open(defaultDevice, O_RDWR);
|
||||
if (handle->fd < 0) {
|
||||
free(handle);
|
||||
return NULL;
|
||||
}
|
||||
handle->generation = init_rawdevice(handle);
|
||||
if (handle->generation == -1) {
|
||||
close(handle->fd);
|
||||
free(handle);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
handle->err = 0;
|
||||
handle->bus_reset_handler = bus_reset_default;
|
||||
handle->tag_handler = tag_handler_default;
|
||||
handle->arm_tag_handler = arm_tag_handler_default;
|
||||
handle->iso_buffer = NULL;
|
||||
handle->iso_mode = ISO_INACTIVE;
|
||||
handle->iso_packet_infos = NULL;
|
||||
return handle;
|
||||
}
|
||||
|
||||
void ieee1394_destroy_handle(struct ieee1394_handle *handle)
|
||||
{
|
||||
if (handle) {
|
||||
if(handle->iso_mode != ISO_INACTIVE) {
|
||||
ieee1394_iso_shutdown(handle);
|
||||
}
|
||||
close(handle->fd);
|
||||
free(handle);
|
||||
}
|
||||
}
|
||||
|
||||
int ieee1394_get_fd(struct ieee1394_handle *handle)
|
||||
{
|
||||
return handle->fd;
|
||||
}
|
||||
|
||||
unsigned int raw1394_get_generation(struct raw1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return UINT_MAX;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return handle->mode.fw->generation;
|
||||
else
|
||||
return handle->mode.ieee1394->generation;
|
||||
}
|
||||
|
||||
void raw1394_update_generation(struct raw1394_handle *handle, unsigned int gen)
|
||||
{
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
handle->mode.fw->generation = gen;
|
||||
else
|
||||
handle->mode.ieee1394->generation = gen;
|
||||
}
|
||||
|
||||
int ieee1394_get_nodecount(struct ieee1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return UINT_MAX;
|
||||
}
|
||||
return handle->num_of_nodes;
|
||||
}
|
||||
|
||||
nodeid_t ieee1394_get_local_id(struct ieee1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return 0xFFFF;
|
||||
}
|
||||
return handle->local_id;
|
||||
}
|
||||
|
||||
nodeid_t ieee1394_get_irm_id(struct ieee1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return 0xFFFF;
|
||||
}
|
||||
return handle->irm_id;
|
||||
}
|
||||
|
||||
void raw1394_set_userdata(struct raw1394_handle *handle, void *data)
|
||||
{
|
||||
if (!handle) {
|
||||
return;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
handle->mode.fw->userdata = data;
|
||||
else
|
||||
handle->mode.ieee1394->userdata = data;
|
||||
}
|
||||
|
||||
void *raw1394_get_userdata(struct raw1394_handle *handle)
|
||||
{
|
||||
if (!handle) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
if (handle->is_fw)
|
||||
return handle->mode.fw->userdata;
|
||||
else
|
||||
return handle->mode.ieee1394->userdata;
|
||||
}
|
||||
|
||||
int ieee1394_get_port_info(struct ieee1394_handle *handle,
|
||||
struct raw1394_portinfo *pinf, int maxports)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
req.type = RAW1394_REQ_LIST_CARDS;
|
||||
req.generation = handle->generation;
|
||||
/* IMPORTANT: raw1394 will be writing directly into the memory you
|
||||
provide in pinf. The viability of this approach assumes that the
|
||||
structure of libraw1394's raw1394_portinfo and the kernel's
|
||||
raw1394_khost_list structs are the same!!
|
||||
*/
|
||||
req.recvb = ptr2int(pinf);
|
||||
req.length = sizeof(struct raw1394_portinfo) * maxports;
|
||||
|
||||
while (1) {
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
if (read(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
if (!req.error) break;
|
||||
|
||||
if (req.error == RAW1394_ERROR_GENERATION) {
|
||||
handle->generation = req.generation;
|
||||
continue;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
return req.misc;
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_set_port(struct ieee1394_handle *handle, int port)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_SET_CARD;
|
||||
req.generation = handle->generation;
|
||||
req.misc = port;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
if (read(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
switch (req.error) {
|
||||
case RAW1394_ERROR_GENERATION:
|
||||
handle->generation = req.generation;
|
||||
errno = ESTALE;
|
||||
return -1;
|
||||
case RAW1394_ERROR_INVALID_ARG:
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
case RAW1394_ERROR_NONE:
|
||||
if (handle->protocol_version == 3) {
|
||||
handle->num_of_nodes = req.misc & 0xffff;
|
||||
handle->local_id = req.misc >> 16;
|
||||
} else {
|
||||
handle->num_of_nodes = req.misc & 0xff;
|
||||
handle->irm_id = ((req.misc >> 8) & 0xff) | 0xffc0;
|
||||
handle->local_id = req.misc >> 16;
|
||||
}
|
||||
handle->generation = req.generation;
|
||||
return 0;
|
||||
default:
|
||||
errno = 0;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
ieee1394handle_t ieee1394_new_handle_on_port(int port)
|
||||
{
|
||||
ieee1394handle_t handle = ieee1394_new_handle();
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
tryagain:
|
||||
if (ieee1394_get_port_info(handle, NULL, 0) < 0) {
|
||||
ieee1394_destroy_handle(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ieee1394_set_port(handle, port)) {
|
||||
if (errno == ESTALE || errno == EINTR) {
|
||||
goto tryagain;
|
||||
} else {
|
||||
ieee1394_destroy_handle(handle);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int ieee1394_reset_bus_new(struct ieee1394_handle *handle, int type)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_RESET_BUS;
|
||||
req.generation = handle->generation;
|
||||
req.misc = type;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
return 0; /* success */
|
||||
}
|
||||
|
||||
|
||||
int raw1394_reset_bus(struct raw1394_handle *handle)
|
||||
{
|
||||
return raw1394_reset_bus_new (handle, RAW1394_LONG_RESET);
|
||||
}
|
||||
|
||||
int ieee1394_busreset_notify (struct ieee1394_handle *handle,
|
||||
int off_on_switch)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_RESET_NOTIFY;
|
||||
req.generation = handle->generation;
|
||||
req.misc = off_on_switch;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -1;
|
||||
|
||||
return 0; /* success */
|
||||
}
|
||||
|
||||
int ieee1394_update_config_rom(ieee1394handle_t handle, const quadlet_t
|
||||
*new_rom, size_t size, unsigned char rom_version)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
int status;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_UPDATE_ROM;
|
||||
req.sendb = (unsigned long) new_rom;
|
||||
req.length = size;
|
||||
req.misc = rom_version;
|
||||
req.recvb = (unsigned long) &status;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -8;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int ieee1394_get_config_rom(ieee1394handle_t handle, quadlet_t *buffer,
|
||||
size_t buffersize, size_t *rom_size, unsigned char *rom_version)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
int status;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_GET_ROM;
|
||||
req.recvb = (unsigned long) buffer;
|
||||
req.length = buffersize;
|
||||
req.tag = (unsigned long) rom_size;
|
||||
req.address = (unsigned long) rom_version;
|
||||
req.sendb = (unsigned long) &status;
|
||||
|
||||
if (write(handle->fd, &req, sizeof(req)) < 0) return -8;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
int ieee1394_bandwidth_modify (raw1394handle_t handle, unsigned int bandwidth,
|
||||
enum raw1394_modify_mode mode)
|
||||
{
|
||||
quadlet_t buffer, compare, swap, new;
|
||||
int retry = 3;
|
||||
int result;
|
||||
|
||||
if (bandwidth == 0)
|
||||
return 0;
|
||||
|
||||
/* Reading current bandwidth usage from IRM. */
|
||||
result = raw1394_read (handle, raw1394_get_irm_id (handle),
|
||||
CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE,
|
||||
sizeof (quadlet_t), &buffer);
|
||||
if (result < 0)
|
||||
return -1;
|
||||
|
||||
buffer = ntohl (buffer);
|
||||
compare = buffer;
|
||||
|
||||
while (retry > 0) {
|
||||
if (mode == RAW1394_MODIFY_ALLOC ) {
|
||||
if (compare < bandwidth) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
swap = compare - bandwidth;
|
||||
}
|
||||
else {
|
||||
swap = compare + bandwidth;
|
||||
|
||||
if( swap > MAXIMUM_BANDWIDTH ) {
|
||||
swap = MAXIMUM_BANDWIDTH;
|
||||
}
|
||||
}
|
||||
|
||||
result = raw1394_lock (handle, raw1394_get_irm_id (handle),
|
||||
CSR_REGISTER_BASE + CSR_BANDWIDTH_AVAILABLE,
|
||||
RAW1394_EXTCODE_COMPARE_SWAP, ntohl(swap), ntohl(compare),
|
||||
&new);
|
||||
if (result < 0)
|
||||
return -1;
|
||||
|
||||
new = ntohl (new);
|
||||
|
||||
if (new != compare) {
|
||||
compare = new;
|
||||
retry--;
|
||||
if ( retry == 0 )
|
||||
return -1;
|
||||
}
|
||||
else {
|
||||
/* Success. */
|
||||
retry = 0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ieee1394_channel_modify (raw1394handle_t handle, unsigned int channel,
|
||||
enum raw1394_modify_mode mode)
|
||||
{
|
||||
quadlet_t buffer;
|
||||
int result;
|
||||
nodeaddr_t addr = CSR_REGISTER_BASE;
|
||||
unsigned int c = channel;
|
||||
quadlet_t compare, swap = 0, new;
|
||||
|
||||
if (c > 31 && c < 64) {
|
||||
addr += CSR_CHANNELS_AVAILABLE_LO;
|
||||
c -= 32;
|
||||
} else if (c < 64)
|
||||
addr += CSR_CHANNELS_AVAILABLE_HI;
|
||||
else
|
||||
return -1;
|
||||
c = 31 - c;
|
||||
|
||||
result = raw1394_read (handle, raw1394_get_irm_id (handle), addr,
|
||||
sizeof (quadlet_t), &buffer);
|
||||
if (result < 0)
|
||||
return -1;
|
||||
|
||||
buffer = ntohl (buffer);
|
||||
|
||||
if ( mode == RAW1394_MODIFY_ALLOC ) {
|
||||
if( (buffer & (1 << c)) == 0 )
|
||||
return -1;
|
||||
swap = htonl (buffer & ~(1 << c));
|
||||
}
|
||||
else if ( mode == RAW1394_MODIFY_FREE ) {
|
||||
if ( (buffer & (1 << c)) != 0 )
|
||||
return -1;
|
||||
swap = htonl (buffer | (1 << c));
|
||||
}
|
||||
|
||||
compare = htonl (buffer);
|
||||
|
||||
result = raw1394_lock (handle, raw1394_get_irm_id (handle), addr,
|
||||
RAW1394_EXTCODE_COMPARE_SWAP, swap, compare, &new);
|
||||
if ( (result < 0) || (new != compare) )
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,196 @@
|
|||
#ifndef _RAW1394_PRIVATE_H
|
||||
#define _RAW1394_PRIVATE_H
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "csr.h"
|
||||
#include "fw.h"
|
||||
#include "kernel-raw1394.h"
|
||||
|
||||
#define HBUF_SIZE 8192
|
||||
#define ARM_REC_LENGTH 4096
|
||||
#define MAXIMUM_BANDWIDTH 4915
|
||||
|
||||
struct ieee1394_handle {
|
||||
int fd;
|
||||
int protocol_version;
|
||||
unsigned int generation;
|
||||
|
||||
nodeid_t local_id;
|
||||
int num_of_nodes;
|
||||
nodeid_t irm_id;
|
||||
|
||||
raw1394_errcode_t err;
|
||||
void *userdata;
|
||||
|
||||
bus_reset_handler_t bus_reset_handler;
|
||||
tag_handler_t tag_handler;
|
||||
arm_tag_handler_t arm_tag_handler;
|
||||
fcp_handler_t fcp_handler;
|
||||
|
||||
/* new ISO API */
|
||||
|
||||
/* memory mapping of the DMA buffer */
|
||||
unsigned char *iso_buffer;
|
||||
enum { ISO_INACTIVE, ISO_XMIT, ISO_RECV } iso_mode;
|
||||
enum { ISO_STOP, ISO_GO } iso_state;
|
||||
|
||||
/* iso XMIT only: */
|
||||
unsigned int iso_buf_stride; /* offset between successive packets */
|
||||
unsigned int next_packet; /* index of next packet to be transmitted */
|
||||
|
||||
/* status buffer, updated from _raw1394_iso_iterate() */
|
||||
struct raw1394_iso_status iso_status;
|
||||
unsigned int iso_packets_dropped;
|
||||
|
||||
/* user-supplied handlers */
|
||||
raw1394_iso_xmit_handler_t iso_xmit_handler;
|
||||
raw1394_iso_recv_handler_t iso_recv_handler;
|
||||
|
||||
quadlet_t buffer[HBUF_SIZE/4]; /* 2048 */
|
||||
void *iso_packet_infos; /* actually a struct raw1394_iso_packet_info* */
|
||||
};
|
||||
typedef struct ieee1394_handle *ieee1394handle_t;
|
||||
// typedef struct fw_handle *fw_handle_t;
|
||||
|
||||
struct raw1394_handle {
|
||||
int is_fw;
|
||||
union {
|
||||
ieee1394handle_t ieee1394;
|
||||
fw_handle_t fw;
|
||||
} mode;
|
||||
};
|
||||
|
||||
struct sync_cb_data {
|
||||
int done;
|
||||
int errcode;
|
||||
};
|
||||
|
||||
int _raw1394_sync_cb(struct raw1394_handle*, struct sync_cb_data*, int);
|
||||
int _raw1394_iso_iterate(raw1394handle_t handle);
|
||||
|
||||
#define CLEAR_REQ(reqp) memset((reqp), 0, sizeof(struct raw1394_request))
|
||||
|
||||
#if SIZEOF_VOID_P == 4
|
||||
#define int2ptr(x) ((void *)(__u32)x)
|
||||
#define ptr2int(x) ((__u64)(__u32)x)
|
||||
#else
|
||||
#define int2ptr(x) ((void *)x)
|
||||
#define ptr2int(x) ((__u64)x)
|
||||
#endif
|
||||
|
||||
|
||||
int ieee1394_arm_register(struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, byte_t *initial_value,
|
||||
octlet_t arm_tag, arm_options_t access_rights,
|
||||
arm_options_t notification_options,
|
||||
arm_options_t client_transactions);
|
||||
int ieee1394_arm_unregister (struct ieee1394_handle *handle, nodeaddr_t start);
|
||||
int ieee1394_arm_set_buf (struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, void *buf);
|
||||
int ieee1394_arm_get_buf (struct ieee1394_handle *handle, nodeaddr_t start,
|
||||
size_t length, void *buf);
|
||||
int ieee1394_errcode_to_errno(raw1394_errcode_t errcode);
|
||||
int ieee1394_loop_iterate(struct raw1394_handle *handle);
|
||||
int ieee1394_start_fcp_listen(struct raw1394_handle *handle);
|
||||
int ieee1394_stop_fcp_listen(struct raw1394_handle *handle);
|
||||
struct ieee1394_handle *ieee1394_new_handle(void);
|
||||
void ieee1394_destroy_handle(struct ieee1394_handle *handle);
|
||||
int ieee1394_get_fd(struct ieee1394_handle *handle);
|
||||
int ieee1394_get_nodecount(struct ieee1394_handle *handle);
|
||||
nodeid_t ieee1394_get_local_id(struct ieee1394_handle *handle);
|
||||
nodeid_t ieee1394_get_irm_id(struct ieee1394_handle *handle);
|
||||
int ieee1394_get_port_info(struct ieee1394_handle *handle,
|
||||
struct raw1394_portinfo *pinf, int maxports);
|
||||
int ieee1394_set_port(struct ieee1394_handle *handle, int port);
|
||||
ieee1394handle_t ieee1394_new_handle_on_port(int port);
|
||||
int ieee1394_reset_bus_new(struct ieee1394_handle *handle, int type);
|
||||
int ieee1394_busreset_notify (struct ieee1394_handle *handle,
|
||||
int off_on_switch);
|
||||
int ieee1394_update_config_rom(ieee1394handle_t handle, const quadlet_t
|
||||
*new_rom, size_t size, unsigned char rom_version);
|
||||
int ieee1394_get_config_rom(ieee1394handle_t handle, quadlet_t *buffer,
|
||||
size_t buffersize, size_t *rom_size, unsigned char *rom_version);
|
||||
int ieee1394_bandwidth_modify (raw1394handle_t handle, unsigned int bandwidth,
|
||||
enum raw1394_modify_mode mode);
|
||||
int ieee1394_channel_modify (raw1394handle_t handle, unsigned int channel,
|
||||
enum raw1394_modify_mode mode);
|
||||
int ieee1394_start_read(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, size_t length, quadlet_t *buffer,
|
||||
unsigned long tag);
|
||||
int ieee1394_start_write(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, size_t length, quadlet_t *data,
|
||||
unsigned long tag);
|
||||
int ieee1394_start_lock(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
||||
quadlet_t arg, quadlet_t *result, unsigned long tag);
|
||||
int ieee1394_start_lock64(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, unsigned int extcode, octlet_t data,
|
||||
octlet_t arg, octlet_t *result, unsigned long tag);
|
||||
int ieee1394_start_async_stream(struct ieee1394_handle *handle,
|
||||
unsigned int channel,
|
||||
unsigned int tag, unsigned int sy,
|
||||
unsigned int speed, size_t length, quadlet_t *data,
|
||||
unsigned long rawtag);
|
||||
int ieee1394_start_async_send(struct ieee1394_handle *handle,
|
||||
size_t length, size_t header_length, unsigned int expect_response,
|
||||
quadlet_t *data, unsigned long rawtag);
|
||||
int ieee1394_read(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer);
|
||||
int ieee1394_write(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data);
|
||||
int ieee1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result);
|
||||
int ieee1394_lock64(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result);
|
||||
int ieee1394_async_stream(struct raw1394_handle *handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy, unsigned int speed,
|
||||
size_t length, quadlet_t *data);
|
||||
int ieee1394_async_send(struct raw1394_handle *handle ,
|
||||
size_t length, size_t header_length, unsigned int expect_response,
|
||||
quadlet_t *data);
|
||||
int ieee1394_start_phy_packet_write(struct ieee1394_handle *handle,
|
||||
quadlet_t data, unsigned long tag);
|
||||
int ieee1394_phy_packet_write (struct raw1394_handle *handle, quadlet_t data);
|
||||
int ieee1394_echo_request(struct ieee1394_handle *handle, quadlet_t data);
|
||||
int ieee1394_wake_up(ieee1394handle_t handle);
|
||||
const char *ieee1394_get_libversion();
|
||||
|
||||
int ieee1394_iso_xmit_init(ieee1394handle_t handle,
|
||||
raw1394_iso_xmit_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_speed speed,
|
||||
int irq_interval);
|
||||
int ieee1394_iso_recv_init(ieee1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
unsigned char channel,
|
||||
enum raw1394_iso_dma_recv_mode mode,
|
||||
int irq_interval);
|
||||
int ieee1394_iso_multichannel_recv_init(ieee1394handle_t handle,
|
||||
raw1394_iso_recv_handler_t handler,
|
||||
unsigned int buf_packets,
|
||||
unsigned int max_packet_size,
|
||||
int irq_interval);
|
||||
int ieee1394_iso_recv_listen_channel(ieee1394handle_t handle, unsigned char channel);
|
||||
int ieee1394_iso_recv_unlisten_channel(ieee1394handle_t handle, unsigned char channel);
|
||||
int ieee1394_iso_recv_flush(ieee1394handle_t handle);
|
||||
int ieee1394_iso_recv_set_channel_mask(ieee1394handle_t handle, u_int64_t mask);
|
||||
int ieee1394_iso_recv_start(ieee1394handle_t handle, int start_on_cycle, int tag_mask, int sync);
|
||||
int ieee1394_iso_xmit_write(raw1394handle_t handle, unsigned char *data, unsigned int len,
|
||||
unsigned char tag, unsigned char sy);
|
||||
int ieee1394_iso_xmit_start(ieee1394handle_t handle, int start_on_cycle, int prebuffer_packets);
|
||||
int ieee1394_iso_xmit_sync(ieee1394handle_t handle);
|
||||
void ieee1394_iso_stop(ieee1394handle_t handle);
|
||||
void ieee1394_iso_shutdown(ieee1394handle_t handle);
|
||||
int ieee1394_read_cycle_timer(ieee1394handle_t handle,
|
||||
u_int32_t *cycle_timer, u_int64_t *local_time);
|
||||
int _ieee1394_iso_iterate(raw1394handle_t handle);
|
||||
|
||||
|
||||
|
||||
#endif /* _RAW1394_PRIVATE_H */
|
|
@ -0,0 +1,352 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
* 2002 Christian Toegel <christian.toegel@gmx.at>
|
||||
* 2002 Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*
|
||||
*
|
||||
* Contributions:
|
||||
*
|
||||
* Christian Toegel <christian.toegel@gmx.at>
|
||||
* lock64 request
|
||||
* transmit physical packet
|
||||
* raw1394_echo_request, raw1394_wake_up (interrupt blocking wait)
|
||||
*
|
||||
* Manfred Weihs <weihs@ict.tuwien.ac.at>
|
||||
* raw1394_start_async_send, raw1394_async_send
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "raw1394.h"
|
||||
#include "kernel-raw1394.h"
|
||||
#include "raw1394_private.h"
|
||||
|
||||
#if HAVE_VALGRIND_VALGRIND_H
|
||||
# include <valgrind/memcheck.h>
|
||||
# ifndef VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE
|
||||
# define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(m, n) do {} while(0)
|
||||
# endif
|
||||
#else
|
||||
# define VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(m, n) do {} while(0)
|
||||
#endif
|
||||
|
||||
|
||||
int ieee1394_start_read(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, size_t length, quadlet_t *buffer,
|
||||
unsigned long tag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ASYNC_READ;
|
||||
req.generation = handle->generation;
|
||||
req.tag = tag;
|
||||
|
||||
req.address = ((__u64)node << 48) | addr;
|
||||
req.length = length;
|
||||
req.recvb = ptr2int(buffer);
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_start_write(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, size_t length, quadlet_t *data,
|
||||
unsigned long tag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ASYNC_WRITE;
|
||||
req.generation = handle->generation;
|
||||
req.tag = tag;
|
||||
|
||||
req.address = ((__u64)node << 48) | addr;
|
||||
req.length = length;
|
||||
req.sendb = ptr2int(data);
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_start_lock(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, unsigned int extcode, quadlet_t data,
|
||||
quadlet_t arg, quadlet_t *result, unsigned long tag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
quadlet_t sendbuf[2];
|
||||
|
||||
if ((extcode > 7) || (extcode == 0)) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_LOCK;
|
||||
req.generation = handle->generation;
|
||||
req.tag = tag;
|
||||
|
||||
req.address = ((__u64)node << 48) | addr;
|
||||
req.sendb = ptr2int(sendbuf);
|
||||
req.recvb = ptr2int(result);
|
||||
req.misc = extcode;
|
||||
|
||||
switch (extcode) {
|
||||
case 3: /* EXTCODE_FETCH_ADD */
|
||||
case 4: /* EXTCODE_LITTLE_ADD */
|
||||
sendbuf[0] = data;
|
||||
req.length = 4;
|
||||
break;
|
||||
default:
|
||||
sendbuf[0] = arg;
|
||||
sendbuf[1] = data;
|
||||
req.length = 8;
|
||||
break;
|
||||
}
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
int ieee1394_start_lock64(struct ieee1394_handle *handle, nodeid_t node,
|
||||
nodeaddr_t addr, unsigned int extcode, octlet_t data,
|
||||
octlet_t arg, octlet_t *result, unsigned long tag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
octlet_t sendbuf[2];
|
||||
|
||||
if ((extcode > 7) || (extcode == 0)) {
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_LOCK64;
|
||||
req.generation = handle->generation;
|
||||
req.tag = tag;
|
||||
|
||||
req.address = ((__u64)node << 48) | addr;
|
||||
req.sendb = ptr2int(sendbuf);
|
||||
req.recvb = ptr2int(result);
|
||||
req.misc = extcode;
|
||||
|
||||
switch (extcode) {
|
||||
case 3: /* EXTCODE_FETCH_ADD */
|
||||
case 4: /* EXTCODE_LITTLE_ADD */
|
||||
sendbuf[0] = data;
|
||||
req.length = 8;
|
||||
break;
|
||||
default:
|
||||
sendbuf[0] = arg;
|
||||
sendbuf[1] = data;
|
||||
req.length = 16;
|
||||
break;
|
||||
}
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_start_async_stream(struct ieee1394_handle *handle,
|
||||
unsigned int channel,
|
||||
unsigned int tag, unsigned int sy,
|
||||
unsigned int speed, size_t length, quadlet_t *data,
|
||||
unsigned long rawtag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ASYNC_STREAM;
|
||||
req.generation = handle->generation;
|
||||
req.tag = rawtag;
|
||||
|
||||
req.address = ((__u64)channel << 48) | speed;
|
||||
req.misc = (tag << 16) | sy;
|
||||
req.length = length;
|
||||
req.sendb = ptr2int(data);
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
int ieee1394_start_async_send(struct ieee1394_handle *handle,
|
||||
size_t length, size_t header_length, unsigned int expect_response,
|
||||
quadlet_t *data, unsigned long rawtag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ASYNC_SEND;
|
||||
req.generation = handle->generation;
|
||||
req.tag = rawtag;
|
||||
|
||||
req.length = length;
|
||||
req.misc = (expect_response << 16) | (header_length & 0xffff);
|
||||
req.sendb = ptr2int(data);
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
|
||||
#define SYNCFUNC_VARS \
|
||||
struct sync_cb_data sd = { 0, 0 }; \
|
||||
struct raw1394_reqhandle rh = { (req_callback_t)_raw1394_sync_cb, \
|
||||
&sd }; \
|
||||
int err = 0
|
||||
|
||||
#define SYNCFUNC_BODY_WO_RETURN \
|
||||
while (!sd.done) { \
|
||||
if (err < 0) return err; \
|
||||
err = raw1394_loop_iterate(handle); \
|
||||
} \
|
||||
handle->mode.ieee1394->err = sd.errcode; \
|
||||
errno = raw1394_errcode_to_errno(sd.errcode);
|
||||
|
||||
#define SYNCFUNC_BODY \
|
||||
SYNCFUNC_BODY_WO_RETURN \
|
||||
return (errno ? -1 : 0)
|
||||
|
||||
int ieee1394_read(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *buffer)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_read(handle->mode.ieee1394, node, addr, length, buffer,
|
||||
(unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY_WO_RETURN;
|
||||
if(!errno) {
|
||||
VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(buffer, length);
|
||||
}
|
||||
|
||||
return (errno ? -1 : 0);
|
||||
}
|
||||
|
||||
int ieee1394_write(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
size_t length, quadlet_t *data)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_write(handle->mode.ieee1394, node, addr, length, data,
|
||||
(unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY;
|
||||
}
|
||||
|
||||
int ieee1394_lock(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, quadlet_t data, quadlet_t arg,
|
||||
quadlet_t *result)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_lock(handle->mode.ieee1394, node, addr, extcode, data, arg, result,
|
||||
(unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY_WO_RETURN;
|
||||
if(!errno) {
|
||||
VALGRIND_MAKE_MEM_DEFINED_IF_ADDRESSABLE(result, sizeof(quadlet_t));
|
||||
}
|
||||
|
||||
return (errno ? -1 : 0);
|
||||
}
|
||||
|
||||
int ieee1394_lock64(struct raw1394_handle *handle, nodeid_t node, nodeaddr_t addr,
|
||||
unsigned int extcode, octlet_t data, octlet_t arg,
|
||||
octlet_t *result)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_lock64(handle->mode.ieee1394, node, addr, extcode, data, arg, result,
|
||||
(unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY;
|
||||
}
|
||||
|
||||
|
||||
int ieee1394_async_stream(struct raw1394_handle *handle, unsigned int channel,
|
||||
unsigned int tag, unsigned int sy, unsigned int speed,
|
||||
size_t length, quadlet_t *data)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_async_stream(handle->mode.ieee1394, channel, tag, sy, speed, length,
|
||||
data, (unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY;
|
||||
}
|
||||
|
||||
int ieee1394_async_send(struct raw1394_handle *handle ,
|
||||
size_t length, size_t header_length, unsigned int expect_response,
|
||||
quadlet_t *data)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_async_send(handle->mode.ieee1394, length, header_length, expect_response,
|
||||
data, (unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int ieee1394_start_phy_packet_write(struct ieee1394_handle *handle,
|
||||
quadlet_t data, unsigned long tag)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_PHYPACKET;
|
||||
req.generation = handle->generation;
|
||||
req.tag = tag;
|
||||
|
||||
req.sendb = data;
|
||||
|
||||
return (int)write(handle->fd, &req, sizeof(req));
|
||||
}
|
||||
|
||||
int ieee1394_phy_packet_write (struct raw1394_handle *handle, quadlet_t data)
|
||||
{
|
||||
SYNCFUNC_VARS;
|
||||
|
||||
err = ieee1394_start_phy_packet_write(handle->mode.ieee1394, data, (unsigned long)&rh);
|
||||
|
||||
SYNCFUNC_BODY; /* return 0 on success */
|
||||
}
|
||||
|
||||
int ieee1394_echo_request(struct ieee1394_handle *handle, quadlet_t data)
|
||||
{
|
||||
struct raw1394_request req;
|
||||
int retval=0;
|
||||
|
||||
CLEAR_REQ(&req);
|
||||
|
||||
req.type = RAW1394_REQ_ECHO;
|
||||
req.misc = data;
|
||||
|
||||
retval = (int)write(handle->fd, &req, sizeof(req));
|
||||
if (retval == sizeof(req)) {
|
||||
return 0; /* succcess */
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
int ieee1394_wake_up(ieee1394handle_t handle)
|
||||
{
|
||||
return ieee1394_echo_request(handle, 0);
|
||||
}
|
||||
|
||||
#undef SYNCFUNC_VARS
|
||||
#undef SYNCFUNC_BODY
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001,2002 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
const char *raw1394_get_libversion()
|
||||
{
|
||||
return VERSION;
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
MAINTAINERCLEANFILES = Makefile.in
|
||||
|
||||
# testlibraw
|
||||
bin_PROGRAMS = testlibraw sendiso dumpiso
|
||||
LDADD = ../src/libraw1394.la
|
|
@ -0,0 +1,645 @@
|
|||
# Makefile.in generated by automake 1.15 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = { \
|
||||
if test -z '$(MAKELEVEL)'; then \
|
||||
false; \
|
||||
elif test -n '$(MAKE_HOST)'; then \
|
||||
true; \
|
||||
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
|
||||
true; \
|
||||
else \
|
||||
false; \
|
||||
fi; \
|
||||
}
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
bin_PROGRAMS = testlibraw$(EXEEXT) sendiso$(EXEEXT) dumpiso$(EXEEXT)
|
||||
subdir = tools
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
dumpiso_SOURCES = dumpiso.c
|
||||
dumpiso_OBJECTS = dumpiso.$(OBJEXT)
|
||||
dumpiso_LDADD = $(LDADD)
|
||||
dumpiso_DEPENDENCIES = ../src/libraw1394.la
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
sendiso_SOURCES = sendiso.c
|
||||
sendiso_OBJECTS = sendiso.$(OBJEXT)
|
||||
sendiso_LDADD = $(LDADD)
|
||||
sendiso_DEPENDENCIES = ../src/libraw1394.la
|
||||
testlibraw_SOURCES = testlibraw.c
|
||||
testlibraw_OBJECTS = testlibraw.$(OBJEXT)
|
||||
testlibraw_LDADD = $(LDADD)
|
||||
testlibraw_DEPENDENCIES = ../src/libraw1394.la
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = dumpiso.c sendiso.c testlibraw.c
|
||||
DIST_SOURCES = dumpiso.c sendiso.c testlibraw.c
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
lt_age = @lt_age@
|
||||
lt_major = @lt_major@
|
||||
lt_revision = @lt_revision@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
MAINTAINERCLEANFILES = Makefile.in
|
||||
LDADD = ../src/libraw1394.la
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tools/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu tools/Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
|
||||
dumpiso$(EXEEXT): $(dumpiso_OBJECTS) $(dumpiso_DEPENDENCIES) $(EXTRA_dumpiso_DEPENDENCIES)
|
||||
@rm -f dumpiso$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(dumpiso_OBJECTS) $(dumpiso_LDADD) $(LIBS)
|
||||
|
||||
sendiso$(EXEEXT): $(sendiso_OBJECTS) $(sendiso_DEPENDENCIES) $(EXTRA_sendiso_DEPENDENCIES)
|
||||
@rm -f sendiso$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(sendiso_OBJECTS) $(sendiso_LDADD) $(LIBS)
|
||||
|
||||
testlibraw$(EXEEXT): $(testlibraw_OBJECTS) $(testlibraw_DEPENDENCIES) $(EXTRA_testlibraw_DEPENDENCIES)
|
||||
@rm -f testlibraw$(EXEEXT)
|
||||
$(AM_V_CCLD)$(LINK) $(testlibraw_OBJECTS) $(testlibraw_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dumpiso.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sendiso.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testlibraw.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
|
||||
clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \
|
||||
ctags ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
|
||||
|
||||
.PRECIOUS: Makefile
|
||||
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
|
@ -0,0 +1,269 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "../src/raw1394.h"
|
||||
|
||||
#define BUFFER 1000
|
||||
#define PACKET_MAX 4096
|
||||
|
||||
u_int64_t listen_channels;
|
||||
unsigned long which_port;
|
||||
char *filename;
|
||||
int file;
|
||||
enum raw1394_iso_dma_recv_mode mode = RAW1394_DMA_DEFAULT;
|
||||
|
||||
void usage_exit(int exitcode)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Usage: dumpiso [opts] [FILE]\n"
|
||||
"Dump IEEE 1394 isochronous channels to FILE or standard output.\n"
|
||||
"\n"
|
||||
"-c --channels CHANNELS Listen on these channels; CHANNELS is either a\n"
|
||||
" number X or a range X-Y.\n"
|
||||
"-p --port PORT Choose 1394 chip PORT. (default: 0)\n"
|
||||
"-h --help Show this help.\n"
|
||||
);
|
||||
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
void parse_args(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
char *tail;
|
||||
unsigned long chan1, chan2;
|
||||
|
||||
int c;
|
||||
int index;
|
||||
static struct option opts[] = {
|
||||
{ "channels", required_argument, NULL, 'c' },
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
while (1) {
|
||||
c = getopt_long(argc, argv, "hc:p:", opts, &index);
|
||||
if (c == -1) break;
|
||||
|
||||
switch (c) {
|
||||
case 'c':
|
||||
chan1 = strtoul(optarg, &tail, 10);
|
||||
chan2 = chan1;
|
||||
|
||||
if (*tail) {
|
||||
if (tail[0] != '-' || !tail[1]) {
|
||||
fprintf(stderr,
|
||||
"invalid argument to channels: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
|
||||
tail++;
|
||||
chan2 = strtoul(tail, &tail, 10);
|
||||
if (*tail) {
|
||||
fprintf(stderr,
|
||||
"invalid argument to channels: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
} else {
|
||||
mode = RAW1394_DMA_PACKET_PER_BUFFER;
|
||||
}
|
||||
|
||||
if (chan2 < chan1) {
|
||||
unsigned long x = chan1;
|
||||
chan1 = chan2;
|
||||
chan2 = x;
|
||||
}
|
||||
|
||||
if (chan2 > 63) {
|
||||
fprintf(stderr,
|
||||
"invalid channel numbers: %s\n",
|
||||
optarg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (i = chan1; i <= chan2; i++)
|
||||
listen_channels |= 1ULL << i;
|
||||
|
||||
break;
|
||||
case 'p':
|
||||
which_port = strtoul(optarg, &tail, 10);
|
||||
if (*tail) {
|
||||
fprintf(stderr,
|
||||
"invalid argument to port: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
usage_exit(0);
|
||||
case '?':
|
||||
usage_exit(1);
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
argv += optind;
|
||||
argc -= optind;
|
||||
|
||||
if (argc > 1) {
|
||||
fprintf(stderr, "Too many arguments.\n");
|
||||
usage_exit(1);
|
||||
}
|
||||
|
||||
if (argc) filename = *argv;
|
||||
|
||||
if (!listen_channels) listen_channels = ~0ULL;
|
||||
}
|
||||
|
||||
void write_header()
|
||||
{
|
||||
static char header[32] = "1394 isodump v2";
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
header[i+16] = (listen_channels >> (56 - 8*i)) & 0xff;
|
||||
|
||||
i = 0;
|
||||
while (i < 32) {
|
||||
int ret;
|
||||
ret = write(file, header + i, 32 - i);
|
||||
|
||||
if (ret < 0) {
|
||||
perror("header write");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
i += ret;
|
||||
}
|
||||
}
|
||||
|
||||
void open_dumpfile()
|
||||
{
|
||||
if (!filename || !filename[0] || (filename[0] == '-' && !filename[1])) {
|
||||
file = fileno(stdout);
|
||||
write_header();
|
||||
return;
|
||||
}
|
||||
|
||||
file = creat(filename, 0666);
|
||||
if (file < 0) {
|
||||
perror("dumpfile open");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
write_header();
|
||||
}
|
||||
|
||||
static enum raw1394_iso_disposition
|
||||
iso_handler(raw1394handle_t handle, unsigned char *data,
|
||||
unsigned int length, unsigned char channel,
|
||||
unsigned char tag, unsigned char sy, unsigned int cycle,
|
||||
unsigned int dropped)
|
||||
{
|
||||
int ret;
|
||||
unsigned char pad = 0;
|
||||
static unsigned int counter = 0;
|
||||
|
||||
if (++counter % 1000 == 0)
|
||||
fprintf(stderr, "\r%uK packets", counter/1000);
|
||||
|
||||
/* write header */
|
||||
if (write(file, &length, sizeof(length)) != sizeof(length) ||
|
||||
write(file, &channel, sizeof(channel)) != sizeof(channel) ||
|
||||
write(file, &tag, sizeof(tag)) != sizeof(tag) ||
|
||||
write(file, &sy, sizeof(sy)) != sizeof(sy) ||
|
||||
write(file, &pad, sizeof(pad)) != sizeof(pad)) {
|
||||
perror("data write");
|
||||
return RAW1394_ISO_ERROR;
|
||||
}
|
||||
|
||||
while (length) {
|
||||
ret = write(file, data, length);
|
||||
if (ret < 0) {
|
||||
perror("data write");
|
||||
return RAW1394_ISO_ERROR;
|
||||
}
|
||||
|
||||
length -= ret;
|
||||
data += ret;
|
||||
}
|
||||
|
||||
return RAW1394_ISO_OK;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
raw1394handle_t handle;
|
||||
int i, ret;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
fprintf(stderr, "port: %ld\nchannels: %#016llx\nfile: %s\n", which_port,
|
||||
(long long unsigned)listen_channels, filename);
|
||||
|
||||
handle = raw1394_new_handle();
|
||||
if (!handle) {
|
||||
if (!errno)
|
||||
fprintf(stderr,
|
||||
"No working kernel driver found.\n");
|
||||
else
|
||||
perror("raw1394_get_handle");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
do {
|
||||
if (raw1394_get_port_info(handle, NULL, 0) <= which_port) {
|
||||
fprintf(stderr, "Port %ld does not exist.\n",
|
||||
which_port);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ret = raw1394_set_port(handle, which_port);
|
||||
} while (ret < 0 && errno == ESTALE);
|
||||
|
||||
if (ret < 0) {
|
||||
perror("raw1394_set_port");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
open_dumpfile();
|
||||
|
||||
if (mode == RAW1394_DMA_DEFAULT) {
|
||||
raw1394_iso_multichannel_recv_init(handle, iso_handler,
|
||||
BUFFER, 2048, -1); /* >2048 makes rawiso stall! */
|
||||
raw1394_iso_recv_set_channel_mask(handle, listen_channels);
|
||||
|
||||
} else for (i = 0; i < 64; i++) {
|
||||
if (!(listen_channels & 1ULL << i))
|
||||
continue;
|
||||
raw1394_iso_recv_init(handle, iso_handler, BUFFER, PACKET_MAX,
|
||||
i, mode, -1);
|
||||
}
|
||||
raw1394_iso_recv_start(handle, -1, -1, 0);
|
||||
|
||||
while (raw1394_loop_iterate(handle) == 0);
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
raw1394_iso_shutdown(handle);
|
||||
raw1394_destroy_handle(handle);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,316 @@
|
|||
/*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "../src/raw1394.h"
|
||||
|
||||
#define BUFFER 1000
|
||||
#define PACKET_MAX 4096
|
||||
|
||||
unsigned long which_port;
|
||||
char *filename;
|
||||
|
||||
unsigned long loopcount = 1;
|
||||
unsigned int speed;
|
||||
|
||||
void usage_exit(int exitcode)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Usage: sendiso [opts] FILE\n"
|
||||
"Send IEEE 1394 isochronous packets from dump file FILE.\n"
|
||||
"\n"
|
||||
"-l --loop COUNT Repeat sending data COUNT times.\n"
|
||||
"-i --infinite Repeat sending data infinitely.\n"
|
||||
"-s --speed SPEED Send data at SPEED (valid values are 100, 200, 400 or\n"
|
||||
" alternatively 1, 2, 4). (default: 100)\n"
|
||||
"\n"
|
||||
"-p --port PORT Choose 1394 chip PORT. (default: 0)\n"
|
||||
"-h --help Show this help.\n"
|
||||
);
|
||||
|
||||
exit(exitcode);
|
||||
}
|
||||
|
||||
void parse_args(int argc, char **argv)
|
||||
{
|
||||
char *tail;
|
||||
|
||||
int c;
|
||||
int index;
|
||||
static struct option opts[] = {
|
||||
{ "file", required_argument, NULL, 'f' },
|
||||
{ "loop", required_argument, NULL, 'l' },
|
||||
{ "infinite", no_argument, NULL, 'i' },
|
||||
{ "speed", required_argument, NULL, 's' },
|
||||
{ "port", required_argument, NULL, 'p' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
while (1) {
|
||||
c = getopt_long(argc, argv, "f:l:is:p:h", opts, &index);
|
||||
if (c == -1) break;
|
||||
|
||||
switch (c) {
|
||||
case 'f':
|
||||
filename = optarg;
|
||||
break;
|
||||
case 'l':
|
||||
loopcount = strtoul(optarg, &tail, 10);
|
||||
if (*tail) {
|
||||
fprintf(stderr,
|
||||
"invalid argument to loop: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
break;
|
||||
case 'i':
|
||||
loopcount = 0;
|
||||
break;
|
||||
case 's':
|
||||
speed = strtoul(optarg, &tail, 10);
|
||||
if (*tail) speed = -1;
|
||||
|
||||
switch (speed) {
|
||||
case 1:
|
||||
case 100:
|
||||
speed = RAW1394_ISO_SPEED_100;
|
||||
break;
|
||||
case 2:
|
||||
case 200:
|
||||
speed = RAW1394_ISO_SPEED_200;
|
||||
break;
|
||||
case 4:
|
||||
case 400:
|
||||
speed = RAW1394_ISO_SPEED_400;
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,
|
||||
"invalid argument to speed: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
which_port = strtoul(optarg, &tail, 10);
|
||||
if (*tail) {
|
||||
fprintf(stderr,
|
||||
"invalid argument to port: %s\n",
|
||||
optarg);
|
||||
usage_exit(1);
|
||||
}
|
||||
break;
|
||||
case 'h':
|
||||
usage_exit(0);
|
||||
case '?':
|
||||
usage_exit(1);
|
||||
case 0:
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
argv += optind;
|
||||
argc -= optind;
|
||||
|
||||
if (argc > 1) {
|
||||
fprintf(stderr, "Too many arguments.\n");
|
||||
usage_exit(1);
|
||||
}
|
||||
|
||||
if (argc) filename = *argv;
|
||||
}
|
||||
|
||||
#define BUF_SIZE 4096
|
||||
#define BUF_HEAD 8
|
||||
void send_file_once(raw1394handle_t handle, int file)
|
||||
{
|
||||
int count, i, ret;
|
||||
unsigned channel, tag, sy;
|
||||
size_t length;
|
||||
static unsigned char buffer[BUF_SIZE + BUF_HEAD];
|
||||
static unsigned int counter = 0;
|
||||
static int inited = 0;
|
||||
|
||||
while (1) {
|
||||
count = read(file, buffer, BUF_HEAD);
|
||||
if (count < 0) {
|
||||
perror("read");
|
||||
exit(1);
|
||||
}
|
||||
if (count < BUF_HEAD)
|
||||
return;
|
||||
|
||||
i = 0;
|
||||
length = ((unsigned int *)buffer)[i];
|
||||
channel = buffer[i + 4];
|
||||
tag = buffer[i + 5];
|
||||
sy = buffer[i + 6];
|
||||
|
||||
i += BUF_HEAD;
|
||||
while (count < length + BUF_HEAD) {
|
||||
ret = read(file, buffer + count,
|
||||
length - count + BUF_HEAD);
|
||||
|
||||
if (ret < 0) {
|
||||
perror("read");
|
||||
exit(1);
|
||||
|
||||
}
|
||||
if (ret == 0)
|
||||
return;
|
||||
|
||||
count += ret;
|
||||
}
|
||||
|
||||
if (inited == 0) {
|
||||
/*
|
||||
fprintf(stderr, "transmitting first packet with length "
|
||||
"%d on channel %d with tag %d and sy %d\n",
|
||||
length, channel, tag, sy);
|
||||
*/
|
||||
ret = raw1394_iso_xmit_init(handle, NULL, BUFFER,
|
||||
PACKET_MAX, channel, speed, -1);
|
||||
if (ret < 0) {
|
||||
perror("raw1394_iso_xmit_init");
|
||||
exit(1);
|
||||
}
|
||||
raw1394_iso_xmit_start(handle, -1, -1);
|
||||
inited = 1;
|
||||
}
|
||||
|
||||
if (++counter % 1000 == 0)
|
||||
fprintf(stderr, "\r%uK packets", counter/1000);
|
||||
|
||||
ret = raw1394_iso_xmit_write(handle, &buffer[i],
|
||||
length, tag, sy);
|
||||
if (ret < 0) {
|
||||
perror("\nraw1394_iso_xmit_write");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void send_iso_file(raw1394handle_t handle)
|
||||
{
|
||||
int file;
|
||||
int count, ret;
|
||||
char buffer[32];
|
||||
|
||||
if (filename[0] == '-' && filename[1] == '\0') {
|
||||
file = fileno(stdin);
|
||||
} else {
|
||||
file = open(filename, O_RDONLY, 0);
|
||||
|
||||
if (file < 0) {
|
||||
perror("open");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
count = 32;
|
||||
while (count) {
|
||||
ret = read(file, buffer, count);
|
||||
|
||||
if (!ret) goto bad_format;
|
||||
|
||||
if (ret < 0) {
|
||||
perror("read");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
count -= ret;
|
||||
}
|
||||
|
||||
if (memcmp("1394 isodump v", buffer, 14)) goto bad_format;
|
||||
if (buffer[14] != '2') goto wrong_version;
|
||||
|
||||
while (1) {
|
||||
send_file_once(handle, file);
|
||||
|
||||
if (!loopcount) {
|
||||
if (lseek(file, 32, SEEK_SET) < 0) {
|
||||
perror("lseek");
|
||||
exit(1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!(--loopcount)) break;
|
||||
|
||||
if (lseek(file, 32, SEEK_SET) < 0) {
|
||||
perror("lseek");
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
bad_format:
|
||||
fprintf(stderr, "Input file format not recognized.\n");
|
||||
exit(1);
|
||||
|
||||
wrong_version:
|
||||
fprintf(stderr, "Format version of input file not supported.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
raw1394handle_t handle;
|
||||
int ret;
|
||||
|
||||
parse_args(argc, argv);
|
||||
|
||||
fprintf(stderr, "port: %ld\nloops: %ld\nfile: %s\n", which_port,
|
||||
loopcount, filename);
|
||||
|
||||
handle = raw1394_new_handle();
|
||||
if (!handle) {
|
||||
if (!errno)
|
||||
fprintf(stderr, "No working kernel driver found.\n");
|
||||
else
|
||||
perror("raw1394_get_handle");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
do {
|
||||
if (raw1394_get_port_info(handle, NULL, 0) <= which_port) {
|
||||
fprintf(stderr, "Port %ld does not exist.\n",
|
||||
which_port);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
ret = raw1394_set_port(handle, which_port);
|
||||
} while (ret < 0 && errno == ESTALE);
|
||||
|
||||
if (ret < 0) {
|
||||
perror("raw1394_set_port");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (filename)
|
||||
send_iso_file(handle);
|
||||
|
||||
fprintf(stderr, "\n");
|
||||
raw1394_iso_shutdown(handle);
|
||||
raw1394_destroy_handle(handle);
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,367 @@
|
|||
/* -*- c-basic-offset: 8 -*-
|
||||
*
|
||||
* libraw1394 - library for raw access to the 1394 bus with the Linux subsystem.
|
||||
*
|
||||
* Copyright (C) 1999,2000 Andreas Bombe
|
||||
*
|
||||
* This library is licensed under the GNU Lesser General Public License (LGPL),
|
||||
* version 2.1 or later. See the file COPYING.LIB in the distribution for
|
||||
* details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <sys/poll.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "../src/raw1394.h"
|
||||
#include "../src/csr.h"
|
||||
|
||||
|
||||
#define TESTADDR (CSR_REGISTER_BASE + CSR_CONFIG_ROM)
|
||||
|
||||
const char not_compatible[] = "\
|
||||
This libraw1394 does not work with your version of Linux. You need a different\n\
|
||||
version that matches your kernel (see kernel help text for the raw1394 option to\n\
|
||||
find out which is the correct version).\n";
|
||||
|
||||
const char not_loaded[] = "\
|
||||
This probably means that you don't have raw1394 support in the kernel or that\n\
|
||||
you haven't loaded the raw1394 module.\n";
|
||||
|
||||
quadlet_t buffer;
|
||||
|
||||
int my_tag_handler(raw1394handle_t handle, unsigned long tag,
|
||||
raw1394_errcode_t errcode)
|
||||
{
|
||||
int err = raw1394_errcode_to_errno(errcode);
|
||||
|
||||
if (err) {
|
||||
printf("failed with error: %s\n", strerror(err));
|
||||
} else {
|
||||
printf("completed with value 0x%08x\n", buffer);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const unsigned char fcp_data[] =
|
||||
{ 0x1, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef };
|
||||
|
||||
int my_fcp_handler(raw1394handle_t handle, nodeid_t nodeid, int response,
|
||||
size_t length, unsigned char *data)
|
||||
{
|
||||
printf(" got fcp %s from node %d of %d bytes:",
|
||||
(response ? "response" : "command"), nodeid & 0x3f, (int)length);
|
||||
|
||||
if (memcmp(fcp_data, data, sizeof fcp_data) != 0)
|
||||
printf("ERROR: fcp payload not correct\n");
|
||||
|
||||
while (length) {
|
||||
printf(" %02x", *data);
|
||||
data++;
|
||||
length--;
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
test_fcp(raw1394handle_t handle)
|
||||
{
|
||||
printf("\n - testing FCP monitoring on local node\n");
|
||||
raw1394_set_fcp_handler(handle, my_fcp_handler);
|
||||
raw1394_start_fcp_listen(handle);
|
||||
raw1394_write(handle, raw1394_get_local_id(handle),
|
||||
CSR_REGISTER_BASE + CSR_FCP_COMMAND, sizeof(fcp_data),
|
||||
(quadlet_t *)fcp_data);
|
||||
raw1394_write(handle, raw1394_get_local_id(handle),
|
||||
CSR_REGISTER_BASE + CSR_FCP_RESPONSE, sizeof(fcp_data),
|
||||
(quadlet_t *)fcp_data);
|
||||
}
|
||||
|
||||
static void
|
||||
read_topology_map(raw1394handle_t handle)
|
||||
{
|
||||
quadlet_t map[70];
|
||||
nodeid_t local_id;
|
||||
int node_count, self_id_count, i, retval;
|
||||
|
||||
local_id = raw1394_get_local_id(handle) | 0xffc0;
|
||||
|
||||
retval = raw1394_read(handle, local_id,
|
||||
CSR_REGISTER_BASE + CSR_TOPOLOGY_MAP, 12, &map[0]);
|
||||
if (retval < 0) {
|
||||
perror("\n - topology map: raw1394_read failed with error");
|
||||
return;
|
||||
}
|
||||
|
||||
self_id_count = ntohl(map[2]) & 0xffff;
|
||||
node_count = ntohl(map[2]) >> 16;
|
||||
retval = raw1394_read(handle, local_id,
|
||||
CSR_REGISTER_BASE + CSR_TOPOLOGY_MAP + 12,
|
||||
self_id_count * sizeof map[0], &map[3]);
|
||||
if (retval < 0) {
|
||||
perror("\n - topology map: raw1394_read failed with error");
|
||||
return;
|
||||
}
|
||||
|
||||
printf("\n - topology map: %d nodes, %d self ids, generation %d\n",
|
||||
node_count, self_id_count, ntohl(map[1]));
|
||||
for (i = 0; i < self_id_count; i++)
|
||||
printf(" 0x%08x\n", ntohl(map[3 + i]));
|
||||
}
|
||||
|
||||
static const quadlet_t unit_directory_data[] = {
|
||||
0x00060000, /* directory_length (CRC left blank) */
|
||||
0x1258595a, /* a bogus unit_specifier_id: XYZ */
|
||||
0x13616263, /* unit_sw_version: abc */
|
||||
0x036c7277, /* a bogus vendor OUI: lrw */
|
||||
0x81000003, /* textual descriptor offset */
|
||||
0x17000001, /* model: 1 */
|
||||
0x81000007, /* textual descriptor offset */
|
||||
|
||||
0x00050000, /* descriptor_length (CRC left blank) */
|
||||
0x00000000, /* descriptor_type: text */
|
||||
0x00000000, /* minimal ASCII, English */
|
||||
0x6c696272, /* "libr" */
|
||||
0x61773133, /* "aw13" */
|
||||
0x39340000, /* "94" */
|
||||
|
||||
0x00050000, /* descriptor_length (CRC left blank) */
|
||||
0x00000000, /* descriptor_type: text */
|
||||
0x00000000, /* minimal ASCII, English */
|
||||
0x74657374, /* "test" */
|
||||
0x6c696272, /* "libr" */
|
||||
0x61770000, /* "aw" */
|
||||
};
|
||||
#define IEEE1212_KEY_UNIT_DIRECTORY 0xd1000000
|
||||
|
||||
static void
|
||||
test_config_rom(raw1394handle_t handle)
|
||||
{
|
||||
quadlet_t rom[0x100] = { 0, };
|
||||
u_int32_t token;
|
||||
size_t rom_size;
|
||||
unsigned char rom_version;
|
||||
int i, retval;
|
||||
|
||||
printf("\n - testing config rom\n");
|
||||
retval = raw1394_get_config_rom(handle, rom, 0x100,
|
||||
&rom_size, &rom_version);
|
||||
printf(" get_config_rom returned %d, romsize %d, rom_version %d\n",
|
||||
retval, (int)rom_size, rom_version);
|
||||
printf(" here are the first 10 quadlets:\n");
|
||||
for (i = 0; i < 10; i++)
|
||||
printf(" 0x%08x\n", rom[i]);
|
||||
|
||||
retval = raw1394_update_config_rom(handle, rom, rom_size, rom_version);
|
||||
perror(" raw1394_update_config_rom failed with error");
|
||||
|
||||
retval = raw1394_add_config_rom_descriptor(handle, &token,
|
||||
0, IEEE1212_KEY_UNIT_DIRECTORY,
|
||||
unit_directory_data, sizeof(unit_directory_data));
|
||||
if (retval) {
|
||||
printf(" raw1394_add_config_rom_descriptor failed with error");
|
||||
return;
|
||||
}
|
||||
|
||||
printf(" added unit '0x58595a:0x616263', reverting in 5 seconds\n");
|
||||
sleep(5);
|
||||
retval = raw1394_remove_config_rom_descriptor(handle, token);
|
||||
if (retval)
|
||||
printf(" raw1394_remove_config_rom_descriptor failed with error");
|
||||
else
|
||||
printf(" unit '0x58595a:0x616263' removed\n");
|
||||
}
|
||||
|
||||
static void
|
||||
read_cycle_timer(raw1394handle_t handle)
|
||||
{
|
||||
u_int32_t ct;
|
||||
u_int64_t local_time;
|
||||
time_t seconds;
|
||||
int retval;
|
||||
|
||||
retval = raw1394_read_cycle_timer(handle, &ct, &local_time);
|
||||
if (retval < 0) {
|
||||
perror("\n - raw1394_read_cycle_timer failed with error");
|
||||
return;
|
||||
}
|
||||
printf("\n - cycle timer: %d seconds, %d cycles, %d sub-cycles\n",
|
||||
ct >> 25, (ct >> 12) & 0x1fff, ct & 0xfff);
|
||||
seconds = local_time / 1000000;
|
||||
printf(" local time from CLOCK_REALTIME: %lld us = %s",
|
||||
(unsigned long long)local_time, ctime(&seconds));
|
||||
|
||||
retval = raw1394_read_cycle_timer_and_clock(handle, &ct, &local_time,
|
||||
CLOCK_MONOTONIC);
|
||||
if (retval < 0) {
|
||||
perror("\n raw1394_read_cycle_timer_and_clock failed with error");
|
||||
return;
|
||||
}
|
||||
printf(" cycle timer: %d seconds, %d cycles, %d sub-cycles\n",
|
||||
ct >> 25, (ct >> 12) & 0x1fff, ct & 0xfff);
|
||||
printf(" local time from CLOCK_MONOTONIC: %lld us\n",
|
||||
(unsigned long long)local_time);
|
||||
|
||||
#if defined(CLOCK_MONOTONIC_RAW)
|
||||
retval = raw1394_read_cycle_timer_and_clock(handle, &ct, &local_time,
|
||||
CLOCK_MONOTONIC_RAW);
|
||||
if (retval < 0) {
|
||||
perror("\n raw1394_read_cycle_timer_and_clock failed with error");
|
||||
return;
|
||||
}
|
||||
printf(" cycle timer: %d seconds, %d cycles, %d sub-cycles\n",
|
||||
ct >> 25, (ct >> 12) & 0x1fff, ct & 0xfff);
|
||||
printf(" local time from CLOCK_MONOTONIC_RAW: %lld us\n",
|
||||
(unsigned long long)local_time);
|
||||
#endif
|
||||
}
|
||||
|
||||
int test_card(int card)
|
||||
{
|
||||
raw1394handle_t handle;
|
||||
struct raw1394_portinfo *portinfo;
|
||||
tag_handler_t std_handler;
|
||||
struct pollfd pfd;
|
||||
int i, l, n, numcards, retval, s;
|
||||
|
||||
portinfo = malloc(sizeof(*portinfo) * (card + 1));
|
||||
if (!portinfo)
|
||||
return -1;
|
||||
|
||||
handle = raw1394_new_handle();
|
||||
|
||||
if (!handle) {
|
||||
if (!errno) {
|
||||
printf(not_compatible);
|
||||
} else {
|
||||
perror("couldn't get handle");
|
||||
printf(not_loaded);
|
||||
}
|
||||
free(portinfo);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (card == 0) {
|
||||
printf("successfully got handle\n");
|
||||
printf("current generation number: %d\n",
|
||||
raw1394_get_generation(handle));
|
||||
}
|
||||
|
||||
numcards = raw1394_get_port_info(handle, portinfo, card + 1);
|
||||
if (numcards < card)
|
||||
perror("couldn't get card info");
|
||||
else if (card == 0)
|
||||
printf("%d card%s found\n",
|
||||
numcards, numcards == 1 ? "" : "s");
|
||||
|
||||
if (numcards <= card)
|
||||
goto out;
|
||||
|
||||
printf("\ncard %d, name: %s\n", card, portinfo[card].name);
|
||||
|
||||
if (raw1394_set_port(handle, card) < 0) {
|
||||
perror("couldn't set port");
|
||||
goto out;
|
||||
}
|
||||
|
||||
n = raw1394_get_nodecount(handle);
|
||||
l = raw1394_get_local_id(handle) & 0x3f;
|
||||
i = raw1394_get_irm_id(handle) & 0x3f;
|
||||
printf("%d nodes on bus, local ID is %d, IRM is %d\n", n, l, i);
|
||||
|
||||
if (n > 0)
|
||||
printf("\n - getting speeds between between nodes and local node\n");
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" node %d: ", i);
|
||||
fflush(stdout);
|
||||
s = raw1394_get_speed(handle, 0xffc0 | i);
|
||||
if (s >= 0)
|
||||
printf("S%d00%s\n", 1 << s,
|
||||
i == l ? " (local node)" : "");
|
||||
else
|
||||
perror("unknown");
|
||||
}
|
||||
|
||||
if (n > 0) {
|
||||
printf("\n - doing transactions with custom tag handler\n");
|
||||
std_handler = raw1394_set_tag_handler(handle, my_tag_handler);
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" read from node %d... ", i);
|
||||
fflush(stdout);
|
||||
buffer = 0;
|
||||
|
||||
if (raw1394_start_read(handle, 0xffc0 | i, TESTADDR, 4,
|
||||
&buffer, 0) < 0) {
|
||||
perror("failed");
|
||||
continue;
|
||||
}
|
||||
if (raw1394_loop_iterate(handle))
|
||||
perror("failed");
|
||||
}
|
||||
|
||||
if (n > 0) {
|
||||
printf("\n - using standard tag handler and synchronous calls\n");
|
||||
raw1394_set_tag_handler(handle, std_handler);
|
||||
}
|
||||
for (i = 0; i < n; i++) {
|
||||
printf(" read from node %d... ", i);
|
||||
fflush(stdout);
|
||||
buffer = 0;
|
||||
|
||||
retval = raw1394_read(handle, 0xffc0 | i, TESTADDR, 4, &buffer);
|
||||
if (retval < 0)
|
||||
perror("failed with error");
|
||||
else
|
||||
printf("completed with value 0x%08x\n", buffer);
|
||||
}
|
||||
|
||||
test_fcp(handle);
|
||||
read_topology_map(handle);
|
||||
test_config_rom(handle);
|
||||
read_cycle_timer(handle);
|
||||
|
||||
printf("\n - posting 0xdeadbeef as an echo request\n");
|
||||
raw1394_echo_request(handle, 0xdeadbeef);
|
||||
|
||||
printf(" polling for leftover messages\n");
|
||||
pfd.fd = raw1394_get_fd(handle);
|
||||
pfd.events = POLLIN;
|
||||
pfd.revents = 0;
|
||||
while (1) {
|
||||
retval = poll(&pfd, 1, 10);
|
||||
if (retval < 1)
|
||||
break;
|
||||
retval = raw1394_loop_iterate(handle);
|
||||
if (retval != 0)
|
||||
printf(" raw1394_loop_iterate() returned 0x%08x\n",
|
||||
retval);
|
||||
}
|
||||
|
||||
if (retval < 0)
|
||||
perror("poll failed");
|
||||
out:
|
||||
raw1394_destroy_handle(handle);
|
||||
free(portinfo);
|
||||
return numcards;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int card = 0, numcards;
|
||||
|
||||
do
|
||||
numcards = test_card(card);
|
||||
while (++card < numcards);
|
||||
|
||||
return numcards < 0;
|
||||
}
|
Loading…
Reference in New Issue