Update of /cvsroot/alsa/alsa-tools/hdspmixer/src In directory sc8-pr-cvs1:/tmp/cvs-serv8357/hdspmixer/src
Modified Files: HDSPMixerAbout.cxx HDSPMixerAbout.h HDSPMixerAboutText.cxx HDSPMixerCard.cxx HDSPMixerCard.h HDSPMixerIOMixer.cxx HDSPMixerIOMixer.h HDSPMixerInputs.cxx HDSPMixerInputs.h HDSPMixerMeter.cxx HDSPMixerOutput.cxx HDSPMixerOutput.h HDSPMixerOutputs.cxx HDSPMixerOutputs.h HDSPMixerPlaybacks.cxx HDSPMixerPlaybacks.h HDSPMixerPresets.cxx HDSPMixerSelector.cxx HDSPMixerSelector.h HDSPMixerWindow.cxx HDSPMixerWindow.h hdspmixer.cxx mappings.h pixmaps.cxx pixmaps.h Log Message: Thomas Charbonnel <[EMAIL PROTECTED]>: updated to version 1.4. Index: HDSPMixerAbout.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerAbout.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerAbout.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerAbout.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -25,8 +25,17 @@ HDSPMixerAbout::HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label) { basew = win; - text = new HDSPMixerAboutText(0,0,w,h); + text = new HDSPMixerAboutText(10,10,w-20,h-20); end(); set_modal(); } +int HDSPMixerAbout::handle(int e) { + switch (e) { + case FL_PUSH: + hide(); + return 1; + default: + return Fl_Window::handle(e); + } +} Index: HDSPMixerAbout.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerAbout.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerAbout.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerAbout.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -37,6 +37,7 @@ HDSPMixerWindow *basew; public: HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *w); + int handle(int e); }; #endif Index: HDSPMixerAboutText.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerAboutText.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerAboutText.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerAboutText.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -23,7 +23,7 @@ HDSPMixerAboutText::HDSPMixerAboutText(int x, int y, int w, int h):Fl_Widget(x, y, w, h, "About Text") { - text = "HDSPMixer (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n\n" + text = "HDSPMixer " VERSION " (C) 2003 Thomas Charbonnel <thomas@@undata.org>\n\n" "Bitmaps by Ralf Brunner\n" "Many thanks to Martin Björnsen, Matthias Carstens and Paul Davis\n\n" "This Program is free software; you can redistribute it and/or modify\n" Index: HDSPMixerCard.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerCard.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerCard.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerCard.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -57,12 +57,14 @@ clock_value = snd_ctl_elem_value_get_enumerated(elemval, 0); if (clock_value == 0) { int new_speed = card->getAutosyncSpeed(); - if (new_speed >= 0 && new_speed != card->double_speed) card->setMode(new_speed); + if (new_speed >= 0 && new_speed != card->speed_mode) card->setMode(new_speed); } - if (clock_value > 3 && !card->double_speed) { + if (clock_value > 3 && clock_value < 7 && card->speed_mode != 1) { card->setMode(1); - } else if (clock_value < 4 && card->double_speed) { + } else if (clock_value < 4 && card->speed_mode != 0) { card->setMode(0); + } else if (clock_value > 6 && card->speed_mode != 2) { + card->setMode(2); } } snd_ctl_event_clear(event); @@ -103,7 +105,9 @@ if (external_rate > 2 && external_rate < 6) { return 1; - } else if (external_rate < 2) { + } else if (external_rate > 6) { + return 2; + } else if (external_rate <= 2) { return 0; } } @@ -143,9 +147,13 @@ case 4: case 5: case 6: - /* SR > 48000 kHz - double speed */ + /* SR > 48000 Hz - double speed */ return 1; - break; + case 7: + case 8: + case 9: + /* SR > 96000 Hz - quad speed */ + return 2; default: /* Should never happen */ return 0; @@ -158,8 +166,11 @@ type = cardtype; card_id = id; snprintf(name, 6, "hw:%i", card_id); - double_speed = getSpeed(); - if (double_speed < 0) { + h9632_aeb.aebi = 0; + h9632_aeb.aebo = 0; + if (type == H9632) getAeb(); + speed_mode = getSpeed(); + if (speed_mode < 0) { fprintf(stderr, "Error trying to determine speed mode for card %s, exiting.\n", name); exit(EXIT_FAILURE); } @@ -170,53 +181,117 @@ basew = NULL; } +void HDSPMixerCard::getAeb() { + int err, i; + snd_hwdep_t *hw; + snd_hwdep_info_t *info; + snd_hwdep_info_alloca(&info); + if ((err = snd_hwdep_open(&hw, name, SND_HWDEP_OPEN_DUPLEX)) != 0) { + fprintf(stderr, "Error opening hwdep device on card %s.\n", name); + return; + } + if ((err = snd_hwdep_ioctl(hw, SNDRV_HDSP_IOCTL_GET_9632_AEB, &h9632_aeb)) < 0) { + fprintf(stderr, "Hwdep ioctl error on card %s : %s.\n", name, snd_strerror(err)); + snd_hwdep_close(hw); + return; + } +} void HDSPMixerCard::adjustSettings() { - if (type == Multiface && !double_speed) { - channels = 18; - channel_map = channel_map_mf_ss; - dest_map = dest_map_mf_ss; - meter_map = channel_map_mf_ss; - lineouts = 2; - } else if (type == Multiface && double_speed) { - channels = 14; - /* FIXME : this is a workaround because the driver is wrong */ - channel_map = meter_map_ds; - dest_map = dest_map_ds; - meter_map = meter_map_ds; - lineouts = 2; - } else if (type == Digiface && !double_speed) { - channels = 26; - channel_map = channel_map_df_ss; - dest_map = dest_map_df_ss; - meter_map = channel_map_df_ss; - lineouts = 2; - } else if (type == Digiface && double_speed) { - channels = 14; - channel_map = channel_map_ds; - dest_map = dest_map_ds; - meter_map = meter_map_ds; - lineouts = 2; - } else if (type == H9652 && !double_speed) { - channels = 26; - channel_map = channel_map_df_ss; - dest_map = dest_map_h9652_ss; - meter_map = channel_map_df_ss; - lineouts = 0; - } else if (type == H9652 && double_speed) { - channels = 14; - channel_map = channel_map_ds; - dest_map = dest_map_h9652_ds; - meter_map = meter_map_ds; - lineouts = 0; - } + if (type == Multiface) { + switch (speed_mode) { + case 0: + channels = 18; + channel_map = channel_map_mf_ss; + dest_map = dest_map_mf_ss; + meter_map = channel_map_mf_ss; + lineouts = 2; + break; + case 1: + channels = 14; + channel_map = meter_map_ds; + dest_map = dest_map_ds; + meter_map = meter_map_ds; + lineouts = 2; + break; + case 2: + /* should never happen */ + break; + } + } else if (type == Digiface) { + switch (speed_mode) { + case 0: + channels = 26; + channel_map = channel_map_df_ss; + dest_map = dest_map_df_ss; + meter_map = channel_map_df_ss; + lineouts = 2; + break; + case 1: + channels = 14; + channel_map = channel_map_ds; + dest_map = dest_map_ds; + meter_map = meter_map_ds; + lineouts = 2; + break; + case 2: + /* should never happen */ + break; + } + } else if (type == H9652) { + switch (speed_mode) { + case 0: + channels = 26; + channel_map = channel_map_df_ss; + dest_map = dest_map_h9652_ss; + meter_map = channel_map_df_ss; + lineouts = 0; + break; + case 1: + channels = 14; + channel_map = channel_map_ds; + dest_map = dest_map_h9652_ds; + meter_map = meter_map_ds; + lineouts = 0; + break; + case 2: + break; + } + } else if (type == H9632) { + /* FIXME : mapping values are my first guess here + this needs to be tested + */ + switch (speed_mode) { + case 0: + channels = 12 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0; + channel_map = channel_map_h9632_ss; + dest_map = dest_map_h9632_ss; + meter_map = channel_map_h9632_ss; + lineouts = 0; + break; + case 1: + channels = 8 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0; + channel_map = channel_map_h9632_ds; + dest_map = dest_map_h9632_ds; + meter_map = meter_map_h9632_ds; + lineouts = 0; + break; + case 2: + channels = 4 + (h9632_aeb.aebi || h9632_aeb.aebo) ? 4 : 0; + channel_map = channel_map_h9632_qs; + dest_map = dest_map_h9632_qs; + meter_map = dest_map_h9632_qs; + lineouts = 0; + break; + } + } window_width = (channels+2)*STRIP_WIDTH; window_height = FULLSTRIP_HEIGHT*2+SMALLSTRIP_HEIGHT+MENU_HEIGHT; } void HDSPMixerCard::setMode(int mode) { - double_speed = mode; + speed_mode = mode; adjustSettings(); actualizeStrips(); @@ -228,7 +303,15 @@ for (int i = channels; i < channels+lineouts; ++i) { basew->outputs->strips[i]->setLabels(); } - + if (h9632_aeb.aebo && !h9632_aeb.aebi) { + basew->inputs->empty_aebi[0]->position(STRIP_WIDTH*(channels-4), basew->inputs->empty_aebi[0]->y()); + basew->inputs->empty_aebi[1]->position(STRIP_WIDTH*(channels-2), basew->inputs->empty_aebi[1]->y()); + } else if (h9632_aeb.aebi && !h9632_aeb.aebo) { + basew->playbacks->empty_aebo[0]->position(STRIP_WIDTH*(channels-4), basew->playbacks->empty_aebo[0]->y()); + basew->playbacks->empty_aebo[1]->position(STRIP_WIDTH*(channels-2), basew->playbacks->empty_aebo[1]->y()); + basew->outputs->empty_aebo[0]->position(STRIP_WIDTH*(channels-4), basew->outputs->empty_aebo[0]->y()); + basew->outputs->empty_aebo[1]->position(STRIP_WIDTH*(channels-2), basew->outputs->empty_aebo[1]->y()); + } basew->inputs->buttons->position(STRIP_WIDTH*channels, basew->inputs->buttons->y()); basew->inputs->init_sizes(); basew->playbacks->empty->position(STRIP_WIDTH*channels, basew->playbacks->empty->y()); @@ -260,10 +343,33 @@ basew->outputs->strips[i]->hide(); } } - for (int i = channels; i < channels+lineouts; ++i) { - basew->outputs->strips[i]->show(); + for (int i = channels; i < channels+2; ++i) { + if (i < channels+lineouts) { + basew->outputs->strips[i]->show(); + } else { + basew->outputs->strips[i]->hide(); + } + } + if (h9632_aeb.aebi && !h9632_aeb.aebo) { + for (int i = 0; i < 2; ++i) { + basew->inputs->empty_aebi[i]->hide(); + basew->playbacks->empty_aebo[i]->show(); + basew->outputs->empty_aebo[i]->show(); + } + } else if (h9632_aeb.aebo && !h9632_aeb.aebi) { + for (int i = 0; i < 2; ++i) { + basew->inputs->empty_aebi[i]->show(); + basew->playbacks->empty_aebo[i]->hide(); + basew->outputs->empty_aebo[i]->hide(); + } + } else { + for (int i = 0; i < 2; ++i) { + basew->inputs->empty_aebi[i]->hide(); + basew->playbacks->empty_aebo[i]->hide(); + basew->outputs->empty_aebo[i]->hide(); + } } - if (type != H9652) basew->outputs->empty->hide(); + if (type != H9652 && type != H9632) basew->outputs->empty->hide(); } int HDSPMixerCard::initializeCard(HDSPMixerWindow *w) Index: HDSPMixerCard.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerCard.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerCard.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerCard.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -46,13 +46,15 @@ char *channel_map; char *dest_map; char *meter_map; - int double_speed; + int speed_mode; void setMode(int mode); int initializeCard(HDSPMixerWindow *w); int getSpeed(); int getAutosyncSpeed(); void actualizeStrips(); void adjustSettings(); + void getAeb(); + hdsp_9632_aeb_t h9632_aeb; }; #endif Index: HDSPMixerIOMixer.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerIOMixer.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerIOMixer.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerIOMixer.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -32,13 +32,16 @@ channel_num = ch; if (channel_num%2) { relative_num = channel_num+1; + p_iomixer_xpm = iomixer_xpm; } else { relative_num = channel_num-1; + p_iomixer_xpm = iomixer_r_xpm; } for (int j = 0; j < 3; ++j) { for (int i = 0; i < 8; ++i) { data[j][0][i] = new HDSPMixerStripData(); data[j][1][i] = new HDSPMixerStripData(); + data[j][2][i] = new HDSPMixerStripData(); } } mutesolo = new HDSPMixerMuteSolo(x+3, y+3, 0, 0, channel_num, type); @@ -59,7 +62,7 @@ void HDSPMixerIOMixer::draw_background(int xpos, int ypos, int w, int h) { fl_push_clip(xpos, ypos, w, h); - fl_draw_pixmap(iomixer_xpm, x(), y()); + fl_draw_pixmap(p_iomixer_xpm, x(), y()); fl_pop_clip(); } Index: HDSPMixerIOMixer.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerIOMixer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerIOMixer.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerIOMixer.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -50,11 +50,12 @@ class HDSPMixerIOMixer:public Fl_Group { private: + char **p_iomixer_xpm; int channel_num, relative_num, mixer_type; char channel_name[6]; void update_child(Fl_Widget &widget); public: - HDSPMixerStripData *data[3][2][8]; /* data[card][mode(ds/ss)][preset number] */ + HDSPMixerStripData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */ HDSPMixerPan *pan; HDSPMixerFader *fader; HDSPMixerPeak *peak; Index: HDSPMixerInputs.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerInputs.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerInputs.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerInputs.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -39,6 +39,8 @@ strips[i]->gain->relative = strips[i+1]->gain; strips[i+1]->gain->relative = strips[i]->gain; } + empty_aebi[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, STRIP_WIDTH*2, FULLSTRIP_HEIGHT, 0); + empty_aebi[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, STRIP_WIDTH*2, FULLSTRIP_HEIGHT, 0); buttons = new HDSPMixerButtons(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT); end(); resizable(NULL); Index: HDSPMixerInputs.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerInputs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerInputs.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerInputs.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -25,9 +25,11 @@ #include <FL/Fl_Group.H> #include "HDSPMixerIOMixer.h" #include "HDSPMixerButtons.h" +#include "HDSPMixerEmpty.h" class HDSPMixerButtons; class HDSPMixerIOMixer; +class HDSPMixerEmpty; class HDSPMixerInputs:public Fl_Group { @@ -35,6 +37,7 @@ HDSPMixerButtons *buttons; HDSPMixerIOMixer *strips[26]; HDSPMixerInputs(int x, int y, int w, int h, int nchannels); + HDSPMixerEmpty *empty_aebi[2]; }; #endif Index: HDSPMixerMeter.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerMeter.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerMeter.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerMeter.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -32,6 +32,9 @@ fast_peak_level = 1000.0; slow_peak_level = 1000.0; max_level = 1000.0; + /* this is no more as simple : + H9652 cards do have both peak and rms data for outputs + */ peak_rms = not_output; } @@ -58,7 +61,7 @@ } rms_height = new_rms_height; - if ((new_peak_height != peak_height || !fine_draw) && peak_rms) { + if ((new_peak_height != peak_height || !fine_draw) && (peak_rms || basew->cards[basew->current_card]->type == H9652)) { if ((rms_height <= (peak_height - PEAK_HEIGHT)) || rms_height == 0) { fl_push_clip(x(), y()+(METER_HEIGHT - peak_height), w(), PEAK_HEIGHT+1); if (peak_rms) { @@ -162,7 +165,7 @@ fr /= ((double)(1125899638407184.0)*(double)(8191.0)); fr = sqrt(fr); - if (!peak_rms) { + if (!peak_rms && (basew->cards[basew->current_card]->type != H9652)) { new_rms_height = new_peak_height; } else { fr = -20 * log10(fr); @@ -175,7 +178,7 @@ } - if (new_rms_height != rms_height || (new_peak_height != peak_height && peak_rms)) { + if (new_rms_height != rms_height || (new_peak_height != peak_height && (peak_rms || basew->cards[basew->current_card]->type == H9652))) { /* FIXME: may not be SMP safe */ redraw(); } Index: HDSPMixerOutput.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerOutput.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerOutput.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerOutput.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -28,8 +28,14 @@ for (int i = 0; i < 8; ++i) { data[j][0][i] = new HDSPMixerOutputData(); data[j][1][i] = new HDSPMixerOutputData(); + data[j][2][i] = new HDSPMixerOutputData(); } } + if (num%2) { + p_output_xpm = output_r_xpm; + } else { + p_output_xpm = output_xpm; + } basew = (HDSPMixerWindow *)window(); setLabels(); out_num = num; @@ -43,15 +49,29 @@ void HDSPMixerOutput::setLabels() { HDSP_IO_Type type = basew->cards[basew->current_card]->type; - int ds = basew->cards[basew->current_card]->double_speed; - if (type == Multiface && !ds) { - labels = labels_mf_ss; - } else if (type == Multiface && ds) { - labels = labels_mf_ds; - } else if (!ds) { - labels = labels_df_ss; - } else if (ds) { - labels = labels_df_ds; + int sm = basew->cards[basew->current_card]->speed_mode; + if (type == H9632) { + switch (sm) { + case 0: + labels = labels_9632_ss; + break; + case 1: + labels = labels_9632_ds; + break; + case 2: + labels = labels_9632_qs; + break; + } + } else if (type == Multiface) { + if (sm) + labels = labels_mf_ds; + else + labels = labels_mf_ss; + } else { + if (sm) + labels = labels_df_ds; + else + labels = labels_df_ss; } } @@ -63,7 +83,7 @@ void HDSPMixerOutput::draw_background(int xpos, int ypos, int w, int h) { fl_push_clip(xpos, ypos, w, h); - fl_draw_pixmap(output_xpm, x(), y()); + fl_draw_pixmap(p_output_xpm, x(), y()); fl_pop_clip(); } Index: HDSPMixerOutput.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerOutput.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerOutput.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerOutput.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -67,16 +67,31 @@ "SP.L", "SP.R", "AN.L", "AN.R" }; +static char *labels_9632_ss[16] = { + "A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8", + "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" +}; + +static char *labels_9632_ds[12] = { + "A 1", "A 2", "A 3", "A 4", + "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" +}; + +static char *labels_9632_qs[8] = { + "SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6" +}; + class HDSPMixerOutput:public Fl_Group { private: int out_num; char **labels; + char **p_output_xpm; HDSPMixerPeak *peak; HDSPMixerWindow *basew; void update_child(Fl_Widget& widget); public: - HDSPMixerOutputData *data[3][2][8]; /* data[card][mode(ds/ss)][preset number] */ + HDSPMixerOutputData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */ HDSPMixerFader *fader; HDSPMixerGain *gain; HDSPMixerMeter *meter; Index: HDSPMixerOutputs.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerOutputs.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerOutputs.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerOutputs.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -32,7 +32,10 @@ strips[i+1]->fader->relative = strips[i]->fader; strips[i]->fader->gain = strips[i]->gain; strips[i+1]->fader->gain = strips[i+1]->gain; + } + empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0); + empty_aebo[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0); empty = new HDSPMixerEmpty(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, SMALLSTRIP_HEIGHT, 0); end(); resizable(NULL); Index: HDSPMixerOutputs.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerOutputs.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerOutputs.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerOutputs.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -33,6 +33,7 @@ class HDSPMixerOutputs:public Fl_Group { public: + HDSPMixerEmpty *empty_aebo[2]; HDSPMixerEmpty *empty; HDSPMixerOutput *strips[28]; HDSPMixerOutputs(int x, int y, int w, int h, int nchannels); Index: HDSPMixerPlaybacks.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerPlaybacks.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerPlaybacks.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerPlaybacks.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -39,6 +39,8 @@ strips[i]->gain->relative = strips[i+1]->gain; strips[i+1]->gain->relative = strips[i]->gain; } + empty_aebo[0] = new HDSPMixerEmpty((nchans-6)*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 0); + empty_aebo[1] = new HDSPMixerEmpty((nchans-4)*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 0); empty = new HDSPMixerEmpty(nchans*STRIP_WIDTH, y, 2*STRIP_WIDTH, FULLSTRIP_HEIGHT, 1); end(); resizable(NULL); Index: HDSPMixerPlaybacks.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerPlaybacks.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerPlaybacks.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerPlaybacks.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -32,6 +32,7 @@ class HDSPMixerPlaybacks:public Fl_Group { public: + HDSPMixerEmpty *empty_aebo[2]; HDSPMixerEmpty *empty; HDSPMixerIOMixer *strips[26]; HDSPMixerPlaybacks(int x, int y, int w, int h, int nchannels); Index: HDSPMixerPresets.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerPresets.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerPresets.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerPresets.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -122,7 +122,7 @@ } void HDSPMixerPresets::save_preset(int prst) { - int speed = basew->cards[basew->current_card]->double_speed; + int speed = basew->cards[basew->current_card]->speed_mode; int card = basew->current_card; int p = prst-1; basew->dirty = 0; @@ -164,7 +164,7 @@ } void HDSPMixerPresets::restore_preset(int prst) { - int speed = basew->cards[basew->current_card]->double_speed; + int speed = basew->cards[basew->current_card]->speed_mode; int card = basew->current_card; int p = prst-1; basew->dirty = 0; Index: HDSPMixerSelector.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerSelector.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerSelector.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerSelector.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -91,29 +91,71 @@ void HDSPMixerSelector::setLabels() { HDSP_IO_Type type; - int ds; + hdsp_9632_aeb_t *aeb; + int sm; clear(); type = basew->cards[basew->current_card]->type; - ds = basew->cards[basew->current_card]->double_speed; - if (type == Multiface && !ds) { - max_dest = 10; - destinations = destinations_mf_ss; - } else if (type == Multiface && ds) { - max_dest = 8; - destinations = destinations_mf_ds; - } else if (type == Digiface && !ds) { - max_dest = 14; - destinations = destinations_df_ss; - } else if (type == Digiface && ds) { - max_dest = 8; - destinations = destinations_df_ds; - } else if (type == H9652 && !ds) { - max_dest = 13; - destinations = destinations_h9652_ss; - } else if (type == H9652 && ds) { - max_dest = 7; - destinations = destinations_h9652_ds; + aeb = &basew->cards[basew->current_card]->h9632_aeb; + sm = basew->cards[basew->current_card]->speed_mode; + if (type == Multiface) { + switch (sm) { + case 0: + max_dest = 10; + destinations = destinations_mf_ss; + break; + case 1: + max_dest = 8; + destinations = destinations_mf_ds; + break; + case 2: + /* should never happen */ + break; + } + } else if (type == Digiface) { + switch (sm) { + case 0: + max_dest = 14; + destinations = destinations_df_ss; + break; + case 1: + max_dest = 8; + destinations = destinations_df_ds; + break; + case 2: + /* should never happen */ + break; + } + } else if (type == H9652) { + switch (sm) { + case 0: + max_dest = 13; + destinations = destinations_h9652_ss; + break; + case 1: + max_dest = 7; + destinations = destinations_h9652_ds; + break; + case 2: + /* should never happen */ + break; + } + } else if (type == H9632) { + switch (sm) { + case 0: + max_dest = 6 + (aeb->aebo) ? 2 : 0; + destinations = destinations_h9632_ss; + break; + case 1: + max_dest = 4 + (aeb->aebo) ? 2 : 0; + destinations = destinations_h9632_ds; + break; + case 2: + max_dest = 2 + (aeb->aebo) ? 2 : 0; + destinations = destinations_h9632_qs; + break; + } } + for (int i = 0; i < max_dest; ++i) { add(destinations[i], 0, 0, 0, FL_MENU_TOGGLE); } Index: HDSPMixerSelector.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerSelector.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerSelector.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerSelector.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -75,6 +75,20 @@ "SPDIF" }; +static char *destinations_h9632_ss[8] = { + "A 1+2", "A 3+4", "A 5+6", "A 7+8", + "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" +}; + +static char *destinations_h9632_ds[6] = { + "A 1+2", "A 3+4", + "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" +}; + +static char *destinations_h9632_qs[4] = { + "SPDIF", "AN 1+2", "AN 3+4", "AN 5+6" +}; + class HDSPMixerSelector:public Fl_Menu_ { private: Index: HDSPMixerWindow.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerWindow.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerWindow.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerWindow.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -20,14 +20,6 @@ #pragma implementation #include "HDSPMixerWindow.h" - -inline int64 swap_rms(int64 *rms) -{ - unsigned int *base = (unsigned int *)rms; - int64 ret = *base; - ret = (ret<<32) | *(base+1); - return ret; -} static void readregisters_cb(void *arg) { @@ -59,27 +51,35 @@ for (int i = 0; i < w->cards[w->current_card]->channels; ++i) { w->inputs->strips[i]->meter->update(peak_rms.input_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00, peak_rms.input_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf, - swap_rms(&peak_rms.input_rms[(w->cards[w->current_card]->meter_map[i])]) ); + peak_rms.input_rms[(w->cards[w->current_card]->meter_map[i])]); } } if (w->inputs->buttons->playback) { for (int i = 0; i < w->cards[w->current_card]->channels; ++i) { w->playbacks->strips[i]->meter->update(peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00, peak_rms.playback_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf, - swap_rms(&peak_rms.playback_rms[(w->cards[w->current_card]->meter_map[i])]) ); + peak_rms.playback_rms[(w->cards[w->current_card]->meter_map[i])]); } } if (w->inputs->buttons->output) { - for (int i = 0; i < w->cards[w->current_card]->channels; ++i) { - w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00, - peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf, - 0 ); - } - for (int i = 0; i < w->cards[w->current_card]->lineouts; ++i) { - w->outputs->strips[w->cards[w->current_card]->channels+i]->meter->update(peak_rms.output_peaks[26+i] & 0xffffff00, - peak_rms.output_peaks[26+i] & 0xf, - 0 ); - } + if (w->cards[w->current_card]->type != H9652) { + for (int i = 0; i < w->cards[w->current_card]->channels; ++i) { + w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00, + peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf, + 0 ); + } + for (int i = 0; i < w->cards[w->current_card]->lineouts; ++i) { + w->outputs->strips[w->cards[w->current_card]->channels+i]->meter->update(peak_rms.output_peaks[26+i] & 0xffffff00, + peak_rms.output_peaks[26+i] & 0xf, + 0 ); + } + } else { + for (int i = 0; i < w->cards[w->current_card]->channels; ++i) { + w->outputs->strips[i]->meter->update(peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xffffff00, + peak_rms.output_peaks[(w->cards[w->current_card]->meter_map[i])] & 0xf, + peak_rms.output_rms[(w->cards[w->current_card]->meter_map[i])] ); + } + } } Fl::add_timeout(0.03, readregisters_cb, w); @@ -614,7 +614,7 @@ scroll->end(); end(); setup = new HDSPMixerSetup(400, 260, "Level Meters Setup", this); - about = new HDSPMixerAbout(340, 230, "About HDSPMixer", this); + about = new HDSPMixerAbout(360, 260, "About HDSPMixer", this); i = 0; while (cards[i] != NULL) { cards[i++]->initializeCard(this); @@ -689,7 +689,7 @@ void HDSPMixerWindow::checkState() { - int speed = cards[current_card]->double_speed; + int speed = cards[current_card]->speed_mode; int p = inputs->buttons->presets->preset-1; int corrupt = 0; /* Mixer strips */ Index: HDSPMixerWindow.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/HDSPMixerWindow.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- HDSPMixerWindow.h 28 Jul 2003 11:32:32 -0000 1.1 +++ HDSPMixerWindow.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -70,7 +70,7 @@ Fl_Scroll *scroll; HDSPMixerSetup *setup; HDSPMixerAbout *about; - HDSPMixerPresetData *data[3][2][8]; /* data[card number][mode(ds/ss)][preset number] */ + HDSPMixerPresetData *data[3][3][8]; /* data[card number][mode(ss/ds/qs)][preset number] */ HDSPMixerCard *cards[3]; HDSPMixerInputs *inputs; HDSPMixerPlaybacks *playbacks; Index: hdspmixer.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/hdspmixer.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- hdspmixer.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ hdspmixer.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -49,7 +49,6 @@ 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)) { @@ -64,6 +63,12 @@ printf("HDSP 9652 found !\n"); hdsp_cards[cards] = new HDSPMixerCard(H9652, card); cards++; + } else if (!strncmp(name, "RME Hammerfall HDSP 9632", 24)) { + printf("HDSP 9632 found !\n"); + hdsp_cards[cards] = new HDSPMixerCard(H9632, card); + cards++; + } else if (!strncmp(name, "RME Hammerfall DSP", 18)) { + printf("Uninitialized HDSP card found.\nUse hdsploader to upload configuration data to the card.\n"); } } } Index: mappings.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/mappings.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mappings.h 28 Jul 2003 11:32:32 -0000 1.1 +++ mappings.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -65,5 +65,33 @@ 0, 2, 8, 10, 16, 18, 24 }; +static char dest_map_h9632_ss[8] = { + 0, 2, 4, 6, 8, 10, 12, 14 +}; + +static char dest_map_h9632_ds[6] = { + 0, 2, 8, 10, 12, 14 +}; + +static char dest_map_h9632_qs[4] = { + 8, 10, 12, 14 +}; + +static char channel_map_h9632_ss[16] = { + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static char channel_map_h9632_ds[12] = { + 1, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static char meter_map_h9632_ds[12] = { + 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15 +}; + +static char channel_map_h9632_qs[8] = { + 8, 9, 10, 11, 12, 13, 14, 15 +}; + #endif Index: pixmaps.cxx =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/pixmaps.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pixmaps.cxx 28 Jul 2003 11:32:32 -0000 1.1 +++ pixmaps.cxx 3 Nov 2003 19:10:39 -0000 1.2 @@ -42,10 +42,18 @@ #include "../pixmaps/empty_linux.xpm" #include "../pixmaps/iomixer.xpm" #include "../pixmaps/level.xpm" -#include "../pixmaps/monitor.xpm" #include "../pixmaps/mute.xpm" #include "../pixmaps/output.xpm" #include "../pixmaps/over.xpm" #include "../pixmaps/peak.xpm" #include "../pixmaps/solo.xpm" - +#include "../pixmaps/iomixer_r.xpm" +#include "../pixmaps/output_r.xpm" +#include "../pixmaps/matrix_black.xpm" +#include "../pixmaps/matrix_white.xpm" +#include "../pixmaps/matrix_yellow.xpm" +#include "../pixmaps/matrix_mute.xpm" +#include "../pixmaps/matrix_grey.xpm" +#include "../pixmaps/matrix_grey_o.xpm" +#include "../pixmaps/matrix_grey_l.xpm" +#include "../pixmaps/matrix_grey_ol.xpm" Index: pixmaps.h =================================================================== RCS file: /cvsroot/alsa/alsa-tools/hdspmixer/src/pixmaps.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pixmaps.h 28 Jul 2003 11:32:32 -0000 1.1 +++ pixmaps.h 3 Nov 2003 19:10:39 -0000 1.2 @@ -49,6 +49,16 @@ extern char * over_xpm[]; extern char * peak_xpm[]; extern char * solo_xpm[]; +extern char * iomixer_r_xpm[]; +extern char * output_r_xpm[]; +extern char * matrix_white_xpm[]; +extern char * matrix_black_xpm[]; +extern char * matrix_yellow_xpm[]; +extern char * matrix_mute_xpm[]; +extern char * matrix_grey_xpm[]; +extern char * matrix_grey_l_xpm[]; +extern char * matrix_grey_ol_xpm[]; +extern char * matrix_grey_o_xpm[]; #endif ------------------------------------------------------- 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