Merge branch 'topic/misc' into for-linus
authorTakashi Iwai <tiwai@suse.de>
Wed, 26 Oct 2011 21:51:43 +0000 (23:51 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 26 Oct 2011 21:51:43 +0000 (23:51 +0200)
1  2 
include/sound/pcm.h
sound/core/pcm_native.c
sound/usb/card.c

diff --combined include/sound/pcm.h
@@@ -825,6 -825,8 +825,8 @@@ int snd_pcm_hw_constraint_step(struct s
  int snd_pcm_hw_constraint_pow2(struct snd_pcm_runtime *runtime,
                               unsigned int cond,
                               snd_pcm_hw_param_t var);
+ int snd_pcm_hw_rule_noresample(struct snd_pcm_runtime *runtime,
+                              unsigned int base_rate);
  int snd_pcm_hw_rule_add(struct snd_pcm_runtime *runtime,
                        unsigned int cond,
                        int var,
@@@ -1035,8 -1037,6 +1037,8 @@@ static inline void snd_pcm_mmap_data_cl
        atomic_dec(&substream->mmap_count);
  }
  
 +int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
 +                           struct vm_area_struct *area);
  /* mmap for io-memory area */
  #if defined(CONFIG_X86) || defined(CONFIG_PPC) || defined(CONFIG_ALPHA)
  #define SNDRV_PCM_INFO_MMAP_IOMEM     SNDRV_PCM_INFO_MMAP
diff --combined sound/core/pcm_native.c
@@@ -2058,16 -2058,12 +2058,12 @@@ EXPORT_SYMBOL(snd_pcm_open_substream)
  
  static int snd_pcm_open_file(struct file *file,
                             struct snd_pcm *pcm,
-                            int stream,
-                            struct snd_pcm_file **rpcm_file)
+                            int stream)
  {
        struct snd_pcm_file *pcm_file;
        struct snd_pcm_substream *substream;
        int err;
  
-       if (rpcm_file)
-               *rpcm_file = NULL;
        err = snd_pcm_open_substream(pcm, stream, file, &substream);
        if (err < 0)
                return err;
                substream->pcm_release = pcm_release_private;
        }
        file->private_data = pcm_file;
-       if (rpcm_file)
-               *rpcm_file = pcm_file;
        return 0;
  }
  
@@@ -2113,7 -2108,6 +2108,6 @@@ static int snd_pcm_capture_open(struct 
  static int snd_pcm_open(struct file *file, struct snd_pcm *pcm, int stream)
  {
        int err;
-       struct snd_pcm_file *pcm_file;
        wait_queue_t wait;
  
        if (pcm == NULL) {
        add_wait_queue(&pcm->open_wait, &wait);
        mutex_lock(&pcm->open_mutex);
        while (1) {
-               err = snd_pcm_open_file(file, pcm, stream, &pcm_file);
+               err = snd_pcm_open_file(file, pcm, stream);
                if (err >= 0)
                        break;
                if (err == -EAGAIN) {
@@@ -3156,8 -3150,8 +3150,8 @@@ static const struct vm_operations_struc
  /*
   * mmap the DMA buffer on RAM
   */
 -static int snd_pcm_default_mmap(struct snd_pcm_substream *substream,
 -                              struct vm_area_struct *area)
 +int snd_pcm_lib_default_mmap(struct snd_pcm_substream *substream,
 +                           struct vm_area_struct *area)
  {
        area->vm_flags |= VM_RESERVED;
  #ifdef ARCH_HAS_DMA_MMAP_COHERENT
        area->vm_ops = &snd_pcm_vm_ops_data_fault;
        return 0;
  }
 +EXPORT_SYMBOL_GPL(snd_pcm_lib_default_mmap);
  
  /*
   * mmap the DMA buffer on I/O memory area
@@@ -3243,7 -3236,7 +3237,7 @@@ int snd_pcm_mmap_data(struct snd_pcm_su
        if (substream->ops->mmap)
                err = substream->ops->mmap(substream, area);
        else
 -              err = snd_pcm_default_mmap(substream, area);
 +              err = snd_pcm_lib_default_mmap(substream, area);
        if (!err)
                atomic_inc(&substream->mmap_count);
        return err;
diff --combined sound/usb/card.c
@@@ -65,9 -65,9 +65,9 @@@
  #include "helper.h"
  #include "debug.h"
  #include "pcm.h"
- #include "urb.h"
  #include "format.h"
  #include "power.h"
+ #include "stream.h"
  
  MODULE_AUTHOR("Takashi Iwai <tiwai@suse.de>");
  MODULE_DESCRIPTION("USB Audio");
@@@ -185,7 -185,7 +185,7 @@@ static int snd_usb_create_stream(struc
                return -EINVAL;
        }
  
-       if (! snd_usb_parse_audio_endpoints(chip, interface)) {
+       if (! snd_usb_parse_audio_interface(chip, interface)) {
                usb_set_interface(dev, interface, 0); /* reset the current interface */
                usb_driver_claim_interface(&usb_audio_driver, iface, (void *)-1L);
                return -EINVAL;
@@@ -530,11 -530,8 +530,11 @@@ snd_usb_audio_probe(struct usb_device *
        return chip;
  
   __error:
 -      if (chip && !chip->num_interfaces)
 -              snd_card_free(chip->card);
 +      if (chip) {
 +              if (!chip->num_interfaces)
 +                      snd_card_free(chip->card);
 +              chip->probing = 0;
 +      }
        mutex_unlock(&register_mutex);
   __err_val:
        return NULL;