Update of /cvsroot/alsa/alsa-tools/hdspconf/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8037/hdspconf/src
Modified Files:
HC_AboutText.cxx HC_AutoSyncRef.cxx HC_CardPane.cxx
HC_CardPane.h HC_ClockSource.cxx HC_ClockSource.h
HC_PrefSyncRef.cxx HC_PrefSyncRef.h HC_SpdifFreq.cxx
HC_SpdifIn.cxx HC_SpdifIn.h HC_SyncCheck.cxx HC_SyncCheck.h
HC_SystemClock.cxx HC_XpmRenderer.h Makefile.am defines.h
hdspconf.cxx
Added Files:
HC_Aeb.cxx HC_Aeb.h HC_BreakoutCable.cxx HC_BreakoutCable.h
HC_InputLevel.cxx HC_InputLevel.h HC_OutputLevel.cxx
HC_OutputLevel.h HC_Phones.cxx HC_Phones.h pixmaps.cxx
pixmaps.h
Log Message:
Thomas Charbonnel <[EMAIL PROTECTED]>:
updated to version 1.2.
--- NEW FILE: HC_Aeb.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_Aeb.h"
static void setAebStatus(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 adat_internal_cb(Fl_Widget *w, void *arg)
{
setAebStatus("Analog Extension Board", ((Fl_Check_Button *)w)->value(),
((HC_CardPane *)arg)->alsa_index);
}
HC_Aeb::HC_Aeb(int x, int y, int w, int h):Fl_Group(x, y, w, h, "AEB")
{
int i = 0;
lock = 0;
box(FL_ENGRAVED_FRAME);
label("AEB");
labelsize(10);
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
adat_internal = new Fl_Check_Button(x+15, y, w-30, 20, "Adat1 Int.");
adat_internal->labelsize(10);
adat_internal->callback(adat_internal_cb, (void *)parent());
end();
}
void HC_Aeb::setAdatInternal(unsigned char val)
{
if (val != adat_internal->value()) {
adat_internal->value(val);
}
}
int HC_Aeb::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);
}
--- NEW FILE: HC_Aeb.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_AEB_H
#define HC_AEB_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_Aeb:public Fl_Group
{
public:
HC_Aeb(int x, int y, int w, int h);
Fl_Check_Button *adat_internal;
void setAdatInternal(unsigned char val);
int handle(int e);
int lock;
};
#endif
--- NEW FILE: HC_BreakoutCable.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_BreakoutCable.h"
static void setXlrStatus(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 xlr_cb(Fl_Widget *w, void *arg)
{
setXlrStatus("XLR Breakout Cable", ((Fl_Check_Button *)w)->value(), ((HC_CardPane
*)arg)->alsa_index);
}
HC_BreakoutCable::HC_BreakoutCable(int x, int y, int w, int h):Fl_Group(x, y, w, h,
"Breakout Cable")
{
int i = 0;
lock = 0;
box(FL_ENGRAVED_FRAME);
label("Breakout Cable");
labelsize(10);
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
xlr = new Fl_Check_Button(x+15, y, w-30, 20, "XLR");
xlr->labelsize(10);
xlr->callback(xlr_cb, (void *)parent());
end();
}
void HC_BreakoutCable::setXlr(unsigned char val)
{
if (val != xlr->value()) {
xlr->value(val);
}
}
int HC_BreakoutCable::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);
}
--- NEW FILE: HC_BreakoutCable.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_BREAKOUTCABLE_H
#define HC_BREAKOUTCABLE_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_BreakoutCable:public Fl_Group
{
public:
HC_BreakoutCable(int x, int y, int w, int h);
Fl_Check_Button *xlr;
void setXlr(unsigned char val);
int handle(int e);
int lock;
};
#endif
--- NEW FILE: HC_InputLevel.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_InputLevel.h"
void input_level_cb(Fl_Widget *w, void *arg)
{
int gain, 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_InputLevel *il = (HC_InputLevel *)arg;
HC_CardPane *pane = (HC_CardPane *)il->parent();
if (source == il->lo_gain) {
gain = 2;
} else if (source == il->plus_four_dbu) {
gain = 1;
} else if (source == il->minus_ten_dbv) {
gain = 0;
}
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, "AD Gain");
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, gain);
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_InputLevel::HC_InputLevel(int x, int y, int w, int h):Fl_Group(x, y, w, h, "Input
Level")
{
int i = 0;
int v_step = (int)(h/3.0f);
box(FL_ENGRAVED_FRAME);;
label("Input Level");
labelsize(10);
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
lo_gain = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Lo Gain");
plus_four_dbu = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "+4
dBu");
minus_ten_dbv = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "-10
dBV");
lo_gain->labelsize(10);
lo_gain->type(FL_RADIO_BUTTON);
lo_gain->callback(input_level_cb, (void *)this);
plus_four_dbu->labelsize(10);
plus_four_dbu->type(FL_RADIO_BUTTON);
plus_four_dbu->callback(input_level_cb, (void *)this);
minus_ten_dbv->labelsize(10);
minus_ten_dbv->type(FL_RADIO_BUTTON);
minus_ten_dbv->callback(input_level_cb, (void *)this);
end();
}
void HC_InputLevel::setInputLevel(unsigned char i)
{
switch (i) {
case 0:
if (minus_ten_dbv->value() != 1)
minus_ten_dbv->setonly();
break;
case 1:
if (plus_four_dbu->value() != 1)
plus_four_dbu->setonly();
break;
case 2:
if (lo_gain->value() != 1)
lo_gain->setonly();
break;
}
}
--- NEW FILE: HC_InputLevel.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_INPUTLEVEL_H
#define HC_INPUTLEVEL_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_InputLevel:public Fl_Group
{
public:
HC_InputLevel(int x, int y, int w, int h);
int source;
Fl_Round_Button *lo_gain;
Fl_Round_Button *plus_four_dbu;
Fl_Round_Button *minus_ten_dbv;
void setInputLevel(unsigned char i);
};
#endif
--- NEW FILE: HC_OutputLevel.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_OutputLevel.h"
void output_level_cb(Fl_Widget *w, void *arg)
{
int gain, 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_OutputLevel *ol = (HC_OutputLevel *)arg;
HC_CardPane *pane = (HC_CardPane *)ol->parent();
if (source == ol->hi_gain) {
gain = 0;
} else if (source == ol->plus_four_dbu) {
gain = 1;
} else if (source == ol->minus_ten_dbv) {
gain = 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, "DA Gain");
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, gain);
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_OutputLevel::HC_OutputLevel(int x, int y, int w, int h):Fl_Group(x, y, w, h,
"Output Level")
{
int i = 0;
int v_step = (int)(h/3.0f);
box(FL_ENGRAVED_FRAME);;
label("Output Level");
labelsize(10);
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
hi_gain = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Hi Gain");
plus_four_dbu = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "+4
dBu");
minus_ten_dbv = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "-10
dBV");
hi_gain->labelsize(10);
hi_gain->type(FL_RADIO_BUTTON);
hi_gain->callback(output_level_cb, (void *)this);
plus_four_dbu->labelsize(10);
plus_four_dbu->type(FL_RADIO_BUTTON);
plus_four_dbu->callback(output_level_cb, (void *)this);
minus_ten_dbv->labelsize(10);
minus_ten_dbv->type(FL_RADIO_BUTTON);
minus_ten_dbv->callback(output_level_cb, (void *)this);
end();
}
void HC_OutputLevel::setOutputLevel(unsigned char i)
{
if (i < children()) {
if (((Fl_Round_Button *)child(i))->value() !=1)
((Fl_Round_Button *)child(i))->setonly();
}
}
--- NEW FILE: HC_OutputLevel.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_OUTPUTLEVEL_H
#define HC_OUTPUTLEVEL_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_OutputLevel:public Fl_Group
{
public:
HC_OutputLevel(int x, int y, int w, int h);
Fl_Round_Button *hi_gain;
Fl_Round_Button *plus_four_dbu;
Fl_Round_Button *minus_ten_dbv;
void setOutputLevel(unsigned char i);
};
#endif
--- NEW FILE: HC_Phones.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_Phones.h"
void phones_cb(Fl_Widget *w, void *arg)
{
int gain, 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_Phones *ph = (HC_Phones *)arg;
HC_CardPane *pane = (HC_CardPane *)ph->parent();
if (source == ph->zero_db) {
gain = 0;
} else if (source == ph->minus_six_db) {
gain = 1;
} else if (source == ph->minus_twelve_db) {
gain = 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, "Phones Gain");
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, gain);
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_Phones::HC_Phones(int x, int y, int w, int h):Fl_Group(x, y, w, h, "Phones")
{
int i = 0;
int v_step = (int)(h/3.0f);
box(FL_ENGRAVED_FRAME);;
label("Phones");
labelsize(10);
align(FL_ALIGN_TOP|FL_ALIGN_LEFT);
zero_db = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "Hi Gain");
minus_six_db = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "+4 dBu");
minus_twelve_db = new Fl_Round_Button(x+15, y+v_step*i++, w-30, v_step, "-10
dBV");
zero_db->labelsize(10);
zero_db->type(FL_RADIO_BUTTON);
zero_db->callback(phones_cb, (void *)this);
minus_six_db->labelsize(10);
minus_six_db->type(FL_RADIO_BUTTON);
minus_six_db->callback(phones_cb, (void *)this);
minus_twelve_db->labelsize(10);
minus_twelve_db->type(FL_RADIO_BUTTON);
minus_twelve_db->callback(phones_cb, (void *)this);
end();
}
void HC_Phones::setPhones(unsigned char i)
{
if (i < children()) {
if (((Fl_Round_Button *)child(i))->value() != 1)
((Fl_Round_Button *)child(i))->setonly();
}
}
--- NEW FILE: HC_Phones.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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_PHONES_H
#define HC_PHONES_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_Phones:public Fl_Group
{
public:
HC_Phones(int x, int y, int w, int h);
Fl_Round_Button *zero_db;
Fl_Round_Button *minus_six_db;
Fl_Round_Button *minus_twelve_db;
void setPhones(unsigned char i);
};
#endif
--- NEW FILE: pixmaps.cxx ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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 "pixmaps.h"
#include "../pixmaps/alsalogo.xpm"
#include "../pixmaps/lad_banner.xpm"
#include "../pixmaps/rme.xpm"
--- NEW FILE: pixmaps.h ---
/*
* HDSPConf
*
* Copyright (C) 2003 Thomas Charbonnel ([EMAIL PROTECTED])
*
* 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 pixmaps_H
#define pixmaps_H
extern char * rme_xpm[];
extern char * alsalogo_xpm[];
extern char * lad_banner_xpm[];
#endif
Index: HC_AboutText.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_AboutText.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_AboutText.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_AboutText.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -23,7 +23,7 @@
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"
+ text = "HDSPConf " VERSION " (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"
Index: HC_AutoSyncRef.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_AutoSyncRef.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_AutoSyncRef.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_AutoSyncRef.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,8 +21,8 @@
#pragma implementation
#include "HC_AutoSyncRef.h"
-extern char *freqs[7];
-extern char *ref[6];
+extern char *freqs[10];
+extern char *ref[7];
HC_AutoSyncRef::HC_AutoSyncRef(int x, int y, int w, int h):Fl_Widget(x, y, w, h,
"AutoSync Ref.")
{
@@ -69,6 +69,15 @@
case 96000:
freq = 5;
break;
+ case 128000:
+ freq = 7;
+ break;
+ case 176400:
+ freq = 8;
+ break;
+ case 192000:
+ freq = 9;
+ break;
default:
freq = 6;
}
@@ -81,7 +90,7 @@
void HC_AutoSyncRef::setRef(unsigned char r)
{
if (r == external_ref) return;
- if (r > 6) external_ref = 6;
+ if (r > 6) external_ref = 3;
else external_ref = r;
redraw();
}
Index: HC_CardPane.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_CardPane.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_CardPane.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_CardPane.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,26 +21,75 @@
#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)
+extern char *card_names[5];
+
+HC_CardPane::HC_CardPane(int alsa_idx, int idx, HDSP_IO_Type 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);
+ snprintf(name, 19, "Card %d (%s)", index+1, card_names[t]);
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);
+ if (type == Multiface) {
+ clock_source = new HC_ClockSource(x()+9, y()+20, 148, V_STEP*7);
+ sync_check = new HC_SyncCheck(x()+9, y()+40+V_STEP*7, 148, V_STEP*4);
+
+ spdif_in = new HC_SpdifIn(x()+166, y()+20, 148, V_STEP*3);
+ spdif_out = new HC_SpdifOut(x()+166, y()+40+V_STEP*3, 148, V_STEP*4);
+ spdif_freq = new HC_SpdifFreq(x()+166, y()+60+V_STEP*7, 148, V_STEP);
+
+ sync_ref = new HC_PrefSyncRef(x()+323, y()+20, 148, V_STEP*4);
+ autosync_ref = new HC_AutoSyncRef(x()+323, y()+40+V_STEP*4, 148, V_STEP*2);
+ system_clock = new HC_SystemClock(x()+323, y()+60+V_STEP*6, 148, V_STEP*2);
+
+ } else if (type == Digiface) {
+
+ clock_source = new HC_ClockSource(x()+9, y()+20, 148, V_STEP*7);
+ sync_check = new HC_SyncCheck(x()+9, y()+40+V_STEP*7, 148, V_STEP*6);
+
+ spdif_in = new HC_SpdifIn(x()+166, y()+20, 148, V_STEP*3);
+ spdif_out = new HC_SpdifOut(x()+166, y()+40+V_STEP*3, 148, V_STEP*4);
+ spdif_freq = new HC_SpdifFreq(x()+166, y()+60+V_STEP*7, 148, V_STEP);
+
+ sync_ref = new HC_PrefSyncRef(x()+323, y()+20, 148, V_STEP*6);
+ autosync_ref = new HC_AutoSyncRef(x()+323, y()+40+V_STEP*6, 148, V_STEP*2);
+ system_clock = new HC_SystemClock(x()+323, y()+60+V_STEP*8, 148, V_STEP*2);
+
+ } else if (type == H9652) {
+
+ clock_source = new HC_ClockSource(x()+9, y()+20, 148, V_STEP*7);
+ sync_check = new HC_SyncCheck(x()+9, y()+40+V_STEP*7, 148, V_STEP*6);
+
+ spdif_in = new HC_SpdifIn(x()+166, y()+20, 148, V_STEP*3);
+ spdif_out = new HC_SpdifOut(x()+166, y()+40+V_STEP*3, 148, V_STEP*4);
+ spdif_freq = new HC_SpdifFreq(x()+166, y()+60+V_STEP*7, 148, V_STEP);
+
+ aeb = new HC_Aeb(x()+323, y()+20, 148, V_STEP);
+ sync_ref = new HC_PrefSyncRef(x()+323, y()+40+V_STEP, 148, V_STEP*6);
+ autosync_ref = new HC_AutoSyncRef(x()+323, y()+60+V_STEP*7, 148, V_STEP*2);
+ system_clock = new HC_SystemClock(x()+323, y()+80+V_STEP*9, 148, V_STEP*2);
- 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);
+ } else if (type == H9632) {
+ clock_source = new HC_ClockSource(x()+8, y()+20, 110, V_STEP*10);
+ sync_check = new HC_SyncCheck(x()+8, y()+40+V_STEP*10, 110, V_STEP*3);
+ spdif_in = new HC_SpdifIn(x()+126, y()+20, 110, V_STEP*4);
+ spdif_out = new HC_SpdifOut(x()+126, y()+40+V_STEP*4, 110, V_STEP*4);
+ spdif_freq = new HC_SpdifFreq(x()+126, y()+60+V_STEP*8, 110, V_STEP);
+
+ aeb = new HC_Aeb(x()+244, y()+20, 110, V_STEP);
+ sync_ref = new HC_PrefSyncRef(x()+244, y()+40+V_STEP, 110, V_STEP*3);
+ autosync_ref = new HC_AutoSyncRef(x()+244, y()+60+V_STEP*4, 110, V_STEP*2);
+ system_clock = new HC_SystemClock(x()+244, y()+80+V_STEP*6, 110, V_STEP*2);
+
+ breakout_cable = new HC_BreakoutCable(x()+362, y()+20, 110, V_STEP);
+ input_level = new HC_InputLevel(x()+362, y()+40+V_STEP, 110, V_STEP*3);
+ output_level = new HC_OutputLevel(x()+362, y()+60+V_STEP*4, 110, V_STEP*3);
+ phones = new HC_Phones(x()+362, y()+80+V_STEP*7, 110, V_STEP*3);
+
+ }
end();
}
Index: HC_CardPane.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_CardPane.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_CardPane.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_CardPane.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -23,6 +23,7 @@
#define HC_CardPane_H
#include <stdio.h>
+#include <sound/hdsp.h>
#include <FL/Fl_Group.H>
#include "HC_SyncCheck.h"
#include "HC_SpdifFreq.h"
@@ -32,6 +33,11 @@
#include "HC_SpdifIn.h"
#include "HC_SpdifOut.h"
#include "HC_PrefSyncRef.h"
+#include "HC_Aeb.h"
+#include "HC_BreakoutCable.h"
+#include "HC_InputLevel.h"
+#include "HC_OutputLevel.h"
+#include "HC_Phones.h"
#include "defines.h"
class HC_SyncCheck;
@@ -42,11 +48,16 @@
class HC_SpdifIn;
class HC_SpdifOut;
class HC_PrefSyncRef;
+class HC_Aeb;
+class HC_BreakoutCable;
+class HC_InputLevel;
+class HC_OutputLevel;
+class HC_Phones;
class HC_CardPane:public Fl_Group
{
public:
- HC_CardPane(int alsa_idx, int idx, int t);
+ HC_CardPane(int alsa_idx, int idx, HDSP_IO_Type t);
HC_SyncCheck *sync_check;
HC_SpdifFreq *spdif_freq;
HC_AutoSyncRef *autosync_ref;
@@ -55,11 +66,16 @@
HC_SpdifIn *spdif_in;
HC_SpdifOut *spdif_out;
HC_PrefSyncRef *sync_ref;
+ HC_Aeb *aeb;
+ HC_BreakoutCable *breakout_cable;
+ HC_InputLevel *input_level;
+ HC_OutputLevel *output_level;
+ HC_Phones *phones;
int index;
int alsa_index;
- int type;
+ HDSP_IO_Type type;
private:
- char name[7];
+ char name[19];
};
#endif
Index: HC_ClockSource.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_ClockSource.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_ClockSource.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_ClockSource.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,7 +21,7 @@
#pragma implementation
#include "HC_ClockSource.h"
-extern char *freqs[7];
+extern char *freqs[10];
void clock_source_cb(Fl_Widget *w, void *arg)
{
@@ -47,7 +47,14 @@
src = 5;
} else if (source == cs->khz96) {
src = 6;
+ } else if (source == cs->khz128) {
+ src = 7;
+ } else if (source == cs->khz176_4) {
+ src = 8;
+ } else if (source == cs->khz192) {
+ src = 9;
}
+
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
snd_ctl_elem_value_alloca(&ctl);
snd_ctl_elem_id_alloca(&id);
@@ -73,25 +80,38 @@
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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, freqs[5]);
khz96->callback(clock_source_cb, (void *)this);
+ if (((HC_CardPane *)parent())->type == H9632) {
+ khz128 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, freqs[7]);
+ khz128->callback(clock_source_cb, (void *)this);
+ khz128->labelsize(10);
+ khz128->type(FL_RADIO_BUTTON);
+ khz176_4 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, freqs[8]);
+ khz176_4->callback(clock_source_cb, (void *)this);
+ khz176_4->labelsize(10);
+ khz176_4->type(FL_RADIO_BUTTON);
+ khz192 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, freqs[9]);
+ khz192->callback(clock_source_cb, (void *)this);
+ khz192->labelsize(10);
+ khz192->type(FL_RADIO_BUTTON);
+ }
autosync->labelsize(10);
autosync->type(FL_RADIO_BUTTON);
khz32->labelsize(10);
Index: HC_ClockSource.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_ClockSource.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_ClockSource.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_ClockSource.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -33,7 +33,6 @@
{
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;
@@ -41,6 +40,9 @@
Fl_Round_Button *khz64;
Fl_Round_Button *khz88_2;
Fl_Round_Button *khz96;
+ Fl_Round_Button *khz128;
+ Fl_Round_Button *khz176_4;
+ Fl_Round_Button *khz192;
void setSource(unsigned char s);
};
Index: HC_PrefSyncRef.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_PrefSyncRef.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_PrefSyncRef.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_PrefSyncRef.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -33,11 +33,11 @@
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;
+ ref = 1;
} else if (source == psr->adat1) {
+ ref = 2;
+ } else if (source == psr->adat_sync) {
ref = 3;
} else if (source == psr->adat2) {
ref = 4;
@@ -70,31 +70,33 @@
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);
+ if (((HC_CardPane *)parent())->type == Multiface || ((HC_CardPane
*)parent())->type == H9632) {
+ adat_name = "ADAT In";
} else {
- v_step = (int)(h/6.0f);
+ adat_name = "ADAT1 In";
}
- 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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");
+ if (((HC_CardPane *)parent())->type != H9632) {
+ adat_sync = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "ADAT
Sync");
+ adat_sync->callback(pref_sync_ref_cb, (void *)this);
+ adat_sync->labelsize(10);
+ adat_sync->type(FL_RADIO_BUTTON);
+ }
+ spdif = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, adat_name);
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");
+ if (((HC_CardPane *)parent())->type != Multiface && ((HC_CardPane
*)parent())->type != H9632) {
+ adat2 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, 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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "ADAT3 In");
adat3->labelsize(10);
adat3->type(FL_RADIO_BUTTON);
adat3->callback(pref_sync_ref_cb, (void *)this);
@@ -105,16 +107,39 @@
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();
+ switch (r) {
+ case 0:
+ if (word_clock->value() != 1)
+ word_clock->setonly();
+ break;
+ case 1:
+ if (spdif->value() != 1)
+ spdif->setonly();
+ break;
+ case 2:
+ if (adat1->value() != 1)
+ adat1->setonly();
+ break;
+ case 3:
+ if (((HC_CardPane *)parent())->type != H9632)
+ if (adat_sync->value() != 1)
+ adat_sync->setonly();
+ break;
+ case 4:
+ if (((HC_CardPane *)parent())->type == H9652 || ((HC_CardPane
*)parent())->type == Digiface)
+ if (adat2->value() != 1)
+ adat2->setonly();
+ break;
+ case 5:
+ if (((HC_CardPane *)parent())->type == H9652 || ((HC_CardPane
*)parent())->type == Digiface)
+ if (adat3->value() != 1)
+ adat3->setonly();
+ break;
}
}
Index: HC_PrefSyncRef.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_PrefSyncRef.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_PrefSyncRef.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_PrefSyncRef.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -41,6 +41,8 @@
Fl_Round_Button *word_clock;
Fl_Round_Button *adat_sync;
void setRef(int r);
+private:
+ char *adat_name;
};
#endif
Index: HC_SpdifFreq.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SpdifFreq.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SpdifFreq.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SpdifFreq.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,7 +21,7 @@
#pragma implementation
#include "HC_SpdifFreq.h"
-extern char *freqs[7];
+extern char *freqs[10];
HC_SpdifFreq::HC_SpdifFreq(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "SPDIF
Freq.")
{
@@ -63,6 +63,15 @@
break;
case 96000:
freq = 5;
+ break;
+ case 128000:
+ freq = 7;
+ break;
+ case 176400:
+ freq = 8;
+ break;
+ case 192000:
+ freq = 9;
break;
default:
freq = 6;
Index: HC_SpdifIn.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SpdifIn.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SpdifIn.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SpdifIn.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -37,6 +37,8 @@
in = 1;
} else if (source == si->internal) {
in = 2;
+ } else if (source == si->aes) {
+ in = 3;
}
snprintf(card_name, 6, "hw:%i", pane->alsa_index);
snd_ctl_elem_value_alloca(&ctl);
@@ -63,15 +65,19 @@
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 = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "Optical");
+ coaxial = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "Coaxial");
+ internal = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "Internal");
+ if (((HC_CardPane *)parent())->type == H9632) {
+ aes = new Fl_Round_Button(x+10, y+V_STEP*i++, w-20, V_STEP, "AES");
+ aes->labelsize(10);
+ aes->type(FL_RADIO_BUTTON);
+ aes->callback(spdif_in_cb, (void *)this);
+ }
adat1->labelsize(10);
adat1->type(FL_RADIO_BUTTON);
adat1->callback(spdif_in_cb, (void *)this);
Index: HC_SpdifIn.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SpdifIn.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SpdifIn.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SpdifIn.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -37,6 +37,7 @@
Fl_Round_Button *adat1;
Fl_Round_Button *coaxial;
Fl_Round_Button *internal;
+ Fl_Round_Button *aes;
void setInput(unsigned char i);
};
Index: HC_SyncCheck.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SyncCheck.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SyncCheck.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SyncCheck.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -31,10 +31,10 @@
wordclock_lock_status = -1;
adatsync_lock_status = -1;
spdif_lock_status = -1;
- if (((HC_CardPane *)parent())->type == MULTIFACE) {
- v_step = (int)(h/4.0f);
+ if (((HC_CardPane *)parent())->type == Multiface || ((HC_CardPane
*)parent())->type == H9632) {
+ adat_name = "ADAT In";
} else {
- v_step = (int)(h/6.0f);
+ adat_name = "ADAT1 In";
}
h_step = (int)(w/2.0f);
draw_box = Fl::get_boxtype(FL_ENGRAVED_FRAME);
@@ -45,7 +45,6 @@
void HC_SyncCheck::draw()
{
- int v_pos = v_step;
int h_pos = 4;
int i = 0;
fl_color(FL_BACKGROUND_COLOR);
@@ -53,20 +52,22 @@
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(adat_name, x()+h_pos, y()+V_STEP*i, h_step, V_STEP, FL_ALIGN_LEFT);
+ fl_draw(lock_status[adat1_lock_status], x()+h_pos+h_step, y()+V_STEP*i++,
h_step-h_pos, V_STEP, FL_ALIGN_CENTER);
+ if (((HC_CardPane *)parent())->type == Digiface || ((HC_CardPane
*)parent())->type == H9652) {
+ fl_draw("ADAT2 In", x()+h_pos, y()+V_STEP*i, h_step, V_STEP,
FL_ALIGN_LEFT);
+ fl_draw(lock_status[adat2_lock_status], x()+h_pos+h_step,
y()+V_STEP*i++, h_step-h_pos, V_STEP, FL_ALIGN_CENTER);
+ fl_draw("ADAT3 In", x()+h_pos, y()+V_STEP*i, h_step, V_STEP,
FL_ALIGN_LEFT);
+ fl_draw(lock_status[adat3_lock_status], x()+h_pos+h_step,
y()+V_STEP*i++, h_step-h_pos, V_STEP, FL_ALIGN_CENTER);
+ }
+ fl_draw("SPDIF In", x()+h_pos, y()+V_STEP*i, h_step, V_STEP, FL_ALIGN_LEFT);
+ fl_draw(lock_status[spdif_lock_status], x()+h_pos+h_step, y()+V_STEP*i++,
h_step-h_pos, V_STEP, FL_ALIGN_CENTER);
+ fl_draw("WordClock", x()+h_pos, y()+V_STEP*i, h_step, V_STEP, FL_ALIGN_LEFT);
+ fl_draw(lock_status[wordclock_lock_status], x()+h_pos+h_step, y()+V_STEP*i++,
h_step-h_pos, V_STEP, FL_ALIGN_CENTER);
+ if (((HC_CardPane *)parent())->type != H9632) {
+ fl_draw("ADAT Sync", x()+h_pos, y()+V_STEP*i, h_step, V_STEP,
FL_ALIGN_LEFT);
+ fl_draw(lock_status[adatsync_lock_status], x()+h_pos+h_step, y()+V_STEP*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)
Index: HC_SyncCheck.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SyncCheck.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SyncCheck.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SyncCheck.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -51,7 +51,8 @@
void setAdatSyncStatus(unsigned char s);
void setWCStatus(unsigned char s);
private:
- int v_step, h_step;
+ char *adat_name;
+ int h_step;
Fl_Box_Draw_F *draw_box;
};
Index: HC_SystemClock.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_SystemClock.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_SystemClock.cxx 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_SystemClock.cxx 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,7 +21,7 @@
#pragma implementation
#include "HC_SystemClock.h"
-extern char *freqs[7];
+extern char *freqs[10];
HC_SystemClock::HC_SystemClock(int x, int y, int w, int h):Fl_Widget(x, y, w, h,
"System Clock")
{
@@ -76,6 +76,15 @@
break;
case 96000:
freq = 5;
+ break;
+ case 128000:
+ freq = 7;
+ break;
+ case 176400:
+ freq = 8;
+ break;
+ case 192000:
+ freq = 9;
break;
default:
freq = 6;
Index: HC_XpmRenderer.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/HC_XpmRenderer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- HC_XpmRenderer.h 2 Jul 2003 10:21:11 -0000 1.1
+++ HC_XpmRenderer.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -25,6 +25,7 @@
#include <FL/Fl_Widget.H>
#include <FL/fl_draw.H>
#include <FL/Fl.H>
+#include "pixmaps.h"
class HC_XpmRenderer:public Fl_Widget
{
Index: Makefile.am
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/Makefile.am,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.am 2 Jul 2003 10:21:11 -0000 1.1
+++ Makefile.am 3 Nov 2003 19:09:32 -0000 1.2
@@ -20,7 +20,19 @@
HC_SpdifOut.h \
HC_PrefSyncRef.cxx \
HC_PrefSyncRef.h \
+ HC_Aeb.cxx \
+ HC_Aeb.h \
+ HC_BreakoutCable.cxx \
+ HC_BreakoutCable.h \
+ HC_InputLevel.cxx \
+ HC_InputLevel.h \
+ HC_OutputLevel.cxx \
+ HC_OutputLevel.h \
+ HC_Phones.cxx \
+ HC_Phones.h \
HC_XpmRenderer.cxx \
HC_XpmRenderer.h \
HC_AboutText.cxx \
- HC_AboutText.h
+ HC_AboutText.h \
+ pixmaps.cxx \
+ pixmaps.h
Index: defines.h
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/defines.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- defines.h 2 Jul 2003 10:21:11 -0000 1.1
+++ defines.h 3 Nov 2003 19:09:32 -0000 1.2
@@ -21,22 +21,20 @@
#ifndef DEFINES_H
#define DEFINES_H
-#define MULTIFACE 0
-#define DIGIFACE 1
-#define HDSP9652 2
-
-#define WINDOW_WIDTH 380
-#define WINDOW_HEIGHT 330
+#define WINDOW_WIDTH 500
+#define WINDOW_HEIGHT 400
#define TABS_X 10
#define TABS_Y 10
-#define TABS_W 360
-#define TABS_H 310
+#define TABS_W 480
+#define TABS_H 380
#define PANE_X 10
#define PANE_Y 30
-#define PANE_H 290
-#define PANE_W 360
+#define PANE_W 480
+#define PANE_H 360
+
+#define V_STEP 24
#endif
Index: hdspconf.cxx
===================================================================
RCS file: /cvsroot/alsa/alsa-tools/hdspconf/src/hdspconf.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- hdspconf.cxx 28 Jul 2003 12:58:10 -0000 1.2
+++ hdspconf.cxx 3 Nov 2003 19:09:32 -0000 1.3
@@ -31,25 +31,35 @@
#include <FL/Fl_Tabs.H>
#include "HC_CardPane.h"
#include "HC_XpmRenderer.h"
+#include "pixmaps.h"
#include "HC_AboutText.h"
#include "defines.h"
-#include "../pixmaps/rme.xpm"
-#include "../pixmaps/alsalogo.xpm"
-#include "../pixmaps/lad_banner.xpm"
+//#define GUI_TEST
class HC_CardPane;
class HC_XpmRenderer;
class HC_AboutText;
-char *freqs[7] = {
+char *card_names[5] = {
+ "Digiface",
+ "Multiface",
+ "HDSP9652",
+ "HDSP9632",
+ "Undefined",
+};
+
+char *freqs[10] = {
"32.0 kHz",
"44.1 kHz",
"48.0 kHz",
"64.0 kHz",
"88.2 kHz",
"96.0 kHz",
- "-----"
+ "-----",
+ "128.0 kHz",
+ "176.4 kHz",
+ "192.0 kHz",
};
char *ref[7] = {
@@ -101,8 +111,10 @@
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) {
+ if (pane->type != H9632) {
+ pane->sync_check->setAdatSyncStatus(config_info.adatsync_sync_check);
+ }
+ if (pane->type == Digiface || pane->type == H9652) {
pane->sync_check->setAdat2Status(config_info.adat_sync_check[1]);
pane->sync_check->setAdat3Status(config_info.adat_sync_check[2]);
}
@@ -118,6 +130,15 @@
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);
+ if (pane->type == H9632) {
+ pane->input_level->setInputLevel(config_info.ad_gain);
+ pane->output_level->setOutputLevel(config_info.da_gain);
+ pane->phones->setPhones(config_info.phone_gain);
+ pane->breakout_cable->setXlr(config_info.xlr_breakout_cable);
+ }
+ if (pane->type == H9632 || pane->type == H9652) {
+ pane->aeb->setAdatInternal(config_info.analog_extension_board);
+ }
}
Fl::add_timeout(0.3, refresh_cb, arg);
@@ -136,7 +157,7 @@
Fl_Group *about_pane;
char *name;
int card;
- int hdsp_cards[4];
+ HDSP_IO_Type hdsp_cards[4];
int alsa_index[4];
snd_ctl_t *handle;
snd_ctl_card_info_t *info;
@@ -146,8 +167,22 @@
snd_ctl_card_info_alloca(&info);
snd_pcm_info_alloca(&pcminfo);
card = -1;
- printf("HDSPConf %s\n", VERSION);
+ printf("\nHDSPConf %s - Copyright (C) 2003 Thomas Charbonnel <[EMAIL
PROTECTED]>\n", VERSION);
+ printf("This program comes WITH ABSOLUTELY NO WARRANTY\n");
+ printf("HDSPConf is free software, see the file copying for details\n\n");
printf("Looking for HDSP cards :\n");
+
+#ifdef GUI_TEST
+ hdsp_cards[0] = Digiface;
+ alsa_index[0] = 0;
+ hdsp_cards[1] = H9652;
+ alsa_index[1] = 1;
+ hdsp_cards[2] = Multiface;
+ alsa_index[2] = 2;
+ hdsp_cards[3] = H9632;
+ alsa_index[3] = 3;
+ cards = 4;
+#else
while (snd_card_next(&card) >= 0 && cards < 4) {
if (card < 0) {
break;
@@ -156,24 +191,30 @@
printf("Card %d : %s\n", card, name);
if (!strncmp(name, "RME Hammerfall DSP + Multiface", 30)) {
printf("Multiface found !\n");
- hdsp_cards[cards] = MULTIFACE;
+ 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;
+ hdsp_cards[cards] = Digiface;
alsa_index[cards] = card;
cards++;
} else if (!strncmp(name, "RME Hammerfall HDSP 9652", 24)) {
printf("HDSP 9652 found !\n");
- hdsp_cards[cards] = HDSP9652;
+ hdsp_cards[cards] = H9652;
alsa_index[cards] = card;
cards++;
+ } else if (!strncmp(name, "RME Hammerfall HDSP 9632", 24)) {
+ printf("HDSP 9632 found !\n");
+ hdsp_cards[cards] = H9632;
+ alsa_index[cards] = card;
+ cards++;
} else if (!strncmp(name, "RME Hammerfall DSP", 18)) {
- printf("Uninitialized HDSP card found. Use hdsploader to upload
firmware.\n");
+ printf("Uninitialized HDSP card found.\nUse hdsploader to upload
configuration data to the card.\n");
}
}
}
+#endif
if (!cards) {
printf("No Hammerfall DSP card found.\n");
exit(1);
@@ -187,15 +228,17 @@
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 = new Fl_Group(10, 30, 480, 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_text = new HC_AboutText(80, 70, 440, 210);
+ rme_logo = new HC_XpmRenderer(60, 328, 113, 35, rme_xpm);
+ alsa_logo = new HC_XpmRenderer(230, 320, 50, 50, alsalogo_xpm);
+ lad_banner = new HC_XpmRenderer(325, 325, 113, 39, lad_banner_xpm);
about_pane->end();
tabs->add(about_pane);
+#ifndef GUI_TEST
refresh_cb((void *)tabs);
+#endif
window->show(argc, argv);
return Fl::run();
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog