All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] hdspmixer: RME AES/AES32 support
@ 2011-02-07 17:55 Adrian Knoth
  2011-02-07 17:55 ` [PATCH 1/2] hdspmixer: Add RME HDSPe AES and AES32 support Adrian Knoth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-02-07 17:55 UTC (permalink / raw)
  To: patch; +Cc: Adrian Knoth, alsa-devel

Hi!

Here's another round of patches for hdspmixer. They add support for the
RME AES and RME AES32 cards (same ID, only difference is PCIe vs. PCI).

Also includes some minor style fixes and formerly missing commas.


Cheers

Adrian Knoth (2):
  hdspmixer: Add RME HDSPe AES and AES32 support.
  hdspmixer: Style and purity fixes for name arrays.

 hdspmixer/src/HDSPMixerCard.cxx     |   22 ++++++
 hdspmixer/src/HDSPMixerOutput.cxx   |    7 ++
 hdspmixer/src/HDSPMixerSelector.cxx |  124 +++++++++++++++++++---------------
 hdspmixer/src/HDSPMixerWindow.cxx   |   10 +++
 hdspmixer/src/defines.h             |    1 +
 hdspmixer/src/hdspmixer.cxx         |    4 +
 6 files changed, 113 insertions(+), 55 deletions(-)

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] hdspmixer: Add RME HDSPe AES and AES32 support.
  2011-02-07 17:55 [PATCH 0/2] hdspmixer: RME AES/AES32 support Adrian Knoth
@ 2011-02-07 17:55 ` Adrian Knoth
  2011-02-07 17:55 ` [PATCH 2/2] hdspmixer: Style and purity fixes for name arrays Adrian Knoth
  2011-02-10 17:59 ` [PATCH 0/2] hdspmixer: RME AES/AES32 support Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-02-07 17:55 UTC (permalink / raw)
  To: patch; +Cc: Adrian Knoth, alsa-devel

Code provided by  Fredrik Lingvall <fredrik.lingvall@gmail.com>

It seems the PCIe (AES) and PCI (AES32) versions behave the same, so we
can kill two birds with one stone.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
---
 hdspmixer/src/HDSPMixerCard.cxx     |   22 ++++++++++++++++++++++
 hdspmixer/src/HDSPMixerOutput.cxx   |    7 +++++++
 hdspmixer/src/HDSPMixerSelector.cxx |    8 ++++++++
 hdspmixer/src/HDSPMixerWindow.cxx   |   10 ++++++++++
 hdspmixer/src/defines.h             |    1 +
 hdspmixer/src/hdspmixer.cxx         |    4 ++++
 6 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/hdspmixer/src/HDSPMixerCard.cxx b/hdspmixer/src/HDSPMixerCard.cxx
index 5f923ac..c0d38b8 100644
--- a/hdspmixer/src/HDSPMixerCard.cxx
+++ b/hdspmixer/src/HDSPMixerCard.cxx
@@ -52,6 +52,16 @@ static char dest_map_madi_ss[32] = {
  48, 50, 52, 54, 56, 58, 60, 62
 };
 
+static char channel_map_aes[16] = {
+    0, 1, 2, 3, 4, 5, 6, 7,
+    9, 10, 11, 12, 13, 14, 15
+};
+
+
+static char dest_map_aes[8] = {
+  0,  2,  4,  6,  8, 10, 12, 14
+};
+
 
 static char dest_map_raydat_ss[18] = {
    4,  6,  8, 10, 
@@ -466,6 +476,18 @@ void HDSPMixerCard::adjustSettings() {
 	break;
       }
 
+    } else if (HDSP_AES == type) {
+      playbacks_offset = 64; /* FL not sure about this one? */
+
+      /* 16 channels for all modes */
+      channels_input = 16;
+      channels_playback = 16;
+      channel_map_input = channel_map_aes;
+      channel_map_playback = channel_map_aes;
+      dest_map = dest_map_aes;
+      meter_map_input = channel_map_aes;
+      meter_map_playback = channel_map_aes;
+
     } else if (HDSPeRayDAT == type) {
       playbacks_offset = 64;
 
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
index 9dc5457..cd9122f 100644
--- a/hdspmixer/src/HDSPMixerOutput.cxx
+++ b/hdspmixer/src/HDSPMixerOutput.cxx
@@ -45,6 +45,11 @@ static char *labels_madi_qs[16] = {
 };
 
 
+static char *labels_aes[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] = {
   "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",
@@ -226,6 +231,8 @@ void HDSPMixerOutput::setLabels()
 	    labels_input = labels_playback = labels_madi_qs;
 	    break;
 	}
+    } else if (HDSP_AES == type) {
+      labels_input = labels_playback = labels_aes;
     } else if (HDSPeAIO == type) {
       	switch (sm) {
 	case 0:
diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx
index 8ac0ad3..23cb744 100644
--- a/hdspmixer/src/HDSPMixerSelector.cxx
+++ b/hdspmixer/src/HDSPMixerSelector.cxx
@@ -45,6 +45,11 @@ static char *destinations_madi_qs[8] = {
 };
 
 
+static char *destinations_aes[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] = {
 
   "A1 1+2", "A1 3+4", "A1 5+6", "A1 7+8",
@@ -291,6 +296,9 @@ void HDSPMixerSelector::setLabels()
 	  destinations = destinations_madi_qs;
 	  break;
 	}
+    } else if (HDSP_AES == type) {
+      max_dest = 8;
+      destinations = destinations_aes;
     } else if (HDSPeAIO == type) {
 	switch (sm) {
 	case 0:
diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx
index e7d4e85..5ac3794 100644
--- a/hdspmixer/src/HDSPMixerWindow.cxx
+++ b/hdspmixer/src/HDSPMixerWindow.cxx
@@ -46,6 +46,7 @@ static void readregisters_cb(void *arg)
 
     if ((HDSPeMADI == w->cards[w->current_card]->type) ||
 	(HDSPeAIO == w->cards[w->current_card]->type) ||
+	(HDSP_AES == w->cards[w->current_card]->type) ||
 	(HDSPeRayDAT == w->cards[w->current_card]->type)) {
       if ((err = snd_hwdep_ioctl(hw, SNDRV_HDSPM_IOCTL_GET_PEAK_RMS, (void *)&hdspm_peak_rms)) < 0) {
 	fprintf(stderr, "HwDep ioctl failed. Metering stopped\n");
@@ -552,6 +553,15 @@ void HDSPMixerWindow::restoreDefaults(int card)
       maxdest[2] = 8;
       num_modes = 3;
       break;
+    case HDSP_AES: /* these cards support full channel count at all modes */
+      chnls[0] = 16;
+      chnls[1] = 16;
+      chnls[2] = 16;
+      maxdest[0] = 16;
+      maxdest[1] = 16;
+      maxdest[2] = 16;
+      num_modes = 3;
+      break;
      case HDSPeAIO:
       chnls[0] = 14;
       chnls[1] = 10;
diff --git a/hdspmixer/src/defines.h b/hdspmixer/src/defines.h
index 33559ab..7fcb4d3 100644
--- a/hdspmixer/src/defines.h
+++ b/hdspmixer/src/defines.h
@@ -27,6 +27,7 @@
 #define HDSPeMADI 10
 #define HDSPeRayDAT 11
 #define HDSPeAIO 12
+#define HDSP_AES 13 /* both AES32 and HDSPeAES? */
 
 #define HDSP_MAX_CHANNELS 64
 #define HDSP_MAX_DEST	  32
diff --git a/hdspmixer/src/hdspmixer.cxx b/hdspmixer/src/hdspmixer.cxx
index 866afda..a020b93 100644
--- a/hdspmixer/src/hdspmixer.cxx
+++ b/hdspmixer/src/hdspmixer.cxx
@@ -77,6 +77,10 @@ int main(int argc, char **argv)
             printf("RME MADI found!\n");
             hdsp_cards[cards] = new HDSPMixerCard(HDSPeMADI, card);
             cards++;
+        } else if (!strncmp(name, "RME AES32", 8)) {
+            printf("RME AES32 or HDSPe AES found!\n");
+            hdsp_cards[cards] = new HDSPMixerCard(HDSP_AES, card);
+            cards++;
         } else if (!strncmp(name, "RME RayDAT", 10)) {
             printf("RME RayDAT found!\n");
             hdsp_cards[cards] = new HDSPMixerCard(HDSPeRayDAT, card);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] hdspmixer: Style and purity fixes for name arrays.
  2011-02-07 17:55 [PATCH 0/2] hdspmixer: RME AES/AES32 support Adrian Knoth
  2011-02-07 17:55 ` [PATCH 1/2] hdspmixer: Add RME HDSPe AES and AES32 support Adrian Knoth
@ 2011-02-07 17:55 ` Adrian Knoth
  2011-02-10 17:59 ` [PATCH 0/2] hdspmixer: RME AES/AES32 support Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Adrian Knoth @ 2011-02-07 17:55 UTC (permalink / raw)
  To: patch; +Cc: Adrian Knoth, alsa-devel

Contribution by Fredrik Lingvall <fredrik.lingvall@gmail.com>

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
---
 hdspmixer/src/HDSPMixerSelector.cxx |  124 ++++++++++++++++++-----------------
 1 files changed, 65 insertions(+), 59 deletions(-)

diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx
index 23cb744..bc18f60 100644
--- a/hdspmixer/src/HDSPMixerSelector.cxx
+++ b/hdspmixer/src/HDSPMixerSelector.cxx
@@ -36,15 +36,14 @@ static char *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",
+  "25+26", "27+28", "29+30", "31+32"
 };
 
 static char *destinations_madi_qs[8] = {
   "1+2", "3+4", "5+6", "7+8",
-  "9+10", "11+12", "13+14", "15+16",
+  "9+10", "11+12", "13+14", "15+16"
 };
 
-
 static char *destinations_aes[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",
@@ -82,73 +81,80 @@ static char *destinations_raydat_qs[6] = {
 static char *destinations_aio_ss[8] = {
   "AN 1+2",
   "AES",
-  "SPDIF", 
+  "SPDIF",
   "A 1+2", "A 3+4", "A 5+6", "A 7+8",
-  "Phones",
+  "Phones"
 };
 
 static char *destinations_aio_ds[6] = {
   "AN 1+2", 
   "AES",
-  "SPDIF", 
-  "A 1+2", "A 3+4"
-  "Phones",
+  "SPDIF",
+  "A 1+2", "A 3+4",
+  "Phones"
 };
 
 static char *destinations_aio_qs[5] = {
   "AN 1+2",
   "AES",
-  "SPDIF", 
-  "A 1+2"
-  "Phones",
+  "SPDIF",
+  "A 1+2",
+  "Phones"
+};
+
+static char *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] = {
+  "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] = {
+  "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_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] = {
-	"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] = {
-	"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] = {
-	"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] = {
-	"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_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_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] = {
-	"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"    
-    };
+static char *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] = {
+  "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] = {
+  "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"    
+};
 
 HDSPMixerSelector::HDSPMixerSelector(int x, int y, int w, int h):Fl_Menu_(x, y, w, h)
 {
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] hdspmixer: RME AES/AES32 support
  2011-02-07 17:55 [PATCH 0/2] hdspmixer: RME AES/AES32 support Adrian Knoth
  2011-02-07 17:55 ` [PATCH 1/2] hdspmixer: Add RME HDSPe AES and AES32 support Adrian Knoth
  2011-02-07 17:55 ` [PATCH 2/2] hdspmixer: Style and purity fixes for name arrays Adrian Knoth
@ 2011-02-10 17:59 ` Takashi Iwai
  2 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2011-02-10 17:59 UTC (permalink / raw)
  To: Adrian Knoth; +Cc: alsa-devel

At Mon,  7 Feb 2011 18:55:24 +0100,
Adrian Knoth wrote:
> 
> Hi!
> 
> Here's another round of patches for hdspmixer. They add support for the
> RME AES and RME AES32 cards (same ID, only difference is PCIe vs. PCI).
> 
> Also includes some minor style fixes and formerly missing commas.

Applied now.  Thanks!


Takashi

> 
> 
> Cheers
> 
> Adrian Knoth (2):
>   hdspmixer: Add RME HDSPe AES and AES32 support.
>   hdspmixer: Style and purity fixes for name arrays.
> 
>  hdspmixer/src/HDSPMixerCard.cxx     |   22 ++++++
>  hdspmixer/src/HDSPMixerOutput.cxx   |    7 ++
>  hdspmixer/src/HDSPMixerSelector.cxx |  124 +++++++++++++++++++---------------
>  hdspmixer/src/HDSPMixerWindow.cxx   |   10 +++
>  hdspmixer/src/defines.h             |    1 +
>  hdspmixer/src/hdspmixer.cxx         |    4 +
>  6 files changed, 113 insertions(+), 55 deletions(-)
> 
> -- 
> 1.7.2.3
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-10 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-07 17:55 [PATCH 0/2] hdspmixer: RME AES/AES32 support Adrian Knoth
2011-02-07 17:55 ` [PATCH 1/2] hdspmixer: Add RME HDSPe AES and AES32 support Adrian Knoth
2011-02-07 17:55 ` [PATCH 2/2] hdspmixer: Style and purity fixes for name arrays Adrian Knoth
2011-02-10 17:59 ` [PATCH 0/2] hdspmixer: RME AES/AES32 support Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.