Update of /cvsroot/alsa/alsa-kernel/pci/rme9652 In directory sc8-pr-cvs1:/tmp/cvs-serv24006
Modified Files: hdsp.c Log Message: fixes by Thomas Charbonnel <[EMAIL PROTECTED]>: * Reenables the hdsp_check_for_iobox function Paul bypassed in his previous patch. This function is needed for mobile setups. It handles the cases where the iobox has been unplugged/replugged or lost power supply. * Fixes the channel limit Mark has reported on the HDSP9652 (24 instead of 26). * Fixes a locking issue reported by Joshua N Pritikin. Index: hdsp.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- hdsp.c 3 Jul 2003 11:31:21 -0000 1.39 +++ hdsp.c 3 Jul 2003 11:41:50 -0000 1.40 @@ -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. */ @@ -528,15 +528,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) { @@ -866,6 +866,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 */ @@ -897,8 +902,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) { @@ -937,7 +940,6 @@ rate_bits = HDSP_Frequency96KHz; break; default: - spin_unlock_irq(&hdsp->lock); return -EINVAL; } @@ -945,7 +947,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; } @@ -976,7 +977,6 @@ hdsp_update_simple_mixer_controls (hdsp); } - spin_unlock_irq(&hdsp->lock); return 0; } @@ -3354,9 +3354,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) { ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog