Skip to contentSkip to conversation

hdsp patch

PATCH Paul Davis 2 participants 8 messages Jun 14, 2003 – Jun 16, 2003

lore
Share & tools
lore

Paul Davis

author
#0 lore raw

this patch fixes some basic problems with the hdsp driver with respect to the hdsp9652 card. it also cleans up a few minor issues with naming in the driver, and slightly rationalizes initialization to involve the minimum of special-casing for the hdsp9652.

the basic problem with the hdsp9652 was related to 8 bit versus 32 bit offsets when addressing the mixer memory. once this was fixed, everything worked. this driver continues to work fine on my pci+digiface unit as well.

my apologies for this taking so long - it has taken a long time to ask RME the "right" question, and quite a long time to get the answer. once i got down to it, the fix took 5 minutes!

now we just need to solve the multiface initialization problems :(

--p

Index: hdsp.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v retrieving revision 1.35

hdsp.c +184 -119
diff -u -u -r1.35 hdsp.c
@@ -75,6 +75,8 @@
 #define DIGIFACE_DS_CHANNELS     14
 #define MULTIFACE_SS_CHANNELS    18
 #define MULTIFACE_DS_CHANNELS    14
+#define H9652_DS_CHANNELS        24
+#define H9652_SS_CHANNELS        24
 
 /* Write registers. These are defined as byte-offsets from the iobase value.
  */
@@ -84,7 +86,7 @@
 #define HDSP_controlRegister		64
 #define HDSP_interruptConfirmation	96
 #define HDSP_outputEnable	  	128
-#define HDSP_jtagReg  			256
+#define HDSP_control2Reg		256
 #define HDSP_midiDataOut0  		352
 #define HDSP_midiDataOut1  		356
 #define HDSP_fifoData  			368
@@ -120,7 +122,7 @@
 
 #define HDSP_IO_EXTENT     5192
 
-/* jtag register bits */
+/* control2 register bits */
 
 #define HDSP_TMS                0x01
 #define HDSP_TCK                0x02
@@ -133,6 +135,7 @@
 #define HDSP_VERSION_BIT	0x100
 #define HDSP_BIGENDIAN_MODE     0x200
 #define HDSP_RD_MULTIPLE        0x400
+#define HDSP_9652_ENABLE_MIXER  0x800
 
 #define HDSP_S_PROGRAM     	(HDSP_PROGRAM|HDSP_CONFIG_MODE_0)
 #define HDSP_S_LOAD		(HDSP_PROGRAM|HDSP_CONFIG_MODE_1)
@@ -358,15 +361,16 @@
         hdsp_midi_t           midi[2];
 	struct tasklet_struct midi_tasklet;
 	int                   precise_ptr;
-	u32                   control_register;	         /* cached value */
+	u32                   control_register;	     /* cached value */
+	u32                   control2_register;     /* cached value */
 	u32                   creg_spdif;
 	u32                   creg_spdif_stream;
-	char                 *card_name;		    /* digiface/multiface */
+	char                 *card_name;	     /* digiface/multiface */
 	HDSP_IO_Type          io_type;               /* ditto, but for code use */
         unsigned short        firmware_rev;
 	unsigned short	      state;		     /* stores state bits */
 	u32		      firmware_cache[24413]; /* this helps recover from accidental iobox power failure */
-	size_t                period_bytes; 	    /* guess what this is */
+	size_t                period_bytes; 	     /* guess what this is */
 	unsigned char         ds_channels;
 	unsigned char         ss_channels;	    /* different for multiface/digiface */
 	void                 *capture_buffer_unaligned;	 /* original buffer addresses */
@@ -452,7 +456,7 @@
 /* prototypes */
 static int __devinit snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp);
 static int __devinit snd_hdsp_create_pcm(snd_card_t *card, hdsp_t *hdsp);
-static inline int snd_hdsp_initialize_input_enable (hdsp_t *hdsp);
+static inline int snd_hdsp_enable_io (hdsp_t *hdsp);
 static inline void snd_hdsp_initialize_midi_flush (hdsp_t *hdsp);
 static inline void snd_hdsp_initialize_channels (hdsp_t *hdsp);
 static inline int hdsp_fifo_wait(hdsp_t *hdsp, int count, int timeout);
@@ -460,18 +464,6 @@
 static int hdsp_autosync_ref(hdsp_t *hdsp);
 static int snd_hdsp_set_defaults(hdsp_t *hdsp);
 
-static inline int hdsp_is_9652 (hdsp_t *hdsp)
-{
-	switch (hdsp->firmware_rev) {
-	case 0x64:
-	case 0x65:
-	case 0x68:
-		return 1;
-	default:
-		return 0;
-	}
-}
-
 static inline int hdsp_playback_to_output_key (hdsp_t *hdsp, int in, int out)
 {
 	switch (hdsp->firmware_rev) {
@@ -504,12 +496,15 @@
 
 static inline int hdsp_check_for_iobox (hdsp_t *hdsp)
 {
+	return 0;
+#if 0
 	if (hdsp_read (hdsp, HDSP_statusRegister) & HDSP_ConfigError) {
 		snd_printk ("Hammerfall-DSP: no Digiface or Multiface connected!\n");
 		hdsp->state &= ~HDSP_FirmwareLoaded;
 		return -EIO;
 	}
 	return 0;
+#endif
 }
 
 static int snd_hdsp_load_firmware_from_cache(hdsp_t *hdsp) {
@@ -521,7 +516,7 @@
 		
 		snd_printk ("loading firmware\n");
 
-		hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_PROGRAM);
+		hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_PROGRAM);
 		hdsp_write (hdsp, HDSP_fifoData, 0);
 		
 		if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT)) {
@@ -529,7 +524,7 @@
 			return -EIO;
 		}
 		
-		hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_LOAD);
+		hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_LOAD);
 		
 		for (i = 0; i < 24413; ++i) {
 			hdsp_write(hdsp, HDSP_fifoData, hdsp->firmware_cache[i]);
@@ -544,7 +539,12 @@
 		    	return -EIO;
 		}
 
-		hdsp_write (hdsp, HDSP_jtagReg, 0);
+#ifdef SNDRV_BIG_ENDIAN
+		hdsp->control2_register = HDSP_BIGENDIAN_MODE;
+#else
+		hdsp->control2_register = 0;
+#endif
+		hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
 		snd_printk ("finished firmware loading\n");
 		
 		if ((1000 / HZ) < 3000) {
@@ -574,25 +574,25 @@
 		return -EIO;
 	}
 
-	if ((err = snd_hdsp_initialize_input_enable(hdsp)) < 0) {
+	if ((err = snd_hdsp_enable_io(hdsp)) < 0) {
 		return err;
 	}
 		
 	if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
 	
-		hdsp_write (hdsp, HDSP_jtagReg, HDSP_PROGRAM);
+		hdsp_write (hdsp, HDSP_control2Reg, HDSP_PROGRAM);
 		hdsp_write (hdsp, HDSP_fifoData, 0);
 		if (hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT) < 0) {
 			return -EIO;
 		}
 
-		hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_LOAD);
+		hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_LOAD);
 		hdsp_write (hdsp, HDSP_fifoData, 0);
 
 		if (hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT)) {
 			hdsp->io_type = Multiface;
-			hdsp_write (hdsp, HDSP_jtagReg, HDSP_VERSION_BIT);
-			hdsp_write (hdsp, HDSP_jtagReg, HDSP_S_LOAD);
+			hdsp_write (hdsp, HDSP_control2Reg, HDSP_VERSION_BIT);
+			hdsp_write (hdsp, HDSP_control2Reg, HDSP_S_LOAD);
 			hdsp_fifo_wait (hdsp, 0, HDSP_SHORT_WAIT);
 		} else {
 			hdsp->io_type = Digiface;
@@ -657,36 +657,41 @@
 {
 	unsigned int ad;
 
-	if (hdsp_is_9652 (hdsp)) {
+	if (addr >= HDSP_MATRIX_MIXER_SIZE)
+		return -1;
+		
+	if (hdsp->io_type == H9652) {
+
+		/* from martin bj�rnsen:
+		   
+		   "You can only write dwords to the
+		   mixer memory which contain two
+		   mixer values in the low and high
+		   word. So if you want to change
+		   value 0 you have to read value 1
+		   from the cache and write both to
+		   the first dword in the mixer
+		   memory."
+		*/
 
-		if ((ad = addr/2) < 676) {
+		hdsp->mixer_matrix[addr] = data;
 
-			/* from martin bj�rnsen:
+		/* `addr' addresses a 16-bit wide address, but
+		   the address space accessed via hdsp_write
+		   uses byte offsets. put another way, addr
+		   varies from 0 to 1351, but to access the
+		   corresponding memory location, we need
+		   to access 0 to 2703 ...
+		*/
 
-			   "You can only write dwords to the
-			   mixer memory which contain two
-			   mixer values in the low and high
-			   word. So if you want to change
-			   value 0 you have to read value 1
-			   from the cache and write both to
-			   the first dword in the mixer
-			   memory."
-			*/
-
-			hdsp->mixer_matrix[addr] = data;
-			hdsp_write (hdsp, 1024 + ad, 
-				    (hdsp->mixer_matrix[(addr&0x7fe)+1] << 16) + 
-				    hdsp->mixer_matrix[addr&0x7fe]);
-			return 0;
-		} else {
-			return -1;
-		}
+		hdsp_write (hdsp, 4096 + (addr*2), 
+			    (hdsp->mixer_matrix[(addr&0x7fe)+1] << 16) + 
+			    hdsp->mixer_matrix[addr&0x7fe]);
 		
+		return 0;
 
 	} else {
-		if (addr >= HDSP_MATRIX_MIXER_SIZE)
-			return -1;
-		
+
 		ad = (addr << 16) + data;
 		
 		if (hdsp_fifo_wait(hdsp, 127, HDSP_LONG_WAIT)) {
@@ -924,6 +929,7 @@
 			hdsp->channel_map = channel_map_mf_ss;
 			break;
 		case Digiface:
+		case H9652:
 			hdsp->channel_map = channel_map_df_ss;
 			break;
 		default:
@@ -2004,7 +2010,19 @@
 	
 	uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
 	uinfo->count = 1;
-	uinfo->value.enumerated.items = (hdsp->io_type == Digiface) ? 6 : 4;
+
+	switch (hdsp->io_type) {
+	case Digiface:
+	case H9652:
+		uinfo->value.enumerated.items = 6;
+		break;
+	case Multiface:
+		uinfo->value.enumerated.items = 4;
+	default:
+		uinfo->value.enumerated.items = 0;
+		break;
+	}
+		
 	if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
 		uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
 	strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
@@ -2028,7 +2046,19 @@
 	
 	if (!snd_hdsp_use_is_exclusive(hdsp))
 		return -EBUSY;
-	max = (hdsp->io_type == Digiface) ? 6 : 4;
+
+	switch (hdsp->io_type) {
+	case Digiface:
+	case H9652:
+		max = 6;
+		break;
+	case Multiface:
+		max = 4;
+		break;
+	default:
+		return -EIO;
+	}
+
 	val = ucontrol->value.enumerated.item[0] % max;
 	spin_lock_irqsave(&hdsp->lock, flags);
 	change = (int)val != hdsp_pref_sync_ref(hdsp);
@@ -2496,7 +2526,22 @@
 	hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol);
 
 	offset = ucontrol->id.index - 1;
-	snd_assert(offset >= 0 || offset < ((hdsp->io_type == Digiface) ? 3 : 1), return -EINVAL);
+	snd_assert(offset >= 0);
+
+	switch (hdsp->io_type) {
+	case Digiface:
+	case H9652:
+		if (offset >= 3)
+			return -EINVAL;
+		break;
+	case Multiface:
+		if (offset >= 1) 
+			return -EINVAL;
+		break;
+	default:
+		return -EIO;
+	}
+
 	ucontrol->value.enumerated.item[0] = hdsp_adat_sync_check(hdsp, offset);
 	return 0;
 }
@@ -2593,8 +2638,9 @@
 	snd_kcontrol_t *kctl;
 
 	for (idx = 0; idx < HDSP_CONTROLS; idx++) {
-		if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_controls[idx], hdsp))) < 0)
+		if ((err = snd_ctl_add(card, kctl = snd_ctl_new1(&snd_hdsp_controls[idx], hdsp))) < 0) {
 			return err;
+		}
 		if (idx == 1)	/* IEC958 (S/PDIF) Stream */
 			hdsp->spdif_ctl = kctl;
 	}
@@ -2602,10 +2648,18 @@
 	snd_hdsp_playback_mixer.name = "Chn";
 	snd_hdsp_adat_sync_check.name = "ADAT Lock Status";
 
-	if (hdsp->io_type == Digiface) {
+	switch (hdsp->io_type) {
+	case Digiface:
 		limit = DIGIFACE_SS_CHANNELS;
-	} else {
+		break;
+	case H9652:
+		limit = H9652_SS_CHANNELS;
+		break;
+	case Multiface:
 		limit = MULTIFACE_SS_CHANNELS;
+		break;
+	default:
+		return -EIO;
 	}
 	
 	/* The index values are one greater than the channel ID so that alsamixer
@@ -2627,7 +2681,7 @@
 	if ((err = snd_ctl_add (card, kctl = snd_ctl_new1(&snd_hdsp_adat_sync_check, hdsp)))) {
 		return err;
 	}	
-	if (hdsp->io_type == Digiface) {
+	if (hdsp->io_type == Digiface || hdsp->io_type == H9652) {
 		for (idx = 1; idx < 3; ++idx) {
 			snd_hdsp_adat_sync_check.index = idx+1;
 			if ((err = snd_ctl_add (card, kctl = snd_ctl_new1(&snd_hdsp_adat_sync_check, hdsp)))) {
@@ -2681,6 +2735,7 @@
 	snd_iprintf(buffer, "IRQ: %d Registers bus: 0x%lx VM: 0x%lx\n",
 		    hdsp->irq, hdsp->port, hdsp->iobase);
 	snd_iprintf(buffer, "Control register: 0x%x\n", hdsp->control_register);
+	snd_iprintf(buffer, "Control2 register: 0x%x\n", hdsp->control2_register);
 	snd_iprintf(buffer, "Status register: 0x%x\n", status);
 	snd_iprintf(buffer, "Status2 register: 0x%x\n", status2);
 	snd_iprintf(buffer, "FIFO status: %d\n", hdsp_read(hdsp, HDSP_fifoStatus) & 0xff);
@@ -2854,6 +2909,7 @@
 
 	switch (hdsp->io_type) {
 	case Digiface:
+	case H9652:
 		x = status & HDSP_Sync1;
 		if (status & HDSP_Lock1) {
 			snd_iprintf(buffer, "ADAT2: %s\n", x ? "Sync" : "Lock");
@@ -3025,13 +3081,13 @@
 		hdsp->mixer_matrix[i] = MINUS_INFINITY_GAIN;
 	}
 
-	for (i = 0; i < (hdsp_is_9652(hdsp) ? 1352 : HDSP_MATRIX_MIXER_SIZE); i++) {
+	for (i = 0; i < (hdsp->io_type == H9652 ? 1352 : HDSP_MATRIX_MIXER_SIZE); i++) {
 		if (hdsp_write_gain (hdsp, i, MINUS_INFINITY_GAIN)) {
 			return -EIO;
 		}
 	}
 	
-	if (!hdsp_is_9652(hdsp) && line_outs_monitor[hdsp->dev]) {
+	if ((hdsp->io_type != H9652) && line_outs_monitor[hdsp->dev]) {
 		
 		snd_printk ("sending all inputs and playback streams to line outs.\n");
 
@@ -3783,7 +3839,7 @@
 			return -EFAULT;
 		break;
 	case SNDRV_HDSP_IOCTL_GET_VERSION:
-		if (hdsp_is_9652(hdsp)) return -EINVAL;
+		if (hdsp->io_type == H9652) return -EINVAL;
 		if (hdsp->io_type == Undefined) {
 			if ((err = hdsp_get_iobox_version(hdsp)) < 0) {
 				return err;
@@ -3796,7 +3852,7 @@
 		}
 		break;
 	case SNDRV_HDSP_IOCTL_UPLOAD_FIRMWARE:
-		if (hdsp_is_9652(hdsp)) return -EINVAL;
+		if (hdsp->io_type == H9652) return -EINVAL;
 		/* SNDRV_HDSP_IOCTL_GET_VERSION must have been called */
 		if (hdsp->io_type == Undefined) return -EINVAL;
 
@@ -3904,7 +3960,19 @@
 	return 0;
 }
 
-static inline int snd_hdsp_initialize_input_enable (hdsp_t *hdsp)
+static inline void snd_hdsp_9652_enable_mixer (hdsp_t *hdsp)
+{
+        hdsp->control2_register |= HDSP_9652_ENABLE_MIXER;
+	hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
+}
+
+static inline void snd_hdsp_9652_disable_mixer (hdsp_t *hdsp)
+{
+        hdsp->control2_register &= ~HDSP_9652_ENABLE_MIXER;
+	hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
+}
+
+static inline int snd_hdsp_enable_io (hdsp_t *hdsp)
 {
 	int i;
 	
@@ -3922,14 +3990,27 @@
 
 static inline void snd_hdsp_initialize_channels(hdsp_t *hdsp)
 {
-	if (hdsp->io_type == Digiface) {
+	switch (hdsp->io_type) {
+	case Digiface:
 		hdsp->card_name = "RME Hammerfall DSP + Digiface";
 		hdsp->ss_channels = DIGIFACE_SS_CHANNELS;
 		hdsp->ds_channels = DIGIFACE_DS_CHANNELS;
-	} else {
+		break;
+
+	case H9652:
+		hdsp->card_name = "RME Hammerfall HDSP 9652";
+		hdsp->ss_channels = H9652_SS_CHANNELS;
+		hdsp->ds_channels = H9652_DS_CHANNELS;
+		break;
+
+	case Multiface:
 		hdsp->card_name = "RME Hammerfall DSP + Multiface";
 		hdsp->ss_channels = MULTIFACE_SS_CHANNELS;
 		hdsp->ds_channels = MULTIFACE_DS_CHANNELS;
+
+	default:
+ 		/* should never get here */
+		break;
 	}
 }
 
@@ -3937,10 +4018,6 @@
 {
 	snd_hdsp_flush_midi_input (hdsp, 0);
 	snd_hdsp_flush_midi_input (hdsp, 1);
-
-#ifdef SNDRV_BIG_ENDIAN
-	hdsp_write(hdsp, HDSP_jtagReg, HDSP_BIGENDIAN_MODE);
-#endif
 }
 
 static int __devinit snd_hdsp_create_alsa_devices(snd_card_t *card, hdsp_t *hdsp)
@@ -4001,6 +4078,7 @@
 	struct pci_dev *pci = hdsp->pci;
 	int err;
 	int i;
+	int is_9652 = 0;
 
 	hdsp->irq = -1;
 	hdsp->state = 0;
@@ -4027,23 +4105,27 @@
 	pci_read_config_word(hdsp->pci, PCI_CLASS_REVISION, &hdsp->firmware_rev);
 	strcpy(card->driver, "H-DSP");
 	strcpy(card->mixername, "Xilinx FPGA");
-	
+
 	switch (hdsp->firmware_rev & 0xff) {
 	case 0xa:
 	case 0xb:
 		hdsp->card_name = "RME Hammerfall DSP";
 		break;
+
 	case 0x64:
 	case 0x65:
 	case 0x68:
 		hdsp->card_name = "RME HDSP 9652";
+		is_9652 = 1;
 		break;
+
 	default:
 		return -ENODEV;
 	}
 
-	if ((err = pci_enable_device(pci)) < 0)
+	if ((err = pci_enable_device(pci)) < 0) {
 		return err;
+	}
 
 	pci_set_master(hdsp->pci);
 
@@ -4071,70 +4153,53 @@
 		return err;
 	}
 	
-	if (hdsp_is_9652(hdsp)) {
-		
-		if ((err = snd_hdsp_initialize_input_enable(hdsp)) != 0) {
+	if (!is_9652 && hdsp_check_for_iobox (hdsp)) {
+		/* no iobox connected, we defer initialization */
+		snd_printk("card initialization pending : waiting for firmware\n");
+		if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
 			return err;
 		}
-
-		hdsp->io_type = Digiface;		
-	
-		hdsp->ss_channels = DIGIFACE_SS_CHANNELS;
-		hdsp->ds_channels = DIGIFACE_DS_CHANNELS;
+		return 0;
+	}
 	
-		snd_hdsp_initialize_midi_flush(hdsp);
+	if ((err = snd_hdsp_enable_io(hdsp)) != 0) {
+		return err;
+	}
 	
+	if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
+		snd_printk("card initialization pending : waiting for firmware\n");
 		if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
 			return err;
 		}
-
-	} else {
+		return 0;
+	} 
 	
-		if (hdsp_check_for_iobox (hdsp)) {
-			/* no iobox connected, we defer initialization */
-			snd_printk("card initialization pending : waiting for firmware\n");
-			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
-				return err;
-			}
-			return 0;
-		}
+	snd_printk("Firmware already loaded, initializing card.\n");
+	
+	if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version1) {
+		hdsp->io_type = Multiface;
+	} else {
+		hdsp->io_type = Digiface;
+	}
 
-		if ((err = snd_hdsp_initialize_input_enable(hdsp)) != 0) {
-			return err;
-		}
-		
-		if ((hdsp_read (hdsp, HDSP_statusRegister) & HDSP_DllError) != 0) {
-			snd_printk("card initialization pending : waiting for firmware\n");
-			if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
-				return err;
-			}
-		return 0;
-		} 
-		
-		snd_printk("Firmware already loaded, initializing card.\n");
+	if (is_9652) {
+	        hdsp->io_type = H9652;
+	        snd_hdsp_9652_enable_mixer (hdsp);
+	}
 
-		if (hdsp_read(hdsp, HDSP_status2Register) & HDSP_version1) {
-			hdsp->io_type = Multiface;
-		} else {
-			hdsp->io_type = Digiface;
-		}
-		
-		if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
-			return err;
-		}
-		
-		snd_hdsp_initialize_channels(hdsp);
-		
-		snd_hdsp_initialize_midi_flush(hdsp);
-		
+	if ((err = snd_hdsp_create_hwdep(card, hdsp)) < 0) {
+		return err;
 	}
 	
+	snd_hdsp_initialize_channels(hdsp);
+	snd_hdsp_initialize_midi_flush(hdsp);
+
 	hdsp->state |= HDSP_FirmwareLoaded;	
-	
+
 	if ((err = snd_hdsp_create_alsa_devices(card, hdsp)) < 0) {
 		return err;
 	}
-	
+
 	return 0;	
 }
 
@@ -4201,7 +4266,7 @@
 	strcpy(card->shortname, "Hammerfall DSP");
 	sprintf(card->longname, "%s at 0x%lx, irq %d", hdsp->card_name, 
 		hdsp->port, hdsp->irq);
-	
+
 	if ((err = snd_card_register(card)) < 0) {
 		snd_card_free(card);
 		return err;

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#1 lore raw

Paul,
Hi. Thanks for sendign these along. First steps look good. I've
managed to patch things and it does install.

QUESTION - I am not explicitly loading snd-hammerfall-mem, but it is getting loaded when I start Alsa. Is this correct? I should _not_ explicitly load that file anywhere, but just let the driver load it?

Also, I seem to have had some problems with the second patch you
sent. It didn't apply. I'm sure it's just me. IT was so simple so I just typed it into the file. Were these sent as attachments, or as text within the email?

Hopefully I'll get some sound later today. Currently nothing is
hooked up to the card, so that will take a while to switch over as everything is quite buried right now.

Thanks,
Mark

Wizard alsa-driver # lsmod
Module Size Used by Not tainted

snd-hdsp               32556   0 
snd-rawmidi            15040   0  [snd-hdsp]
snd-seq-device          4352   0  [snd-rawmidi]
snd-pcm                64928   0  [snd-hdsp]
snd-timer              15876   0  [snd-pcm]
snd-page-alloc          5404   0  [snd-pcm]
snd-hwdep               5216   0  [snd-hdsp]
snd                    32836   0  [snd-hdsp snd-rawmidi snd-seq-device
snd-pcm snd-timer snd-hwdep]
snd-hammerfall-mem      1920   0  [snd-hdsp]
radeon                107972   1 
agpgart                11920   3  (autoclean)
ide-cd                 27080   0  (autoclean)
cdrom                  25984   0  (autoclean) [ide-cd]

Wizard alsa-driver #

Wizard card0 # more hdsp
RME HDSP 9652 (Card #1)
Buffers: capture dee00000 playback df000000
IRQ: 17 Registers bus: 0x28800000 VM: 0xe08e6000
Control register: 0x100805e
Status register: 0x2800000
Status2 register: 0xffff8701
FIFO status: 0
MIDI1 Output status: 0xffffff00
MIDI1 Input status: 0xffffff3a
MIDI2 Output status: 0xffffff00
MIDI2 Input status: 0xffffff39

Buffer Size (Latency): 8192 samples (2 periods of 32768 bytes) Hardware pointer (frames): 0
Passthru: no
Line out: on
Firmware version: 1

Sample Clock Source: Internal 32 kHz
Preferred Sync Reference: ADAT1
AutoSync Reference: None
AutoSync Frequency: 0
System Clock Mode: Master
System Clock Frequency: 32000

IEC958 input: Internal
IEC958 output: Coaxial only
IEC958 quality: Consumer
IEC958 emphasis: off
IEC958 NonAudio: off
IEC958 sample rate: Error flag set

ADAT1: No Lock
ADAT2: No Lock
ADAT3: No Lock
SPDIF: No Lock
Word Clock: No Lock
ADAT Sync: No Lock

Wizard card0 #

Quoted 5 lines · Paul Davis

this patch fixes some basic problems with the hdsp driver with respect to the hdsp9652 card. it also cleans up a few minor issues with naming in the driver, and slightly rationalizes initialization to involve the minimum of special-casing for the hdsp9652.

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

author
#2 lore raw
Quoted 3 lines

QUESTION - I am not explicitly loading snd-hammerfall-mem, but it is getting loaded when I start Alsa. Is this correct? I should _not_ explicitly load that file anywhere, but just let the driver load it?

it depends on how much physical RAM you have. with lots of RAM, it will be possible to get the required physically contiguous RAM for a long time after booting. with less RAM, you need to get the memory module loaded early, before other parts of booting have fragmented the kernel's physical memory map so much that its no longer possible.

Quoted 4 lines

Also, I seem to have had some problems with the second patch you
sent. It didn't apply. I'm sure it's just me. IT was so simple so I just typed it into the file. Were these sent as attachments, or as text within the email?

just text. typing it in is fine, too (its how i did it!)

--p

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#3 lore raw
In reply to Paul Davis

Paul,
I've been trying for the last day or so to get some sound out of the
card. Still no luck. The setup does work fine when I boot into Windows. I've certainly had a few problems on this end, like getting /etc/asound.state into a funny configuration that had both the on-board Via chipset and the HDSP 9652 in it. That's fixed, but still no sound.

I'm running as root. I've tried both Jack and straight Alsa with
aplay and alsaplayer. Everything acts like I should be getting sound, but I don't. The Alsa drivers appear to be loaded. Restarting Alsa looks pretty normal.

alsamixer says everything is turned up to 30. 'M' doesn't seem to
mute or unmute and channels for this card.

Can you clarify - do I need to make any 'connections' through the
HDSP 9652 to get the alsa_pcm:playback_1/2 to be enabled and supplying audio to my amp? If so, what commands are you using?

I'm attaching asound.state, .asoundrc and a little more info. Let me
know what else you want to see.

Thanks for any pointers you can provide.

Cheers,
Mark

Wizard root # lsmod
Module Size Used by Not tainted

snd-hdsp               32556   3 
snd-rawmidi            15040   0  [snd-hdsp]
snd-seq-device          4352   0  [snd-rawmidi]
snd-pcm                64928   2  [snd-hdsp]
snd-timer              15876   0  [snd-pcm]
snd-hwdep               5216   0  [snd-hdsp]
snd                    32836   1  [snd-hdsp snd-rawmidi snd-seq-device
snd-pcm snd-timer snd-hwdep]
radeon                107972   1 
agpgart                11920   3  (autoclean)
ide-cd                 27080   0  (autoclean)
cdrom                  25984   0  (autoclean) [ide-cd]
snd-page-alloc          5404   0  [snd-pcm]
snd-hammerfall-mem      1920   0  [snd-hdsp]

Wizard root #

Wizard root # cat /proc/asound/card0/hdsp
RME HDSP 9652 (Card #1)
Buffers: capture df000000 playback dee00000
IRQ: 17 Registers bus: 0xe8800000 VM: 0xe08e6000
Control register: 0x10080b3
Status register: 0x2043088
Status2 register: 0xffff8041
FIFO status: 0
MIDI1 Output status: 0xffffff00
MIDI1 Input status: 0xffffff5e
MIDI2 Output status: 0xffffff00
MIDI2 Input status: 0xffffff4b

Buffer Size (Latency): 128 samples (2 periods of 512 bytes) Hardware pointer (frames): 0
Passthru: no
Line out: on
Firmware version: 1

Sample Clock Source: Internal 44.1 kHz
Preferred Sync Reference: ADAT1
AutoSync Reference: ADAT1
AutoSync Frequency: 44100
System Clock Mode: Master
System Clock Frequency: 44100

IEC958 input: Internal
IEC958 output: Coaxial only
IEC958 quality: Consumer
IEC958 emphasis: off
IEC958 NonAudio: off
IEC958 sample rate: Error flag set

ADAT1: Sync
ADAT2: No Lock
ADAT3: No Lock
SPDIF: No Lock
Word Clock: No Lock
ADAT Sync: No Lock

Wizard root #

Quoted 10 lines · Paul Davis

this patch fixes some basic problems with the hdsp driver with respect to the hdsp9652 card. it also cleans up a few minor issues with naming in the driver, and slightly rationalizes initialization to involve the minimum of special-casing for the hdsp9652.

the basic problem with the hdsp9652 was related to 8 bit versus 32 bit offsets when addressing the mixer memory. once this was fixed, everything worked. this driver continues to work fine on my pci+digiface unit as well.

Quoted 8 lines

my apologies for this taking so long - it has taken a long time to ask RME the "right" question, and quite a long time to get the answer. once i got down to it, the fix took 5 minutes!

now we just need to solve the multiface initialization problems :(

--p

state.'' {
	control.1 {
		comment.access 'read write'
		comment.type IEC958
		iface PCM
		name 'IEC958 Playback Default'
		value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.2 {
		comment.access 'read write inactive'
		comment.type IEC958
		iface PCM
		name 'IEC958 Playback PCM Stream'
		value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.3 {
		comment.access read
		comment.type IEC958
		iface MIXER
		name 'IEC958 Playback Con Mask'
		value '3b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.4 {
		comment.access read
		comment.type IEC958
		iface MIXER
		name 'IEC958 Playback Pro Mask'
		value '1f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
	}
	control.5 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface HWDEP
		name Mixer
		value.0 0
		value.1 0
		value.2 0
	}
	control.6 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 ADAT1
		comment.item.1 Coaxial
		comment.item.2 Internal
		iface PCM
		name 'IEC958 Input Connector'
		value Internal
	}
	control.7 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name 'IEC958 Output also on ADAT1'
		value false
	}
	control.8 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name 'IEC958 Professional Bit'
		value false
	}
	control.9 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name 'IEC958 Emphasis Bit'
		value false
	}
	control.10 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name 'IEC958 Non-audio Bit'
		value false
	}
	control.11 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 AutoSync
		comment.item.1 'Internal 32.0 kHz'
		comment.item.2 'Internal 44.1 kHz'
		comment.item.3 'Internal 48.0 kHz'
		comment.item.4 'Internal 64.0 kHz'
		comment.item.5 'Internal 88.2 kHz'
		comment.item.6 'Internal 96.0 kHz'
		iface PCM
		name 'Sample Clock Source'
		value 'Internal 44.1 kHz'
	}
	control.12 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 Master
		comment.item.1 Slave
		iface HWDEP
		name 'System Clock Mode'
		value Master
	}
	control.13 {
		comment.access 'read write'
		comment.type ENUMERATED
		comment.item.0 Word
		comment.item.1 'ADAT Sync'
		comment.item.2 IEC958
		comment.item.3 ADAT1
		comment.item.4 ADAT2
		comment.item.5 ADAT3
		iface HWDEP
		name 'Preferred Sync Reference'
		value ADAT1
	}
	control.14 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 Word
		comment.item.1 'ADAT Sync'
		comment.item.2 IEC958
		comment.item.3 None
		comment.item.4 ADAT1
		comment.item.5 ADAT2
		comment.item.6 ADAT3
		iface HWDEP
		name 'AutoSync Reference'
		value None
	}
	control.15 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 '32000'
		comment.item.1 '44100'
		comment.item.2 '48000'
		comment.item.3 '64000'
		comment.item.4 '88200'
		comment.item.5 '96000'
		comment.item.6 None
		iface HWDEP
		name 'SPDIF Sample Rate'
		value None
	}
	control.16 {
		comment.access read
		comment.type INTEGER
		comment.range '0 - 0'
		iface HWDEP
		name 'System Sample Rate'
		value 44100
	}
	control.17 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 '32000'
		comment.item.1 '44100'
		comment.item.2 '48000'
		comment.item.3 '64000'
		comment.item.4 '88200'
		comment.item.5 '96000'
		comment.item.6 None
		iface PCM
		name 'External Rate'
		value '48000'
	}
	control.18 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'Word Clock Lock Status'
		value 'No Lock'
	}
	control.19 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'SPDIF Lock Status'
		value 'No Lock'
	}
	control.20 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'ADAT Sync Lock Status'
		value 'No Lock'
	}
	control.21 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name Passthru
		value false
	}
	control.22 {
		comment.access 'read write'
		comment.type BOOLEAN
		iface HWDEP
		name 'Line Out'
		value true
	}
	control.23 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 1
		value 19665
	}
	control.24 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 2
		value 19665
	}
	control.25 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 3
		value 19665
	}
	control.26 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 4
		value 19665
	}
	control.27 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 5
		value 19665
	}
	control.28 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 6
		value 19665
	}
	control.29 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 7
		value 19665
	}
	control.30 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 8
		value 19665
	}
	control.31 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 9
		value 19665
	}
	control.32 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 10
		value 19665
	}
	control.33 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 11
		value 19665
	}
	control.34 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 12
		value 19665
	}
	control.35 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 13
		value 19665
	}
	control.36 {
		comment.access 'read write'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 14
		value 19665
	}
	control.37 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 15
		value 19665
	}
	control.38 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 16
		value 19665
	}
	control.39 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 17
		value 19665
	}
	control.40 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 18
		value 19665
	}
	control.41 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 19
		value 19665
	}
	control.42 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 20
		value 19665
	}
	control.43 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 21
		value 19665
	}
	control.44 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 22
		value 19665
	}
	control.45 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 23
		value 19665
	}
	control.46 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 24
		value 19665
	}
	control.47 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 25
		value 19665
	}
	control.48 {
		comment.access 'read write volatile'
		comment.type INTEGER
		comment.range '0 - 65536 (step 1)'
		iface MIXER
		name Chn
		index 26
		value 19665
	}
	control.49 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'ADAT Lock Status'
		index 1
		value Sync
	}
	control.50 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'ADAT Lock Status'
		index 2
		value 'No Lock'
	}
	control.51 {
		comment.access read
		comment.type ENUMERATED
		comment.item.0 'No Lock'
		comment.item.1 Lock
		comment.item.2 Sync
		iface HWDEP
		name 'ADAT Lock Status'
		index 3
		value 'No Lock'
	}
}
pcm.hdsp {
           type hw
	   card 0
         }
ctl.hdsp {
           type hw
           card 0
         }
author
#4 lore raw
Quoted 4 lines

RME HDSP 9652 (Card #1)
Buffers: capture df000000 playback dee00000
IRQ: 17 Registers bus: 0xe8800000 VM: 0xe08e6000
Control register: 0x10080b3

You don't have the correct version of the driver. It would print:

RME Hammerfall HDSP 9652 (Card #1)
Buffers: capture f7000000 playback f6e00000
IRQ: 11 Registers bus: 0xfebb0000 VM: 0xf88af000
Control register: 0x10080f9
Control2 register: 0x800

notice the extra "Control2" register printout. check the source code in alsa-kernel/pci/rme9652/hdsp.c contains the snd_hdsp_9652_enable_mixer, and verify that the modifications dates on your installed modules match those of the built object files. or something like that. its definitely a version skew thing.

--p

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#5 lore raw
Quoted 7 lines · Paul Davis
Quoted 4 lines

RME HDSP 9652 (Card #1)
Buffers: capture df000000 playback dee00000
IRQ: 17 Registers bus: 0xe8800000 VM: 0xe08e6000
Control register: 0x10080b3

You don't have the correct version of the driver. It would print:

Quoted 7 lines

RME Hammerfall HDSP 9652 (Card #1)
Buffers: capture f7000000 playback f6e00000
IRQ: 11 Registers bus: 0xfebb0000 VM: 0xf88af000
Control register: 0x10080f9
Control2 register: 0x800

notice the extra "Control2" register printout.

Cool. Something to look for anyway....

15 minutes later.

Bingo! OK, so the new driver hadn't gotten moved to the right place. It seems to be there now. I'm getting sound, but it's full volume and I don't seem to be able to turn it down. (And I only have a few more minutes before my kid goes to sleep. Or tries to...) ;-)

I have alsamixer up and running, and the volumes turned down to 6 and it's still screaming loud. Is this like the old driver where the mixer didn't work at all? Or have I not set the right things?

The other thing I notice is I only seem to be able to set 24 values in my little script to set volumes. The driver I just replaced allowed me to set all 26.

OK, so a lot of progress, but I need to be able to reduce the volume badly!!!

What can I send you to see if it's my problem?

Also, please answer - do I need to set routing paths through the HDSP FPGA to get the mixer working? Can you supply a script to do that if it's necessary?

Thanks,
Mark

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

#6 lore raw
Quoted 20 lines · Mark Knecht

Cool. Something to look for anyway....

15 minutes later.

Bingo! OK, so the new driver hadn't gotten moved to the right place. It seems to be there now. I'm getting sound, but it's full volume and I don't seem to be able to turn it down. (And I only have a few more minutes before my kid goes to sleep. Or tries to...) ;-)

I have alsamixer up and running, and the volumes turned down to 6 and it's still screaming loud. Is this like the old driver where the mixer didn't work at all? Or have I not set the right things?

The other thing I notice is I only seem to be able to set 24 values in my little script to set volumes. The driver I just replaced allowed me to set all 26.

OK, so a lot of progress, but I need to be able to reduce the volume badly!!!

Quoted 8 lines

What can I send you to see if it's my problem?

Also, please answer - do I need to set routing paths through the HDSP FPGA to get the mixer working? Can you supply a script to do that if it's necessary?

Thanks,
Mark

BTW:

Wizard rme9652 # cat /proc/asound/card0/hdsp
RME Hammerfall HDSP 9652 (Card #1)
Buffers: capture de400000 playback de200000
IRQ: 17 Registers bus: 0xe8800000 VM: 0xe4cf7000
Control register: 0x10080de
Control2 register: 0x800
Status register: 0x2040008
Status2 register: 0xffff8061
FIFO status: 0
MIDI1 Output status: 0xffffff00
MIDI1 Input status: 0xffffff00
MIDI2 Output status: 0xffffff00
MIDI2 Input status: 0xffffff00

Buffer Size (Latency): 8192 samples (2 periods of 32768 bytes) Hardware pointer (frames): 0
Passthru: no
Line out: on
Firmware version: 1

Sample Clock Source: Internal 48 kHz
Preferred Sync Reference: ADAT1
AutoSync Reference: ADAT1
AutoSync Frequency: 48000
System Clock Mode: Master
System Clock Frequency: 48000

IEC958 input: Internal
IEC958 output: Coaxial only
IEC958 quality: Consumer
IEC958 emphasis: off
IEC958 NonAudio: off
IEC958 sample rate: Error flag set

ADAT1: Sync
ADAT2: No Lock
ADAT3: No Lock
SPDIF: No Lock
Word Clock: No Lock
ADAT Sync: No Lock

Wizard rme9652 #

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5

author
#7 lore raw
In reply to Mark Knecht
Quoted 3 lines

I have alsamixer up and running, and the volumes turned down to 6 and it's still screaming loud. Is this like the old driver where the mixer didn't work at all? Or have I not set the right things?

no, the mixer "works", but unfortunately it appears that i didn't test enough. the code still appears to be not quite right - there's a tricky detail that you can only write 32 bit values to the mixer, but each mixer element is 16 bits, so you always have to write the one you want to modify, plus its "neighbour". looks like i don't have that quite right yet.

Quoted 3 lines

The other thing I notice is I only seem to be able to set 24 values in my little script to set volumes. The driver I just replaced allowed me to set all 26.

i'll check on that. probably just a mistake on my part about the number of channels (i tend to forget the s/pdif outs).

Quoted 2 lines

Also, please answer - do I need to set routing paths through the HDSP FPGA to get the mixer working?

no. the mixer is (dis|en)abled by flipping a control register bit. if its on, its on. what needs work is the hdsp_write_gain() function.

--p

-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5