Skip to contentSkip to conversation

RME Hammerfall HDSP 9652

DISCUSSION Nick Arnold 5 participants 13 messages Aug 27, 2003 – Sep 1, 2003

lore
Share & tools
lore
#0 lore raw

Hello,

We here are attempting to get the RME Hammerfall HDSP 9652 card working with ALSA 0.9.6 on a SMP redhat 9 box. We're trying to use 12 input channels and three output channels, running at 96KHz 24bit samples. The output of "uname -a" on the box says:

Linux wombat 2.4.20-19.9smp #1 SMP Tue Jul 15 16:45:28 EDT 2003 i686 athlon i386 GNU/Linux

We had been successfully using the "old" RME Hammerfall 9652 with ALSA 0.9.0 beta12 on an older machine with the same channels/sample rate/sample size.

With a signal connected to one input channel and nothing written to the card we're seeing output on several channels. I think this could be related to settings of the hardware mixer? I'm looking into the "amixer" utility but have so-far been unable to find any options that help.

We have a known signal (IRIG-B) connected to one input channel and our software is now having trouble decoding the signal when it didn't before. We're not sure why this could be occuring.

1) first of all, we're assuming it is possible to get the card working on this setup?

2) I'm trying to determine if this card actually supports 96KHz (ie as a parameter to snd_pcm_hw_params_set_rate_near() for example) -- the "old" card was always set to 48KHz and we "simulated" 96KHz with two 48KHz channels per 96KHz channel. Is this still the way to do it?

3) It seems we need to find the right "amixer" incantations to get the driver into a workable state. The one thing that seems to have helped so far is to set the "Sample Clock Source" interface of the mixer to "Internal 96.0 kHz" with the command:

amixer -c 0 cset -numid=11 6

But we're not sure this is really what we want. Are there other commands we need? I don't believe we have a problem with output channel levels since we've played with these.

any help much appreciated,

nick.

--
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Nautronix Ltd.

If you are not the intended recipient, you have received this email in error and use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please contact the sender.

Although our computer systems use active virus protection software, and we take various measures to reduce the risk of viruses being transmitted in e-mail messages and attachments sent from this company, we cannot guarantee that such e-mail messages and attachments are free from viruses on receipt. It is a condition of our using e-mail to correspond with you, that any and all liability on our part arising directly or indirectly out of any virus is excluded. Please ensure that you run virus checking software on all e-mail messages and attachments before reading them.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#1 lore raw
Quoted 20 lines

Hello,

We here are attempting to get the RME Hammerfall HDSP 9652 card working with ALSA 0.9.6 on a SMP redhat 9 box. We're trying to use 12 input channels and three output channels, running at 96KHz 24bit samples. The output of "uname -a" on the box says:

    Linux wombat 2.4.20-19.9smp #1 SMP Tue Jul 15 16:45:28 EDT 2003 i686

athlon i386 GNU/Linux

We had been successfully using the "old" RME Hammerfall 9652 with ALSA 0.9.0 beta12 on an older machine with the same channels/sample rate/sample size.

With a signal connected to one input channel and nothing written to the card we're seeing output on several channels. I think this could be related to settings of the hardware mixer? I'm looking into the "amixer" utility but have so-far been unable to find any options that help.

Quoted 8 lines

We have a known signal (IRIG-B) connected to one input channel and our software is now having trouble decoding the signal when it didn't before. We're not sure why this could be occuring.

1) first of all, we're assuming it is possible to get the card working on
this setup?

With this driver version the matrix mixer code is still broken and the metering code is not implemented. Please apply the attach patch to correct this. Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to downgrade it to rev. 101 (0x65) for the card to work properly. Please let me know if you're having the same problems.
I also have a development version of hdspmixer working for the card, email me if you need it. I'll release it soon, as well as a huge driver patch, when hdsp 9632 support will be completed (btw the 9632 driver code is already functionnal, people can mail me if they need it right now).

Quoted 5 lines

2) I'm trying to determine if this card actually supports 96KHz (ie as a parameter to snd_pcm_hw_params_set_rate_near() for example) -- the
"old" card was always set to 48KHz and we "simulated" 96KHz with two 48KHz channels per 96KHz channel. Is this still the way to do it?

The card needs to be set to 96 kHz, then the ADAT channel coupling will work as you described.

Quoted 8 lines

3) It seems we need to find the right "amixer" incantations to get the driver
into a workable state. The one thing that seems to have helped so
far is to set the "Sample Clock Source" interface of the mixer to "Internal 96.0 kHz" with the command:

amixer -c 0 cset -numid=11 6

It looks good to me, except the '-' before numid. Note that you can also use the hdspconf GUI to control this.

Quoted 4 lines

But we're not sure this is really what we want. Are there other
commands we need? I don't believe we have a problem with output channel levels since we've played with these.

