--- hdsp.c.old	2003-07-03 12:23:52.000000000 +0200
+++ hdsp.c	2003-07-03 12:24:07.000000000 +0200
@@ -76,8 +76,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
+#define H9652_DS_CHANNELS        26
+#define H9652_SS_CHANNELS        14
 
 /* Write registers. These are defined as byte-offsets from the iobase value.
  */
@@ -497,15 +497,15 @@
 
 static inline int hdsp_check_for_iobox (hdsp_t *hdsp)
 {
-	return 0;
-#if 0
+
+	if (hdsp->io_type == H9652) return 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) {
@@ -835,6 +835,11 @@
 	int current_rate;
 	int rate_bits;
 
+	/* ASSUMPTION: hdsp->lock is either help, or
+	   there is no need for it (e.g. during module
+	   initialization).
+	*/
+	
 	if (!(hdsp->control_register & HDSP_ClockModeMaster)) {	
 		if (called_internally) {
 			/* request from ctl or card initialization */
@@ -866,8 +871,6 @@
 	   exists for externally-driven rate changes. All we can do
 	   is to flag rate changes in the read/write routines.  */
 
-	spin_lock_irq(&hdsp->lock);
-
 	switch (rate) {
 	case 32000:
 		if (current_rate > 48000) {
@@ -906,7 +909,6 @@
 		rate_bits = HDSP_Frequency96KHz;
 		break;
 	default:
-		spin_unlock_irq(&hdsp->lock);
 		return -EINVAL;
 	}
 
@@ -914,7 +916,6 @@
 		snd_printk ("cannot change between single- and double-speed mode (capture PID = %d, playback PID = %d)\n",
 			    hdsp->capture_pid,
 			    hdsp->playback_pid);
-		spin_unlock_irq(&hdsp->lock);
 		return -EBUSY;
 	}
 
@@ -945,7 +946,6 @@
 		hdsp_update_simple_mixer_controls (hdsp);
 	}
 
-	spin_unlock_irq(&hdsp->lock);
 	return 0;
 }
 
@@ -3346,9 +3346,13 @@
 	/* how to make sure that the rate matches an externally-set one ?
 	 */
 
+	spin_lock_irq(&hdsp->lock);
 	if ((err = hdsp_set_rate(hdsp, params_rate(params), 0)) < 0) {
+		spin_unlock_irq(&hdsp->lock);
 		_snd_pcm_hw_param_setempty(params, SNDRV_PCM_HW_PARAM_RATE);
 		return err;
+	} else {
+		spin_unlock_irq(&hdsp->lock);
 	}
 
 	if ((err = hdsp_set_interrupt_interval(hdsp, params_period_size(params))) < 0) {
