mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2025-10-28 05:40:23 -04:00
Added hdspconf utility by Thomas Charbonnel (requiring FLTK)
This commit is contained in:
parent
1febedba63
commit
dceea38da2
38 changed files with 7092 additions and 0 deletions
1
hdspconf/AUTHORS
Normal file
1
hdspconf/AUTHORS
Normal file
|
|
@ -0,0 +1 @@
|
|||
Thomas Charbonnel <thomas@undata.org>
|
||||
340
hdspconf/COPYING
Normal file
340
hdspconf/COPYING
Normal file
|
|
@ -0,0 +1,340 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 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.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, 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 or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
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 give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
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 Program or any portion
|
||||
of it, thus forming a work based on the Program, 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) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
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 Program, 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 Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) 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; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, 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 executable. However, as a
|
||||
special exception, the source code 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.
|
||||
|
||||
If distribution of executable or 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 counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program 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.
|
||||
|
||||
5. 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 Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program 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 to
|
||||
this License.
|
||||
|
||||
7. 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 Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program 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 Program.
|
||||
|
||||
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.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program 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.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the 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 Program
|
||||
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 Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, 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
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "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 PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. 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 PROGRAM 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 PROGRAM (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 PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. 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 program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 of the License, 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, 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.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
0
hdspconf/ChangeLog
Normal file
0
hdspconf/ChangeLog
Normal file
229
hdspconf/INSTALL
Normal file
229
hdspconf/INSTALL
Normal file
|
|
@ -0,0 +1,229 @@
|
|||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
||||
Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
These are generic installation instructions.
|
||||
|
||||
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 only 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. If you're
|
||||
using `csh' on an old version of System V, you might need to type
|
||||
`sh ./configure' instead to prevent `csh' from trying to execute
|
||||
`configure' itself.
|
||||
|
||||
Running `configure' takes awhile. 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.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. 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.
|
||||
|
||||
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=c89 CFLAGS=-O2 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 must use a version of `make' that
|
||||
supports the `VPATH' variable, such as 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 `..'.
|
||||
|
||||
If you have to use a `make' that does not support the `VPATH'
|
||||
variable, you have 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.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=PATH' 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.
|
||||
|
||||
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'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
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.
|
||||
|
||||
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 `--target=TYPE' option 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
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--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.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
1
hdspconf/Makefile.am
Normal file
1
hdspconf/Makefile.am
Normal file
|
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src pixmaps
|
||||
0
hdspconf/NEWS
Normal file
0
hdspconf/NEWS
Normal file
2
hdspconf/README
Normal file
2
hdspconf/README
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
HDSPConfig is a GUI to control the Hammerfall HDSP Alsa Settings.
|
||||
Up to four hdsp cards are supported.
|
||||
62
hdspconf/configure.in
Normal file
62
hdspconf/configure.in
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
AC_INIT(src/hdspconf.cxx)
|
||||
AM_INIT_AUTOMAKE(hdspconf, 1.0)
|
||||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_MAKE_SET
|
||||
AC_STDC_HEADERS
|
||||
AC_PATH_X
|
||||
|
||||
AM_PATH_ALSA(0.9.0)
|
||||
|
||||
dnl kernel header files
|
||||
AC_MSG_CHECKING(for kernel header files)
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=ver specify kernel version (for example 2.5.5-pre1)],
|
||||
[kerneldir="$withval"], [kerneldir=""])
|
||||
if test "$kerneldir" != "" -a -r "/lib/modules/$kerneldir/build/include/sound"; then
|
||||
kerneldir="/lib/modules/$kerneldir/build/include"
|
||||
AC_MSG_RESULT($kerneldir)
|
||||
else
|
||||
if test -z "$kerneldir"; then
|
||||
AC_MSG_RESULT("not specified")
|
||||
else
|
||||
AC_MSG_RESULT("directory /lib/modules/$kerneldir/build/include/sound not found")
|
||||
fi
|
||||
kerneldir=""
|
||||
fi
|
||||
|
||||
dnl path for sound/asound.h
|
||||
AC_MSG_CHECKING(for directory with ALSA kernel headers)
|
||||
AC_ARG_WITH(soundbase,
|
||||
[ --with-soundbase=dir specify base directory with kernel sound headers (optional)],
|
||||
[soundbasedir="$withval"], [soundbasedir="$kerneldir"])
|
||||
if test "$soundbasedir" != "" -a -r "$soundbasedir/sound" ; then
|
||||
ALSA_CFLAGS="$ALSA_CFLAGS -I$soundbasedir"
|
||||
CFLAGS="$CFLAGS -I$soundbasedir"
|
||||
AC_MSG_RESULT($ALSA_CFLAGS)
|
||||
else
|
||||
if test "x$prefix" != xNONE; then
|
||||
aprefix=$prefix
|
||||
else
|
||||
aprefix=$ac_default_prefix
|
||||
fi
|
||||
if test -z "$soundbasedir" -a -r "$aprefix/include/sound"; then
|
||||
ALSA_CFLAGS="$ALSA_CFLAGS -I$aprefix/include"
|
||||
CFLAGS="$CFLAGS -I$aprefix/include"
|
||||
AC_MSG_RESULT($ALSA_CFLAGS)
|
||||
else
|
||||
AC_MSG_RESULT("not specified - using C compiler defaults")
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PATH_PROG(FLTK_CONFIG, fltk-config, no)
|
||||
if test "$FLTK_CONFIG" = "no"; then
|
||||
AC_MSG_ERROR(no fltk-config is found)
|
||||
fi
|
||||
FLTK_CXXFLAGS=`$FLTK_CONFIG $fltk_config_args --cxxflags`
|
||||
FLTK_LIBS=`$FLTK_CONFIG $fltk_config_args --ldflags`
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS $FLTK_CXXFLAGS"
|
||||
LDFLAGS="$LDFLAGS $ALSA_LIBS $FLTK_LIBS"
|
||||
|
||||
AC_OUTPUT(Makefile src/Makefile pixmaps/Makefile)
|
||||
25
hdspconf/cvscompile
Normal file
25
hdspconf/cvscompile
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
if test "x$AUTOMAKE_DIR" = "x"; then
|
||||
if test -d /usr/local/share/automake; then
|
||||
AUTOMAKE_DIR=/usr/local/share/automake
|
||||
fi
|
||||
if test -d /usr/share/automake; then
|
||||
AUTOMAKE_DIR="/usr/share/automake"
|
||||
fi
|
||||
fi
|
||||
|
||||
for f in install-sh mkinstalldirs missing; do
|
||||
cp -av $AUTOMAKE_DIR/$f .
|
||||
done
|
||||
|
||||
aclocal $ACLOCAL_FLAGS
|
||||
automake --foreign --add-missing --copy
|
||||
touch depcomp
|
||||
autoconf
|
||||
export CFLAGS='-O2 -Wall -pipe -g'
|
||||
echo "CFLAGS=$CFLAGS"
|
||||
echo "./configure $@"
|
||||
./configure $@
|
||||
unset CFLAGS
|
||||
make
|
||||
1
hdspconf/pixmaps/Makefile.am
Normal file
1
hdspconf/pixmaps/Makefile.am
Normal file
|
|
@ -0,0 +1 @@
|
|||
EXTRA_DIST = $(wildcard *.xpm)
|
||||
451
hdspconf/pixmaps/alsalogo.xpm
Normal file
451
hdspconf/pixmaps/alsalogo.xpm
Normal file
|
|
@ -0,0 +1,451 @@
|
|||
/* XPM */
|
||||
static char * alsalogo_xpm[] = {
|
||||
"50 50 398 2",
|
||||
" c None",
|
||||
". c #C0C0C0",
|
||||
"+ c #BEC1BE",
|
||||
"@ c #9EAD9D",
|
||||
"# c #889687",
|
||||
"$ c #7D8A7C",
|
||||
"% c #788477",
|
||||
"& c #9AA799",
|
||||
"* c #484D47",
|
||||
"= c #3A3F3A",
|
||||
"- c #515551",
|
||||
"; c #6C706B",
|
||||
"> c #8F958F",
|
||||
", c #ADAFAD",
|
||||
"' c #BCBCBB",
|
||||
") c #BEC0BE",
|
||||
"! c #606A60",
|
||||
"~ c #515651",
|
||||
"{ c #646664",
|
||||
"] c #828282",
|
||||
"^ c #A2A4A1",
|
||||
"/ c #EEEEED",
|
||||
"( c #FEFEFC",
|
||||
"_ c #A7B7A5",
|
||||
": c #7E8B7D",
|
||||
"< c #414542",
|
||||
"[ c #5C5E5C",
|
||||
"} c #BCBDBB",
|
||||
"| c #F6F6F4",
|
||||
"1 c #8B978A",
|
||||
"2 c #4A4F4A",
|
||||
"3 c #939493",
|
||||
"4 c #C7C9C6",
|
||||
"5 c #5C655C",
|
||||
"6 c #4C4D4C",
|
||||
"7 c #C3C4C2",
|
||||
"8 c #768176",
|
||||
"9 c #626262",
|
||||
"0 c #E9E9E7",
|
||||
"a c #93A291",
|
||||
"b c #5E625E",
|
||||
"c c #7B7B7A",
|
||||
"d c #838482",
|
||||
"e c #FCFCFB",
|
||||
"f c #F3F4F1",
|
||||
"g c #EBECE9",
|
||||
"h c #E6E6E4",
|
||||
"i c #E7E7E5",
|
||||
"j c #EEEEEC",
|
||||
"k c #FDFDFB",
|
||||
"l c #FAFAF9",
|
||||
"m c #CBCFCA",
|
||||
"n c #969796",
|
||||
"o c #737A73",
|
||||
"p c #787D77",
|
||||
"q c #7C817C",
|
||||
"r c #798079",
|
||||
"s c #727871",
|
||||
"t c #9D9F9D",
|
||||
"u c #EDEEEB",
|
||||
"v c #F8F8F6",
|
||||
"w c #D3D4D2",
|
||||
"x c #9DA09D",
|
||||
"y c #727672",
|
||||
"z c #CBCBCB",
|
||||
"A c #E5E6E4",
|
||||
"B c #F6F7F4",
|
||||
"C c #F4F5F2",
|
||||
"D c #DFE0DE",
|
||||
"E c #707370",
|
||||
"F c #C0C2C0",
|
||||
"G c #FCFCFA",
|
||||
"H c #ADB3AD",
|
||||
"I c #515452",
|
||||
"J c #939793",
|
||||
"K c #F1F1EF",
|
||||
"L c #BFC4BE",
|
||||
"M c #F4F5F4",
|
||||
"N c #FBFBFA",
|
||||
"O c #B7BAB7",
|
||||
"P c #A2A5A0",
|
||||
"Q c #F9FAF8",
|
||||
"R c #F5F5F3",
|
||||
"S c #BABDBA",
|
||||
"T c #727472",
|
||||
"U c #CBCECC",
|
||||
"V c #F5F5F4",
|
||||
"W c #E2E3E1",
|
||||
"X c #CFD4CE",
|
||||
"Y c #B5B7B4",
|
||||
"Z c #777777",
|
||||
"` c #303231",
|
||||
" . c #8F918F",
|
||||
".. c #A5A7A4",
|
||||
"+. c #B9BCB8",
|
||||
"@. c #CACDC9",
|
||||
"#. c #F7F7F5",
|
||||
"$. c #EFF0ED",
|
||||
"%. c #D0D0CE",
|
||||
"&. c #C1C2C1",
|
||||
"*. c #909690",
|
||||
"=. c #6D746D",
|
||||
"-. c #727972",
|
||||
";. c #98A398",
|
||||
">. c #BFC9BE",
|
||||
",. c #BDD0BC",
|
||||
"'. c #BCD1BE",
|
||||
"). c #C0D5C1",
|
||||
"!. c #C4D9C5",
|
||||
"~. c #C4D8C3",
|
||||
"{. c #C3D8C4",
|
||||
"]. c #C3D5C2",
|
||||
"^. c #C0D0C0",
|
||||
"/. c #B1BDB2",
|
||||
"(. c #878F87",
|
||||
"_. c #9CA59C",
|
||||
":. c #E0E7DF",
|
||||
"<. c #E6E9E5",
|
||||
"[. c #F0F0EE",
|
||||
"}. c #FBFBF9",
|
||||
"|. c #3A403A",
|
||||
"1. c #747673",
|
||||
"2. c #363936",
|
||||
"3. c #7F8B7F",
|
||||
"4. c #CCE0CC",
|
||||
"5. c #DAF2DB",
|
||||
"6. c #D8EFD7",
|
||||
"7. c #D7EED6",
|
||||
"8. c #D6ECD4",
|
||||
"9. c #D4EBD4",
|
||||
"0. c #D2E9D4",
|
||||
"a. c #D1E8D3",
|
||||
"b. c #CEE5CF",
|
||||
"c. c #CDE4CE",
|
||||
"d. c #CFE6D0",
|
||||
"e. c #CCE2CD",
|
||||
"f. c #BCCEBC",
|
||||
"g. c #BCC5BC",
|
||||
"h. c #DBDEDB",
|
||||
"i. c #F9F9F8",
|
||||
"j. c #8B8D8A",
|
||||
"k. c #606961",
|
||||
"l. c #B3C4B4",
|
||||
"m. c #D7EED8",
|
||||
"n. c #D3E9D4",
|
||||
"o. c #D4EAD4",
|
||||
"p. c #859185",
|
||||
"q. c #666F65",
|
||||
"r. c #C2D6C0",
|
||||
"s. c #1C1E1D",
|
||||
"t. c #B8CCBA",
|
||||
"u. c #535853",
|
||||
"v. c #454C46",
|
||||
"w. c #99A999",
|
||||
"x. c #CCE3CD",
|
||||
"y. c #5E675F",
|
||||
"z. c #8A958B",
|
||||
"A. c #C8DEC9",
|
||||
"B. c #C9DFCA",
|
||||
"C. c #CBE2CC",
|
||||
"D. c #CDDECE",
|
||||
"E. c #E5EEE5",
|
||||
"F. c #F6FBF4",
|
||||
"G. c #F9F9F7",
|
||||
"H. c #B7BAB6",
|
||||
"I. c #656E65",
|
||||
"J. c #D3EAD5",
|
||||
"K. c #D3E9D2",
|
||||
"L. c #6D776D",
|
||||
"M. c #525A52",
|
||||
"N. c #1C1E1C",
|
||||
"O. c #161717",
|
||||
"P. c #A0B1A1",
|
||||
"Q. c #4F5750",
|
||||
"R. c #6E776E",
|
||||
"S. c #C7DAC6",
|
||||
"T. c #C8DDC8",
|
||||
"U. c #D4E1D4",
|
||||
"V. c #F5F7F3",
|
||||
"W. c #CCCDCA",
|
||||
"X. c #3B3D3B",
|
||||
"Y. c #D5ECD5",
|
||||
"Z. c #CEE5D0",
|
||||
"`. c #CCDFCA",
|
||||
" + c #565B57",
|
||||
".+ c #191A1A",
|
||||
"++ c #9CAE9D",
|
||||
"@+ c #535854",
|
||||
"#+ c #C2D6C3",
|
||||
"$+ c #C7D9C5",
|
||||
"%+ c #C3DAC4",
|
||||
"&+ c #C2DAC4",
|
||||
"*+ c #CCDFCC",
|
||||
"=+ c #EFF3EE",
|
||||
"-+ c #C9CAC8",
|
||||
";+ c #9EAC9D",
|
||||
">+ c #D0E7D1",
|
||||
",+ c #D3EAD4",
|
||||
"'+ c #C1D3C0",
|
||||
")+ c #353735",
|
||||
"!+ c #505850",
|
||||
"~+ c #C0D4BF",
|
||||
"{+ c #727A73",
|
||||
"]+ c #676E68",
|
||||
"^+ c #535B54",
|
||||
"/+ c #303230",
|
||||
"(+ c #B6C9B7",
|
||||
"_+ c #C5D8C4",
|
||||
":+ c #CED8CC",
|
||||
"<+ c #D9DBD9",
|
||||
"[+ c #C1D3C1",
|
||||
"}+ c #D0E7D2",
|
||||
"|+ c #B5C6B3",
|
||||
"1+ c #202221",
|
||||
"2+ c #494F49",
|
||||
"3+ c #B8CAB7",
|
||||
"4+ c #C3D6C3",
|
||||
"5+ c #454B45",
|
||||
"6+ c #CAE1CB",
|
||||
"7+ c #C5DAC6",
|
||||
"8+ c #585F59",
|
||||
"9+ c #1F2020",
|
||||
"0+ c #ACBEAD",
|
||||
"a+ c #C4DAC4",
|
||||
"b+ c #C1D5BF",
|
||||
"c+ c #F2F2F0",
|
||||
"d+ c #D3E1D2",
|
||||
"e+ c #D0E6D1",
|
||||
"f+ c #ADBEAB",
|
||||
"g+ c #141515",
|
||||
"h+ c #484C48",
|
||||
"i+ c #A3B3A3",
|
||||
"j+ c #616962",
|
||||
"k+ c #858F85",
|
||||
"l+ c #B4C6B5",
|
||||
"m+ c #535754",
|
||||
"n+ c #0E0E0F",
|
||||
"o+ c #A1B3A2",
|
||||
"p+ c #C6D9C5",
|
||||
"q+ c #959995",
|
||||
"r+ c #CEE5CE",
|
||||
"s+ c #0A0B0B",
|
||||
"t+ c #545954",
|
||||
"u+ c #909D90",
|
||||
"v+ c #A0AF9F",
|
||||
"w+ c #454946",
|
||||
"x+ c #9EAD9F",
|
||||
"y+ c #565B56",
|
||||
"z+ c #070808",
|
||||
"A+ c #98A999",
|
||||
"B+ c #BACAB9",
|
||||
"C+ c #636763",
|
||||
"D+ c #EEF0ED",
|
||||
"E+ c #D8E8D8",
|
||||
"F+ c #9EB0A0",
|
||||
"G+ c #222423",
|
||||
"H+ c #646864",
|
||||
"I+ c #6E746E",
|
||||
"J+ c #B4C8B5",
|
||||
"K+ c #222424",
|
||||
"L+ c #828B83",
|
||||
"M+ c #676B67",
|
||||
"N+ c #1F201F",
|
||||
"O+ c #97A798",
|
||||
"P+ c #C7DBC6",
|
||||
"Q+ c #BFD3BD",
|
||||
"R+ c #99A698",
|
||||
"S+ c #8C8E8C",
|
||||
"T+ c #F8F8F7",
|
||||
"U+ c #F2F4F1",
|
||||
"V+ c #9EAFA0",
|
||||
"W+ c #0B0B0C",
|
||||
"X+ c #171817",
|
||||
"Y+ c #4B504B",
|
||||
"Z+ c #B6CAB8",
|
||||
"`+ c #AABAAA",
|
||||
" @ c #3E413F",
|
||||
".@ c #707670",
|
||||
"+@ c #1B1C1B",
|
||||
"@@ c #0D0D0E",
|
||||
"#@ c #95A596",
|
||||
"$@ c #C1D6C1",
|
||||
"%@ c #9CA79C",
|
||||
"&@ c #4D514E",
|
||||
"*@ c #EDEEEC",
|
||||
"=@ c #F6F7F5",
|
||||
"-@ c #E4ECE3",
|
||||
";@ c #CCDECB",
|
||||
">@ c #CADFCA",
|
||||
",@ c #CFE6D1",
|
||||
"'@ c #3C3E3C",
|
||||
")@ c #5E675E",
|
||||
"!@ c #383A38",
|
||||
"~@ c #6E786F",
|
||||
"{@ c #B3C6B4",
|
||||
"]@ c #555D55",
|
||||
"^@ c #484D49",
|
||||
"/@ c #869187",
|
||||
"(@ c #616861",
|
||||
"_@ c #4F534F",
|
||||
":@ c #828C81",
|
||||
"<@ c #C4D7C3",
|
||||
"[@ c #BBCDBB",
|
||||
"}@ c #919E91",
|
||||
"|@ c #575C58",
|
||||
"1@ c #A7AAA6",
|
||||
"2@ c #A2A3A1",
|
||||
"3@ c #E4E5E5",
|
||||
"4@ c #C3C8C1",
|
||||
"5@ c #CBE0CB",
|
||||
"6@ c #B2C2B2",
|
||||
"7@ c #AFC2AF",
|
||||
"8@ c #B5C9B6",
|
||||
"9@ c #9CA89C",
|
||||
"0@ c #97A498",
|
||||
"a@ c #93A093",
|
||||
"b@ c #BCCFBD",
|
||||
"c@ c #A8B8A9",
|
||||
"d@ c #A5B3A5",
|
||||
"e@ c #B2C4B2",
|
||||
"f@ c #B1C2B0",
|
||||
"g@ c #AAB7AA",
|
||||
"h@ c #C5D8C3",
|
||||
"i@ c #C5D1C3",
|
||||
"j@ c #BBC2B9",
|
||||
"k@ c #757B75",
|
||||
"l@ c #7B7F7B",
|
||||
"m@ c #EEEFEC",
|
||||
"n@ c #E7EBE6",
|
||||
"o@ c #BFC5BE",
|
||||
"p@ c #A2ABA2",
|
||||
"q@ c #B2BDB2",
|
||||
"r@ c #B9C8B9",
|
||||
"s@ c #BCCEBB",
|
||||
"t@ c #B9CAB8",
|
||||
"u@ c #B6C8B5",
|
||||
"v@ c #AEC0AD",
|
||||
"w@ c #AABCA9",
|
||||
"x@ c #A4B1A4",
|
||||
"y@ c #A2ADA2",
|
||||
"z@ c #889087",
|
||||
"A@ c #616260",
|
||||
"B@ c #7A7F7A",
|
||||
"C@ c #BEBEBD",
|
||||
"D@ c #CECFCD",
|
||||
"E@ c #E0E2DF",
|
||||
"F@ c #C1C5C0",
|
||||
"G@ c #979997",
|
||||
"H@ c #7E817F",
|
||||
"I@ c #6C736C",
|
||||
"J@ c #515451",
|
||||
"K@ c #333533",
|
||||
"L@ c #595D59",
|
||||
"M@ c #656B65",
|
||||
"N@ c #6E716F",
|
||||
"O@ c #959795",
|
||||
"P@ c #BCBFBC",
|
||||
"Q@ c #E3E7E3",
|
||||
"R@ c #F7F8F6",
|
||||
"S@ c #BCBDBA",
|
||||
"T@ c #EBECEA",
|
||||
"U@ c #A4ACA4",
|
||||
"V@ c #535653",
|
||||
"W@ c #B7B8B6",
|
||||
"X@ c #616B60",
|
||||
"Y@ c #F7F7F6",
|
||||
"Z@ c #E2E6E1",
|
||||
"`@ c #7D817E",
|
||||
" # c #838582",
|
||||
".# c #D1D2D0",
|
||||
"+# c #CACECA",
|
||||
"@# c #868A86",
|
||||
"## c #F3F4F2",
|
||||
"$# c #FAFBF9",
|
||||
"%# c #B1B4AF",
|
||||
"&# c #505450",
|
||||
"*# c #626562",
|
||||
"=# c #E0E0DF",
|
||||
"-# c #F5F6F3",
|
||||
";# c #B3B5B3",
|
||||
"># c #606260",
|
||||
",# c #818480",
|
||||
"'# c #959894",
|
||||
")# c #878B86",
|
||||
"!# c #696B69",
|
||||
"~# c #565756",
|
||||
"{# c #919491",
|
||||
"]# c #BDBDBC",
|
||||
"^# c #EAEAE8",
|
||||
"/# c #A7B7A6",
|
||||
"(# c #BFC3BE",
|
||||
"_# c #7F807F",
|
||||
":# c #7D7E7E",
|
||||
"<# c #808181",
|
||||
"[# c #929391",
|
||||
"}# c #B8BBB7",
|
||||
"|# c #7A7A7A",
|
||||
"1# c #93A292",
|
||||
". . . . . . . . . . . . . . . . . . . . + @ # $ % % $ # @ + . . . . . . . . . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . . . . . . & * = - ; > , ' ' , > ; - = * & . . . . . . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . . . ) ! ~ { ] ^ / ( ( ( ( ( ( ( ( / ^ ] { ~ ! ) . . . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . _ : < [ } | ( ( ( ( ( ( ( ( ( ( ( ( ( ( | } [ < : _ . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . 1 2 3 4 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 4 3 2 1 . . . . . . . . . . . ",
|
||||
". . . . . . . . . . 5 6 7 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 7 6 5 . . . . . . . . . . ",
|
||||
". . . . . . . . . 8 9 0 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 0 9 8 . . . . . . . . . ",
|
||||
". . . . . . . a b c ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( c b a . . . . . . . ",
|
||||
". . . . . . . b d e ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( e d b . . . . . . . ",
|
||||
". . . . . . 8 c e ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( e c 8 . . . . . . ",
|
||||
". . . . . 5 9 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 9 5 . . . . . ",
|
||||
". . . . 1 6 0 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( f g h i j k ( ( ( ( ( ( ( 0 6 1 . . . . ",
|
||||
". . . _ 2 7 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( l m n o p q r s t u ( ( ( ( ( ( ( 7 2 _ . . . ",
|
||||
". . . : 3 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( v w x { y z A B C D E F G ( ( ( ( ( ( ( 3 : . . . ",
|
||||
". . ) < 4 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( H I J K ( ( ( ( ( ( G L M ( ( ( ( ( ( ( 4 < ) . . ",
|
||||
". . ! [ ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( N O o P u ( ( ( ( ( ( ( ( ( k Q ( ( ( ( ( ( ( ( [ ! . . ",
|
||||
". . ~ } ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( R S T U ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( } ~ . . ",
|
||||
". & { | ( ( ( ( ( ( ( ( ( ( ( ( k V W X Y Z ` ...+.@.h #.( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( | { & . ",
|
||||
". * ] ( ( ( ( ( ( ( ( ( $.%.&.*.=.-.;.>.,.'.).!.~.{.].^./.(._.:.<.[.}.( ( ( ( ( ( ( ( ( ( ( ( ] * . ",
|
||||
". |.^ ( ( ( ( ( ( ( ( R 1.2.3.4.5.6.7.8.9.0.0.0.0.a.b.c.c.c.d.e.f.g.h.( ( ( ( ( ( ( ( ( ( ( ( ^ |.. ",
|
||||
"+ - / ( ( ( ( ( ( i.j.k.l.m.9.n.o.8.8.p.q.r.s.t.0.u.v.w.x.y.z.x.A.B.C.D.E.F.( ( ( ( ( ( ( ( ( / - + ",
|
||||
"@ ; ( ( ( ( ( ( G.H.I.d.J.0.0.o.8.8.K.L.M.r.N.t.0.O.P.c.c.Q.R.C.A.A.A.S.T.U.V.e ( ( ( ( ( ( ( ( ; @ ",
|
||||
"# > ( ( ( ( ( ( W.X.Y.Z.0.0.0.o.8.8.`. +M.r.N.t.0..+++c.c.Q.@+#+A.A.A.$+%+&+*+=+( ( ( ( ( ( ( ( > # ",
|
||||
"$ , ( ( ( ( ( ( -+;+>+b.0.0.0.,+8.8.'+)+!+~+N.t.0.{+]+c.c.^+/+(+A.A.A.$+%+&+_+:+G ( ( ( ( ( ( ( , $ ",
|
||||
"% ' ( ( ( ( ( ( <+[+c.c.}+0.0.o.8.8.|+1+2+3+N.t.0.4+5+6+7+8+9+0+A.A.A.$+%+&+a+b+/ ( ( ( ( ( ( ( ' % ",
|
||||
"% ' ( ( ( ( ( ( c+d+c.c.e+0.0.0.n.8.f+g+h+i+N.t.0.0.j+k+l+m+n+o+A.A.A.$+%+&+p+b+q+#.( ( ( ( ( ( ' % ",
|
||||
"$ , ( ( ( ( ( ( G =+r+c.b.a.0.0.0.,+o+s+t+u+N.t.0.b.v+w+x+y+z+A+A.A.A.$+%+&+_+B+C+D+( ( ( ( ( ( , $ ",
|
||||
"# > ( ( ( ( ( ( ( ( E+c.c.b.a.0.0.0.F+G+H+I+s.t.}+c.J+K+L+M+N+O+A.A.P+$+%+&+Q+R+S+T+( ( ( ( ( ( > # ",
|
||||
"@ ; ( ( ( ( ( ( ( ( U+U.x.c.c.a.0.0.V+W+X+Y+N.Z+c.c.`+ @.@+@@@#@A.A.P+$+%+$@%@&@*@( ( ( ( ( ( ( ; @ ",
|
||||
"+ - / ( ( ( ( ( ( ( ( =@-@;@>@b.,@0.F+'@)@!@s.~@{@]@^@/@(@@+_@:@A.T.S.<@[@}@|@1@( ( ( ( ( ( ( / - + ",
|
||||
". = 2@( ( ( ( ( ( ( ( ( ( }.3@4@[+5@6@7@8@9@0@a@b@c@l.c.d@e@f@g@h@i@j@k@/+l@=@( ( ( ( ( ( ( ( 2@= . ",
|
||||
". * ] ( ( ( ( ( ( ( ( ( ( ( G m@n@o@p@q@r@s@t@u@J+u@u@u@v@w@x@y@z@A@B@C@D@$.( ( ( ( ( ( ( ( ( ] * . ",
|
||||
". & { | ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( Q E@F@G@H@I@J@K@L@M@N@O@P@Q@R@( ( ( ( ( ( ( ( ( ( ( ( | { & . ",
|
||||
". . ~ S@( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( }.T@U@V@W@m@f G.G ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( S@~ . . ",
|
||||
". . X@[ ( ( ( ( ( ( ( ( Y@e ( ( ( ( ( ( ( k Z@`@ #.#G.( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( [ X@. . ",
|
||||
". . . < 4 ( ( ( ( ( ( ( +#@###( ( ( ( $#%#&#*#=#( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 4 < . . . ",
|
||||
". . . : 3 ( ( ( ( ( ( ( -#;#>#,#'#)#!#~#{#]#^#G ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 3 : . . . ",
|
||||
". . . /#2 7 ( ( ( ( ( ( ( f (#_#:#<#[#}#Y@( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 7 2 /#. . . ",
|
||||
". . . . 1 6 0 ( ( ( ( ( ( ( ( G }.G ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 0 6 1 . . . . ",
|
||||
". . . . . 5 9 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 9 5 . . . . . ",
|
||||
". . . . . . 8 |#e ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( e |#8 . . . . . . ",
|
||||
". . . . . . . b d e ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( e d b . . . . . . . ",
|
||||
". . . . . . . 1#b |#( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( |#b 1#. . . . . . . ",
|
||||
". . . . . . . . . 8 9 0 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 0 9 8 . . . . . . . . . ",
|
||||
". . . . . . . . . . 5 6 7 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 7 6 5 . . . . . . . . . . ",
|
||||
". . . . . . . . . . . 1 2 3 4 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( 4 3 2 1 . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . /#: < [ S@| ( ( ( ( ( ( ( ( ( ( ( ( ( ( | S@[ < : /#. . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . . . . X@~ { ] 2@/ ( ( ( ( ( ( ( ( / 2@] { ~ X@. . . . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . . . . . . & * |.- ; > , ' ' , > ; - |.* & . . . . . . . . . . . . . . . . . ",
|
||||
". . . . . . . . . . . . . . . . . . . . + @ # $ % % $ # @ + . . . . . . . . . . . . . . . . . . . . "};
|
||||
1875
hdspconf/pixmaps/lad_banner.xpm
Normal file
1875
hdspconf/pixmaps/lad_banner.xpm
Normal file
File diff suppressed because it is too large
Load diff
2338
hdspconf/pixmaps/rme.xpm
Normal file
2338
hdspconf/pixmaps/rme.xpm
Normal file
File diff suppressed because it is too large
Load diff
46
hdspconf/src/HC_AboutText.cxx
Normal file
46
hdspconf/src/HC_AboutText.cxx
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_AboutText.h"
|
||||
|
||||
HC_AboutText::HC_AboutText(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "About Text")
|
||||
{
|
||||
text = "HDSPConf (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n\n"
|
||||
"This Program is free software; you can redistribute it and/or modify\n"
|
||||
"it under the terms of the GNU General Public License as published by\n"
|
||||
"the Free Software Foundation; either version 2 of the License, or\n"
|
||||
"(at your option) any later version.\n\n"
|
||||
"This program is distributed in the hope that it will be useful,\n"
|
||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
|
||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||
"See the GNU General Public License for more details.\n\n"
|
||||
"You should have received a copy of the GNU General Public License\n"
|
||||
"along with this program; if not, write to the Free Software\n"
|
||||
"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
|
||||
}
|
||||
|
||||
void HC_AboutText::draw()
|
||||
{
|
||||
fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA, 10);
|
||||
fl_draw(text, x(), y(), w(), h(), FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
39
hdspconf/src/HC_AboutText.h
Normal file
39
hdspconf/src/HC_AboutText.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_ABOUTTEXT_H
|
||||
#define HC_ABOUTTEXT_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
|
||||
class HC_AboutText:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_AboutText(int x, int y, int w, int h);
|
||||
void draw();
|
||||
private:
|
||||
char *text;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
88
hdspconf/src/HC_AutoSyncRef.cxx
Normal file
88
hdspconf/src/HC_AutoSyncRef.cxx
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_AutoSyncRef.h"
|
||||
|
||||
extern char *freqs[7];
|
||||
extern char *ref[6];
|
||||
|
||||
HC_AutoSyncRef::HC_AutoSyncRef(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "AutoSync Ref.")
|
||||
{
|
||||
external_freq = 2;
|
||||
external_ref = 3;
|
||||
draw_box = Fl::get_boxtype(FL_ENGRAVED_FRAME);
|
||||
label("AutoSync Ref.");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
void HC_AutoSyncRef::draw()
|
||||
{
|
||||
fl_color(FL_BACKGROUND_COLOR);
|
||||
fl_rectf(x(), y(), w(), h());
|
||||
draw_box(x(), y(), w(), h(), FL_WHITE);
|
||||
fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA, 10);
|
||||
fl_draw("Input", x()+4, y(), w()/2, h()/2, FL_ALIGN_LEFT);
|
||||
fl_draw(ref[external_ref], x()+w()/2-4, y(), w()/2, h()/2, FL_ALIGN_CENTER);
|
||||
fl_draw("Freq.", x()+4, y()+h()/2, w()/2, h()/2, FL_ALIGN_LEFT);
|
||||
fl_draw(freqs[external_freq], x()+w()/2-4, y()+h()/2, w()/2, h()/2, FL_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
void HC_AutoSyncRef::setFreq(int f)
|
||||
{
|
||||
int freq;
|
||||
switch (f) {
|
||||
case 32000:
|
||||
freq = 0;
|
||||
break;
|
||||
case 44100:
|
||||
freq = 1;
|
||||
break;
|
||||
case 48000:
|
||||
freq = 2;
|
||||
break;
|
||||
case 64000:
|
||||
freq = 3;
|
||||
break;
|
||||
case 88200:
|
||||
freq = 4;
|
||||
break;
|
||||
case 96000:
|
||||
freq = 5;
|
||||
break;
|
||||
default:
|
||||
freq = 6;
|
||||
}
|
||||
if (freq != external_freq) {
|
||||
external_freq = freq;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void HC_AutoSyncRef::setRef(unsigned char r)
|
||||
{
|
||||
if (r == external_ref) return;
|
||||
if (r > 6) external_ref = 6;
|
||||
else external_ref = r;
|
||||
redraw();
|
||||
}
|
||||
|
||||
45
hdspconf/src/HC_AutoSyncRef.h
Normal file
45
hdspconf/src/HC_AutoSyncRef.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_AUTOSYNCREF_H
|
||||
#define HC_AUTOSYNCREF_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_AutoSyncRef:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_AutoSyncRef(int x, int y, int w, int h);
|
||||
void draw();
|
||||
int external_freq, external_ref;
|
||||
void setFreq(int f);
|
||||
void setRef(unsigned char r);
|
||||
private:
|
||||
Fl_Box_Draw_F *draw_box;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
46
hdspconf/src/HC_CardPane.cxx
Normal file
46
hdspconf/src/HC_CardPane.cxx
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
HC_CardPane::HC_CardPane(int alsa_idx, int idx, int t):Fl_Group(PANE_X, PANE_Y, PANE_W, PANE_H)
|
||||
{
|
||||
alsa_index = alsa_idx;
|
||||
index = idx;
|
||||
type = t;
|
||||
snprintf(name, 7, "Card %d", index+1);
|
||||
label(name);
|
||||
labelsize(10);
|
||||
|
||||
sync_ref = new HC_PrefSyncRef(x()+6, y()+20, 112, 120);
|
||||
sync_check = new HC_SyncCheck(x()+6, y()+156, 112, 100);
|
||||
|
||||
spdif_in = new HC_SpdifIn(x()+124, y()+20, 112, 60);
|
||||
spdif_out = new HC_SpdifOut(x()+124, y()+96, 112, 80);
|
||||
spdif_freq = new HC_SpdifFreq(x()+124, y()+192, 112, 20);
|
||||
|
||||
clock_source = new HC_ClockSource(x()+242, y()+20, 112, 140);
|
||||
autosync_ref = new HC_AutoSyncRef(x()+242, y()+176, 112, 40);
|
||||
system_clock = new HC_SystemClock(x()+242, y()+232, 112, 40);
|
||||
|
||||
end();
|
||||
}
|
||||
|
||||
66
hdspconf/src/HC_CardPane.h
Normal file
66
hdspconf/src/HC_CardPane.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_CardPane_H
|
||||
#define HC_CardPane_H
|
||||
|
||||
#include <stdio.h>
|
||||
#include <FL/Fl_Group.H>
|
||||
#include "HC_SyncCheck.h"
|
||||
#include "HC_SpdifFreq.h"
|
||||
#include "HC_AutoSyncRef.h"
|
||||
#include "HC_SystemClock.h"
|
||||
#include "HC_ClockSource.h"
|
||||
#include "HC_SpdifIn.h"
|
||||
#include "HC_SpdifOut.h"
|
||||
#include "HC_PrefSyncRef.h"
|
||||
#include "defines.h"
|
||||
|
||||
class HC_SyncCheck;
|
||||
class HC_SpdifFreq;
|
||||
class HC_AutoSyncRef;
|
||||
class HC_SystemClock;
|
||||
class HC_ClockSource;
|
||||
class HC_SpdifIn;
|
||||
class HC_SpdifOut;
|
||||
class HC_PrefSyncRef;
|
||||
|
||||
class HC_CardPane:public Fl_Group
|
||||
{
|
||||
public:
|
||||
HC_CardPane(int alsa_idx, int idx, int t);
|
||||
HC_SyncCheck *sync_check;
|
||||
HC_SpdifFreq *spdif_freq;
|
||||
HC_AutoSyncRef *autosync_ref;
|
||||
HC_SystemClock *system_clock;
|
||||
HC_ClockSource *clock_source;
|
||||
HC_SpdifIn *spdif_in;
|
||||
HC_SpdifOut *spdif_out;
|
||||
HC_PrefSyncRef *sync_ref;
|
||||
int index;
|
||||
int alsa_index;
|
||||
int type;
|
||||
private:
|
||||
char name[7];
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
119
hdspconf/src/HC_ClockSource.cxx
Normal file
119
hdspconf/src/HC_ClockSource.cxx
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_ClockSource.h"
|
||||
|
||||
extern char *freqs[7];
|
||||
|
||||
void clock_source_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
int src, err;
|
||||
char card_name[6];
|
||||
snd_ctl_elem_value_t *ctl;
|
||||
snd_ctl_elem_id_t *id;
|
||||
snd_ctl_t *handle;
|
||||
HC_ClockSource *cs = (HC_ClockSource *)arg;
|
||||
HC_CardPane *pane = (HC_CardPane *)(cs->parent());
|
||||
Fl_Round_Button *source = (Fl_Round_Button *)w;
|
||||
if (source == cs->autosync) {
|
||||
src = 0;
|
||||
} else if (source == cs->khz32) {
|
||||
src = 1;
|
||||
} else if (source == cs->khz44_1) {
|
||||
src = 2;
|
||||
} else if (source == cs->khz48) {
|
||||
src = 3;
|
||||
} else if (source == cs->khz64) {
|
||||
src = 4;
|
||||
} else if (source == cs->khz88_2) {
|
||||
src = 5;
|
||||
} else if (source == cs->khz96) {
|
||||
src = 6;
|
||||
}
|
||||
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
|
||||
snd_ctl_elem_value_alloca(&ctl);
|
||||
snd_ctl_elem_id_alloca(&id);
|
||||
snd_ctl_elem_id_set_name(id, "Sample Clock Source");
|
||||
snd_ctl_elem_id_set_numid(id, 0);
|
||||
snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_PCM);
|
||||
snd_ctl_elem_id_set_device(id, 0);
|
||||
snd_ctl_elem_id_set_subdevice(id, 0);
|
||||
snd_ctl_elem_id_set_index(id, 0);
|
||||
snd_ctl_elem_value_set_id(ctl, id);
|
||||
snd_ctl_elem_value_set_enumerated(ctl, 0, src);
|
||||
if ((err = snd_ctl_open(&handle, card_name, SND_CTL_NONBLOCK)) < 0) {
|
||||
fprintf(stderr, "Error opening ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||
fprintf(stderr, "Error accessing ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
snd_ctl_close(handle);
|
||||
}
|
||||
|
||||
HC_ClockSource::HC_ClockSource(int x, int y, int w, int h):Fl_Group(x, y, w, h, "Sample Clock Source")
|
||||
{
|
||||
int i = 0;
|
||||
int v_step = (int)(h/7.0f);
|
||||
box(FL_ENGRAVED_FRAME);
|
||||
label("Sample Clock Source");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
autosync = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "AutoSync");
|
||||
autosync->callback(clock_source_cb, (void *)this);
|
||||
khz32 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, freqs[0]);
|
||||
khz32->callback(clock_source_cb, (void *)this);
|
||||
khz44_1 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, freqs[1]);
|
||||
khz44_1->callback(clock_source_cb, (void *)this);
|
||||
khz48 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, freqs[2]);
|
||||
khz48->callback(clock_source_cb, (void *)this);
|
||||
khz64 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, freqs[3]);
|
||||
khz64->callback(clock_source_cb, (void *)this);
|
||||
khz88_2 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, freqs[4]);
|
||||
khz88_2->callback(clock_source_cb, (void *)this);
|
||||
khz96 = new Fl_Round_Button(x+15, y+v_step*i, w-30, v_step, freqs[5]);
|
||||
khz96->callback(clock_source_cb, (void *)this);
|
||||
autosync->labelsize(10);
|
||||
autosync->type(FL_RADIO_BUTTON);
|
||||
khz32->labelsize(10);
|
||||
khz32->type(FL_RADIO_BUTTON);
|
||||
khz44_1->labelsize(10);
|
||||
khz44_1->type(FL_RADIO_BUTTON);
|
||||
khz48->labelsize(10);
|
||||
khz48->type(FL_RADIO_BUTTON);
|
||||
khz64->labelsize(10);
|
||||
khz64->type(FL_RADIO_BUTTON);
|
||||
khz88_2->labelsize(10);
|
||||
khz88_2->type(FL_RADIO_BUTTON);
|
||||
khz96->labelsize(10);
|
||||
khz96->type(FL_RADIO_BUTTON);
|
||||
end();
|
||||
}
|
||||
|
||||
void HC_ClockSource::setSource(unsigned char s)
|
||||
{
|
||||
if (s < children()) {
|
||||
if (((Fl_Round_Button *)child(s))->value() != 1)
|
||||
((Fl_Round_Button *)child(s))->setonly();
|
||||
}
|
||||
}
|
||||
|
||||
48
hdspconf/src/HC_ClockSource.h
Normal file
48
hdspconf/src/HC_ClockSource.h
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_CLOCKSOURCE_H
|
||||
#define HC_CLOCKSOURCE_H
|
||||
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_ClockSource:public Fl_Group
|
||||
{
|
||||
public:
|
||||
HC_ClockSource(int x, int y, int w, int h);
|
||||
int source;
|
||||
Fl_Round_Button *autosync;
|
||||
Fl_Round_Button *khz32;
|
||||
Fl_Round_Button *khz44_1;
|
||||
Fl_Round_Button *khz48;
|
||||
Fl_Round_Button *khz64;
|
||||
Fl_Round_Button *khz88_2;
|
||||
Fl_Round_Button *khz96;
|
||||
void setSource(unsigned char s);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
120
hdspconf/src/HC_PrefSyncRef.cxx
Normal file
120
hdspconf/src/HC_PrefSyncRef.cxx
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_PrefSyncRef.h"
|
||||
|
||||
void pref_sync_ref_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
int ref, err;
|
||||
char card_name[6];
|
||||
snd_ctl_elem_value_t *ctl;
|
||||
snd_ctl_elem_id_t *id;
|
||||
snd_ctl_t *handle;
|
||||
HC_PrefSyncRef *psr = (HC_PrefSyncRef *)arg;
|
||||
HC_CardPane *pane = (HC_CardPane *)(psr->parent());
|
||||
Fl_Round_Button *source = (Fl_Round_Button *)w;
|
||||
if (source == psr->word_clock) {
|
||||
ref = 0;
|
||||
} else if (source == psr->adat_sync) {
|
||||
ref = 1;
|
||||
} else if (source == psr->spdif) {
|
||||
ref = 2;
|
||||
} else if (source == psr->adat1) {
|
||||
ref = 3;
|
||||
} else if (source == psr->adat2) {
|
||||
ref = 4;
|
||||
} else if (source == psr->adat3) {
|
||||
ref = 5;
|
||||
}
|
||||
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
|
||||
snd_ctl_elem_value_alloca(&ctl);
|
||||
snd_ctl_elem_id_alloca(&id);
|
||||
snd_ctl_elem_id_set_name(id, "Preferred Sync Reference");
|
||||
snd_ctl_elem_id_set_numid(id, 0);
|
||||
snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_HWDEP);
|
||||
snd_ctl_elem_id_set_device(id, 0);
|
||||
snd_ctl_elem_id_set_subdevice(id, 0);
|
||||
snd_ctl_elem_id_set_index(id, 0);
|
||||
snd_ctl_elem_value_set_id(ctl, id);
|
||||
snd_ctl_elem_value_set_enumerated(ctl, 0, ref);
|
||||
if ((err = snd_ctl_open(&handle, card_name, SND_CTL_NONBLOCK)) < 0) {
|
||||
fprintf(stderr, "Error opening ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||
fprintf(stderr, "Error accessing ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
snd_ctl_close(handle);
|
||||
}
|
||||
|
||||
|
||||
HC_PrefSyncRef::HC_PrefSyncRef(int x, int y, int w, int h):Fl_Group(x, y, w, h, "Pref. Sync Ref")
|
||||
{
|
||||
int i = 0;
|
||||
int v_step;
|
||||
if (((HC_CardPane *)parent())->type == MULTIFACE) {
|
||||
v_step = (int)(h/4.0f);
|
||||
} else {
|
||||
v_step = (int)(h/6.0f);
|
||||
}
|
||||
source = 0;
|
||||
box(FL_ENGRAVED_FRAME);;
|
||||
label("Pref. Sync Ref");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
word_clock = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Word Clock");
|
||||
word_clock->callback(pref_sync_ref_cb, (void *)this);
|
||||
adat_sync = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT Sync");
|
||||
adat_sync->callback(pref_sync_ref_cb, (void *)this);
|
||||
spdif = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "SPDIF In");
|
||||
spdif->callback(pref_sync_ref_cb, (void *)this);
|
||||
adat1 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT1 In");
|
||||
adat1->callback(pref_sync_ref_cb, (void *)this);
|
||||
if (((HC_CardPane *)parent())->type != MULTIFACE) {
|
||||
adat2 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT2 In");
|
||||
adat2->labelsize(10);
|
||||
adat2->type(FL_RADIO_BUTTON);
|
||||
adat2->callback(pref_sync_ref_cb, (void *)this);
|
||||
adat3 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT3 In");
|
||||
adat3->labelsize(10);
|
||||
adat3->type(FL_RADIO_BUTTON);
|
||||
adat3->callback(pref_sync_ref_cb, (void *)this);
|
||||
}
|
||||
adat1->labelsize(10);
|
||||
adat1->type(FL_RADIO_BUTTON);
|
||||
spdif->labelsize(10);
|
||||
spdif->type(FL_RADIO_BUTTON);
|
||||
word_clock->labelsize(10);
|
||||
word_clock->type(FL_RADIO_BUTTON);
|
||||
adat_sync->labelsize(10);
|
||||
adat_sync->type(FL_RADIO_BUTTON);
|
||||
end();
|
||||
}
|
||||
|
||||
void HC_PrefSyncRef::setRef(int r)
|
||||
{
|
||||
if (r >= 0 && r < children()) {
|
||||
if (((Fl_Round_Button *)child(r))->value() != 1)
|
||||
((Fl_Round_Button *)child(r))->setonly();
|
||||
}
|
||||
}
|
||||
|
||||
47
hdspconf/src/HC_PrefSyncRef.h
Normal file
47
hdspconf/src/HC_PrefSyncRef.h
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_PREFSYNCREF_H
|
||||
#define HC_PREFSYNCREF_H
|
||||
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_PrefSyncRef:public Fl_Group
|
||||
{
|
||||
public:
|
||||
HC_PrefSyncRef(int x, int y, int w, int h);
|
||||
int source;
|
||||
Fl_Round_Button *adat1;
|
||||
Fl_Round_Button *adat2;
|
||||
Fl_Round_Button *adat3;
|
||||
Fl_Round_Button *spdif;
|
||||
Fl_Round_Button *word_clock;
|
||||
Fl_Round_Button *adat_sync;
|
||||
void setRef(int r);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
74
hdspconf/src/HC_SpdifFreq.cxx
Normal file
74
hdspconf/src/HC_SpdifFreq.cxx
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_SpdifFreq.h"
|
||||
|
||||
extern char *freqs[7];
|
||||
|
||||
HC_SpdifFreq::HC_SpdifFreq(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "SPDIF Freq.")
|
||||
{
|
||||
spdif_freq = 0;
|
||||
draw_box = Fl::get_boxtype(FL_ENGRAVED_FRAME);
|
||||
label("SPDIF Freq.");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
void HC_SpdifFreq::draw()
|
||||
{
|
||||
fl_color(FL_BACKGROUND_COLOR);
|
||||
fl_rectf(x(), y(), w(), h());
|
||||
draw_box(x(), y(), w(), h(), FL_WHITE);
|
||||
fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA, 10);
|
||||
fl_draw(freqs[spdif_freq], x(), y(), w(), h(), FL_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
void HC_SpdifFreq::setFreq(int f)
|
||||
{
|
||||
int freq;
|
||||
switch (f) {
|
||||
case 32000:
|
||||
freq = 0;
|
||||
break;
|
||||
case 44100:
|
||||
freq = 1;
|
||||
break;
|
||||
case 48000:
|
||||
freq = 2;
|
||||
break;
|
||||
case 64000:
|
||||
freq = 3;
|
||||
break;
|
||||
case 88200:
|
||||
freq = 4;
|
||||
break;
|
||||
case 96000:
|
||||
freq = 5;
|
||||
break;
|
||||
default:
|
||||
freq = 6;
|
||||
}
|
||||
if (freq != spdif_freq) {
|
||||
spdif_freq = freq;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
44
hdspconf/src/HC_SpdifFreq.h
Normal file
44
hdspconf/src/HC_SpdifFreq.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_SPDIFFREQ_H
|
||||
#define HC_SPDIFFREQ_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_SpdifFreq:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_SpdifFreq(int x, int y, int w, int h);
|
||||
void draw();
|
||||
int spdif_freq;
|
||||
void setFreq(int f);
|
||||
private:
|
||||
Fl_Box_Draw_F *draw_box;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
94
hdspconf/src/HC_SpdifIn.cxx
Normal file
94
hdspconf/src/HC_SpdifIn.cxx
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_SpdifIn.h"
|
||||
|
||||
void spdif_in_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
int in, err;
|
||||
char card_name[6];
|
||||
snd_ctl_elem_value_t *ctl;
|
||||
snd_ctl_elem_id_t *id;
|
||||
snd_ctl_t *handle;
|
||||
Fl_Round_Button *source = (Fl_Round_Button *)w;
|
||||
HC_SpdifIn *si = (HC_SpdifIn *)arg;
|
||||
HC_CardPane *pane = (HC_CardPane *)si->parent();
|
||||
if (source == si->adat1) {
|
||||
in = 0;
|
||||
} else if (source == si->coaxial) {
|
||||
in = 1;
|
||||
} else if (source == si->internal) {
|
||||
in = 2;
|
||||
}
|
||||
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
|
||||
snd_ctl_elem_value_alloca(&ctl);
|
||||
snd_ctl_elem_id_alloca(&id);
|
||||
snd_ctl_elem_id_set_name(id, "IEC958 Input Connector");
|
||||
snd_ctl_elem_id_set_numid(id, 0);
|
||||
snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_PCM);
|
||||
snd_ctl_elem_id_set_device(id, 0);
|
||||
snd_ctl_elem_id_set_subdevice(id, 0);
|
||||
snd_ctl_elem_id_set_index(id, 0);
|
||||
snd_ctl_elem_value_set_id(ctl, id);
|
||||
snd_ctl_elem_value_set_enumerated(ctl, 0, in);
|
||||
if ((err = snd_ctl_open(&handle, card_name, SND_CTL_NONBLOCK)) < 0) {
|
||||
fprintf(stderr, "Error opening ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||
fprintf(stderr, "Error accessing ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
snd_ctl_close(handle);
|
||||
}
|
||||
|
||||
HC_SpdifIn::HC_SpdifIn(int x, int y, int w, int h):Fl_Group(x, y, w, h, "SPDIF In")
|
||||
{
|
||||
int i = 0;
|
||||
int v_step = (int)(h/3.0f);
|
||||
source = 0;
|
||||
box(FL_ENGRAVED_FRAME);;
|
||||
label("SPDIF In");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
adat1 = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT1");
|
||||
coaxial = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Coaxial");
|
||||
internal = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Internal");
|
||||
adat1->labelsize(10);
|
||||
adat1->type(FL_RADIO_BUTTON);
|
||||
adat1->callback(spdif_in_cb, (void *)this);
|
||||
coaxial->labelsize(10);
|
||||
coaxial->type(FL_RADIO_BUTTON);
|
||||
coaxial->callback(spdif_in_cb, (void *)this);
|
||||
internal->labelsize(10);
|
||||
internal->type(FL_RADIO_BUTTON);
|
||||
internal->callback(spdif_in_cb, (void *)this);
|
||||
end();
|
||||
}
|
||||
|
||||
void HC_SpdifIn::setInput(unsigned char i)
|
||||
{
|
||||
if (i < children()) {
|
||||
if (((Fl_Round_Button *)child(i))->value() != 1)
|
||||
((Fl_Round_Button *)child(i))->setonly();
|
||||
}
|
||||
}
|
||||
|
||||
44
hdspconf/src/HC_SpdifIn.h
Normal file
44
hdspconf/src/HC_SpdifIn.h
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_SPDIFIN_H
|
||||
#define HC_SPDIFIN_H
|
||||
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Round_Button.H>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_SpdifIn:public Fl_Group
|
||||
{
|
||||
public:
|
||||
HC_SpdifIn(int x, int y, int w, int h);
|
||||
int source;
|
||||
Fl_Round_Button *adat1;
|
||||
Fl_Round_Button *coaxial;
|
||||
Fl_Round_Button *internal;
|
||||
void setInput(unsigned char i);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
140
hdspconf/src/HC_SpdifOut.cxx
Normal file
140
hdspconf/src/HC_SpdifOut.cxx
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_SpdifOut.h"
|
||||
|
||||
static void setSpdifBit(char *ctl_name, int val, int card_index)
|
||||
{
|
||||
int err;
|
||||
char card_name[6];
|
||||
snd_ctl_elem_value_t *ctl;
|
||||
snd_ctl_elem_id_t *id;
|
||||
snd_ctl_t *handle;
|
||||
snprintf(card_name, 6, "hw:%i", card_index);
|
||||
snd_ctl_elem_value_alloca(&ctl);
|
||||
snd_ctl_elem_id_alloca(&id);
|
||||
snd_ctl_elem_id_set_name(id, ctl_name);
|
||||
snd_ctl_elem_id_set_numid(id, 0);
|
||||
snd_ctl_elem_id_set_interface(id, SND_CTL_ELEM_IFACE_HWDEP);
|
||||
snd_ctl_elem_id_set_device(id, 0);
|
||||
snd_ctl_elem_id_set_subdevice(id, 0);
|
||||
snd_ctl_elem_id_set_index(id, 0);
|
||||
snd_ctl_elem_value_set_id(ctl, id);
|
||||
snd_ctl_elem_value_set_integer(ctl, 0, val);
|
||||
if ((err = snd_ctl_open(&handle, card_name, SND_CTL_NONBLOCK)) < 0) {
|
||||
fprintf(stderr, "Error opening ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
if ((err = snd_ctl_elem_write(handle, ctl)) < 0) {
|
||||
fprintf(stderr, "Error accessing ctl interface on card %s\n", card_name);
|
||||
return;
|
||||
}
|
||||
snd_ctl_close(handle);
|
||||
}
|
||||
|
||||
void spdif_on_adat_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
setSpdifBit("IEC958 Output also on ADAT1", ((Fl_Check_Button *)w)->value(), ((HC_CardPane *)arg)->alsa_index);
|
||||
}
|
||||
|
||||
void spdif_professional_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
setSpdifBit("IEC958 Professional Bit", ((Fl_Check_Button *)w)->value(), ((HC_CardPane *)arg)->alsa_index);
|
||||
}
|
||||
|
||||
void spdif_emphasis_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
setSpdifBit("IEC958 Emphasis Bit", ((Fl_Check_Button *)w)->value(), ((HC_CardPane *)arg)->alsa_index);
|
||||
}
|
||||
|
||||
void spdif_nonaudio_cb(Fl_Widget *w, void *arg)
|
||||
{
|
||||
setSpdifBit("IEC958 Non-audio Bit", ((Fl_Check_Button *)w)->value(), ((HC_CardPane *)arg)->alsa_index);
|
||||
}
|
||||
|
||||
HC_SpdifOut::HC_SpdifOut(int x, int y, int w, int h):Fl_Group(x, y, w, h, "SPDIF Out")
|
||||
{
|
||||
int i = 0;
|
||||
lock = 0;
|
||||
int v_step = (int)(h/4.0f);
|
||||
box(FL_ENGRAVED_FRAME);
|
||||
label("SPDIF Out");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
adat1 = new Fl_Check_Button(x+15, y+v_step*i++, w-30, v_step, "ADAT1");
|
||||
professional = new Fl_Check_Button(x+15, y+v_step*i++, w-30, v_step, "Professional");
|
||||
emphasis = new Fl_Check_Button(x+15, y+v_step*i++, w-30, v_step, "Emphasis");
|
||||
non_audio = new Fl_Check_Button(x+15, y+v_step*i++, w-30, v_step, "Non-Audio");
|
||||
adat1->labelsize(10);
|
||||
adat1->callback(spdif_on_adat_cb, (void *)parent());
|
||||
professional->labelsize(10);
|
||||
professional->callback(spdif_professional_cb, (void *)parent());
|
||||
emphasis->labelsize(10);
|
||||
emphasis->callback(spdif_emphasis_cb, (void *)parent());
|
||||
non_audio->labelsize(10);
|
||||
non_audio->callback(spdif_nonaudio_cb, (void *)parent());
|
||||
end();
|
||||
}
|
||||
|
||||
void HC_SpdifOut::setOut(unsigned char val)
|
||||
{
|
||||
if (val != adat1->value()) {
|
||||
adat1->value(val);
|
||||
}
|
||||
}
|
||||
|
||||
void HC_SpdifOut::setProfessional(unsigned char val)
|
||||
{
|
||||
|
||||
if (val != professional->value()) {
|
||||
professional->value(val);
|
||||
}
|
||||
}
|
||||
|
||||
void HC_SpdifOut::setEmphasis(unsigned char val)
|
||||
{
|
||||
if (val != emphasis->value()) {
|
||||
emphasis->value(val);
|
||||
}
|
||||
}
|
||||
|
||||
void HC_SpdifOut::setNonaudio(unsigned char val)
|
||||
{
|
||||
if (val != non_audio->value()) {
|
||||
non_audio->value(val);
|
||||
}
|
||||
}
|
||||
|
||||
int HC_SpdifOut::handle(int e)
|
||||
{
|
||||
switch (e) {
|
||||
case FL_PUSH:
|
||||
lock = 1;
|
||||
break;
|
||||
case FL_RELEASE:
|
||||
lock = 0;
|
||||
break;
|
||||
default:
|
||||
return Fl_Group::handle(e);
|
||||
}
|
||||
return Fl_Group::handle(e);
|
||||
}
|
||||
|
||||
50
hdspconf/src/HC_SpdifOut.h
Normal file
50
hdspconf/src/HC_SpdifOut.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_SPDIFOUT_H
|
||||
#define HC_SPDIFOUT_H
|
||||
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Check_Button.H>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_SpdifOut:public Fl_Group
|
||||
{
|
||||
public:
|
||||
HC_SpdifOut(int x, int y, int w, int h);
|
||||
int source;
|
||||
Fl_Check_Button *adat1;
|
||||
Fl_Check_Button *professional;
|
||||
Fl_Check_Button *emphasis;
|
||||
Fl_Check_Button *non_audio;
|
||||
void setOut(unsigned char val);
|
||||
void setProfessional(unsigned char val);
|
||||
void setEmphasis(unsigned char val);
|
||||
void setNonaudio(unsigned char val);
|
||||
int handle(int e);
|
||||
int lock;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
125
hdspconf/src/HC_SyncCheck.cxx
Normal file
125
hdspconf/src/HC_SyncCheck.cxx
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_SyncCheck.h"
|
||||
|
||||
extern char *lock_status[3];
|
||||
|
||||
HC_SyncCheck::HC_SyncCheck(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "SyncCheck")
|
||||
{
|
||||
adat1_lock_status = -1;
|
||||
adat2_lock_status = -1;
|
||||
adat3_lock_status = -1;
|
||||
wordclock_lock_status = -1;
|
||||
adatsync_lock_status = -1;
|
||||
spdif_lock_status = -1;
|
||||
if (((HC_CardPane *)parent())->type == MULTIFACE) {
|
||||
v_step = (int)(h/4.0f);
|
||||
} else {
|
||||
v_step = (int)(h/6.0f);
|
||||
}
|
||||
h_step = (int)(w/2.0f);
|
||||
draw_box = Fl::get_boxtype(FL_ENGRAVED_FRAME);
|
||||
label("SyncCheck");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
void HC_SyncCheck::draw()
|
||||
{
|
||||
int v_pos = v_step;
|
||||
int h_pos = 4;
|
||||
int i = 0;
|
||||
fl_color(FL_BACKGROUND_COLOR);
|
||||
fl_rectf(x(), y(), w(), h());
|
||||
draw_box(x(), y(), w(), h(), FL_WHITE);
|
||||
fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA, 10);
|
||||
fl_draw("ADAT1 In", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[adat1_lock_status], x()+h_pos+h_step, y()+v_pos*i++, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
if (((HC_CardPane *)parent())->type != MULTIFACE) {
|
||||
fl_draw("ADAT2 In", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[adat2_lock_status], x()+h_pos+h_step, y()+v_pos*i++, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
fl_draw("ADAT3 In", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[adat3_lock_status], x()+h_pos+h_step, y()+v_pos*i++, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
}
|
||||
fl_draw("SPDIF In", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[spdif_lock_status], x()+h_pos+h_step, y()+v_pos*i++, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
fl_draw("WordClock", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[wordclock_lock_status], x()+h_pos+h_step, y()+v_pos*i++, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
fl_draw("ADAT Sync", x()+h_pos, y()+v_pos*i, h_step, v_step, FL_ALIGN_LEFT);
|
||||
fl_draw(lock_status[adatsync_lock_status], x()+h_pos+h_step, y()+v_pos*i, h_step-h_pos, v_step, FL_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setSpdifStatus(unsigned char s)
|
||||
{
|
||||
if (s == spdif_lock_status) return;
|
||||
if (s > 2) spdif_lock_status = 2;
|
||||
else spdif_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setWCStatus(unsigned char s)
|
||||
{
|
||||
if (s == wordclock_lock_status) return;
|
||||
if (s > 2) wordclock_lock_status = 2;
|
||||
else wordclock_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setAdat1Status(unsigned char s)
|
||||
{
|
||||
if (s == adat1_lock_status) return;
|
||||
if (s > 2) adat1_lock_status = 2;
|
||||
else adat1_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setAdat2Status(unsigned char s)
|
||||
{
|
||||
if (s == adat2_lock_status) return;
|
||||
if (s > 2) adat2_lock_status = 2;
|
||||
else adat2_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setAdat3Status(unsigned char s)
|
||||
{
|
||||
if (s == adat3_lock_status) return;
|
||||
if (s > 2) adat3_lock_status = 2;
|
||||
else adat3_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
void HC_SyncCheck::setAdatSyncStatus(unsigned char s)
|
||||
{
|
||||
if (s == adatsync_lock_status) return;
|
||||
if (s > 2) adatsync_lock_status = 2;
|
||||
else adatsync_lock_status = s;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
|
||||
59
hdspconf/src/HC_SyncCheck.h
Normal file
59
hdspconf/src/HC_SyncCheck.h
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_SYNCCHECK_H
|
||||
#define HC_SYNCCHECK_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
#define NO_LOCK 0
|
||||
#define LOCK 1
|
||||
#define SYNC 2
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_SyncCheck:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_SyncCheck(int x, int y, int w, int h);
|
||||
void draw();
|
||||
int adat1_lock_status;
|
||||
int adat2_lock_status;
|
||||
int adat3_lock_status;
|
||||
int wordclock_lock_status;
|
||||
int adatsync_lock_status;
|
||||
int spdif_lock_status;
|
||||
void setSpdifStatus(unsigned char s);
|
||||
void setAdat1Status(unsigned char s);
|
||||
void setAdat2Status(unsigned char s);
|
||||
void setAdat3Status(unsigned char s);
|
||||
void setAdatSyncStatus(unsigned char s);
|
||||
void setWCStatus(unsigned char s);
|
||||
private:
|
||||
int v_step, h_step;
|
||||
Fl_Box_Draw_F *draw_box;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
87
hdspconf/src/HC_SystemClock.cxx
Normal file
87
hdspconf/src/HC_SystemClock.cxx
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_SystemClock.h"
|
||||
|
||||
extern char *freqs[7];
|
||||
|
||||
HC_SystemClock::HC_SystemClock(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "System Clock")
|
||||
{
|
||||
system_freq = 6;
|
||||
system_mode = 0;
|
||||
draw_box = Fl::get_boxtype(FL_ENGRAVED_FRAME);
|
||||
label("System Clock");
|
||||
labelsize(10);
|
||||
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
|
||||
}
|
||||
|
||||
void HC_SystemClock::draw()
|
||||
{
|
||||
fl_color(FL_BACKGROUND_COLOR);
|
||||
fl_rectf(x(), y(), w(), h());
|
||||
draw_box(x(), y(), w(), h(), FL_WHITE);
|
||||
fl_color(FL_BLACK);
|
||||
fl_font(FL_HELVETICA, 10);
|
||||
fl_draw("Mode", x()+4, y(), w()/2, h()/2, FL_ALIGN_LEFT);
|
||||
fl_draw(system_mode ? "Slave" : "Master", x()+w()/2-4, y(), w()/2, h()/2, FL_ALIGN_CENTER);
|
||||
fl_draw("Freq.", x()+4, y()+h()/2, w()/2, h()/2, FL_ALIGN_LEFT);
|
||||
fl_draw(freqs[system_freq], x()+w()/2-4, y()+h()/2, w()/2, h()/2, FL_ALIGN_CENTER);
|
||||
}
|
||||
|
||||
void HC_SystemClock::setMode(unsigned char m)
|
||||
{
|
||||
if (m != system_mode) {
|
||||
if (m) system_mode = 1;
|
||||
else system_mode = 0;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
|
||||
void HC_SystemClock::setFreq(int f)
|
||||
{
|
||||
int freq;
|
||||
switch(f) {
|
||||
case 32000:
|
||||
freq = 0;
|
||||
break;
|
||||
case 44100:
|
||||
freq = 1;
|
||||
break;
|
||||
case 48000:
|
||||
freq = 2;
|
||||
break;
|
||||
case 64000:
|
||||
freq = 3;
|
||||
break;
|
||||
case 88200:
|
||||
freq = 4;
|
||||
break;
|
||||
case 96000:
|
||||
freq = 5;
|
||||
break;
|
||||
default:
|
||||
freq = 6;
|
||||
}
|
||||
if (freq != system_freq) {
|
||||
system_freq = freq;
|
||||
redraw();
|
||||
}
|
||||
}
|
||||
46
hdspconf/src/HC_SystemClock.h
Normal file
46
hdspconf/src/HC_SystemClock.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_SYSTEMCLOCK_H
|
||||
#define HC_SYSTEMCLOCK_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
#include "HC_CardPane.h"
|
||||
|
||||
class HC_CardPane;
|
||||
|
||||
class HC_SystemClock:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_SystemClock(int x, int y, int w, int h);
|
||||
void draw();
|
||||
int system_freq;
|
||||
int system_mode;
|
||||
void setMode(unsigned char m);
|
||||
void setFreq(int f);
|
||||
private:
|
||||
Fl_Box_Draw_F *draw_box;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
33
hdspconf/src/HC_XpmRenderer.cxx
Normal file
33
hdspconf/src/HC_XpmRenderer.cxx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma implementation
|
||||
#include "HC_XpmRenderer.h"
|
||||
|
||||
HC_XpmRenderer::HC_XpmRenderer(int x, int y, int w, int h, char * const *xpm):Fl_Widget(x, y, w, h)
|
||||
{
|
||||
pixmap = xpm;
|
||||
}
|
||||
|
||||
void HC_XpmRenderer::draw()
|
||||
{
|
||||
fl_draw_pixmap(pixmap, x(), y());
|
||||
}
|
||||
|
||||
39
hdspconf/src/HC_XpmRenderer.h
Normal file
39
hdspconf/src/HC_XpmRenderer.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#pragma interface
|
||||
#ifndef HC_XPMRENDERER_H
|
||||
#define HC_XPMRENDERER_H
|
||||
|
||||
#include <FL/Fl_Widget.H>
|
||||
#include <FL/fl_draw.H>
|
||||
#include <FL/Fl.H>
|
||||
|
||||
class HC_XpmRenderer:public Fl_Widget
|
||||
{
|
||||
public:
|
||||
HC_XpmRenderer(int x, int y, int w, int h, char * const *xpm);
|
||||
void draw();
|
||||
private:
|
||||
char * const *pixmap;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
26
hdspconf/src/Makefile.am
Normal file
26
hdspconf/src/Makefile.am
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
bin_PROGRAMS = hdspconf
|
||||
hdspconf_SOURCES = \
|
||||
hdspconf.cxx \
|
||||
defines.h \
|
||||
HC_CardPane.cxx \
|
||||
HC_CardPane.h \
|
||||
HC_SyncCheck.cxx \
|
||||
HC_SyncCheck.h \
|
||||
HC_SpdifFreq.cxx \
|
||||
HC_SpdifFreq.h \
|
||||
HC_AutoSyncRef.cxx \
|
||||
HC_AutoSyncRef.h \
|
||||
HC_SystemClock.cxx \
|
||||
HC_SystemClock.h \
|
||||
HC_ClockSource.cxx \
|
||||
HC_ClockSource.h \
|
||||
HC_SpdifIn.cxx \
|
||||
HC_SpdifIn.h \
|
||||
HC_SpdifOut.cxx \
|
||||
HC_SpdifOut.h \
|
||||
HC_PrefSyncRef.cxx \
|
||||
HC_PrefSyncRef.h \
|
||||
HC_XpmRenderer.cxx \
|
||||
HC_XpmRenderer.h \
|
||||
HC_AboutText.cxx \
|
||||
HC_AboutText.h
|
||||
42
hdspconf/src/defines.h
Normal file
42
hdspconf/src/defines.h
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef DEFINES_H
|
||||
#define DEFINES_H
|
||||
|
||||
#define MULTIFACE 0
|
||||
#define DIGIFACE 1
|
||||
#define HDSP9652 2
|
||||
|
||||
#define WINDOW_WIDTH 380
|
||||
#define WINDOW_HEIGHT 330
|
||||
|
||||
#define TABS_X 10
|
||||
#define TABS_Y 10
|
||||
#define TABS_W 360
|
||||
#define TABS_H 310
|
||||
|
||||
#define PANE_X 10
|
||||
#define PANE_Y 30
|
||||
#define PANE_H 290
|
||||
#define PANE_W 360
|
||||
|
||||
#endif
|
||||
|
||||
200
hdspconf/src/hdspconf.cxx
Normal file
200
hdspconf/src/hdspconf.cxx
Normal file
|
|
@ -0,0 +1,200 @@
|
|||
/*
|
||||
* HDSPConf
|
||||
*
|
||||
* Copyright (C) 2003 Thomas Charbonnel (thomas@undata.org)
|
||||
*
|
||||
* 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 of the License, 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, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <alsa/asoundlib.h>
|
||||
#include <sound/hdsp.h>
|
||||
#include <FL/Fl.H>
|
||||
#include <FL/Fl_Window.H>
|
||||
#include <FL/Fl_Group.H>
|
||||
#include <FL/Fl_Tabs.H>
|
||||
#include "HC_CardPane.h"
|
||||
#include "HC_XpmRenderer.h"
|
||||
#include "HC_AboutText.h"
|
||||
#include "defines.h"
|
||||
|
||||
#include "../pixmaps/rme.xpm"
|
||||
#include "../pixmaps/alsalogo.xpm"
|
||||
#include "../pixmaps/lad_banner.xpm"
|
||||
|
||||
class HC_CardPane;
|
||||
class HC_XpmRenderer;
|
||||
class HC_AboutText;
|
||||
|
||||
char *freqs[7] = {
|
||||
"32.0 kHz",
|
||||
"44.1 kHz",
|
||||
"48.0 kHz",
|
||||
"64.0 kHz",
|
||||
"88.2 kHz",
|
||||
"96.0 kHz",
|
||||
"-----"
|
||||
};
|
||||
|
||||
char *ref[7] = {
|
||||
"Word Clock",
|
||||
"ADAT Sync",
|
||||
"SPDIF",
|
||||
"-----",
|
||||
"ADAT1",
|
||||
"ADAT2",
|
||||
"ADAT3"
|
||||
};
|
||||
|
||||
char *lock_status[3] = {
|
||||
"No Lock",
|
||||
"Lock",
|
||||
"Sync"
|
||||
};
|
||||
|
||||
static void refresh_cb(void *arg)
|
||||
{
|
||||
Fl_Tabs *tabs = (Fl_Tabs *)arg;
|
||||
int err;
|
||||
snd_hwdep_t *hw;
|
||||
char card_name[6];
|
||||
hdsp_config_info_t config_info;
|
||||
|
||||
for (int i = 0; i < tabs->children()-1 ; ++i) {
|
||||
HC_CardPane *pane = (HC_CardPane *)tabs->child(i);
|
||||
if (!pane->visible()) {
|
||||
break;
|
||||
}
|
||||
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
|
||||
|
||||
if ((err = snd_hwdep_open(&hw, card_name, SND_HWDEP_OPEN_READ)) != 0) {
|
||||
fprintf(stderr, "Error opening hwdep device on card %s.\n", card_name);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((err = snd_hwdep_ioctl(hw, SNDRV_HDSP_IOCTL_GET_CONFIG_INFO, (void *)&config_info)) < 0) {
|
||||
fprintf(stderr, "Hwdep ioctl error on card %s.\n", card_name);
|
||||
snd_hwdep_close(hw);
|
||||
break;
|
||||
}
|
||||
|
||||
snd_hwdep_close(hw);
|
||||
|
||||
pane->sync_ref->setRef(config_info.pref_sync_ref);
|
||||
pane->spdif_freq->setFreq(config_info.spdif_sample_rate);
|
||||
pane->sync_check->setAdat1Status(config_info.adat_sync_check[0]);
|
||||
pane->sync_check->setSpdifStatus(config_info.spdif_sync_check);
|
||||
pane->sync_check->setWCStatus(config_info.wordclock_sync_check);
|
||||
pane->sync_check->setAdatSyncStatus(config_info.adatsync_sync_check);
|
||||
if (pane->type != MULTIFACE) {
|
||||
pane->sync_check->setAdat2Status(config_info.adat_sync_check[1]);
|
||||
pane->sync_check->setAdat3Status(config_info.adat_sync_check[2]);
|
||||
}
|
||||
pane->spdif_in->setInput(config_info.spdif_in);
|
||||
if (pane->spdif_out->lock == 0) {
|
||||
pane->spdif_out->setOut(config_info.spdif_out);
|
||||
pane->spdif_out->setProfessional(config_info.spdif_professional);
|
||||
pane->spdif_out->setEmphasis(config_info.spdif_emphasis);
|
||||
pane->spdif_out->setNonaudio(config_info.spdif_nonaudio);
|
||||
}
|
||||
pane->clock_source->setSource(config_info.clock_source);
|
||||
pane->autosync_ref->setRef(config_info.autosync_ref);
|
||||
pane->autosync_ref->setFreq(config_info.autosync_sample_rate);
|
||||
pane->system_clock->setMode(config_info.system_clock_mode);
|
||||
pane->system_clock->setFreq(config_info.system_sample_rate);
|
||||
}
|
||||
|
||||
Fl::add_timeout(0.3, refresh_cb, arg);
|
||||
return;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
Fl_Window *window;
|
||||
Fl_Tabs *tabs;
|
||||
HC_CardPane *card_panes[4];
|
||||
HC_XpmRenderer *lad_banner;
|
||||
HC_XpmRenderer *alsa_logo;
|
||||
HC_XpmRenderer *rme_logo;
|
||||
HC_AboutText *about_text;
|
||||
Fl_Group *about_pane;
|
||||
char **name;
|
||||
int card;
|
||||
int hdsp_cards[4];
|
||||
int alsa_index[4];
|
||||
snd_ctl_t *handle;
|
||||
snd_ctl_card_info_t *info;
|
||||
snd_pcm_info_t *pcminfo;
|
||||
int cards = 0;
|
||||
|
||||
snd_ctl_card_info_alloca(&info);
|
||||
snd_pcm_info_alloca(&pcminfo);
|
||||
card = -1;
|
||||
printf("HDSPConf %s\n", VERSION);
|
||||
printf("Looking for HDSP cards :\n");
|
||||
while (snd_card_next(&card) >= 0 && cards < 4) {
|
||||
if (card < 0) {
|
||||
break;
|
||||
} else {
|
||||
snd_card_get_longname(card, name);
|
||||
printf("Card %d : %s\n", card, *name);
|
||||
if (!strncmp(*name, "RME Hammerfall DSP + Multiface", 30)) {
|
||||
printf("Multiface found !\n");
|
||||
hdsp_cards[cards] = MULTIFACE;
|
||||
alsa_index[cards] = card;
|
||||
cards++;
|
||||
} else if (!strncmp(*name, "RME Hammerfall DSP + Digiface", 29)) {
|
||||
printf("Digiface found !\n");
|
||||
hdsp_cards[cards] = DIGIFACE;
|
||||
alsa_index[cards] = card;
|
||||
cards++;
|
||||
} else if (!strncmp(*name, "RME HDSP 9652", 13)) {
|
||||
printf("HDSP 9652 found !\n");
|
||||
hdsp_cards[cards] = HDSP9652;
|
||||
alsa_index[cards] = card;
|
||||
cards++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!cards) {
|
||||
printf("No Hammerfall DSP card found.\n");
|
||||
exit(1);
|
||||
}
|
||||
printf("%d Hammerfall DSP %s found.\n", cards, (cards > 1) ? "cards" : "card");
|
||||
|
||||
window = new Fl_Window(WINDOW_WIDTH, WINDOW_HEIGHT, "Hammerfall DSP Alsa Settings");
|
||||
tabs = new Fl_Tabs(TABS_X, TABS_Y, TABS_W, TABS_H);
|
||||
window->end();
|
||||
for (int i = 0; i < cards; ++i) {
|
||||
card_panes[i] = new HC_CardPane(alsa_index[i], i, hdsp_cards[i]);
|
||||
tabs->add((Fl_Group *)card_panes[i]);
|
||||
}
|
||||
about_pane = new Fl_Group(10, 30, 360, 360, "About");
|
||||
about_pane->labelsize(10);
|
||||
about_text = new HC_AboutText(20, 40, 340, 210);
|
||||
rme_logo = new HC_XpmRenderer(20, 263, 113, 35, rme_xpm);
|
||||
alsa_logo = new HC_XpmRenderer(170, 255, 50, 50, alsalogo_xpm);
|
||||
lad_banner = new HC_XpmRenderer(245, 260, 113, 39, lad_banner_xpm);
|
||||
about_pane->end();
|
||||
tabs->add(about_pane);
|
||||
refresh_cb((void *)tabs);
|
||||
window->show(argc, argv);
|
||||
return Fl::run();
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue