Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 May 2010 16:41:44 +0000 (09:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 20 May 2010 16:41:44 +0000 (09:41 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (250 commits)
  ALSA: hda: Storage class should be before const qualifier
  ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies
  ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT
  ASoC: sdp4430 - add sdp4430 pcm ops to DAI.
  ASoC: TWL6040: Enable earphone path in codec
  ASoC: SDP4430: Add support for Earphone speaker
  ASoC: SDP4430: Add sdp4430 machine driver
  ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF
  ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function
  ALSA: sound/pci/asihpi: Use kzalloc
  ALSA: hdmi - dont fail on extra nodes
  ALSA: intelhdmi - add id for the CougarPoint chipset
  ALSA: intelhdmi - user friendly codec name
  ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS
  ALSA: asihpi: incorrect range check
  ALSA: asihpi: testing the wrong variable
  ALSA: es1688: add pedantic range checks
  ARM: McBSP: Add support for omap4 in McBSP driver
  ARM: McBSP: Fix request for irq in OMAP4
  OMAP: McBSP: Add 32-bit mode support
  ...

1  2 
arch/arm/mach-davinci/board-dm365-evm.c
include/linux/i2c/twl.h
sound/core/pcm_native.c
sound/soc/pxa/Kconfig

index 98814e6a5987c7a16e8820da400108ceb3db56ec,e78d8110b12efa82d6baeef14c289b53498ae859..84acef1d0b3d98be0797c1f4c439d58d77173ede
@@@ -54,6 -54,11 +54,6 @@@ static inline int have_tvp7002(void
        return 0;
  }
  
 -
 -#define DM365_ASYNC_EMIF_CONTROL_BASE 0x01d10000
 -#define DM365_ASYNC_EMIF_DATA_CE0_BASE        0x02000000
 -#define DM365_ASYNC_EMIF_DATA_CE1_BASE        0x04000000
 -
  #define DM365_EVM_PHY_MASK            (0x2)
  #define DM365_EVM_MDIO_FREQUENCY      (2200000) /* PHY bus frequency */
  
@@@ -600,7 -605,11 +600,11 @@@ static __init void dm365_evm_init(void
        /* maybe setup mmc1/etc ... _after_ mmc0 */
        evm_init_cpld();
  
+ #ifdef CONFIG_SND_DM365_AIC3X_CODEC
        dm365_init_asp(&dm365_evm_snd_data);
+ #elif defined(CONFIG_SND_DM365_VOICE_CODEC)
+       dm365_init_vc(&dm365_evm_snd_data);
+ #endif
        dm365_init_rtc();
        dm365_init_ks(&dm365evm_ks_data);
  
                        ARRAY_SIZE(dm365_evm_spi_info));
  }
  
 -static __init void dm365_evm_irq_init(void)
 -{
 -      davinci_irq_init();
 -}
 -
  MACHINE_START(DAVINCI_DM365_EVM, "DaVinci DM365 EVM")
        .phys_io        = IO_PHYS,
        .io_pg_offst    = (__IO_ADDRESS(IO_PHYS) >> 18) & 0xfffc,
        .boot_params    = (0x80000100),
        .map_io         = dm365_evm_map_io,
 -      .init_irq       = dm365_evm_irq_init,
 +      .init_irq       = davinci_irq_init,
        .timer          = &davinci_timer,
        .init_machine   = dm365_evm_init,
  MACHINE_END
diff --combined include/linux/i2c/twl.h
index a63b77d89d3095960ce2c679eb13a46f4587a38a,ebd90ce58ca246240804f686098d1af93b173be1..6de90bfc6acde5a2728cb4d95091ab2dd7115822
@@@ -496,7 -496,7 +496,7 @@@ struct twl4030_madc_platform_data 
        int             irq_line;
  };
  
 -/* Boards have uniqe mappings of {row, col} --> keycode.
 +/* Boards have unique mappings of {row, col} --> keycode.
   * Column and row are 8 bits each, but range only from 0..7.
   * a PERSISTENT_KEY is "always on" and never reported.
   */
@@@ -569,9 -569,9 +569,9 @@@ struct twl4030_codec_data 
        struct twl4030_codec_audio_data         *audio;
        struct twl4030_codec_vibra_data         *vibra;
  
-       /* twl6030 */
-       int audpwron_gpio;      /* audio power-on gpio */
-       int naudint_irq;        /* audio interrupt */
+       /* twl6040 */
+       int audpwron_gpio;      /* audio power-on gpio */
+       int naudint_irq;        /* audio interrupt */
  };
  
  struct twl4030_platform_data {
@@@ -664,15 -664,15 +664,15 @@@ static inline int twl4030charger_usb_en
  #define TWL4030_REG_VUSB3V1   19
  
  /* TWL6030 SMPS/LDO's */
 -/* EXTERNAL dc-to-dc buck convertor contollable via SR */
 +/* EXTERNAL dc-to-dc buck convertor controllable via SR */
  #define TWL6030_REG_VDD1      30
  #define TWL6030_REG_VDD2      31
  #define TWL6030_REG_VDD3      32
  
  /* Non SR compliant dc-to-dc buck convertors */
 -#define       TWL6030_REG_VMEM        33
 +#define TWL6030_REG_VMEM      33
  #define TWL6030_REG_V2V1      34
 -#define       TWL6030_REG_V1V29       35
 +#define TWL6030_REG_V1V29     35
  #define TWL6030_REG_V1V8      36
  
  /* EXTERNAL LDOs */
diff --combined sound/core/pcm_native.c
index 192dd407512fcc4688a1640597d9e76ac6ad05a8,4c3edc1532c9b5c1657be55acb3058181566374d..644c2bb17b86270e3c7fd88307858095470b1bb4
@@@ -484,13 -484,11 +484,13 @@@ static int snd_pcm_hw_params(struct snd
        snd_pcm_timer_resolution_change(substream);
        runtime->status->state = SNDRV_PCM_STATE_SETUP;
  
 -      pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
 -                              substream->latency_id);
 +      if (substream->latency_pm_qos_req) {
 +              pm_qos_remove_request(substream->latency_pm_qos_req);
 +              substream->latency_pm_qos_req = NULL;
 +      }
        if ((usecs = period_to_usecs(runtime)) >= 0)
 -              pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY,
 -                                      substream->latency_id, usecs);
 +              substream->latency_pm_qos_req = pm_qos_add_request(
 +                                      PM_QOS_CPU_DMA_LATENCY, usecs);
        return 0;
   _error:
        /* hardware might be unuseable from this time,
@@@ -545,8 -543,8 +545,8 @@@ static int snd_pcm_hw_free(struct snd_p
        if (substream->ops->hw_free)
                result = substream->ops->hw_free(substream);
        runtime->status->state = SNDRV_PCM_STATE_OPEN;
 -      pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY,
 -              substream->latency_id);
 +      pm_qos_remove_request(substream->latency_pm_qos_req);
 +      substream->latency_pm_qos_req = NULL;
        return result;
  }
  
@@@ -2112,7 -2110,9 +2112,9 @@@ static int snd_pcm_open_file(struct fil
  static int snd_pcm_playback_open(struct inode *inode, struct file *file)
  {
        struct snd_pcm *pcm;
+       int err = nonseekable_open(inode, file);
+       if (err < 0)
+               return err;
        pcm = snd_lookup_minor_data(iminor(inode),
                                    SNDRV_DEVICE_TYPE_PCM_PLAYBACK);
        return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_PLAYBACK);
  static int snd_pcm_capture_open(struct inode *inode, struct file *file)
  {
        struct snd_pcm *pcm;
+       int err = nonseekable_open(inode, file);
+       if (err < 0)
+               return err;
        pcm = snd_lookup_minor_data(iminor(inode),
                                    SNDRV_DEVICE_TYPE_PCM_CAPTURE);
        return snd_pcm_open(file, pcm, SNDRV_PCM_STREAM_CAPTURE);
@@@ -3312,18 -3314,13 +3316,13 @@@ static int snd_pcm_fasync(int fd, struc
        struct snd_pcm_file * pcm_file;
        struct snd_pcm_substream *substream;
        struct snd_pcm_runtime *runtime;
-       int err = -ENXIO;
  
-       lock_kernel();
        pcm_file = file->private_data;
        substream = pcm_file->substream;
        if (PCM_RUNTIME_CHECK(substream))
-               goto out;
+               return -ENXIO;
        runtime = substream->runtime;
-       err = fasync_helper(fd, file, on, &runtime->fasync);
- out:
-       unlock_kernel();
-       return err;
+       return fasync_helper(fd, file, on, &runtime->fasync);
  }
  
  /*
  #endif /* CONFIG_SND_SUPPORT_OLD_API */
  
  #ifndef CONFIG_MMU
- unsigned long dummy_get_unmapped_area(struct file *file, unsigned long addr,
-                                     unsigned long len, unsigned long pgoff,
-                                     unsigned long flags)
- {
-       return 0;
+ static unsigned long snd_pcm_get_unmapped_area(struct file *file,
+                                              unsigned long addr,
+                                              unsigned long len,
+                                              unsigned long pgoff,
+                                              unsigned long flags)
+ {
+       struct snd_pcm_file *pcm_file = file->private_data;
+       struct snd_pcm_substream *substream = pcm_file->substream;
+       struct snd_pcm_runtime *runtime = substream->runtime;
+       unsigned long offset = pgoff << PAGE_SHIFT;
+       switch (offset) {
+       case SNDRV_PCM_MMAP_OFFSET_STATUS:
+               return (unsigned long)runtime->status;
+       case SNDRV_PCM_MMAP_OFFSET_CONTROL:
+               return (unsigned long)runtime->control;
+       default:
+               return (unsigned long)runtime->dma_area + offset;
+       }
  }
  #else
- # define dummy_get_unmapped_area NULL
+ # define snd_pcm_get_unmapped_area NULL
  #endif
  
  /*
@@@ -3464,12 -3475,13 +3477,13 @@@ const struct file_operations snd_pcm_f_
                .aio_write =            snd_pcm_aio_write,
                .open =                 snd_pcm_playback_open,
                .release =              snd_pcm_release,
+               .llseek =               no_llseek,
                .poll =                 snd_pcm_playback_poll,
                .unlocked_ioctl =       snd_pcm_playback_ioctl,
                .compat_ioctl =         snd_pcm_ioctl_compat,
                .mmap =                 snd_pcm_mmap,
                .fasync =               snd_pcm_fasync,
-               .get_unmapped_area =    dummy_get_unmapped_area,
+               .get_unmapped_area =    snd_pcm_get_unmapped_area,
        },
        {
                .owner =                THIS_MODULE,
                .aio_read =             snd_pcm_aio_read,
                .open =                 snd_pcm_capture_open,
                .release =              snd_pcm_release,
+               .llseek =               no_llseek,
                .poll =                 snd_pcm_capture_poll,
                .unlocked_ioctl =       snd_pcm_capture_ioctl,
                .compat_ioctl =         snd_pcm_ioctl_compat,
                .mmap =                 snd_pcm_mmap,
                .fasync =               snd_pcm_fasync,
-               .get_unmapped_area =    dummy_get_unmapped_area,
+               .get_unmapped_area =    snd_pcm_get_unmapped_area,
        }
  };
diff --combined sound/soc/pxa/Kconfig
index 78e612100782caaaa6bbbbac2c57cae6a159c1b3,495a36fba360a2d6ba6b706eda3cadc91651c035..e30c8325f35e5fbccece8ff06f1fa8cc62951a3e
@@@ -23,7 -23,6 +23,7 @@@ config SND_PXA2XX_SOC_I2
  
  config SND_PXA_SOC_SSP
        tristate
 +      select PXA_SSP
  
  config SND_PXA2XX_SOC_CORGI
        tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
@@@ -43,6 -42,14 +43,14 @@@ config SND_PXA2XX_SOC_SPIT
          Say Y if you want to add support for SoC audio on Sharp
          Zaurus SL-Cxx00 models (Spitz, Borzoi and Akita).
  
+ config SND_PXA2XX_SOC_Z2
+       tristate "SoC Audio support for Zipit Z2"
+       depends on SND_PXA2XX_SOC && MACH_ZIPIT2
+       select SND_PXA2XX_SOC_I2S
+       select SND_SOC_WM8750
+       help
+         Say Y if you want to add support for SoC audio on Zipit Z2.
  config SND_PXA2XX_SOC_POODLE
        tristate "SoC Audio support for Poodle"
        depends on SND_PXA2XX_SOC && MACH_POODLE