* [PATCH 0/5] Even more hdspmixer fixes
@ 2011-03-01 9:42 Adrian Knoth
2011-03-01 9:42 ` [PATCH 1/5] hdspmixer: Fix compiler warnings Adrian Knoth
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
Hi!
Next round of hdspmixer updates. Mostly cosmetics, but also fixing a
segfault with H9652 cards.
Thanks to Craig Bourne for immediate testing, also tested and confirmed
to be working on RayDAT, Multiface and AES32.
Adrian Knoth (5):
hdspmixer: Fix compiler warnings.
hdspmixer: Don't use hardcoded number of cards.
hdspmixer: Make static destination maps extern
hdspmixer: Lower nesting depth in label assignment
hdspmixer: Fix labels on H9652
hdspmixer/pixmaps/Slider1.xpm | 2 +-
hdspmixer/pixmaps/Slider2.xpm | 2 +-
hdspmixer/pixmaps/Zlmloop2.xpm | 2 +-
hdspmixer/pixmaps/Zlmloopm2.xpm | 2 +-
hdspmixer/pixmaps/b_blank.xpm | 2 +-
hdspmixer/pixmaps/b_card1.xpm | 2 +-
hdspmixer/pixmaps/b_card2.xpm | 2 +-
hdspmixer/pixmaps/b_card3.xpm | 2 +-
hdspmixer/pixmaps/b_mute.xpm | 2 +-
hdspmixer/pixmaps/b_pre1.xpm | 2 +-
hdspmixer/pixmaps/b_pre2.xpm | 2 +-
hdspmixer/pixmaps/b_pre3.xpm | 2 +-
hdspmixer/pixmaps/b_pre4.xpm | 2 +-
hdspmixer/pixmaps/b_pre5.xpm | 2 +-
hdspmixer/pixmaps/b_pre6.xpm | 2 +-
hdspmixer/pixmaps/b_pre7.xpm | 2 +-
hdspmixer/pixmaps/b_pre8.xpm | 2 +-
hdspmixer/pixmaps/b_save.xpm | 2 +-
hdspmixer/pixmaps/b_solo.xpm | 2 +-
hdspmixer/pixmaps/b_zlm.xpm | 2 +-
hdspmixer/pixmaps/buttons.xpm | 2 +-
hdspmixer/pixmaps/empty.xpm | 2 +-
hdspmixer/pixmaps/empty_2.xpm | 2 +-
hdspmixer/pixmaps/empty_linux.xpm | 2 +-
hdspmixer/pixmaps/iomixer.xpm | 2 +-
hdspmixer/pixmaps/iomixer_r.xpm | 2 +-
hdspmixer/pixmaps/level.xpm | 2 +-
hdspmixer/pixmaps/matrix_black.xpm | 2 +-
hdspmixer/pixmaps/matrix_grey.xpm | 2 +-
hdspmixer/pixmaps/matrix_grey_l.xpm | 2 +-
hdspmixer/pixmaps/matrix_grey_o.xpm | 2 +-
hdspmixer/pixmaps/matrix_grey_ol.xpm | 2 +-
hdspmixer/pixmaps/matrix_mute.xpm | 2 +-
hdspmixer/pixmaps/matrix_white.xpm | 2 +-
hdspmixer/pixmaps/matrix_yellow.xpm | 2 +-
hdspmixer/pixmaps/monitor.xpm | 2 +-
hdspmixer/pixmaps/mute.xpm | 2 +-
hdspmixer/pixmaps/output.xpm | 2 +-
hdspmixer/pixmaps/output_r.xpm | 2 +-
hdspmixer/pixmaps/over.xpm | 2 +-
hdspmixer/pixmaps/peak.xpm | 2 +-
hdspmixer/pixmaps/solo.xpm | 2 +-
hdspmixer/src/HDSPMixerAbout.cxx | 2 +-
hdspmixer/src/HDSPMixerAbout.h | 2 +-
hdspmixer/src/HDSPMixerAboutText.h | 2 +-
hdspmixer/src/HDSPMixerGain.cxx | 2 +-
hdspmixer/src/HDSPMixerGain.h | 2 +-
hdspmixer/src/HDSPMixerIOMixer.h | 4 +-
hdspmixer/src/HDSPMixerOutput.cxx | 189 ++++++++++--------
hdspmixer/src/HDSPMixerOutput.h | 4 +-
hdspmixer/src/HDSPMixerSelector.cxx | 38 ++--
hdspmixer/src/HDSPMixerSelector.h | 2 +-
hdspmixer/src/HDSPMixerSetup.cxx | 2 +-
hdspmixer/src/HDSPMixerSetup.h | 2 +-
hdspmixer/src/Makefile.am | 1 +
hdspmixer/src/channelmap.cxx | 368 ++++++++++++++++++++++++++++++++++
hdspmixer/src/channelmap.h | 348 ++++++---------------------------
hdspmixer/src/pixmaps.h | 76 ++++----
58 files changed, 642 insertions(+), 486 deletions(-)
create mode 100644 hdspmixer/src/channelmap.cxx
--
1.7.4.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] hdspmixer: Fix compiler warnings.
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
@ 2011-03-01 9:42 ` Adrian Knoth
2011-03-01 9:42 ` [PATCH 2/5] hdspmixer: Don't use hardcoded number of cards Adrian Knoth
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
All compiler warnings were caused by a conversion from "foo" to a
char pointer. Given that the string itself really is constant, simply
add the keyword to make g++ happy.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/pixmaps/Slider1.xpm b/hdspmixer/pixmaps/Slider1.xpm
index 017f4d2..7c24161 100644
--- a/hdspmixer/pixmaps/Slider1.xpm
+++ b/hdspmixer/pixmaps/Slider1.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * Slider1_xpm[] = {
+char const * Slider1_xpm[] = {
"13 12 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/Slider2.xpm b/hdspmixer/pixmaps/Slider2.xpm
index f7d76b1..743b5cf 100644
--- a/hdspmixer/pixmaps/Slider2.xpm
+++ b/hdspmixer/pixmaps/Slider2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * Slider2_xpm[] = {
+char const * Slider2_xpm[] = {
"2 13 257 2",
" c None",
". c #7DF846",
diff --git a/hdspmixer/pixmaps/Zlmloop2.xpm b/hdspmixer/pixmaps/Zlmloop2.xpm
index 42377c9..f27f075 100644
--- a/hdspmixer/pixmaps/Zlmloop2.xpm
+++ b/hdspmixer/pixmaps/Zlmloop2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * Zlmloop2_xpm[] = {
+char const * Zlmloop2_xpm[] = {
"76 253 257 2",
" c None",
". c #D1E0E5",
diff --git a/hdspmixer/pixmaps/Zlmloopm2.xpm b/hdspmixer/pixmaps/Zlmloopm2.xpm
index 55b121f..77d7dab 100644
--- a/hdspmixer/pixmaps/Zlmloopm2.xpm
+++ b/hdspmixer/pixmaps/Zlmloopm2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * Zlmloopm2_xpm[] = {
+char const * Zlmloopm2_xpm[] = {
"76 253 257 2",
" c None",
". c #D1E0E5",
diff --git a/hdspmixer/pixmaps/b_blank.xpm b/hdspmixer/pixmaps/b_blank.xpm
index c0374d2..bafadd7 100644
--- a/hdspmixer/pixmaps/b_blank.xpm
+++ b/hdspmixer/pixmaps/b_blank.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_blank_xpm[] = {
+char const * b_blank_xpm[] = {
"13 13 13 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_card1.xpm b/hdspmixer/pixmaps/b_card1.xpm
index c832a10..d818674 100644
--- a/hdspmixer/pixmaps/b_card1.xpm
+++ b/hdspmixer/pixmaps/b_card1.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_card1_xpm[] = {
+char const * b_card1_xpm[] = {
"13 13 14 1",
" c None",
". c #8D8F0F",
diff --git a/hdspmixer/pixmaps/b_card2.xpm b/hdspmixer/pixmaps/b_card2.xpm
index 5dd8da8..9a27ce6 100644
--- a/hdspmixer/pixmaps/b_card2.xpm
+++ b/hdspmixer/pixmaps/b_card2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_card2_xpm[] = {
+char const * b_card2_xpm[] = {
"13 13 14 1",
" c None",
". c #8D8F0F",
diff --git a/hdspmixer/pixmaps/b_card3.xpm b/hdspmixer/pixmaps/b_card3.xpm
index 10e9e30..05961a0 100644
--- a/hdspmixer/pixmaps/b_card3.xpm
+++ b/hdspmixer/pixmaps/b_card3.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_card3_xpm[] = {
+char const * b_card3_xpm[] = {
"13 13 14 1",
" c None",
". c #8D8F0F",
diff --git a/hdspmixer/pixmaps/b_mute.xpm b/hdspmixer/pixmaps/b_mute.xpm
index dcdc8cd..86bec57 100644
--- a/hdspmixer/pixmaps/b_mute.xpm
+++ b/hdspmixer/pixmaps/b_mute.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_mute_xpm[] = {
+char const * b_mute_xpm[] = {
"30 22 52 1",
" c None",
". c #DE8C00",
diff --git a/hdspmixer/pixmaps/b_pre1.xpm b/hdspmixer/pixmaps/b_pre1.xpm
index b81f85a..62b8874 100644
--- a/hdspmixer/pixmaps/b_pre1.xpm
+++ b/hdspmixer/pixmaps/b_pre1.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre1_xpm[] = {
+char const * b_pre1_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre2.xpm b/hdspmixer/pixmaps/b_pre2.xpm
index 731c030..4c33101 100644
--- a/hdspmixer/pixmaps/b_pre2.xpm
+++ b/hdspmixer/pixmaps/b_pre2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre2_xpm[] = {
+char const * b_pre2_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre3.xpm b/hdspmixer/pixmaps/b_pre3.xpm
index 77162c2..0b14cb2 100644
--- a/hdspmixer/pixmaps/b_pre3.xpm
+++ b/hdspmixer/pixmaps/b_pre3.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre3_xpm[] = {
+char const * b_pre3_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre4.xpm b/hdspmixer/pixmaps/b_pre4.xpm
index 30ab560..c22909b 100644
--- a/hdspmixer/pixmaps/b_pre4.xpm
+++ b/hdspmixer/pixmaps/b_pre4.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre4_xpm[] = {
+char const * b_pre4_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre5.xpm b/hdspmixer/pixmaps/b_pre5.xpm
index f563537..bfc2784 100644
--- a/hdspmixer/pixmaps/b_pre5.xpm
+++ b/hdspmixer/pixmaps/b_pre5.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre5_xpm[] = {
+char const * b_pre5_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre6.xpm b/hdspmixer/pixmaps/b_pre6.xpm
index 2d47537..b5ab0f5 100644
--- a/hdspmixer/pixmaps/b_pre6.xpm
+++ b/hdspmixer/pixmaps/b_pre6.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre6_xpm[] = {
+char const * b_pre6_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre7.xpm b/hdspmixer/pixmaps/b_pre7.xpm
index 8de4470..4690875 100644
--- a/hdspmixer/pixmaps/b_pre7.xpm
+++ b/hdspmixer/pixmaps/b_pre7.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre7_xpm[] = {
+char const * b_pre7_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_pre8.xpm b/hdspmixer/pixmaps/b_pre8.xpm
index 895263f..aa4073a 100644
--- a/hdspmixer/pixmaps/b_pre8.xpm
+++ b/hdspmixer/pixmaps/b_pre8.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_pre8_xpm[] = {
+char const * b_pre8_xpm[] = {
"13 13 14 1",
" c None",
". c #1AA00D",
diff --git a/hdspmixer/pixmaps/b_save.xpm b/hdspmixer/pixmaps/b_save.xpm
index a984e28..c39529b 100644
--- a/hdspmixer/pixmaps/b_save.xpm
+++ b/hdspmixer/pixmaps/b_save.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_save_xpm[] = {
+char const * b_save_xpm[] = {
"13 13 14 1",
" c None",
". c #5C7B1B",
diff --git a/hdspmixer/pixmaps/b_solo.xpm b/hdspmixer/pixmaps/b_solo.xpm
index f678b19..ad6c9f5 100644
--- a/hdspmixer/pixmaps/b_solo.xpm
+++ b/hdspmixer/pixmaps/b_solo.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_solo_xpm[] = {
+char const * b_solo_xpm[] = {
"30 22 53 1",
" c None",
". c #7C2000",
diff --git a/hdspmixer/pixmaps/b_zlm.xpm b/hdspmixer/pixmaps/b_zlm.xpm
index c44e75b..6e9c6e9 100644
--- a/hdspmixer/pixmaps/b_zlm.xpm
+++ b/hdspmixer/pixmaps/b_zlm.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * b_zlm_xpm[] = {
+char const * b_zlm_xpm[] = {
"13 13 11 1",
" c None",
". c #000D00",
diff --git a/hdspmixer/pixmaps/buttons.xpm b/hdspmixer/pixmaps/buttons.xpm
index 7cbe5f1..3e3f44f 100644
--- a/hdspmixer/pixmaps/buttons.xpm
+++ b/hdspmixer/pixmaps/buttons.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * buttons_xpm[] = {
+char const * buttons_xpm[] = {
"76 253 257 2",
" c None",
". c #C08480",
diff --git a/hdspmixer/pixmaps/empty.xpm b/hdspmixer/pixmaps/empty.xpm
index 284abc1..c86fe46 100644
--- a/hdspmixer/pixmaps/empty.xpm
+++ b/hdspmixer/pixmaps/empty.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * empty_xpm[] = {
+char const * empty_xpm[] = {
"76 253 402 2",
" c None",
". c #404840",
diff --git a/hdspmixer/pixmaps/empty_2.xpm b/hdspmixer/pixmaps/empty_2.xpm
index 31ff7b2..fb40d88 100644
--- a/hdspmixer/pixmaps/empty_2.xpm
+++ b/hdspmixer/pixmaps/empty_2.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * empty_2_xpm[] = {
+char const * empty_2_xpm[] = {
"76 253 257 2",
" c None",
". c #D1E0E5",
diff --git a/hdspmixer/pixmaps/empty_linux.xpm b/hdspmixer/pixmaps/empty_linux.xpm
index e74ff51..10088d6 100644
--- a/hdspmixer/pixmaps/empty_linux.xpm
+++ b/hdspmixer/pixmaps/empty_linux.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * empty_linux_xpm[] = {
+char const * empty_linux_xpm[] = {
"76 253 1535 2",
" c None",
". c #404840",
diff --git a/hdspmixer/pixmaps/iomixer.xpm b/hdspmixer/pixmaps/iomixer.xpm
index 31a4b16..15b7536 100644
--- a/hdspmixer/pixmaps/iomixer.xpm
+++ b/hdspmixer/pixmaps/iomixer.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * iomixer_xpm[] = {
+char const * iomixer_xpm[] = {
"36 253 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/iomixer_r.xpm b/hdspmixer/pixmaps/iomixer_r.xpm
index 6428cd4..cac66c9 100644
--- a/hdspmixer/pixmaps/iomixer_r.xpm
+++ b/hdspmixer/pixmaps/iomixer_r.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * iomixer_r_xpm[] = {
+char const * iomixer_r_xpm[] = {
"36 253 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/level.xpm b/hdspmixer/pixmaps/level.xpm
index a92fe26..3b776a5 100644
--- a/hdspmixer/pixmaps/level.xpm
+++ b/hdspmixer/pixmaps/level.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * level_xpm[] = {
+char const * level_xpm[] = {
"8 139 257 2",
" c None",
". c #149003",
diff --git a/hdspmixer/pixmaps/matrix_black.xpm b/hdspmixer/pixmaps/matrix_black.xpm
index e96c3cf..69e1e50 100644
--- a/hdspmixer/pixmaps/matrix_black.xpm
+++ b/hdspmixer/pixmaps/matrix_black.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_black_xpm[] = {
+char const * matrix_black_xpm[] = {
"32 12 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/matrix_grey.xpm b/hdspmixer/pixmaps/matrix_grey.xpm
index 40d0a34..ad5b369 100644
--- a/hdspmixer/pixmaps/matrix_grey.xpm
+++ b/hdspmixer/pixmaps/matrix_grey.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_grey_xpm[] = {
+char const * matrix_grey_xpm[] = {
"32 12 22 1",
" c None",
". c #A0A0A0",
diff --git a/hdspmixer/pixmaps/matrix_grey_l.xpm b/hdspmixer/pixmaps/matrix_grey_l.xpm
index b1a434e..5eeedbe 100644
--- a/hdspmixer/pixmaps/matrix_grey_l.xpm
+++ b/hdspmixer/pixmaps/matrix_grey_l.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_grey_l_xpm[] = {
+char const * matrix_grey_l_xpm[] = {
"32 12 22 1",
" c None",
". c #6F776F",
diff --git a/hdspmixer/pixmaps/matrix_grey_o.xpm b/hdspmixer/pixmaps/matrix_grey_o.xpm
index 8dce291..033e00b 100644
--- a/hdspmixer/pixmaps/matrix_grey_o.xpm
+++ b/hdspmixer/pixmaps/matrix_grey_o.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_grey_o_xpm[] = {
+char const * matrix_grey_o_xpm[] = {
"32 12 22 1",
" c None",
". c #6F776F",
diff --git a/hdspmixer/pixmaps/matrix_grey_ol.xpm b/hdspmixer/pixmaps/matrix_grey_ol.xpm
index 64c6c40..4ced7f4 100644
--- a/hdspmixer/pixmaps/matrix_grey_ol.xpm
+++ b/hdspmixer/pixmaps/matrix_grey_ol.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_grey_ol_xpm[] = {
+char const * matrix_grey_ol_xpm[] = {
"32 12 22 1",
" c None",
". c #6F776F",
diff --git a/hdspmixer/pixmaps/matrix_mute.xpm b/hdspmixer/pixmaps/matrix_mute.xpm
index 3c917d8..fcc30b2 100644
--- a/hdspmixer/pixmaps/matrix_mute.xpm
+++ b/hdspmixer/pixmaps/matrix_mute.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_mute_xpm[] = {
+char const * matrix_mute_xpm[] = {
"32 12 25 1",
" c None",
". c #C5C5BD",
diff --git a/hdspmixer/pixmaps/matrix_white.xpm b/hdspmixer/pixmaps/matrix_white.xpm
index c741b5b..ab5808a 100644
--- a/hdspmixer/pixmaps/matrix_white.xpm
+++ b/hdspmixer/pixmaps/matrix_white.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_white_xpm[] = {
+char const * matrix_white_xpm[] = {
"32 12 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/matrix_yellow.xpm b/hdspmixer/pixmaps/matrix_yellow.xpm
index c4ab7f7..6a6565c 100644
--- a/hdspmixer/pixmaps/matrix_yellow.xpm
+++ b/hdspmixer/pixmaps/matrix_yellow.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * matrix_yellow_xpm[] = {
+char const * matrix_yellow_xpm[] = {
"32 12 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/monitor.xpm b/hdspmixer/pixmaps/monitor.xpm
index 4d84ef6..8c29898 100644
--- a/hdspmixer/pixmaps/monitor.xpm
+++ b/hdspmixer/pixmaps/monitor.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * monitor_xpm[] = {
+char const * monitor_xpm[] = {
"76 253 257 2",
" c None",
". c #D1E0E5",
diff --git a/hdspmixer/pixmaps/mute.xpm b/hdspmixer/pixmaps/mute.xpm
index 83c71e4..fbc4707 100644
--- a/hdspmixer/pixmaps/mute.xpm
+++ b/hdspmixer/pixmaps/mute.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * mute_xpm[] = {
+char const * mute_xpm[] = {
"13 26 30 1",
" c None",
". c #1B7B1B",
diff --git a/hdspmixer/pixmaps/output.xpm b/hdspmixer/pixmaps/output.xpm
index 3fc334f..a9ccb80 100644
--- a/hdspmixer/pixmaps/output.xpm
+++ b/hdspmixer/pixmaps/output.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * output_xpm[] = {
+char const * output_xpm[] = {
"36 208 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/output_r.xpm b/hdspmixer/pixmaps/output_r.xpm
index 78fc61b..2e73c7f 100644
--- a/hdspmixer/pixmaps/output_r.xpm
+++ b/hdspmixer/pixmaps/output_r.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * output_r_xpm[] = {
+char const * output_r_xpm[] = {
"36 208 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/over.xpm b/hdspmixer/pixmaps/over.xpm
index 6b0e7e3..5918170 100644
--- a/hdspmixer/pixmaps/over.xpm
+++ b/hdspmixer/pixmaps/over.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * over_xpm[] = {
+char const * over_xpm[] = {
"30 13 257 2",
" c None",
". c #000000",
diff --git a/hdspmixer/pixmaps/peak.xpm b/hdspmixer/pixmaps/peak.xpm
index 88b20e3..19d46be 100644
--- a/hdspmixer/pixmaps/peak.xpm
+++ b/hdspmixer/pixmaps/peak.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * peak_xpm[] = {
+char const * peak_xpm[] = {
"8 5 257 2",
" c None",
". c #61FF48",
diff --git a/hdspmixer/pixmaps/solo.xpm b/hdspmixer/pixmaps/solo.xpm
index 1bfb438..42f3aca 100644
--- a/hdspmixer/pixmaps/solo.xpm
+++ b/hdspmixer/pixmaps/solo.xpm
@@ -1,5 +1,5 @@
/* XPM */
-char * solo_xpm[] = {
+char const * solo_xpm[] = {
"13 26 28 1",
" c None",
". c #3C3E2D",
diff --git a/hdspmixer/src/HDSPMixerAbout.cxx b/hdspmixer/src/HDSPMixerAbout.cxx
index 709529a..39587d0 100644
--- a/hdspmixer/src/HDSPMixerAbout.cxx
+++ b/hdspmixer/src/HDSPMixerAbout.cxx
@@ -22,7 +22,7 @@
#include "HDSPMixerAbout.h"
-HDSPMixerAbout::HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label)
+HDSPMixerAbout::HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label)
{
basew = win;
text = new HDSPMixerAboutText(10,10,w-20,h-20);
diff --git a/hdspmixer/src/HDSPMixerAbout.h b/hdspmixer/src/HDSPMixerAbout.h
index f59b256..e539935 100644
--- a/hdspmixer/src/HDSPMixerAbout.h
+++ b/hdspmixer/src/HDSPMixerAbout.h
@@ -36,7 +36,7 @@ private:
HDSPMixerAboutText *text;
HDSPMixerWindow *basew;
public:
- HDSPMixerAbout(int w, int h, char *label, HDSPMixerWindow *win);
+ HDSPMixerAbout(int w, int h, char const *label, HDSPMixerWindow *win);
int handle(int e);
};
diff --git a/hdspmixer/src/HDSPMixerAboutText.h b/hdspmixer/src/HDSPMixerAboutText.h
index 75b96ce..7ccac25 100644
--- a/hdspmixer/src/HDSPMixerAboutText.h
+++ b/hdspmixer/src/HDSPMixerAboutText.h
@@ -32,7 +32,7 @@ public:
HDSPMixerAboutText(int x, int y, int w, int h);
void draw();
private:
- char *text;
+ char const *text;
};
#endif
diff --git a/hdspmixer/src/HDSPMixerGain.cxx b/hdspmixer/src/HDSPMixerGain.cxx
index 9d43a73..fd6339e 100644
--- a/hdspmixer/src/HDSPMixerGain.cxx
+++ b/hdspmixer/src/HDSPMixerGain.cxx
@@ -33,7 +33,7 @@ void HDSPMixerGain::draw()
fl_draw(text, x(), y(), w(), h(), FL_ALIGN_CENTER);
}
-void HDSPMixerGain::setText(char *txt)
+void HDSPMixerGain::setText(char const *txt)
{
strncpy(text, txt, 10);
redraw();
diff --git a/hdspmixer/src/HDSPMixerGain.h b/hdspmixer/src/HDSPMixerGain.h
index 9f70778..a5ab55a 100644
--- a/hdspmixer/src/HDSPMixerGain.h
+++ b/hdspmixer/src/HDSPMixerGain.h
@@ -39,7 +39,7 @@ public:
char text[10];
HDSPMixerGain(int x, int y, int parenttype);
void draw();
- void setText(char *txt);
+ void setText(char const *txt);
};
#endif
diff --git a/hdspmixer/src/HDSPMixerIOMixer.h b/hdspmixer/src/HDSPMixerIOMixer.h
index a9a35de..b440007 100644
--- a/hdspmixer/src/HDSPMixerIOMixer.h
+++ b/hdspmixer/src/HDSPMixerIOMixer.h
@@ -51,7 +51,7 @@ class HDSPMixerMeter;
class HDSPMixerIOMixer:public Fl_Group
{
private:
- char **p_iomixer_xpm;
+ char const **p_iomixer_xpm;
int channel_num, relative_num, mixer_type;
std::stringstream channel_name;
void update_child(Fl_Widget &widget);
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
index dd0c9f8..05a126c 100644
--- a/hdspmixer/src/HDSPMixerOutput.cxx
+++ b/hdspmixer/src/HDSPMixerOutput.cxx
@@ -21,7 +21,7 @@
#pragma implementation
#include "HDSPMixerOutput.h"
-static char *labels_madi_ss[64] = {
+static char const *labels_madi_ss[64] = {
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16",
"17", "18", "19", "20", "21", "22", "23", "24",
@@ -32,25 +32,25 @@ static char *labels_madi_ss[64] = {
"57", "58", "59", "60", "61", "62", "63", "64"
};
-static char *labels_madi_ds[64] = {
+static char const *labels_madi_ds[64] = {
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16",
"17", "18", "19", "20", "21", "22", "23", "24",
"25", "26", "27", "28", "29", "30", "31", "32",
};
-static char *labels_madi_qs[16] = {
+static char const *labels_madi_qs[16] = {
"1", "2", "3", "4", "5", "6", "7", "8",
"9", "10", "11", "12", "13", "14", "15", "16",
};
-static char *labels_aes32[16] = {
+static char const *labels_aes32[16] = {
"AES 1", "AES 2", "AES 3", "AES 4", "AES 5", "AES 6", "AES 7", "AES 8",
"AES 9", "AES 10", "AES 11", "AES 12", "AES 13", "AES 14", "AES 15", "AES 16"
};
-static char *labels_raydat_ss[36] = {
+static char const *labels_raydat_ss[36] = {
"A1.1", "A1.2", "A1.3", "A1.4", "A1.5", "A1.6", "A1.7", "A1.8",
"A2.1", "A2.2", "A2.3", "A2.4", "A2.5", "A2.6", "A2.7", "A2.8",
"A3.1", "A3.2", "A3.3", "A3.4", "A3.5", "A3.6", "A3.7", "A3.8",
@@ -59,7 +59,7 @@ static char *labels_raydat_ss[36] = {
"SP.L", "SP.R"
};
-static char *labels_raydat_ds[20] = {
+static char const *labels_raydat_ds[20] = {
"A1.1", "A1.2", "A1.3", "A1.4",
"A2.1", "A2.2", "A2.3", "A2.4",
"A3.1", "A3.2", "A3.3", "A3.4",
@@ -68,7 +68,7 @@ static char *labels_raydat_ds[20] = {
"SP.L", "SP.R"
};
-static char *labels_raydat_qs[12] = {
+static char const *labels_raydat_qs[12] = {
"A1.1", "A1.2",
"A2.1", "A2.2",
"A3.1", "A3.2",
@@ -78,7 +78,7 @@ static char *labels_raydat_qs[12] = {
};
-static char *labels_aio_ss_input[14] = {
+static char const *labels_aio_ss_input[14] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
@@ -86,7 +86,7 @@ static char *labels_aio_ss_input[14] = {
"A 5", "A 6", "A 7", "A 8"
};
-static char *labels_aio_ss_playback[16] = {
+static char const *labels_aio_ss_playback[16] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
@@ -95,14 +95,14 @@ static char *labels_aio_ss_playback[16] = {
"PH.L", "PH.R"
};
-static char *labels_aio_ds_input[10] = {
+static char const *labels_aio_ds_input[10] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
"A 1", "A 2", "A 3", "A 4"
};
-static char *labels_aio_ds_playback[12] = {
+static char const *labels_aio_ds_playback[12] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
@@ -110,14 +110,14 @@ static char *labels_aio_ds_playback[12] = {
"PH.L", "PH.R"
};
-static char *labels_aio_qs_input[8] = {
+static char const *labels_aio_qs_input[8] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
"A 1", "A 2"
};
-static char *labels_aio_qs_playback[10] = {
+static char const *labels_aio_qs_playback[10] = {
"AN 1", "AN 2",
"SP.L", "SP.R",
"AES.L", "AES.R",
@@ -126,44 +126,44 @@ static char *labels_aio_qs_playback[10] = {
};
-static char *labels_mf_ss[20] = {
+static char const *labels_mf_ss[20] = {
"AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8",
"A 1", "A 2", "A 3", "A 4", "A 5", "A 6", "A 7", "A 8",
"SP.L", "SP.R", "AN.L", "AN.R"
};
-static char *labels_mf_ds[16] = {
+static char const *labels_mf_ds[16] = {
"AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6", "AN 7", "AN 8",
"A 1", "A 2", "A 3", "A 4",
"SP.L", "SP.R", "AN.L", "AN.R"
};
-static char *labels_df_ss[28] = {
+static char const *labels_df_ss[28] = {
"A1 1", "A1 2", "A1 3", "A1 4", "A1 5", "A1 6", "A1 7", "A1 8",
"A2 1", "A2 2", "A2 3", "A2 4", "A2 5", "A2 6", "A2 7", "A2 8",
"A3 1", "A3 2", "A3 3", "A3 4", "A3 5", "A3 6", "A3 7", "A3 8",
"SP.L", "SP.R", "AN.L", "AN.R"
};
-static char *labels_df_ds[16] = {
+static char const *labels_df_ds[16] = {
"A1 1", "A1 2", "A1 3", "A1 4",
"A2 1", "A2 2", "A2 3", "A2 4",
"A3 1", "A3 2", "A3 3", "A3 4",
"SP.L", "SP.R", "AN.L", "AN.R"
};
-static char *labels_9632_ss[16] = {
+static char const *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] = {
+static char const *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] = {
+static char const *labels_9632_qs[8] = {
"SP.L", "SP.R", "AN 1", "AN 2", "AN 3", "AN 4", "AN 5", "AN 6"
};
diff --git a/hdspmixer/src/HDSPMixerOutput.h b/hdspmixer/src/HDSPMixerOutput.h
index 2e7fb09..f38d263 100644
--- a/hdspmixer/src/HDSPMixerOutput.h
+++ b/hdspmixer/src/HDSPMixerOutput.h
@@ -46,8 +46,8 @@ class HDSPMixerOutput:public Fl_Group
{
private:
int out_num;
- char **labels_input, **labels_playback;
- char **p_output_xpm;
+ char const **labels_input, **labels_playback;
+ char const **p_output_xpm;
HDSPMixerPeak *peak;
HDSPMixerWindow *basew;
void update_child(Fl_Widget& widget);
diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx
index a4156b0..098658f 100644
--- a/hdspmixer/src/HDSPMixerSelector.cxx
+++ b/hdspmixer/src/HDSPMixerSelector.cxx
@@ -24,7 +24,7 @@
#pragma implementation
#include "HDSPMixerSelector.h"
-static char *destinations_madi_ss[32] = {
+static char const *destinations_madi_ss[32] = {
"1+2", "3+4", "5+6", "7+8",
"9+10", "11+12", "13+14", "15+16",
"17+18", "19+20", "21+22", "23+24",
@@ -35,24 +35,24 @@ static char *destinations_madi_ss[32] = {
"57+58", "59+60", "61+62", "63+64"
};
-static char *destinations_madi_ds[16] = {
+static char const *destinations_madi_ds[16] = {
"1+2", "3+4", "5+6", "7+8",
"9+10", "11+12", "13+14", "15+16",
"17+18", "19+20", "21+22", "23+24",
"25+26", "27+28", "29+30", "31+32"
};
-static char *destinations_madi_qs[8] = {
+static char const *destinations_madi_qs[8] = {
"1+2", "3+4", "5+6", "7+8",
"9+10", "11+12", "13+14", "15+16"
};
-static char *destinations_aes32[8] = {
+static char const *destinations_aes32[8] = {
"AES 1+2", "AES 3+4", "AES 5+6", "AES 7+8",
"AES 9+10", "AES 11+12", "AES 13+14", "AES 15+16",
};
-static char *destinations_raydat_ss[18] = {
+static char const *destinations_raydat_ss[18] = {
"A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8",
"A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8",
@@ -62,7 +62,7 @@ static char *destinations_raydat_ss[18] = {
"SPDIF"
};
-static char *destinations_raydat_ds[10] = {
+static char const *destinations_raydat_ds[10] = {
"A1 1+2", "A1 3+4",
"A2 1+2", "A2 3+4",
"A3 1+2", "A3 3+4",
@@ -71,7 +71,7 @@ static char *destinations_raydat_ds[10] = {
"SPDIF"
};
-static char *destinations_raydat_qs[6] = {
+static char const *destinations_raydat_qs[6] = {
"A1 1+2",
"A2 1+2",
"A3 1+2",
@@ -81,7 +81,7 @@ static char *destinations_raydat_qs[6] = {
};
-static char *destinations_aio_ss[8] = {
+static char const *destinations_aio_ss[8] = {
"AN 1+2",
"AES",
"SPDIF",
@@ -89,7 +89,7 @@ static char *destinations_aio_ss[8] = {
"Phones"
};
-static char *destinations_aio_ds[6] = {
+static char const *destinations_aio_ds[6] = {
"AN 1+2",
"AES",
"SPDIF",
@@ -97,7 +97,7 @@ static char *destinations_aio_ds[6] = {
"Phones"
};
-static char *destinations_aio_qs[5] = {
+static char const *destinations_aio_qs[5] = {
"AN 1+2",
"AES",
"SPDIF",
@@ -105,57 +105,57 @@ static char *destinations_aio_qs[5] = {
"Phones"
};
-static char *destinations_mf_ss[10] = {
+static char const *destinations_mf_ss[10] = {
"AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8",
"A 1+2", "A 3+4", "A 5+6", "A 7+8",
"SPDIF", "Analog"
};
-static char *destinations_mf_ds[8] = {
+static char const *destinations_mf_ds[8] = {
"AN 1+2", "AN 3+4", "AN 5+6", "AN 7+8",
"A 1+2", "A 3+4",
"SPDIF", "Analog"
};
-static char *destinations_df_ss[14] = {
+static char const *destinations_df_ss[14] = {
"A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8",
"A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8",
"A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8",
"SPDIF", "Analog"
};
-static char *destinations_df_ds[8] = {
+static char const *destinations_df_ds[8] = {
"A1 1+2", "A1 3+4",
"A2 1+2", "A2 3+4",
"A3 1+2", "A3 3+4",
"SPDIF", "Analog"
};
-static char *destinations_h9652_ss[13] = {
+static char const *destinations_h9652_ss[13] = {
"A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8",
"A2 1+2", "A2 3+4", "A2 5+6", "A2 7+8",
"A3 1+2", "A3 3+4", "A3 5+6", "A3 7+8",
"SPDIF"
};
-static char *destinations_h9652_ds[7] = {
+static char const *destinations_h9652_ds[7] = {
"A1 1+2", "A1 3+4",
"A2 1+2", "A2 3+4",
"A3 1+2", "A3 3+4",
"SPDIF"
};
-static char *destinations_h9632_ss[8] = {
+static char const *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] = {
+static char const *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] = {
+static char const *destinations_h9632_qs[4] = {
"SPDIF", "AN 1+2", "AN 3+4", "AN 5+6"
};
diff --git a/hdspmixer/src/HDSPMixerSelector.h b/hdspmixer/src/HDSPMixerSelector.h
index 6f232cf..7994305 100644
--- a/hdspmixer/src/HDSPMixerSelector.h
+++ b/hdspmixer/src/HDSPMixerSelector.h
@@ -39,7 +39,7 @@ class HDSPMixerIOMixer;
class HDSPMixerSelector:public Fl_Menu_
{
private:
- char **destinations;
+ char const **destinations;
HDSPMixerWindow *basew;
public:
int max_dest;
diff --git a/hdspmixer/src/HDSPMixerSetup.cxx b/hdspmixer/src/HDSPMixerSetup.cxx
index 6fa3551..593ee70 100644
--- a/hdspmixer/src/HDSPMixerSetup.cxx
+++ b/hdspmixer/src/HDSPMixerSetup.cxx
@@ -91,7 +91,7 @@ static void rmsplus3_cb(Fl_Widget *widget, void *arg)
}
-HDSPMixerSetup::HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label)
+HDSPMixerSetup::HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win):Fl_Double_Window(w, h, label)
{
basew = win;
plm = new Fl_Group(10, 25, 380, 60, "Peak Level Meters");
diff --git a/hdspmixer/src/HDSPMixerSetup.h b/hdspmixer/src/HDSPMixerSetup.h
index 21ffbb2..ba95951 100644
--- a/hdspmixer/src/HDSPMixerSetup.h
+++ b/hdspmixer/src/HDSPMixerSetup.h
@@ -54,7 +54,7 @@ public:
int level_val;
int numbers_val;
int rmsplus3_val;
- HDSPMixerSetup(int w, int h, char *label, HDSPMixerWindow *win);
+ HDSPMixerSetup(int w, int h, char const *label, HDSPMixerWindow *win);
HDSPMixerWindow *basew;
void updateValues();
};
diff --git a/hdspmixer/src/pixmaps.h b/hdspmixer/src/pixmaps.h
index 624bd28..b980a62 100644
--- a/hdspmixer/src/pixmaps.h
+++ b/hdspmixer/src/pixmaps.h
@@ -21,44 +21,44 @@
#ifndef pixmaps_H
#define pixmaps_H
-extern char * Slider1_xpm[];
-extern char * Slider2_xpm[];
-extern char * b_blank_xpm[];
-extern char * b_card1_xpm[];
-extern char * b_card2_xpm[];
-extern char * b_card3_xpm[];
-extern char * b_mute_xpm[];
-extern char * b_pre1_xpm[];
-extern char * b_pre2_xpm[];
-extern char * b_pre3_xpm[];
-extern char * b_pre4_xpm[];
-extern char * b_pre5_xpm[];
-extern char * b_pre6_xpm[];
-extern char * b_pre7_xpm[];
-extern char * b_pre8_xpm[];
-extern char * b_save_xpm[];
-extern char * b_solo_xpm[];
-extern char * buttons_xpm[];
-extern char * empty_xpm[];
-extern char * empty_linux_xpm[];
-extern char * iomixer_xpm[];
-extern char * level_xpm[];
-extern char * monitor_xpm[];
-extern char * mute_xpm[];
-extern char * output_xpm[];
-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[];
+extern char const * Slider1_xpm[];
+extern char const * Slider2_xpm[];
+extern char const * b_blank_xpm[];
+extern char const * b_card1_xpm[];
+extern char const * b_card2_xpm[];
+extern char const * b_card3_xpm[];
+extern char const * b_mute_xpm[];
+extern char const * b_pre1_xpm[];
+extern char const * b_pre2_xpm[];
+extern char const * b_pre3_xpm[];
+extern char const * b_pre4_xpm[];
+extern char const * b_pre5_xpm[];
+extern char const * b_pre6_xpm[];
+extern char const * b_pre7_xpm[];
+extern char const * b_pre8_xpm[];
+extern char const * b_save_xpm[];
+extern char const * b_solo_xpm[];
+extern char const * buttons_xpm[];
+extern char const * empty_xpm[];
+extern char const * empty_linux_xpm[];
+extern char const * iomixer_xpm[];
+extern char const * level_xpm[];
+extern char const * monitor_xpm[];
+extern char const * mute_xpm[];
+extern char const * output_xpm[];
+extern char const * over_xpm[];
+extern char const * peak_xpm[];
+extern char const * solo_xpm[];
+extern char const * iomixer_r_xpm[];
+extern char const * output_r_xpm[];
+extern char const * matrix_white_xpm[];
+extern char const * matrix_black_xpm[];
+extern char const * matrix_yellow_xpm[];
+extern char const * matrix_mute_xpm[];
+extern char const * matrix_grey_xpm[];
+extern char const * matrix_grey_l_xpm[];
+extern char const * matrix_grey_ol_xpm[];
+extern char const * matrix_grey_o_xpm[];
#endif
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] hdspmixer: Don't use hardcoded number of cards.
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
2011-03-01 9:42 ` [PATCH 1/5] hdspmixer: Fix compiler warnings Adrian Knoth
@ 2011-03-01 9:42 ` Adrian Knoth
2011-03-01 9:42 ` [PATCH 3/5] hdspmixer: Make static destination maps extern Adrian Knoth
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
We have introduced MAX_CARDS before to make the code more safe and
extendable, so it's just sane to use it all over the place.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/src/HDSPMixerIOMixer.h b/hdspmixer/src/HDSPMixerIOMixer.h
index b440007..2ec7f05 100644
--- a/hdspmixer/src/HDSPMixerIOMixer.h
+++ b/hdspmixer/src/HDSPMixerIOMixer.h
@@ -56,7 +56,7 @@ private:
std::stringstream channel_name;
void update_child(Fl_Widget &widget);
public:
- HDSPMixerStripData *data[3][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
+ HDSPMixerStripData *data[MAX_CARDS][3][8]; /* data[card][mode(ss/ds/qs)][preset number] */
HDSPMixerPan *pan;
HDSPMixerFader *fader;
HDSPMixerPeak *peak;
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] hdspmixer: Make static destination maps extern
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
2011-03-01 9:42 ` [PATCH 1/5] hdspmixer: Fix compiler warnings Adrian Knoth
2011-03-01 9:42 ` [PATCH 2/5] hdspmixer: Don't use hardcoded number of cards Adrian Knoth
@ 2011-03-01 9:42 ` Adrian Knoth
2011-03-01 9:42 ` [PATCH 4/5] hdspmixer: Lower nesting depth in label assignment Adrian Knoth
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
To prevent multiple inclusion, make the destmaps global and only
reference them via extern.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/src/Makefile.am b/hdspmixer/src/Makefile.am
index b097898..e80a8ac 100644
--- a/hdspmixer/src/Makefile.am
+++ b/hdspmixer/src/Makefile.am
@@ -56,5 +56,6 @@ hdspmixer_SOURCES = \
pixmaps.cxx \
pixmaps.h \
defines.h \
+ channelmap.cxx \
channelmap.h
diff --git a/hdspmixer/src/channelmap.cxx b/hdspmixer/src/channelmap.cxx
new file mode 100644
index 0000000..f2f0585
--- /dev/null
+++ b/hdspmixer/src/channelmap.cxx
@@ -0,0 +1,368 @@
+/*
+ * HDSPMixer
+ *
+ * Copyright (C) 2011 Adrian Knoth (adi@drcomp.erfurt.thur.de)
+ * Fredrik Lingvall (fredrik.lingvall@gmail.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 "channelmap.h"
+
+
+/***
+ *
+ * hdsp cards
+ *
+ ***/
+
+// Digiface
+
+
+char dest_map_df_ss[14] = {
+ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26
+};
+
+char channel_map_df_ss[26] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, /* ADAT 1 */
+ 8, 9, 10, 11, 12, 13, 14, 15, /* ADAT 2 */
+ 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT 3 */
+ 24, 25 /* SPDIF */
+};
+
+// Multiface
+
+char dest_map_mf_ss[10] = {
+ 0, 2, 4, 6, 16, 18, 20, 22, 24, 26
+};
+
+char channel_map_mf_ss[26] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, /* Line in */
+ 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */
+ 24, 25, /* SPDIF */
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+// Digiface/Multiface
+
+char meter_map_ds[26] = {
+ 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19,
+ 24, 25,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+char channel_map_ds[26] = {
+ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
+ 24, 25,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+char dest_map_ds[8] = {
+ 0, 2, 8, 10, 16, 18, 24, 26
+};
+
+// HDSP 9652
+
+char dest_map_h9652_ss[13] = {
+ 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
+};
+
+char dest_map_h9652_ds[7] = {
+ 0, 2, 8, 10, 16, 18, 24
+};
+
+// HDSP 9632
+
+char dest_map_h9632_ss[8] = {
+ 0, 2, 4, 6, 8, 10, 12, 14
+};
+
+char dest_map_h9632_ds[6] = {
+ 0, 2, 8, 10, 12, 14
+};
+
+char dest_map_h9632_qs[4] = {
+ 8, 10, 12, 14
+};
+
+char channel_map_h9632_ss[16] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+};
+
+char channel_map_h9632_ds[12] = {
+ 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15
+};
+
+char channel_map_h9632_qs[8] = {
+ 8, 9, 10, 11, 12, 13, 14, 15
+};
+
+
+/***
+ *
+ * hdspm cards
+ *
+ ***/
+
+// HDSPe MADI and MADIface
+
+char dest_map_unity[32] = {
+ 0, 2, 4, 6, 8, 10, 12, 14,
+ 16, 18, 20, 22, 24, 26, 28, 30,
+ 32, 34, 36, 38, 40, 42, 44, 46,
+ 48, 50, 52, 54, 56, 58, 60, 62
+};
+
+char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = {
+ 0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63
+};
+
+char channel_map_unity_ds[HDSPM_MAX_CHANNELS] = {
+ 0, 2, 4, 6, 8, 10, 12, 14,
+ 16, 18, 20, 22, 24, 26, 28, 30,
+ 32, 34, 36, 38, 40, 42, 44, 46,
+ 48, 50, 52, 54, 56, 58, 60, 62,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = {
+ 0, 4, 8, 12, 16, 20, 24, 28,
+ 32, 36, 40, 44, 48, 52, 56, 60,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+// HDSPe RayDAT
+
+char dest_map_raydat_ss[18] = {
+ 4, 6, 8, 10,
+ 12, 14, 16, 18,
+ 20, 22, 24, 26,
+ 28, 30, 32, 34,
+ 0, 2
+};
+
+char dest_map_raydat_ds[10] = {
+ 4, 6,
+ 8, 10,
+ 12, 14,
+ 16, 18,
+ 0, 2
+};
+
+char dest_map_raydat_qs[6] = {
+ 4,
+ 6,
+ 8,
+ 10,
+ 0, 2
+};
+
+char channel_map_raydat_ss[HDSPM_MAX_CHANNELS] = {
+ 4, 5, 6, 7, 8, 9, 10, 11, /* ADAT 1 */
+ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT 2 */
+ 20, 21, 22, 23, 24, 25, 26, 27, /* ADAT 3 */
+ 28, 29, 30, 31, 32, 33, 34, 35, /* ADAT 4 */
+ 0, 1, /* AES */
+ 2, 3, /* SPDIF */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = {
+ 4, 5, 6, 7, /* ADAT 1 */
+ 8, 9, 10, 11, /* ADAT 2 */
+ 12, 13, 14, 15, /* ADAT 3 */
+ 16, 17, 18, 19, /* ADAT 4 */
+ 0, 1, /* AES */
+ 2, 3, /* SPDIF */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = {
+ 4, 5, /* ADAT 1 */
+ 6, 7, /* ADAT 2 */
+ 8, 9, /* ADAT 3 */
+ 10, 11, /* ADAT 4 */
+ 0, 1, /* AES */
+ 2, 3, /* SPDIF */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+// HDSPe AIO
+
+char dest_map_aio_ss[8] = {
+ 0, // Analogue
+ 8, // AES
+ 10, // SPDIF
+ 12, 14, 16, 18, // ADAT
+ 6 // Phones
+};
+
+
+char dest_map_aio_ds[6] = {
+ 0, // Analogue
+ 8, // AES
+ 10, // SPDIF
+ 12, 16, // ADAT
+ 6 // Phones
+};
+
+char dest_map_aio_qs[5] = {
+ 0, // Analogue
+ 8, // AES
+ 10, // SPDIF
+ 12, // ADAT
+ 6 // Phone
+};
+
+char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line in */
+ 8, 9, /* AES in, */
+ 10, 11, /* SPDIF in */
+ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */
+ -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line out */
+ 8, 9, /* AES out */
+ 10, 11, /* SPDIF out */
+ 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */
+ 6, 7, /* phone out */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+};
+
+char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line in */
+ 8, 9, /* AES in */
+ 10, 11, /* SPDIF in */
+ 12, 14, 16, 18, /* ADAT in */
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line out */
+ 8, 9, /* AES out */
+ 10, 11, /* SPDIF out */
+ 12, 14, 16, 18, /* ADAT out */
+ 6, 7, /* phone out */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line in */
+ 8, 9, /* AES in */
+ 10, 11, /* SPDIF in */
+ 12, 16, /* ADAT in */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* line out */
+ 8, 9, /* AES out */
+ 10, 11, /* SPDIF out */
+ 12, 16, /* ADAT out */
+ 6, 7, /* phone out */
+ -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
+// HDSP AES32 and HDSPe AES
+
+char dest_map_aes32[8] = {
+ 0, 2, 4, 6, 8, 10, 12, 14
+};
+
+char channel_map_aes32[HDSPM_MAX_CHANNELS] = {
+ 0, 1, /* AES 1 */
+ 2, 3, /* AES 2 */
+ 4, 5, /* AES 3 */
+ 6, 7, /* AES 4 */
+ 8, 9, /* AES 5 */
+ 10, 11, /* AES 6 */
+ 12, 13, /* AES 7 */
+ 14, 15, /* AES 8 */
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1
+};
+
diff --git a/hdspmixer/src/channelmap.h b/hdspmixer/src/channelmap.h
index 8939b78..6b151a0 100644
--- a/hdspmixer/src/channelmap.h
+++ b/hdspmixer/src/channelmap.h
@@ -25,6 +25,9 @@
#ifndef channelmap_H
#define channelmap_H
+#include <alsa/sound/hdsp.h>
+#include <alsa/sound/hdspm.h>
+
/***
*
* hdsp cards
@@ -33,83 +36,43 @@
// Digiface
-static char dest_map_df_ss[14] = {
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26
-};
+extern char dest_map_df_ss[14];
-static char channel_map_df_ss[26] = {
- 0, 1, 2, 3, 4, 5, 6, 7, /* ADAT 1 */
- 8, 9, 10, 11, 12, 13, 14, 15, /* ADAT 2 */
- 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT 3 */
- 24, 25 /* SPDIF */
-};
+extern char channel_map_df_ss[26];
// Multiface
-static char dest_map_mf_ss[10] = {
- 0, 2, 4, 6, 16, 18, 20, 22, 24, 26
-};
+extern char dest_map_mf_ss[10];
-static char channel_map_mf_ss[26] = {
- 0, 1, 2, 3, 4, 5, 6, 7, /* Line in */
- 16, 17, 18, 19, 20, 21, 22, 23, /* ADAT */
- 24, 25, /* SPDIF */
- -1, -1, -1, -1, -1, -1, -1, -1
-};
+extern char channel_map_mf_ss[26];
// Digiface/Multiface
-static char meter_map_ds[26] = {
- 0, 1, 2, 3, 8, 9, 10, 11, 16, 17, 18, 19,
- 24, 25,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-};
+extern char meter_map_ds[26];
-static char channel_map_ds[26] = {
- 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23,
- 24, 25,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
-};
+extern char channel_map_ds[26];
-static char dest_map_ds[8] = {
- 0, 2, 8, 10, 16, 18, 24, 26
-};
+extern char dest_map_ds[8];
// HDSP 9652
-static char dest_map_h9652_ss[13] = {
- 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24
-};
+extern char dest_map_h9652_ss[13];
-static char dest_map_h9652_ds[7] = {
- 0, 2, 8, 10, 16, 18, 24
-};
+extern char dest_map_h9652_ds[7];
// HDSP 9632
-static char dest_map_h9632_ss[8] = {
- 0, 2, 4, 6, 8, 10, 12, 14
-};
+extern char dest_map_h9632_ss[8];
-static char dest_map_h9632_ds[6] = {
- 0, 2, 8, 10, 12, 14
-};
+extern char dest_map_h9632_ds[6];
-static char dest_map_h9632_qs[4] = {
- 8, 10, 12, 14
-};
+extern char dest_map_h9632_qs[4];
-static char channel_map_h9632_ss[16] = {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
-};
+extern char channel_map_h9632_ss[16];
-static char channel_map_h9632_ds[12] = {
- 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15
-};
+extern char channel_map_h9632_ds[12];
-static char channel_map_h9632_qs[8] = {
- 8, 9, 10, 11, 12, 13, 14, 15
-};
+extern char channel_map_h9632_qs[8];
/***
@@ -120,250 +83,53 @@ static char channel_map_h9632_qs[8] = {
// HDSPe MADI and MADIface
-static char dest_map_unity[32] = {
- 0, 2, 4, 6, 8, 10, 12, 14,
- 16, 18, 20, 22, 24, 26, 28, 30,
- 32, 34, 36, 38, 40, 42, 44, 46,
- 48, 50, 52, 54, 56, 58, 60, 62
-};
-
-static char channel_map_unity_ss[HDSPM_MAX_CHANNELS] = {
- 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 27, 28, 29, 30, 31,
- 32, 33, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 54, 55,
- 56, 57, 58, 59, 60, 61, 62, 63
-};
-
-static char channel_map_unity_ds[HDSPM_MAX_CHANNELS] = {
- 0, 2, 4, 6, 8, 10, 12, 14,
- 16, 18, 20, 22, 24, 26, 28, 30,
- 32, 34, 36, 38, 40, 42, 44, 46,
- 48, 50, 52, 54, 56, 58, 60, 62,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char channel_map_unity_qs[HDSPM_MAX_CHANNELS] = {
- 0, 4, 8, 12, 16, 20, 24, 28,
- 32, 36, 40, 44, 48, 52, 56, 60,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
+extern char dest_map_unity[32];
+
+extern char channel_map_unity_ss[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_unity_ds[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_unity_qs[HDSPM_MAX_CHANNELS];
// HDSPe RayDAT
-static char dest_map_raydat_ss[18] = {
- 4, 6, 8, 10,
- 12, 14, 16, 18,
- 20, 22, 24, 26,
- 28, 30, 32, 34,
- 0, 2
-};
-
-static char dest_map_raydat_ds[10] = {
- 4, 6,
- 8, 10,
- 12, 14,
- 16, 18,
- 0, 2
-};
-
-static char dest_map_raydat_qs[6] = {
- 4,
- 6,
- 8,
- 10,
- 0, 2
-};
-
-static char channel_map_raydat_ss[HDSPM_MAX_CHANNELS] = {
- 4, 5, 6, 7, 8, 9, 10, 11, /* ADAT 1 */
- 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT 2 */
- 20, 21, 22, 23, 24, 25, 26, 27, /* ADAT 3 */
- 28, 29, 30, 31, 32, 33, 34, 35, /* ADAT 4 */
- 0, 1, /* AES */
- 2, 3, /* SPDIF */
- -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char channel_map_raydat_ds[HDSPM_MAX_CHANNELS] = {
- 4, 5, 6, 7, /* ADAT 1 */
- 8, 9, 10, 11, /* ADAT 2 */
- 12, 13, 14, 15, /* ADAT 3 */
- 16, 17, 18, 19, /* ADAT 4 */
- 0, 1, /* AES */
- 2, 3, /* SPDIF */
- -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char channel_map_raydat_qs[HDSPM_MAX_CHANNELS] = {
- 4, 5, /* ADAT 1 */
- 6, 7, /* ADAT 2 */
- 8, 9, /* ADAT 3 */
- 10, 11, /* ADAT 4 */
- 0, 1, /* AES */
- 2, 3, /* SPDIF */
- -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
+extern char dest_map_raydat_ss[18];
+
+extern char dest_map_raydat_ds[10];
+
+extern char dest_map_raydat_qs[6];
+
+extern char channel_map_raydat_ss[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_raydat_ds[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_raydat_qs[HDSPM_MAX_CHANNELS];
// HDSPe AIO
-static char dest_map_aio_ss[8] = {
- 0, // Analogue
- 8, // AES
- 10, // SPDIF
- 12, 14, 16, 18, // ADAT
- 6 // Phones
-};
-
-
-static char dest_map_aio_ds[6] = {
- 0, // Analogue
- 8, // AES
- 10, // SPDIF
- 12, 16, // ADAT
- 6 // Phones
-};
-
-static char dest_map_aio_qs[5] = {
- 0, // Analogue
- 8, // AES
- 10, // SPDIF
- 12, // ADAT
- 6 // Phone
-};
-
-static char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line in */
- 8, 9, /* AES in, */
- 10, 11, /* SPDIF in */
- 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT in */
- -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line out */
- 8, 9, /* AES out */
- 10, 11, /* SPDIF out */
- 12, 13, 14, 15, 16, 17, 18, 19, /* ADAT out */
- 6, 7, /* phone out */
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
-};
-
-static char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line in */
- 8, 9, /* AES in */
- 10, 11, /* SPDIF in */
- 12, 14, 16, 18, /* ADAT in */
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1
-};
-
-static char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line out */
- 8, 9, /* AES out */
- 10, 11, /* SPDIF out */
- 12, 14, 16, 18, /* ADAT out */
- 6, 7, /* phone out */
- -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1
-};
-
-static char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line in */
- 8, 9, /* AES in */
- 10, 11, /* SPDIF in */
- 12, 16, /* ADAT in */
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1
-};
-
-static char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* line out */
- 8, 9, /* AES out */
- 10, 11, /* SPDIF out */
- 12, 16, /* ADAT out */
- 6, 7, /* phone out */
- -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1
-};
+extern char dest_map_aio_ss[8];
+
+
+extern char dest_map_aio_ds[6];
+
+extern char dest_map_aio_qs[5];
+
+extern char channel_map_aio_in_ss[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_aio_out_ss[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_aio_in_ds[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_aio_out_ds[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_aio_in_qs[HDSPM_MAX_CHANNELS];
+
+extern char channel_map_aio_out_qs[HDSPM_MAX_CHANNELS];
// HDSP AES32 and HDSPe AES
-static char dest_map_aes32[8] = {
- 0, 2, 4, 6, 8, 10, 12, 14
-};
-
-static char channel_map_aes32[HDSPM_MAX_CHANNELS] = {
- 0, 1, /* AES 1 */
- 2, 3, /* AES 2 */
- 4, 5, /* AES 3 */
- 6, 7, /* AES 4 */
- 8, 9, /* AES 5 */
- 10, 11, /* AES 6 */
- 12, 13, /* AES 7 */
- 14, 15, /* AES 8 */
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1
-};
+extern char dest_map_aes32[8];
+
+extern char channel_map_aes32[HDSPM_MAX_CHANNELS];
#endif /* channelmap_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] hdspmixer: Lower nesting depth in label assignment
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
` (2 preceding siblings ...)
2011-03-01 9:42 ` [PATCH 3/5] hdspmixer: Make static destination maps extern Adrian Knoth
@ 2011-03-01 9:42 ` Adrian Knoth
2011-03-01 9:42 ` [PATCH 5/5] hdspmixer: Fix labels on H9652 Adrian Knoth
2011-03-01 12:54 ` [PATCH 0/5] Even more hdspmixer fixes Takashi Iwai
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
This fix is mostly cosmetic, the long if-then-else-if-chain was rather
confusing. To improve code readability, use simple if-then statements
and leave the function as soon as a match is found.
Clear code would probably use a two-dimensional map, but it seems rather
overengineered.
Last but not least, the non-matching case was augmented by assigning a
generic "1", "2", "3" .. channel naming schema to prevent hdspmixer from
crashing.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
index 05a126c..b0064c2 100644
--- a/hdspmixer/src/HDSPMixerOutput.cxx
+++ b/hdspmixer/src/HDSPMixerOutput.cxx
@@ -198,71 +198,92 @@ void HDSPMixerOutput::setLabels()
int sm = basew->cards[basew->current_card]->speed_mode;
if (type == H9632) {
- switch (sm) {
- case 0:
- labels_input = labels_playback = labels_9632_ss;
- break;
- case 1:
- labels_input = labels_playback = labels_9632_ds;
- break;
- case 2:
- labels_input = labels_playback = labels_9632_qs;
- break;
- }
- } else if (type == Multiface) {
- if (sm)
- labels_input = labels_playback = labels_mf_ds;
- else
- labels_input = labels_playback = labels_mf_ss;
- } else if (type == Digiface) {
- if (sm)
- labels_input = labels_playback = labels_df_ds;
- else
- labels_input = labels_playback = labels_df_ss;
- } else if (HDSPeMADI == type) {
- switch (sm) {
- case 0:
- labels_input = labels_playback = labels_madi_ss;
- break;
- case 1:
- labels_input = labels_playback = labels_madi_ds;
- break;
- case 2:
- labels_input = labels_playback = labels_madi_qs;
- break;
- }
- } else if (HDSP_AES == type) {
- labels_input = labels_playback = labels_aes32;
- } else if (HDSPeAIO == type) {
- switch (sm) {
- case 0:
- labels_input = labels_aio_ss_input;
- labels_playback = labels_aio_ss_playback;
- break;
- case 1:
- labels_input = labels_aio_ds_input;
- labels_playback = labels_aio_ds_playback;
- break;
- case 2:
- labels_input = labels_aio_qs_input;
- labels_playback = labels_aio_ds_playback;
- break;
- }
- } else if (HDSPeRayDAT == type) {
- switch (sm) {
- case 0:
- labels_input = labels_playback = labels_raydat_ss;
- break;
- case 1:
- labels_input = labels_playback = labels_raydat_ds;
- break;
- case 2:
- labels_input = labels_playback = labels_raydat_qs;
- break;
- }
- } else {
- fprintf(stderr, "Unknown card type for output labels\n");
+ switch (sm) {
+ case 0:
+ labels_input = labels_playback = labels_9632_ss;
+ break;
+ case 1:
+ labels_input = labels_playback = labels_9632_ds;
+ break;
+ case 2:
+ labels_input = labels_playback = labels_9632_qs;
+ break;
+ }
+ return;
+ }
+
+ if (type == Multiface) {
+ if (sm)
+ labels_input = labels_playback = labels_mf_ds;
+ else
+ labels_input = labels_playback = labels_mf_ss;
+ return;
+ };
+
+ if (type == Digiface) {
+ if (sm)
+ labels_input = labels_playback = labels_df_ds;
+ else
+ labels_input = labels_playback = labels_df_ss;
+ return;
+ }
+
+
+ if (HDSPeMADI == type) {
+ switch (sm) {
+ case 0:
+ labels_input = labels_playback = labels_madi_ss;
+ break;
+ case 1:
+ labels_input = labels_playback = labels_madi_ds;
+ break;
+ case 2:
+ labels_input = labels_playback = labels_madi_qs;
+ break;
+ }
+ return;
+ }
+
+ if (HDSP_AES == type) {
+ labels_input = labels_playback = labels_aes32;
+ return;
+ }
+
+ if (HDSPeAIO == type) {
+ switch (sm) {
+ case 0:
+ labels_input = labels_aio_ss_input;
+ labels_playback = labels_aio_ss_playback;
+ break;
+ case 1:
+ labels_input = labels_aio_ds_input;
+ labels_playback = labels_aio_ds_playback;
+ break;
+ case 2:
+ labels_input = labels_aio_qs_input;
+ labels_playback = labels_aio_ds_playback;
+ break;
+ }
+ return;
+ }
+
+ if (HDSPeRayDAT == type) {
+ switch (sm) {
+ case 0:
+ labels_input = labels_playback = labels_raydat_ss;
+ break;
+ case 1:
+ labels_input = labels_playback = labels_raydat_ds;
+ break;
+ case 2:
+ labels_input = labels_playback = labels_raydat_qs;
+ break;
+ }
+ return;
}
+
+ fprintf(stderr, "Unknown card type for output labels, assigning defaults\n");
+ labels_input = labels_playback = labels_madi_ss;
}
void HDSPMixerOutput::draw_background()
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] hdspmixer: Fix labels on H9652
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
` (3 preceding siblings ...)
2011-03-01 9:42 ` [PATCH 4/5] hdspmixer: Lower nesting depth in label assignment Adrian Knoth
@ 2011-03-01 9:42 ` Adrian Knoth
2011-03-01 12:54 ` [PATCH 0/5] Even more hdspmixer fixes Takashi Iwai
5 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 9:42 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
The H9652 uses the same layout as the Digiface, except Digiface features
an additional headphones out. That's why the channel mappings are the
same, but Digiface has mexdest=14 while H9652 has maxdest=13 (12 ADAT
pairs, another pair for S/PDIF and headphone-L/R on Digiface)
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
index b0064c2..5047825 100644
--- a/hdspmixer/src/HDSPMixerOutput.cxx
+++ b/hdspmixer/src/HDSPMixerOutput.cxx
@@ -220,7 +220,7 @@ void HDSPMixerOutput::setLabels()
return;
};
- if (type == Digiface) {
+ if (type == Digiface || type == H9652) {
if (sm)
labels_input = labels_playback = labels_df_ds;
else
--
1.7.4.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Even more hdspmixer fixes
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
` (4 preceding siblings ...)
2011-03-01 9:42 ` [PATCH 5/5] hdspmixer: Fix labels on H9652 Adrian Knoth
@ 2011-03-01 12:54 ` Takashi Iwai
2011-03-01 12:56 ` Adrian Knoth
5 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2011-03-01 12:54 UTC (permalink / raw)
To: Adrian Knoth; +Cc: alsa-devel
At Tue, 1 Mar 2011 10:42:22 +0100,
Adrian Knoth wrote:
>
> Hi!
>
> Next round of hdspmixer updates. Mostly cosmetics, but also fixing a
> segfault with H9652 cards.
>
> Thanks to Craig Bourne for immediate testing, also tested and confirmed
> to be working on RayDAT, Multiface and AES32.
The first three patches have been already applied in alsa-tools git
tree so I applied newly the latter two. For further works, please
update your git tree first.
Thanks!
Takashi
>
>
> Adrian Knoth (5):
> hdspmixer: Fix compiler warnings.
> hdspmixer: Don't use hardcoded number of cards.
> hdspmixer: Make static destination maps extern
> hdspmixer: Lower nesting depth in label assignment
> hdspmixer: Fix labels on H9652
>
> hdspmixer/pixmaps/Slider1.xpm | 2 +-
> hdspmixer/pixmaps/Slider2.xpm | 2 +-
> hdspmixer/pixmaps/Zlmloop2.xpm | 2 +-
> hdspmixer/pixmaps/Zlmloopm2.xpm | 2 +-
> hdspmixer/pixmaps/b_blank.xpm | 2 +-
> hdspmixer/pixmaps/b_card1.xpm | 2 +-
> hdspmixer/pixmaps/b_card2.xpm | 2 +-
> hdspmixer/pixmaps/b_card3.xpm | 2 +-
> hdspmixer/pixmaps/b_mute.xpm | 2 +-
> hdspmixer/pixmaps/b_pre1.xpm | 2 +-
> hdspmixer/pixmaps/b_pre2.xpm | 2 +-
> hdspmixer/pixmaps/b_pre3.xpm | 2 +-
> hdspmixer/pixmaps/b_pre4.xpm | 2 +-
> hdspmixer/pixmaps/b_pre5.xpm | 2 +-
> hdspmixer/pixmaps/b_pre6.xpm | 2 +-
> hdspmixer/pixmaps/b_pre7.xpm | 2 +-
> hdspmixer/pixmaps/b_pre8.xpm | 2 +-
> hdspmixer/pixmaps/b_save.xpm | 2 +-
> hdspmixer/pixmaps/b_solo.xpm | 2 +-
> hdspmixer/pixmaps/b_zlm.xpm | 2 +-
> hdspmixer/pixmaps/buttons.xpm | 2 +-
> hdspmixer/pixmaps/empty.xpm | 2 +-
> hdspmixer/pixmaps/empty_2.xpm | 2 +-
> hdspmixer/pixmaps/empty_linux.xpm | 2 +-
> hdspmixer/pixmaps/iomixer.xpm | 2 +-
> hdspmixer/pixmaps/iomixer_r.xpm | 2 +-
> hdspmixer/pixmaps/level.xpm | 2 +-
> hdspmixer/pixmaps/matrix_black.xpm | 2 +-
> hdspmixer/pixmaps/matrix_grey.xpm | 2 +-
> hdspmixer/pixmaps/matrix_grey_l.xpm | 2 +-
> hdspmixer/pixmaps/matrix_grey_o.xpm | 2 +-
> hdspmixer/pixmaps/matrix_grey_ol.xpm | 2 +-
> hdspmixer/pixmaps/matrix_mute.xpm | 2 +-
> hdspmixer/pixmaps/matrix_white.xpm | 2 +-
> hdspmixer/pixmaps/matrix_yellow.xpm | 2 +-
> hdspmixer/pixmaps/monitor.xpm | 2 +-
> hdspmixer/pixmaps/mute.xpm | 2 +-
> hdspmixer/pixmaps/output.xpm | 2 +-
> hdspmixer/pixmaps/output_r.xpm | 2 +-
> hdspmixer/pixmaps/over.xpm | 2 +-
> hdspmixer/pixmaps/peak.xpm | 2 +-
> hdspmixer/pixmaps/solo.xpm | 2 +-
> hdspmixer/src/HDSPMixerAbout.cxx | 2 +-
> hdspmixer/src/HDSPMixerAbout.h | 2 +-
> hdspmixer/src/HDSPMixerAboutText.h | 2 +-
> hdspmixer/src/HDSPMixerGain.cxx | 2 +-
> hdspmixer/src/HDSPMixerGain.h | 2 +-
> hdspmixer/src/HDSPMixerIOMixer.h | 4 +-
> hdspmixer/src/HDSPMixerOutput.cxx | 189 ++++++++++--------
> hdspmixer/src/HDSPMixerOutput.h | 4 +-
> hdspmixer/src/HDSPMixerSelector.cxx | 38 ++--
> hdspmixer/src/HDSPMixerSelector.h | 2 +-
> hdspmixer/src/HDSPMixerSetup.cxx | 2 +-
> hdspmixer/src/HDSPMixerSetup.h | 2 +-
> hdspmixer/src/Makefile.am | 1 +
> hdspmixer/src/channelmap.cxx | 368 ++++++++++++++++++++++++++++++++++
> hdspmixer/src/channelmap.h | 348 ++++++---------------------------
> hdspmixer/src/pixmaps.h | 76 ++++----
> 58 files changed, 642 insertions(+), 486 deletions(-)
> create mode 100644 hdspmixer/src/channelmap.cxx
>
> --
> 1.7.4.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Even more hdspmixer fixes
2011-03-01 12:54 ` [PATCH 0/5] Even more hdspmixer fixes Takashi Iwai
@ 2011-03-01 12:56 ` Adrian Knoth
0 siblings, 0 replies; 8+ messages in thread
From: Adrian Knoth @ 2011-03-01 12:56 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On 03/01/11 13:54, Takashi Iwai wrote:
>> Thanks to Craig Bourne for immediate testing, also tested and confirmed
>> to be working on RayDAT, Multiface and AES32.
> The first three patches have been already applied in alsa-tools git
> tree so I applied newly the latter two. For further works, please
> update your git tree first.
Mea culpa, I just forgot that I've sent them yesterday. Unconditionally
rebasing indeed seems to be the reasonable cure. ;)
Thanks
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-01 12:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01 9:42 [PATCH 0/5] Even more hdspmixer fixes Adrian Knoth
2011-03-01 9:42 ` [PATCH 1/5] hdspmixer: Fix compiler warnings Adrian Knoth
2011-03-01 9:42 ` [PATCH 2/5] hdspmixer: Don't use hardcoded number of cards Adrian Knoth
2011-03-01 9:42 ` [PATCH 3/5] hdspmixer: Make static destination maps extern Adrian Knoth
2011-03-01 9:42 ` [PATCH 4/5] hdspmixer: Lower nesting depth in label assignment Adrian Knoth
2011-03-01 9:42 ` [PATCH 5/5] hdspmixer: Fix labels on H9652 Adrian Knoth
2011-03-01 12:54 ` [PATCH 0/5] Even more hdspmixer fixes Takashi Iwai
2011-03-01 12:56 ` Adrian Knoth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).