I think it's what you want. Please let me know if you have success with this.

Thomas

hdsp.c renamed from hdsp.c.0.9.6 +66 -5
@@ -121,7 +121,10 @@
 #define HDSP_playbackRmsLevel   4612  /* 26 * 64 bit values */
 #define HDSP_inputRmsLevel      4868  /* 26 * 64 bit values */
 
-#define HDSP_IO_EXTENT     5192
+#define HDSP_9652_peakBase	7164	
+#define HDSP_9652_rmsBase	4096
+
+#define HDSP_IO_EXTENT     7168
 
 /* control2 register bits */
 
@@ -495,6 +498,7 @@
 static int hdsp_update_simple_mixer_controls(hdsp_t *hdsp);
 static int hdsp_autosync_ref(hdsp_t *hdsp);
 static int snd_hdsp_set_defaults(hdsp_t *hdsp);
+static inline void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp);
 
 static inline int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out)
 {
@@ -716,8 +720,9 @@
 		   corresponding memory location, we need
 		   to access 0 to 2703 ...
 		*/
-
-		hdsp_write (hdsp, 4096 + (addr*2), 
+		ad = addr/2;
+	
+		hdsp_write (hdsp, 4096 + (ad*4), 
 			    (hdsp->mixer_matrix[(addr&0x7fe)+1] << 16) + 
 			    hdsp->mixer_matrix[addr&0x7fe]);
 		
@@ -3078,8 +3083,21 @@
 		                 HDSP_SPDIFInputCoaxial | 
 		                 hdsp_encode_latency(7) | 
 		                 HDSP_LineOut;
+	
 
 	hdsp_write(hdsp, HDSP_controlRegister, hdsp->control_register);
+
+#ifdef SNDRV_BIG_ENDIAN
+	hdsp->control2_register = HDSP_BIGENDIAN_MODE;
+#else
+	hdsp->control2_register = 0;
+#endif
+	if (hdsp->io_type == H9652) {
+	        snd_hdsp_9652_enable_mixer (hdsp);
+	} else {
+	    hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
+	} 
+
 	hdsp_reset_hw_pointer(hdsp);
 	hdsp_compute_period_size(hdsp);
 
@@ -3800,8 +3818,47 @@
 	switch (cmd) {
 	case SNDRV_HDSP_IOCTL_GET_PEAK_RMS:
 		if (hdsp->io_type == H9652) {
-		    snd_printk("hardware metering isn't supported yet for hdsp9652 cards\n");
-		    return -EINVAL;
+			unsigned long rms_low, rms_high;
+			int i;
+			int doublespeed = 0;
+			if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DoubleSpeedStatus)
+				doublespeed = 1;
+			peak_rms = (hdsp_peak_rms_t *)arg;
+			for (i = 0; i < 26; ++i) {
+				if (!(doublespeed && (i & 4))) {
+					if (copy_to_user_fromio((void *)peak_rms->input_peaks+i*4, hdsp->iobase+HDSP_9652_peakBase-i*4, 4) != 0)
+						return -EFAULT;
+					if (copy_to_user_fromio((void *)peak_rms->playback_peaks+i*4, hdsp->iobase+HDSP_9652_peakBase-(doublespeed ? 14 : 26)*4-i*4, 4) != 0)
+						return -EFAULT;
+					if (copy_to_user_fromio((void *)peak_rms->output_peaks+i*4, hdsp->iobase+HDSP_9652_peakBase-2*(doublespeed ? 14 : 26)*4-i*4, 4) != 0)
+						return -EFAULT;
+					rms_low = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+i*8) & 0xFFFFFF00;
+					rms_high = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+i*8+4) & 0xFFFFFF00;
+					rms_high += (rms_low >> 24);
+					rms_low <<= 8;
+					if (copy_to_user((void *)peak_rms->input_rms+i*8, &rms_low, 4) != 0)
+						return -EFAULT;
+					if (copy_to_user((void *)peak_rms->input_rms+i*8+4, &rms_high, 4) != 0)
+						return -EFAULT;					
+					rms_low = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+(doublespeed ? 14 : 26)*8+i*8) & 0xFFFFFF00;
+					rms_high = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+(doublespeed ? 14 : 26)*8+i*8+4) & 0xFFFFFF00;
+					rms_high += (rms_low >> 24);
+					rms_low <<= 8;
+					if (copy_to_user((void *)peak_rms->playback_rms+i*8, &rms_low, 4) != 0)
+						return -EFAULT;
+					if (copy_to_user((void *)peak_rms->playback_rms+i*8+4, &rms_high, 4) != 0)
+						return -EFAULT;					
+					rms_low = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+2*(doublespeed ? 14 : 26)*8+i*8) & 0xFFFFFF00;
+					rms_high = *(unsigned long *)(hdsp->iobase+HDSP_9652_rmsBase+2*(doublespeed ? 14 : 26)*8+i*8+4) & 0xFFFFFF00;
+					rms_high += (rms_low >> 24);
+					rms_low <<= 8;
+					if (copy_to_user((void *)peak_rms->output_rms+i*8, &rms_low, 4) != 0)
+						return -EFAULT;
+					if (copy_to_user((void *)peak_rms->output_rms+i*8+4, &rms_high, 4) != 0)
+						return -EFAULT;					
+				}
+			}
+			return 0;
 		}
 		if (!(hdsp->state & HDSP_FirmwareLoaded)) {
 			snd_printk("firmware needs to be uploaded to the card.\n");	
@@ -4108,6 +4165,8 @@
 	spin_lock_init(&hdsp->midi[1].lock);
 	hdsp->iobase = 0;
 	hdsp->res_port = 0;
+	hdsp->control_register = 0;
+	hdsp->control2_register = 0;
 	hdsp->io_type = Undefined;
 	for (i = 0; i < HDSP_MAX_CHANNELS; ++i)
 		hdsp->playback_mixer_ctls[i] = 0;
@@ -4125,6 +4184,7 @@
 	switch (hdsp->firmware_rev & 0xff) {
 	case 0xa:
 	case 0xb:
+	case 0x32:
 		hdsp->card_name = "RME Hammerfall DSP";
 		break;
 
@@ -4200,6 +4260,7 @@
 
 	if (is_9652) {
 	        hdsp->io_type = H9652;
+		/* FIXME : no more needed here */
 	        snd_hdsp_9652_enable_mixer (hdsp);
 	}
 
#2 lore raw

Hi,

Thanks Thomas and Mark for your replies. We've made some progress but are not all the way there yet ...

I'm replying in the most part to Thomas' response:

Quoted 5 lines
Quoted 1 line

are attempting to get the RME Hammerfall HDSP 9652 card working ...

With this driver version the matrix mixer code is still broken and the metering code is not implemented. Please apply the attach patch to correct this.

We've applied the patch to hdsp.{h,c}. The newly built driver has ameliorated the problem of unexplained signal appearing on our output channels. Thats a win.

Quoted 5 lines

Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to downgrade it to rev. 101 (0x65) for the card to work properly.

[and Mark concured he had to downgrade the firmware]

We have not made any changes to the firmware thus far. Unsure if its required or not.

1) do we need to do this? Are there some characteristic symtoms to look for?

Quoted 7 lines
Quoted 4 lines

I'm trying to determine if this card actually supports 96KHz (ie as a parameter to snd_pcm_hw_params_set_rate_near() for example) -- the "old" card was always set to 48KHz and we "simulated" 96KHz with two 48KHz channels per 96KHz channel. Is this still the way to do it?

The card needs to be set to 96 kHz, then the ADAT channel coupling will work as you described.

Okay, we've set the "Sample Clock Source" on the mixer to 96kHz. This has changed the output of "amixer -contents" to show 14 output channels instead of 26. We can open the card in this mode and can use "aplay" and "arecord" (see more discussion below).

However, I'd appreciate some clarification on this point. This setting seems to imply that the new card can run at 96kHz and is aware that 2 48kHz ADAT channels are to be combined into one logical 96kHz channel. Also that the card itself will look after the interleaving and de-interleaving of these channels.

2) is my understanding of the 96kHz mode correct?

3) is it possible to use the "Internal 48.0 kHz" setting and keep things "like they used to be"? Whereby we retain responsiblity for the interleaving and de-interleaving of channels; we operate on the full 26 channels; and we can make little (if any) code changes?

4) why is the number of channels now 14? It would seem to make sense for it to be 13 -- half the total 46kHz channels available.

We've conducted a test using "aplay" and "arecord":

- connected a physical loopback from the first output channel to first input channel
- executed: "aplay -r 96000 -f s32_le test_tone_1khz.raw"
- executed at the same time: "arecord -r 96000 -f s32_le -I"

The file test_tone_1khz.raw is a pure 1kHz tone generated in matlab. The recording shows the sign wave smooth in most places, but occasionally the signal departs from the wave and saw-tooths or jumps for some tens of samples. It appears as though some samples are being lost.

We've also attached an IRIG-B device to the 10th input channel during this test. The recording of that channel appears to show the signal has been recorded without glitches.

We're currently unsure how to interpret these results -- I can make snippets of the files available if that would be useful.

Again, thanks for any advice,

nick.

PS. Mark also mentioned some problems related to the spdif still remain in the driver. We are not using the spdif interface so I'm assuming we can safely ignore those issues.

--
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Nautronix Ltd.

If you are not the intended recipient, you have received this email in error and use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please contact the sender.

Although our computer systems use active virus protection software, and we take various measures to reduce the risk of viruses being transmitted in e-mail messages and attachments sent from this company, we cannot guarantee that such e-mail messages and attachments are free from viruses on receipt. It is a condition of our using e-mail to correspond with you, that any and all liability on our part arising directly or indirectly out of any virus is excluded. Please ensure that you run virus checking software on all e-mail messages and attachments before reading them.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#3 lore raw
Quoted 8 lines
Quoted 5 lines

Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to downgrade it to rev. 101 (0x65) for the card to work properly.

[and Mark concured he had to downgrade the firmware]

We have not made any changes to the firmware thus far. Unsure if its required or not.

if you can load the driver and the "firmware" (aka "configuration data", done by hdsploader), then you don't need to worry about this, AFAIK. however, use lspci -vv to get full version info on the system you have - the "rev" number indicates the firmware you have.

Quoted 10 lines

Okay, we've set the "Sample Clock Source" on the mixer to 96kHz. This has changed the output of "amixer -contents" to show 14 output channels instead of 26. We can open the card in this mode and can use "aplay" and "arecord" (see more discussion below).

However, I'd appreciate some clarification on this point. This setting seems to imply that the new card can run at 96kHz and is aware that 2 48kHz ADAT channels are to be combined into one logical 96kHz channel. Also that the card itself will look after the interleaving and de-interleaving of these channels.

this is done in hardware yes.

Quoted 1 line

2) is my understanding of the 96kHz mode correct?

mostly, yes.

Quoted 4 lines

3) is it possible to use the "Internal 48.0 kHz" setting and keep things "like they used to be"? Whereby we retain responsiblity for the interleaving and de-interleaving of channels; we operate on the full 26 channels; and we can make little (if any) code changes?

to be honest, i don't know what you're really thinking. implementing this in software by pretending you have 26 channels is, well, a bit odd. at 96kHz, you have 14 channels, not 26. it just so happens that the limitations of the ADAT protocol force bitsplitting onto the situation, but i think you should really forget about that.

you certainly could do this, and under some cirucmstances it would work. but under others, it would not. i have never seen or heard of any ADAT-enabled interface manufacturer encouraging this approach.

Quoted 2 lines

4) why is the number of channels now 14? It would seem to make sense for it to be 13 -- half the total 46kHz channels available.

no, because some of the channels are S/PDIF, which supports 96kHz natively. you've got:

at <= 48kHz

3 * 8 = 24 ADAT channels
2 S/PDIF channels

at >= 88.2kHz

3 * 4 = 12 ADAT channels
2 S/PDIF channels

Quoted 1 line

We've conducted a test using "aplay" and "arecord":

bad idea. neither of the programs are real-time safe. use ecasound or jack for testing.

Quoted 3 lines

PS. Mark also mentioned some problems related to the spdif still remain in the driver. We are not using the spdif interface so I'm assuming we can safely ignore those issues.

based on your description, i believe you can, yes.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#4 lore raw
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to

downgrade it to

Quoted 4 lines
Quoted 3 lines

rev. 101 (0x65) for the card to work properly.

[and Mark concured he had to downgrade the firmware]

Quoted 9 lines
Quoted 2 lines

We have not made any changes to the firmware thus far. Unsure if its required or not.

if you can load the driver and the "firmware" (aka "configuration data", done by hdsploader), then you don't need to worry about this, AFAIK.
however, use lspci -vv to get full version info on the system you have - the "rev" number indicates the firmware you have.

Does hdsploader have anything to do with the HDSP 9652? I thought that was only for the Digiface/Multiface cards. I'm not using it (I believe) unless it's happening in the background somewhere.

For clarity - I can load the Alsa driver for the HDSP 9652 when my card has the rev. 104 firmware in it. It's just that the card doesn't work properly. The driver does find the card & load. After downgrading my firmware in Windows to Rev 101 I can load the driver and my card works. All that is required (apparently) to load the driver is a match in the PCI ID numbers and reading out of the firmware revision.

I have attempted (last weekend) to upgrade my firmware back up to rev. 104 and tried the Alsa drivers, but they did not work.

- Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#5 lore raw
In reply to Nick Arnold
Quoted 10 lines · Nick Arnold
Quoted 5 lines

Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to downgrade it to rev. 101 (0x65) for the card to work properly.

[and Mark concured he had to downgrade the firmware]

We have not made any changes to the firmware thus far. Unsure if its required or not.

1) do we need to do this? Are there some characteristic symtoms to look for?

In 44.1K operation with rev. 104 and using hdspmixer it's just lot of bad signals on all the channels in my case. I do not know what the symptoms would look like in 96K.

Quoted 5 lines

Okay, we've set the "Sample Clock Source" on the mixer to 96kHz. This has changed the output of "amixer -contents" to show 14 output channels instead of 26. We can open the card in this mode and can use "aplay" and "arecord" (see more discussion below).

Quoted 7 lines

However, I'd appreciate some clarification on this point. This setting seems to imply that the new card can run at 96kHz and is aware that 2 48kHz ADAT channels are to be combined into one logical 96kHz channel. Also that the card itself will look after the interleaving and de-interleaving of these channels.

2) is my understanding of the 96kHz mode correct?

It is my understanding also. The RME manual concurs.

<SNIP>

Quoted 3 lines

4) why is the number of channels now 14? It would seem to make sense for it to be 13 -- half the total 46kHz channels available.

spdif continues to run at 48K stereo instead of 96K mono I believe.

Quoted 4 lines

The file test_tone_1khz.raw is a pure 1kHz tone generated in matlab. The recording shows the sign wave smooth in most places, but occasionally the signal departs from the wave and saw-tooths or jumps for some tens of samples. It appears as though some samples are being lost.

If the HDSP 9652 is the master clock source, is the receiving device set to use ADAT clock, so that it remains synced? I need to do this at 44.1K also. Actually, I have not looked at the signal received to make sure there are no sync problems. I'm just using my ears.

Quoted 3 lines

PS. Mark also mentioned some problems related to the spdif still remain in the driver. We are not using the spdif interface so I'm assuming we can safely ignore those issues.

At 44.1K, yes, I'm ignoring it and not having any other problems so far. (That I've noticed, but you have me curious)

- Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#6 lore raw
Quoted 8 lines

<SNIP>

Quoted 3 lines

4) why is the number of channels now 14? It would seem to make sense for it to be 13 -- half the total 46kHz channels available.

spdif continues to run at 48K stereo instead of 96K mono I believe.

My response here was incorrect. Please see Paul and Thomas's responses. spdif does run at 96Khz (apparently) so the two channels are both available.

Sorry for any confusion.

- Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#7 lore raw
In reply to Nick Arnold
Quoted 4 lines

We've applied the patch to hdsp.{h,c}. The newly built driver has ameliorated the problem of unexplained signal appearing on our output channels. Thats a win.

Ameliorated or solved ?

Quoted 9 lines
Quoted 5 lines

Mark Knecht is currently using this code with success, but the card behaved strangely with rev. 104 (0x68) firmware. He had to downgrade it to rev. 101 (0x65) for the card to work properly.

[and Mark concured he had to downgrade the firmware]

We have not made any changes to the firmware thus far. Unsure if its required or not.

To make things clear (partly regarding Paul's answer):
we use the word 'firmware' in two cases :
1) to designate the flashable onboard firmware of the hdsp cards, which determines the card revision.
2) to designate the configuration data that needs to be uploaded into external IO boxes (Multiface and Digiface) using hdsploader.

Hdsp9652 and 9632 cards do not need a firmware in acception 2). Their firmware (1), as well as the firmware (1) of PCI and cardbus hdsp cards, can be altered using the firmware updater tool available for Mac and Windows on RME's website. I will write a similar tool for linux in the next months.

Quoted 3 lines

1) do we need to do this? Are there some characteristic symtoms to look for?

Mark Knecht experienced problems using rev 104 (0x68) firmware (1) on his hdsp9652. Symptoms are intermitent stops and resumes of any audio processing by the card (playback and routing). I asked RME about this, but got no satisfying reply so far. Rev. 101 (0x65) firware (1) seems to work fine, but you'll need a windows install to use the tool from RME.

Quoted 5 lines

Okay, we've set the "Sample Clock Source" on the mixer to 96kHz. This has changed the output of "amixer -contents" to show 14 output channels instead of 26. We can open the card in this mode and can use "aplay" and "arecord" (see more discussion below).

Quoted 9 lines

However, I'd appreciate some clarification on this point. This setting seems to imply that the new card can run at 96kHz and is aware that 2 48kHz ADAT channels are to be combined into one logical 96kHz channel. Also that the card itself will look after the interleaving and de-interleaving of these channels.

2) is my understanding of the 96kHz mode correct?

I think so.

3) is it possible to use the "Internal 48.0 kHz" setting and keep things

Quoted 3 lines

"like they used to be"? Whereby we retain responsiblity for the
interleaving and de-interleaving of channels; we operate on the full 26 channels; and we can make little (if any) code changes?

No, you can't. The internal rate is then really 96kHz, and the clock signal on the spdif output is indeed 96kHz. One thing you could do, maybe,
would be to simulate in userspace what the card is doing in hardware,
keeping the 48 kHz sample rate, if you really need that.

Thomas

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#8 lore raw
Quoted 9 lines

3) is it possible to use the "Internal 48.0 kHz" setting and keep things

Quoted 3 lines

"like they used to be"? Whereby we retain responsiblity for the
interleaving and de-interleaving of channels; we operate on the full 26 channels; and we can make little (if any) code changes?

No, you can't. The internal rate is then really 96kHz, and the clock signal on the spdif output is indeed 96kHz. One thing you could do, maybe, would be to simulate in userspace what the card is doing in hardware, keeping the 48 kHz sample rate, if you really need that.

but if they don't use the s/pdif channels, then you can do this. i tried it a long time ago on the hammerfall digi9652. it works, but it strikes me as a silly idea :)

--p

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#9 lore raw
In reply to Thomas Charbonnel

Hello again,

We seem to have got the card working both for capture and playback(!).

Thanks to everyone for their replies. We were not expecting so much positive response. If any of the respondants are in Fremantle Perth sometime send us an email and we'll take you to lunch!

The three things we did:

1) applied the patch to the hdsp driver. This solved (rather than "ameliorated" as I incorrectly wrote earlier) the unexplained signal on the output channels.

2) found the right "amixer" settings for our setup:

        #!/bin/bash

        amixer -c 0 cset numid=11 0
        amixer -c 0 cset numid=13 0

        for i in $(seq 1 26);do
            amixer -c 0 cset name=Chn,index=$i 32768
        done

- ie. the sync reference was an external word clock, so the card should not use any internal clock source; and output channels should be turned on.

(I neglected to mention earlier that we have an external work clock source and hence the card must run as a slave and not use any of the "Internal XXX kHz" sample source clock settings. It took me awhile to realise the importance of this piece of information.)

3) changed to a working AD/DA converter box. :) Almost at the point of giving-up we swapped to a different AD/DA converter box and found the card worked!

I've attached the output of "amixer contents" and the interesting bit of the output of "lspci -vv" for the curious. You'll notice the card is presenting as having 26 channels. This has meant we have needed no changes to our software from the "old" Hammerfall.

Our software was originally written to work with the "old" Hammerfall -- I believe now called the DIGI 9652. To the best of our understanding that card had no knowledge of ADAT "double speed" and hence we opened the card requesting 48kHz sampling and 26 channels. We did the (de-)interleaving of channels ourselves. This was done because we were under the impression it would support no other setttings.

Now this software is running without change with the new card -- ie. 26 channels; 48kHz; and we're doing the (de-)interleaving. This is a great result.

If this card is capable of performing the channel (de-)interleaving for us under our setup (a slave device auto-syncing to the word clock) we'll probably start looking into getting this working sometime soon, but its a lower priority.

Anyway, thanks everyone for your help,

nick.
--
This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of Nautronix Ltd.

If you are not the intended recipient, you have received this email in error and use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please contact the sender.

Although our computer systems use active virus protection software, and we take various measures to reduce the risk of viruses being transmitted in e-mail messages and attachments sent from this company, we cannot guarantee that such e-mail messages and attachments are free from viruses on receipt. It is a condition of our using e-mail to correspond with you, that any and all liability on our part arising directly or indirectly out of any virus is excluded. Please ensure that you run virus checking software on all e-mail messages and attachments before reading them.

numid=49,iface=HWDEP,name='ADAT Lock Status',index=1
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=2
numid=50,iface=HWDEP,name='ADAT Lock Status',index=2
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=2
numid=51,iface=HWDEP,name='ADAT Lock Status',index=3
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=2
numid=20,iface=HWDEP,name='ADAT Sync Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=14,iface=HWDEP,name='AutoSync Reference'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 'Word'
; Item #1 'ADAT Sync'
; Item #2 'IEC958'
; Item #3 'None'
; Item #4 'ADAT1'
; Item #5 'ADAT2'
; Item #6 'ADAT3'
: values=0
numid=9,iface=HWDEP,name='IEC958 Emphasis Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=10,iface=HWDEP,name='IEC958 Non-audio Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=7,iface=HWDEP,name='IEC958 Output also on ADAT1'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=8,iface=HWDEP,name='IEC958 Professional Bit'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=22,iface=HWDEP,name='Line Out'
; type=BOOLEAN,access=rw---,values=1
: values=on
numid=5,iface=HWDEP,name='Mixer'
; type=INTEGER,access=rw---,values=3,min=0,max=65536,step=1 : values=0,0,0
numid=21,iface=HWDEP,name='Passthru'
; type=BOOLEAN,access=rw---,values=1
: values=off
numid=13,iface=HWDEP,name='Preferred Sync Reference'
; type=ENUMERATED,access=rw---,values=1,items=6
; Item #0 'Word'
; Item #1 'ADAT Sync'
; Item #2 'IEC958'
; Item #3 'ADAT1'
; Item #4 'ADAT2'
; Item #5 'ADAT3'
: values=0
numid=19,iface=HWDEP,name='SPDIF Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=0
numid=15,iface=HWDEP,name='SPDIF Sample Rate'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 '32000'
; Item #1 '44100'
; Item #2 '48000'
; Item #3 '64000'
; Item #4 '88200'
; Item #5 '96000'
; Item #6 'None'
: values=6
numid=12,iface=HWDEP,name='System Clock Mode'
; type=ENUMERATED,access=r----,values=1,items=2
; Item #0 'Master'
; Item #1 'Slave'
: values=1
numid=16,iface=HWDEP,name='System Sample Rate'
; type=INTEGER,access=r----,values=1,min=0,max=0,step=0 : values=48000
numid=18,iface=HWDEP,name='Word Clock Lock Status'
; type=ENUMERATED,access=r----,values=1,items=3
; Item #0 'No Lock'
; Item #1 'Lock'
; Item #2 'Sync'
: values=2
numid=3,iface=MIXER,name='IEC958 Playback Con Mask'
; type=IEC958,access=r----,values=1
: values=?
numid=4,iface=MIXER,name='IEC958 Playback Pro Mask'
; type=IEC958,access=r----,values=1
: values=?
numid=23,iface=MIXER,name='Chn',index=1
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=24,iface=MIXER,name='Chn',index=2
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=25,iface=MIXER,name='Chn',index=3
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=26,iface=MIXER,name='Chn',index=4
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=27,iface=MIXER,name='Chn',index=5
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=28,iface=MIXER,name='Chn',index=6
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=29,iface=MIXER,name='Chn',index=7
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=30,iface=MIXER,name='Chn',index=8
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=31,iface=MIXER,name='Chn',index=9
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=32,iface=MIXER,name='Chn',index=10
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=33,iface=MIXER,name='Chn',index=11
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=34,iface=MIXER,name='Chn',index=12
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=35,iface=MIXER,name='Chn',index=13
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=36,iface=MIXER,name='Chn',index=14
; type=INTEGER,access=rw---,values=1,min=0,max=65536,step=1 : values=32768
numid=37,iface=MIXER,name='Chn',index=15
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=38,iface=MIXER,name='Chn',index=16
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=39,iface=MIXER,name='Chn',index=17
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=40,iface=MIXER,name='Chn',index=18
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=41,iface=MIXER,name='Chn',index=19
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=42,iface=MIXER,name='Chn',index=20
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=43,iface=MIXER,name='Chn',index=21
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=44,iface=MIXER,name='Chn',index=22
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=45,iface=MIXER,name='Chn',index=23
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=46,iface=MIXER,name='Chn',index=24
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=47,iface=MIXER,name='Chn',index=25
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=48,iface=MIXER,name='Chn',index=26
; type=INTEGER,access=rw-v-,values=1,min=0,max=65536,step=1 : values=32768
numid=17,iface=PCM,name='External Rate'
; type=ENUMERATED,access=r----,values=1,items=7
; Item #0 '32000'
; Item #1 '44100'
; Item #2 '48000'
; Item #3 '64000'
; Item #4 '88200'
; Item #5 '96000'
; Item #6 'None'
: values=2
numid=6,iface=PCM,name='IEC958 Input Connector'
; type=ENUMERATED,access=rw---,values=1,items=3
; Item #0 'ADAT1'
; Item #1 'Coaxial'
; Item #2 'Internal'
: values=2
numid=1,iface=PCM,name='IEC958 Playback Default'
; type=IEC958,access=rw---,values=1
: values=?
numid=11,iface=PCM,name='Sample Clock Source'
; type=ENUMERATED,access=rw---,values=1,items=7
; Item #0 'AutoSync'
; Item #1 'Internal 32.0 kHz'
; Item #2 'Internal 44.1 kHz'
; Item #3 'Internal 48.0 kHz'
; Item #4 'Internal 64.0 kHz'
; Item #5 'Internal 88.2 kHz'
; Item #6 'Internal 96.0 kHz'
: values=0

02:05.0 Multimedia audio controller: Xilinx Corporation RME Hammerfall DSP
(rev 64)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
ParErr- Step ping- SERR- FastB2B- Status: Cap- 66Mhz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort - <MAbort- >SERR- <PERR- Latency: 64
Interrupt: pin A routed to IRQ 9
Region 0: Memory at e1000000 (32-bit, non-prefetchable) [size=64K]

#10 lore raw
Quoted 8 lines

Hello again,

We seem to have got the card working both for capture and playback(!).

Thanks to everyone for their replies. We were not expecting so much positive response. If any of the respondants are in Fremantle Perth sometime send us an email and we'll take you to lunch!

Who knows, thanks !

Quoted 43 lines

The three things we did:

1) applied the patch to the hdsp driver. This solved (rather than "ameliorated" as I incorrectly wrote earlier) the unexplained signal on the output channels.

