* [PATCH 0/3] [RME - HDSP] Userlevel support for RPM
@ 2011-07-28 21:45 Adrian Knoth
2011-07-28 21:45 ` [PATCH 1/3] hdspmixer: Add support for RME RPM Adrian Knoth
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Adrian Knoth @ 2011-07-28 21:45 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
Hi!
Here's a series of recent work on RME RPM support. Confirmed to be
working by our one and only user so far. ;)
As soon as alsa-lib supports the RPM (it's a single define), I'll drop
the temporary define in both, hdsploader and hdspmixer.
RPM users: note that the current kernel code seems to be broken and does
not correctly detect your RPM box. More magic could be added to
hdsploader to provide a temporary workaround.
Cheers
Adrian Knoth (3):
hdspmixer: Add support for RME RPM
hdsploader: Add support for RME RPM
hdsploader: Temporary define for RPM
hdsploader/hdsploader.c | 7 +++++++
hdspmixer/src/HDSPMixerCard.cxx | 11 +++++++++++
hdspmixer/src/HDSPMixerCard.h | 5 +++++
hdspmixer/src/HDSPMixerOutput.cxx | 15 +++++++++++++++
hdspmixer/src/HDSPMixerSelector.cxx | 7 +++++++
hdspmixer/src/HDSPMixerWindow.cxx | 4 ++++
hdspmixer/src/channelmap.cxx | 12 ++++++++++++
hdspmixer/src/channelmap.h | 5 +++++
hdspmixer/src/hdspmixer.cxx | 4 ++++
9 files changed, 70 insertions(+), 0 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] hdspmixer: Add support for RME RPM
2011-07-28 21:45 [PATCH 0/3] [RME - HDSP] Userlevel support for RPM Adrian Knoth
@ 2011-07-28 21:45 ` Adrian Knoth
2011-07-28 21:45 ` [PATCH 2/3] hdsploader: " Adrian Knoth
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Adrian Knoth @ 2011-07-28 21:45 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
This patch adds support for the RME RPM devices. It's mostly based on
Florian Faber's previous patch against hdspmixer 1.0.23,
forwarded-ported to the current hdspmixer code.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdspmixer/src/HDSPMixerCard.cxx b/hdspmixer/src/HDSPMixerCard.cxx
index fbd5de5..78b88b6 100644
--- a/hdspmixer/src/HDSPMixerCard.cxx
+++ b/hdspmixer/src/HDSPMixerCard.cxx
@@ -255,6 +255,17 @@ void HDSPMixerCard::adjustSettings() {
}
}
+ if (type == RPM) {
+ /* RPM has no digital audio connectors, hence channel mappings don't
+ * depend on speedmode */
+ channels_input = 5;
+ channels_playback = channels_output = 6; /* 2xMain,2xMon,2xPH */
+ channel_map_input = channel_map_playback = channel_map_rpm;
+ dest_map = dest_map_rpm;
+ meter_map_input = meter_map_playback = channel_map_rpm;
+ }
+
+
if (type == H9652) {
switch (speed_mode) {
case 0:
diff --git a/hdspmixer/src/HDSPMixerCard.h b/hdspmixer/src/HDSPMixerCard.h
index d2ef8a6..656702b 100644
--- a/hdspmixer/src/HDSPMixerCard.h
+++ b/hdspmixer/src/HDSPMixerCard.h
@@ -32,6 +32,11 @@
#include "channelmap.h"
#include "HDSPMixerWindow.h"
+/* temporary workaround until hdsp.h (HDSP_IO_Type gets fixed */
+#ifndef RPM
+# define RPM 5
+#endif
+
class HDSPMixerWindow;
class HDSPMixerCard
diff --git a/hdspmixer/src/HDSPMixerOutput.cxx b/hdspmixer/src/HDSPMixerOutput.cxx
index 17ab25d..5a88f41 100644
--- a/hdspmixer/src/HDSPMixerOutput.cxx
+++ b/hdspmixer/src/HDSPMixerOutput.cxx
@@ -77,6 +77,15 @@ static char const *labels_raydat_qs[12] = {
"SP.L", "SP.R"
};
+static char const *labels_rpm_output[6] = {
+ "Main L", "Main R", "Mon L", "Mon R", "PH L", "PH R"
+};
+
+static char const *labels_rpm_input[5] = {
+ "Phono 1.L", "Phono 1.R",
+ "Phono 2.L", "Phono 2.R",
+ "Mic"
+};
static char const *labels_aio_ss_input[14] = {
"AN 1", "AN 2",
@@ -219,6 +228,12 @@ void HDSPMixerOutput::setLabels()
labels_input = labels_playback = labels_mf_ss;
return;
};
+
+ if (type == RPM) {
+ labels_input = labels_rpm_input;
+ labels_playback = labels_rpm_output;
+ return;
+ };
if (type == Digiface || type == H9652) {
if (sm)
diff --git a/hdspmixer/src/HDSPMixerSelector.cxx b/hdspmixer/src/HDSPMixerSelector.cxx
index 32d91db..084c80d 100644
--- a/hdspmixer/src/HDSPMixerSelector.cxx
+++ b/hdspmixer/src/HDSPMixerSelector.cxx
@@ -131,6 +131,10 @@ static char const *destinations_df_ds[8] = {
"SPDIF", "Analog"
};
+static char const *destinations_rpm[3] = {
+ "Main", "Mon", "Phones"
+};
+
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",
@@ -261,6 +265,9 @@ void HDSPMixerSelector::setLabels()
/* should never happen */
break;
}
+ } else if (type == RPM) {
+ max_dest = 3;
+ destinations = destinations_rpm;
} else if (type == H9652) {
switch (sm) {
case 0:
diff --git a/hdspmixer/src/HDSPMixerWindow.cxx b/hdspmixer/src/HDSPMixerWindow.cxx
index 74b5630..e1fe18c 100644
--- a/hdspmixer/src/HDSPMixerWindow.cxx
+++ b/hdspmixer/src/HDSPMixerWindow.cxx
@@ -709,6 +709,10 @@ void HDSPMixerWindow::restoreDefaults(int card)
maxdest[0] = 14;
maxdest[1] = 8;
break;
+ case RPM:
+ chnls[0] = chnls[1] = 6;
+ maxdest[0] = maxdest[1] = 3;
+ break;
case H9652:
chnls[0] = 26;
chnls[1] = 14;
diff --git a/hdspmixer/src/channelmap.cxx b/hdspmixer/src/channelmap.cxx
index 598be56..e3ca15c 100644
--- a/hdspmixer/src/channelmap.cxx
+++ b/hdspmixer/src/channelmap.cxx
@@ -78,6 +78,18 @@ char dest_map_ds[8] = {
0, 2, 8, 10, 16, 18, 24, 26
};
+/* RPM */
+char dest_map_rpm[3] = {
+ 0, 2, 4
+};
+
+char channel_map_rpm[26] = {
+ 0, 1, 2, 3, 4, 5, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1
+};
+
// HDSP 9652
char dest_map_h9652_ss[13] = {
diff --git a/hdspmixer/src/channelmap.h b/hdspmixer/src/channelmap.h
index 6b151a0..51b69ce 100644
--- a/hdspmixer/src/channelmap.h
+++ b/hdspmixer/src/channelmap.h
@@ -54,6 +54,11 @@ extern char channel_map_ds[26];
extern char dest_map_ds[8];
+// RPM
+
+extern char dest_map_rpm[3];
+extern char channel_map_rpm[26];
+
// HDSP 9652
extern char dest_map_h9652_ss[13];
diff --git a/hdspmixer/src/hdspmixer.cxx b/hdspmixer/src/hdspmixer.cxx
index 4929863..9c0a3c4 100644
--- a/hdspmixer/src/hdspmixer.cxx
+++ b/hdspmixer/src/hdspmixer.cxx
@@ -65,6 +65,10 @@ int main(int argc, char **argv)
printf("Digiface found!\n");
hdsp_cards[cards] = new HDSPMixerCard(Digiface, card, shortname);
cards++;
+ } else if (!strncmp(name, "RME Hammerfall DSP + RPM", 24)) {
+ printf("RPM found!\n");
+ hdsp_cards[cards] = new HDSPMixerCard(RPM, card, shortname);
+ cards++;
} else if (!strncmp(name, "RME Hammerfall HDSP 9652", 24)) {
printf("HDSP 9652 found!\n");
hdsp_cards[cards] = new HDSPMixerCard(H9652, card, shortname);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] hdsploader: Add support for RME RPM
2011-07-28 21:45 [PATCH 0/3] [RME - HDSP] Userlevel support for RPM Adrian Knoth
2011-07-28 21:45 ` [PATCH 1/3] hdspmixer: Add support for RME RPM Adrian Knoth
@ 2011-07-28 21:45 ` Adrian Knoth
2011-07-28 21:45 ` [PATCH 3/3] hdsploader: Temporary define for RPM Adrian Knoth
2011-07-29 5:49 ` [PATCH 0/3] [RME - HDSP] Userlevel support " Takashi Iwai
3 siblings, 0 replies; 10+ messages in thread
From: Adrian Knoth @ 2011-07-28 21:45 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
Augment hdsploader to support the RME RPM devices. The firmware is
already present in alsa-firmware, so we can directly load it.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdsploader/hdsploader.c b/hdsploader/hdsploader.c
index d1855b1..fa488a2 100644
--- a/hdsploader/hdsploader.c
+++ b/hdsploader/hdsploader.c
@@ -86,6 +86,9 @@ void upload_firmware(int card)
err = read_bin_file(code, DATAPATH "/digiface_firmware_rev11.bin");
}
break;
+ case RPM:
+ err = read_bin_file(code, DATAPATH "/rpm_firmware.bin");
+ break;
default:
fprintf(stderr, "Unknown iobox or firmware revision\n");
snd_hwdep_close(hw);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-28 21:45 [PATCH 0/3] [RME - HDSP] Userlevel support for RPM Adrian Knoth
2011-07-28 21:45 ` [PATCH 1/3] hdspmixer: Add support for RME RPM Adrian Knoth
2011-07-28 21:45 ` [PATCH 2/3] hdsploader: " Adrian Knoth
@ 2011-07-28 21:45 ` Adrian Knoth
2011-07-29 5:50 ` Takashi Iwai
2011-07-29 5:49 ` [PATCH 0/3] [RME - HDSP] Userlevel support " Takashi Iwai
3 siblings, 1 reply; 10+ messages in thread
From: Adrian Knoth @ 2011-07-28 21:45 UTC (permalink / raw)
To: patch; +Cc: Adrian Knoth, alsa-devel
Right now (1.0.24.1), alsa-lib's hdsp.h doesn't know about the RPM. To
avoid a strong dependency on unreleased code, temporary provide the
define here.
It can be dropped as soon as a new version of alsa-lib will be released,
thus effectively making it the required minimum version for alsa-tools.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
diff --git a/hdsploader/hdsploader.c b/hdsploader/hdsploader.c
index fa488a2..bfbe3bc 100644
--- a/hdsploader/hdsploader.c
+++ b/hdsploader/hdsploader.c
@@ -27,6 +27,10 @@
static u_int32_t code[24413];
+#ifndef RPM
+# define RPM 5
+#endif
+
int read_bin_file(u_int32_t *array, const char *filename)
{
FILE *out;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/3] [RME - HDSP] Userlevel support for RPM
2011-07-28 21:45 [PATCH 0/3] [RME - HDSP] Userlevel support for RPM Adrian Knoth
` (2 preceding siblings ...)
2011-07-28 21:45 ` [PATCH 3/3] hdsploader: Temporary define for RPM Adrian Knoth
@ 2011-07-29 5:49 ` Takashi Iwai
3 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2011-07-29 5:49 UTC (permalink / raw)
To: Adrian Knoth; +Cc: alsa-devel
At Thu, 28 Jul 2011 23:45:45 +0200,
Adrian Knoth wrote:
>
> Hi!
>
> Here's a series of recent work on RME RPM support. Confirmed to be
> working by our one and only user so far. ;)
>
> As soon as alsa-lib supports the RPM (it's a single define), I'll drop
> the temporary define in both, hdsploader and hdspmixer.
>
> RPM users: note that the current kernel code seems to be broken and does
> not correctly detect your RPM box. More magic could be added to
> hdsploader to provide a temporary workaround.
OK, applied now all three patches. The drop can be done later.
thanks,
Takashi
>
>
> Cheers
>
> Adrian Knoth (3):
> hdspmixer: Add support for RME RPM
> hdsploader: Add support for RME RPM
> hdsploader: Temporary define for RPM
>
> hdsploader/hdsploader.c | 7 +++++++
> hdspmixer/src/HDSPMixerCard.cxx | 11 +++++++++++
> hdspmixer/src/HDSPMixerCard.h | 5 +++++
> hdspmixer/src/HDSPMixerOutput.cxx | 15 +++++++++++++++
> hdspmixer/src/HDSPMixerSelector.cxx | 7 +++++++
> hdspmixer/src/HDSPMixerWindow.cxx | 4 ++++
> hdspmixer/src/channelmap.cxx | 12 ++++++++++++
> hdspmixer/src/channelmap.h | 5 +++++
> hdspmixer/src/hdspmixer.cxx | 4 ++++
> 9 files changed, 70 insertions(+), 0 deletions(-)
>
> --
> 1.7.5.4
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-28 21:45 ` [PATCH 3/3] hdsploader: Temporary define for RPM Adrian Knoth
@ 2011-07-29 5:50 ` Takashi Iwai
2011-07-29 5:51 ` Takashi Iwai
2011-07-29 15:46 ` Adrian Knoth
0 siblings, 2 replies; 10+ messages in thread
From: Takashi Iwai @ 2011-07-29 5:50 UTC (permalink / raw)
To: Adrian Knoth; +Cc: alsa-devel
At Thu, 28 Jul 2011 23:45:48 +0200,
Adrian Knoth wrote:
>
> Right now (1.0.24.1), alsa-lib's hdsp.h doesn't know about the RPM. To
> avoid a strong dependency on unreleased code, temporary provide the
> define here.
>
> It can be dropped as soon as a new version of alsa-lib will be released,
> thus effectively making it the required minimum version for alsa-tools.
>
> Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
>
> diff --git a/hdsploader/hdsploader.c b/hdsploader/hdsploader.c
> index fa488a2..bfbe3bc 100644
> --- a/hdsploader/hdsploader.c
> +++ b/hdsploader/hdsploader.c
> @@ -27,6 +27,10 @@
>
> static u_int32_t code[24413];
>
> +#ifndef RPM
> +# define RPM 5
> +#endif
Now (after committing it), I found that it should be 4 instead of 5...?
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-29 5:50 ` Takashi Iwai
@ 2011-07-29 5:51 ` Takashi Iwai
2011-07-29 15:50 ` Adrian Knoth
2011-07-29 15:46 ` Adrian Knoth
1 sibling, 1 reply; 10+ messages in thread
From: Takashi Iwai @ 2011-07-29 5:51 UTC (permalink / raw)
To: Adrian Knoth; +Cc: alsa-devel
At Fri, 29 Jul 2011 07:50:32 +0200,
Takashi Iwai wrote:
>
> At Thu, 28 Jul 2011 23:45:48 +0200,
> Adrian Knoth wrote:
> >
> > Right now (1.0.24.1), alsa-lib's hdsp.h doesn't know about the RPM. To
> > avoid a strong dependency on unreleased code, temporary provide the
> > define here.
> >
> > It can be dropped as soon as a new version of alsa-lib will be released,
> > thus effectively making it the required minimum version for alsa-tools.
> >
> > Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
> >
> > diff --git a/hdsploader/hdsploader.c b/hdsploader/hdsploader.c
> > index fa488a2..bfbe3bc 100644
> > --- a/hdsploader/hdsploader.c
> > +++ b/hdsploader/hdsploader.c
> > @@ -27,6 +27,10 @@
> >
> > static u_int32_t code[24413];
> >
> > +#ifndef RPM
> > +# define RPM 5
> > +#endif
>
> Now (after committing it), I found that it should be 4 instead of 5...?
Also, the corresponding firmware file isn't found in alsa-firmware tree.
Could you submit it, too?
thanks,
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-29 5:50 ` Takashi Iwai
2011-07-29 5:51 ` Takashi Iwai
@ 2011-07-29 15:46 ` Adrian Knoth
1 sibling, 0 replies; 10+ messages in thread
From: Adrian Knoth @ 2011-07-29 15:46 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Fri, Jul 29, 2011 at 07:50:32AM +0200, Takashi Iwai wrote:
> > Right now (1.0.24.1), alsa-lib's hdsp.h doesn't know about the RPM. To
> > avoid a strong dependency on unreleased code, temporary provide the
> > define here.
> >
> > It can be dropped as soon as a new version of alsa-lib will be released,
> > thus effectively making it the required minimum version for alsa-tools.
> >
> > Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
> >
> > diff --git a/hdsploader/hdsploader.c b/hdsploader/hdsploader.c
> > index fa488a2..bfbe3bc 100644
> > --- a/hdsploader/hdsploader.c
> > +++ b/hdsploader/hdsploader.c
> > @@ -27,6 +27,10 @@
> >
> > static u_int32_t code[24413];
> >
> > +#ifndef RPM
> > +# define RPM 5
> > +#endif
>
> Now (after committing it), I found that it should be 4 instead of 5...?
Indeed. That's why repeated code is evil. ;) I'll come up with a fix.
Thanks for spotting.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-29 5:51 ` Takashi Iwai
@ 2011-07-29 15:50 ` Adrian Knoth
2011-07-29 15:53 ` Takashi Iwai
0 siblings, 1 reply; 10+ messages in thread
From: Adrian Knoth @ 2011-07-29 15:50 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
On Fri, Jul 29, 2011 at 07:51:31AM +0200, Takashi Iwai wrote:
Hi!
> > > +# define RPM 5
> > > +#endif
> >
> > Now (after committing it), I found that it should be 4 instead of 5...?
>
> Also, the corresponding firmware file isn't found in alsa-firmware tree.
> Could you submit it, too?
http://git.alsa-project.org/?p=alsa-firmware.git;a=tree;f=hdsploader;hb=HEAD
There is rpm_firmware.bin, exactly the one we need.
Or am I missing something?
Cheers
--
mail: adi@thur.de http://adi.thur.de PGP/GPG: key via keyserver
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] hdsploader: Temporary define for RPM
2011-07-29 15:50 ` Adrian Knoth
@ 2011-07-29 15:53 ` Takashi Iwai
0 siblings, 0 replies; 10+ messages in thread
From: Takashi Iwai @ 2011-07-29 15:53 UTC (permalink / raw)
To: Adrian Knoth; +Cc: alsa-devel
At Fri, 29 Jul 2011 17:50:17 +0200,
Adrian Knoth wrote:
>
> On Fri, Jul 29, 2011 at 07:51:31AM +0200, Takashi Iwai wrote:
>
> Hi!
>
> > > > +# define RPM 5
> > > > +#endif
> > >
> > > Now (after committing it), I found that it should be 4 instead of 5...?
> >
> > Also, the corresponding firmware file isn't found in alsa-firmware tree.
> > Could you submit it, too?
>
> http://git.alsa-project.org/?p=alsa-firmware.git;a=tree;f=hdsploader;hb=HEAD
>
> There is rpm_firmware.bin, exactly the one we need.
Never mind, I just overlooked it.
Takashi
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-07-29 15:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-28 21:45 [PATCH 0/3] [RME - HDSP] Userlevel support for RPM Adrian Knoth
2011-07-28 21:45 ` [PATCH 1/3] hdspmixer: Add support for RME RPM Adrian Knoth
2011-07-28 21:45 ` [PATCH 2/3] hdsploader: " Adrian Knoth
2011-07-28 21:45 ` [PATCH 3/3] hdsploader: Temporary define for RPM Adrian Knoth
2011-07-29 5:50 ` Takashi Iwai
2011-07-29 5:51 ` Takashi Iwai
2011-07-29 15:50 ` Adrian Knoth
2011-07-29 15:53 ` Takashi Iwai
2011-07-29 15:46 ` Adrian Knoth
2011-07-29 5:49 ` [PATCH 0/3] [RME - HDSP] Userlevel 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.