Merge branch 'topic/hdsp' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Wed, 10 Jun 2009 05:26:32 +0000 (07:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 10 Jun 2009 05:26:32 +0000 (07:26 +0200)
* topic/hdsp:
  ALSA: hdsp - Add a comment about external firmwares for hdsp
  ALSA: hdsp: allow firmware loading from inside the kernel

1  2 
sound/pci/Kconfig
sound/pci/rme9652/hdsp.c

diff --combined sound/pci/Kconfig
@@@ -275,16 -275,6 +275,16 @@@ config SND_CS5535AUDI
          To compile this driver as a module, choose M here: the module
          will be called snd-cs5535audio.
  
 +config SND_CTXFI
 +      tristate "Creative Sound Blaster X-Fi"
 +      select SND_PCM
 +      help
 +        If you want to use soundcards based on Creative Sound Blastr X-Fi
 +        boards with 20k1 or 20k2 chips, say Y here.
 +
 +        To compile this driver as a module, choose M here: the module
 +        will be called snd-ctxfi.
 +
  config SND_DARLA20
        tristate "(Echoaudio) Darla20"
        select FW_LOADER
@@@ -542,6 -532,9 +542,9 @@@ config SND_HDS
          To compile this driver as a module, choose M here: the module
          will be called snd-hdsp.
  
+ comment "Don't forget to add built-in firmwares for HDSP driver"
+       depends on SND_HDSP=y
  config SND_HDSPM
        tristate "RME Hammerfall DSP MADI"
        select SND_HWDEP
diff --combined sound/pci/rme9652/hdsp.c
@@@ -28,7 -28,6 +28,7 @@@
  #include <linux/pci.h>
  #include <linux/firmware.h>
  #include <linux/moduleparam.h>
 +#include <linux/math64.h>
  
  #include <sound/core.h>
  #include <sound/control.h>
@@@ -403,9 -402,9 +403,9 @@@ MODULE_FIRMWARE("digiface_firmware_rev1
  #define HDSP_DMA_AREA_BYTES ((HDSP_MAX_CHANNELS+1) * HDSP_CHANNEL_BUFFER_BYTES)
  #define HDSP_DMA_AREA_KILOBYTES (HDSP_DMA_AREA_BYTES/1024)
  
- /* use hotplug firmeare loader? */
+ /* use hotplug firmware loader? */
  #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE)
- #if !defined(HDSP_USE_HWDEP_LOADER) && !defined(CONFIG_SND_HDSP)
+ #if !defined(HDSP_USE_HWDEP_LOADER)
  #define HDSP_FW_LOADER
  #endif
  #endif
@@@ -1048,6 -1047,7 +1048,6 @@@ static int hdsp_set_interrupt_interval(
  static void hdsp_set_dds_value(struct hdsp *hdsp, int rate)
  {
        u64 n;
 -      u32 r;
  
        if (rate >= 112000)
                rate /= 4;
                rate /= 2;
  
        n = DDS_NUMERATOR;
 -      div64_32(&n, rate, &r);
 +      n = div_u64(n, rate);
        /* n should be less than 2^32 for being written to FREQ register */
        snd_BUG_ON(n >> 32);
        /* HDSP_freqReg and HDSP_resetPointer are the same, so keep the DDS
@@@ -3097,6 -3097,7 +3097,6 @@@ static int snd_hdsp_get_adat_sync_check
  static int hdsp_dds_offset(struct hdsp *hdsp)
  {
        u64 n;
 -      u32 r;
        unsigned int dds_value = hdsp->dds_value;
        int system_sample_rate = hdsp->system_sample_rate;
  
         * dds_value = n / rate
         * rate = n / dds_value
         */
 -      div64_32(&n, dds_value, &r);
 +      n = div_u64(n, dds_value);
        if (system_sample_rate >= 112000)
                n *= 4;
        else if (system_sample_rate >= 56000)