2) found the right "amixer" settings for our setup:

        #!/bin/bash

        amixer -c 0 cset numid=11 0
        amixer -c 0 cset numid=13 0

        for i in $(seq 1 26);do
            amixer -c 0 cset name=Chn,index=$i 32768
        done

- ie. the sync reference was an external word clock, so the card
should
not use any internal clock source; and output channels should be
turned on.

(I neglected to mention earlier that we have an external work clock
source and hence the card must run as a slave and not use any of the "Internal XXX kHz" sample source clock settings. It took me awhile to realise the importance of this piece of information.)

3) changed to a working AD/DA converter box. :) Almost at the point of giving-up we swapped to a different AD/DA converter box and found the card worked!

I've attached the output of "amixer contents" and the interesting bit of the output of "lspci -vv" for the curious. You'll notice the card is presenting as having 26 channels. This has meant we have needed no changes to our software from the "old" Hammerfall.

Our software was originally written to work with the "old" Hammerfall -- I believe now called the DIGI 9652. To the best of our understanding that card had no knowledge of ADAT "double speed" and hence we opened the card requesting 48kHz sampling and 26 channels. We did the (de-)interleaving of channels ourselves. This was done because we were under the impression it would support no other setttings.

Quoted 9 lines

Now this software is running without change with the new card -- ie. 26 channels; 48kHz; and we're doing the (de-)interleaving. This is a great result.

If this card is capable of performing the channel (de-)interleaving for us under our setup (a slave device auto-syncing to the word clock) we'll probably start looking into getting this working sometime soon, but its a lower priority.

If you try to do this, you'll have to manually switch to Internal 96 kHZ, make sure you feed the card with a valid 96 kHz sync source, then switch the card back to AutoSync. This is because there is no way an external sync source can cause the card to switch mode, and the driver won't let you switch to AutoSync if there isn't a valid sync source in the range of the current speed mode (32 - 48 kHz for single speed, 64 - 96 kHz for double speed).

Thomas

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#12 lore raw
In reply to Nick Arnold

Nick,
Hi. I see you got a couple of responses from Thomas. Indeed, there is a
new working driver for the HDSP 9652. I am unclear whether you are using this in your setup? If you are not you must upgrade to that new source code before you will get good results. As Thomas said, I had to downgrade the firmware to the older revision or things do not work at all.

I want to point out that while I *can* run 96KHz between two boxes, I
have not tested it AT ALL! All I have done in this area is to set the card at 96KHz and see hdspmixer show that the number of channels is cut in half. I have no personal need for 96KHz yet, so none of this has been on my to-do list.

Using the new (and I think unreleased) driver I have tested all 26
physical inputs, all 26 physical outputs and all 26 playback outputs. The only two things that I have found that are not working this morning are:

1) spdif receive of audio
2) spdif clocking (lock/sync) indications

spdif transmit is fine at 44.1KHz.

I look forward to hearing how you progress once you get set up to use
this card at 96KHz.

Cheers,
Mark

Quoted 53 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Nick Arnold
Sent: Wednesday, August 27, 2003 1:09 AM
To: [email protected]
Subject: [Alsa-devel] RME Hammerfall HDSP 9652

Hello,

We here are attempting to get the RME Hammerfall HDSP 9652 card working with
ALSA 0.9.6 on a SMP redhat 9 box. We're trying to use 12 input channels and
three output channels, running at 96KHz 24bit samples. The output of "uname -a" on the box says:

Linux wombat 2.4.20-19.9smp #1 SMP Tue Jul 15 16:45:28 EDT 2003 i686 athlon i386 GNU/Linux

We had been successfully using the "old" RME Hammerfall 9652 with ALSA 0.9.0
beta12 on an older machine with the same channels/sample rate/sample size.

With a signal connected to one input channel and nothing written to the card
we're seeing output on several channels. I think this could be related to settings of the hardware mixer? I'm looking into the "amixer" utility but have so-far been unable to find any options that help.

We have a known signal (IRIG-B) connected to one input channel and our software is now having trouble decoding the signal when it didn't before. We're not sure why this could be occuring.

1) first of all, we're assuming it is possible to get the card working on this setup?

2) I'm trying to determine if this card actually supports 96KHz (ie as a parameter to snd_pcm_hw_params_set_rate_near() for example) --
the "old"
card was always set to 48KHz and we "simulated" 96KHz with two 48KHz channels per 96KHz channel. Is this still the way to do it?

3) It seems we need to find the right "amixer" incantations to get the driver
into a workable state. The one thing that seems to have
helped so far is
to set the "Sample Clock Source" interface of the mixer to
"Internal 96.0
kHz" with the command:

amixer -c 0 cset -numid=11 6

Quoted 8 lines

But we're not sure this is really what we want. Are there
other commands
we need? I don't believe we have a problem with output channel levels since we've played with these.

any help much appreciated,

nick.

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf