]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'sound-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 22:41:41 +0000 (15:41 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 15 Apr 2015 22:41:41 +0000 (15:41 -0700)
Pull sound updates from Takashi Iwai:
 "There have been major modernization with the standard bus: in ALSA
  sequencer core and HD-audio.  Also, HD-audio receives the regmap
  support replacing the in-house cache register cache code.  These
  changes shouldn't impact the existing behavior, but rather
  refactoring.

  In addition, HD-audio got the code split to a core library part and
  the "legacy" driver parts.  This is a preliminary work for adapting
  the upcoming ASoC HD-audio driver, and the whole transition is still
  work in progress, likely finished in 4.1.

  Along with them, there are many updates in ASoC area as usual, too:
  lots of cleanups, Intel code shuffling, etc.

  Here are some highlights:

  ALSA core:
   - PCM: the audio timestamp / wallclock enhancement
   - PCM: fixes in DPCM management
   - Fixes / cleanups of user-space control element management
   - Sequencer: modernization using the standard bus

  HD-audio:
   - Modernization using the standard bus
   - Regmap support
   - Use standard runtime PM for codec power saving
   - Widget-path based power-saving for IDT, VIA and Realtek codecs
   - Reorganized sysfs entries for each codec object
   - More Dell headset support

  ASoC:
   - Move of jack registration to the card level
   - Lots of ASoC cleanups, mainly moving things from the CODEC level to
     the card level
   - Support for DAPM routes specified by both the machine driver and DT
   - Continuing improvements to rcar
   - pcm512x enhacements
   - Intel platforms updates
   - rt5670 updates / fixes
   - New platforms / devices: some non-DSP Qualcomm platforms, Google's
     Storm platform, Maxmim MAX98925 CODECs and the Ingenic JZ4780 SoC

  Misc:
   - ice1724: Improved ESI W192M support
   - emu10k1: Emu 1010 fixes/enhancement"

* tag 'sound-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (411 commits)
  ALSA: hda - set GET bit when adding a vendor verb to the codec regmap
  ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450
  ALSA: hda - Fix another race in runtime PM refcounting
  ALSA: hda - Expose codec type sysfs
  ALSA: ctl: fix to handle several elements added by one operation for userspace element
  ASoC: Intel: fix array_size.cocci warnings
  ASoC: n810: Automatically disconnect non-connected pins
  ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()
  ASoC: davinci-evm: Use card DAPM context to access widgets
  ASoC: mop500_ab8500: Use card DAPM context to access widgets
  ASoC: wm1133-ev1: Use card DAPM context to access widgets
  ASoC: atmel: Improve machine driver compile test coverage
  ASoC: atmel: Add dependency to SND_SOC_I2C_AND_SPI where necessary
  ALSA: control: Fix a typo of SNDRV_CTL_ELEM_ACCESS_TLV_* with SNDRV_CTL_TLV_OP_*
  ALSA: usb-audio: Don't attempt to get Microsoft Lifecam Cinema sample rate
  ASoC: rnsd: fix build regression without CONFIG_OF
  ALSA: emu10k1: add toggles for E-mu 1010 optical ports
  ALSA: ctl: fill identical information to return value when adding userspace elements
  ALSA: ctl: fix a bug to return no identical information in info operation for userspace controls
  ALSA: ctl: confirm to return all identical information in 'activate' event
  ...

1  2 
MAINTAINERS
sound/core/pcm_native.c
sound/soc/codecs/arizona.c
sound/soc/soc-core.c

diff --combined MAINTAINERS
index c72a7baec55cc5fe02675525a241291454d9e605,080be6d19f786d1327fa2aba886c438815bd8638..d158405c75ffbb38369e973fec8de4292fe85784
@@@ -724,7 -724,7 +724,7 @@@ F: staging/iio/trigger/iio-trig-bfin-ti
  
  ANDROID DRIVERS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -M:    Arve Hjønnevåg <arve@android.com>
 +M:    Arve Hjønnevåg <arve@android.com>
  M:    Riley Andrews <riandrews@android.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/gregkh/staging.git
  L:    devel@driverdev.osuosl.org
@@@ -1468,8 -1468,6 +1468,8 @@@ F:      drivers/clocksource/arm_global_timer
  F:    drivers/i2c/busses/i2c-st.c
  F:    drivers/media/rc/st_rc.c
  F:    drivers/mmc/host/sdhci-st.c
 +F:    drivers/phy/phy-miphy28lp.c
 +F:    drivers/phy/phy-miphy365x.c
  F:    drivers/phy/phy-stih407-usb.c
  F:    drivers/phy/phy-stih41x-usb.c
  F:    drivers/pinctrl/pinctrl-st.c
@@@ -1764,7 -1762,7 +1764,7 @@@ S:      Supporte
  F:    drivers/tty/serial/atmel_serial.c
  
  ATMEL Audio ALSA driver
- M:    Bo Shen <voice.shen@atmel.com>
+ M:    Nicolas Ferre <nicolas.ferre@atmel.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/atmel
@@@ -2520,18 -2518,11 +2520,18 @@@ F:   Documentation/zh_CN
  
  CHIPIDEA USB HIGH SPEED DUAL ROLE CONTROLLER
  M:    Peter Chen <Peter.Chen@freescale.com>
 -T:    git git://github.com/hzpeterchen/linux-usb.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    drivers/usb/chipidea/
  
 +CHIPONE ICN8318 I2C TOUCHSCREEN DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/input/touchscreen/chipone_icn8318.txt
 +F:    drivers/input/touchscreen/chipone_icn8318.c
 +
  CHROME HARDWARE PLATFORM SUPPORT
  M:    Olof Johansson <olof@lixom.net>
  S:    Maintained
@@@ -2825,7 -2816,6 +2825,7 @@@ L:      linux-crypto@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
  S:    Maintained
  F:    Documentation/crypto/
 +F:    Documentation/DocBook/crypto-API.tmpl
  F:    arch/*/crypto/
  F:    crypto/
  F:    drivers/crypto/
@@@ -3147,15 -3137,12 +3147,15 @@@ S:   Supporte
  F:    Documentation/hwmon/da90??
  F:    drivers/gpio/gpio-da90??.c
  F:    drivers/hwmon/da90??-hwmon.c
 +F:    drivers/iio/adc/da91??-*.c
  F:    drivers/input/misc/da90??_onkey.c
  F:    drivers/input/touchscreen/da9052_tsi.c
  F:    drivers/leds/leds-da90??.c
  F:    drivers/mfd/da903x.c
  F:    drivers/mfd/da90??-*.c
 +F:    drivers/mfd/da91??-*.c
  F:    drivers/power/da9052-battery.c
 +F:    drivers/power/da91??-*.c
  F:    drivers/regulator/da903x.c
  F:    drivers/regulator/da9???-regulator.[ch]
  F:    drivers/rtc/rtc-da90??.c
@@@ -3165,7 -3152,6 +3165,7 @@@ F:      include/linux/mfd/da903x.
  F:    include/linux/mfd/da9052/
  F:    include/linux/mfd/da9055/
  F:    include/linux/mfd/da9063/
 +F:    include/linux/mfd/da9150/
  F:    include/sound/da[79]*.h
  F:    sound/soc/codecs/da[79]*.[ch]
  
@@@ -4177,12 -4163,6 +4177,12 @@@ F:    sound/soc/fsl/fsl
  F:    sound/soc/fsl/imx*
  F:    sound/soc/fsl/mpc8610_hpcd.c
  
 +FREESCALE QORIQ MANAGEMENT COMPLEX DRIVER
 +M:    J. German Rivera <German.Rivera@freescale.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/fsl-mc/
 +
  FREEVXFS FILESYSTEM
  M:    Christoph Hellwig <hch@infradead.org>
  W:    ftp://ftp.openlinux.org/pub/people/hch/vxfs
@@@ -4332,15 -4312,6 +4332,15 @@@ S:    Supporte
  F:    drivers/phy/
  F:    include/linux/phy/
  
 +GENERIC PM DOMAINS
 +M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
 +M:    Kevin Hilman <khilman@kernel.org>
 +M:    Ulf Hansson <ulf.hansson@linaro.org>
 +L:    linux-pm@vger.kernel.org
 +S:    Supported
 +F:    drivers/base/power/domain*.c
 +F:    include/linux/pm_domain.h
 +
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
@@@ -4354,10 -4325,10 +4354,10 @@@ F:   scripts/get_maintainer.p
  
  GFS2 FILE SYSTEM
  M:    Steven Whitehouse <swhiteho@redhat.com>
 +M:    Bob Peterson <rpeterso@redhat.com>
  L:    cluster-devel@redhat.com
  W:    http://sources.redhat.com/cluster/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes.git
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
  S:    Supported
  F:    Documentation/filesystems/gfs2*.txt
  F:    fs/gfs2/
@@@ -4977,7 -4948,6 +4977,7 @@@ S:      Maintaine
  F:    drivers/iio/
  F:    drivers/staging/iio/
  F:    include/linux/iio/
 +F:    tools/iio/
  
  IKANOS/ADI EAGLE ADSL USB DRIVER
  M:    Matthieu Castet <castet.matthieu@free.fr>
@@@ -5301,6 -5271,13 +5301,13 @@@ F:    drivers/char/ipmi
  F:    include/linux/ipmi*
  F:    include/uapi/linux/ipmi*
  
+ QCOM AUDIO (ASoC) DRIVERS
+ M:    Patrick Lai <plai@codeaurora.org>
+ M:    Banajit Goswami <bgoswami@codeaurora.org>
+ L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
+ S:    Supported
+ F:    sound/soc/qcom/
  IPS SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <aacraid@adaptec.com>
  L:    linux-scsi@vger.kernel.org
@@@ -5621,8 -5598,6 +5628,8 @@@ S:      Supporte
  F:    Documentation/*/kvm*.txt
  F:    Documentation/virtual/kvm/
  F:    arch/*/kvm/
 +F:    arch/x86/kernel/kvm.c
 +F:    arch/x86/kernel/kvmclock.c
  F:    arch/*/include/asm/kvm*
  F:    include/linux/kvm*
  F:    include/uapi/linux/kvm*
@@@ -6354,7 -6329,6 +6361,7 @@@ F:      drivers/scsi/megaraid
  
  MELLANOX ETHERNET DRIVER (mlx4_en)
  M:    Amir Vadai <amirv@mellanox.com>
 +M:    Ido Shamay <idos@mellanox.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
@@@ -6597,8 -6571,10 +6604,8 @@@ F:     drivers/mfd
  F:    include/linux/mfd/
  
  MULTIMEDIA CARD (MMC), SECURE DIGITAL (SD) AND SDIO SUBSYSTEM
 -M:    Chris Ball <chris@printf.net>
  M:    Ulf Hansson <ulf.hansson@linaro.org>
  L:    linux-mmc@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
  T:    git git://git.linaro.org/people/ulf.hansson/mmc.git
  S:    Maintained
  F:    drivers/mmc/
@@@ -6974,13 -6950,6 +6981,13 @@@ S:    Supporte
  F:    drivers/block/nvme*
  F:    include/linux/nvme.h
  
 +NXP-NCI NFC DRIVER
 +M:    Clément Perrochaud <clement.perrochaud@effinnov.com>
 +R:    Charles Gorand <charles.gorand@effinnov.com>
 +L:    linux-nfc@lists.01.org (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/nfc/nxp-nci
 +
  NXP TDA998X DRM DRIVER
  M:    Russell King <rmk+kernel@arm.linux.org.uk>
  S:    Supported
@@@ -8389,6 -8358,7 +8396,6 @@@ F:      block/partitions/ibm.
  
  S390 NETWORK DRIVERS
  M:    Ursula Braun <ursula.braun@de.ibm.com>
 -M:    Frank Blaschka <blaschka@linux.vnet.ibm.com>
  M:    linux390@de.ibm.com
  L:    linux-s390@vger.kernel.org
  W:    http://www.ibm.com/developerworks/linux/linux390/
@@@ -8596,7 -8566,6 +8603,7 @@@ F:      include/uapi/linux/timex.
  F:    kernel/time/clocksource.c
  F:    kernel/time/time*.c
  F:    kernel/time/ntp.c
 +F:    tools/testing/selftests/timers/
  
  SC1200 WDT DRIVER
  M:    Zwane Mwaikambo <zwanem@gmail.com>
@@@ -8705,8 -8674,10 +8712,8 @@@ S:     Maintaine
  F:    drivers/mmc/host/sdricoh_cs.c
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) DRIVER
 -M:    Chris Ball <chris@printf.net>
  L:    linux-mmc@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc.git
 -S:    Maintained
 +S:    Orphan
  F:    drivers/mmc/host/sdhci.*
  F:    drivers/mmc/host/sdhci-pltfm.[ch]
  
@@@ -8722,12 -8693,18 +8729,12 @@@ F:   include/linux/seccomp.
  K:    \bsecure_computing
  K:    \bTIF_SECCOMP\b
  
 -SECURE DIGITAL HOST CONTROLLER INTERFACE, OPEN FIRMWARE BINDINGS (SDHCI-OF)
 -M:    Anton Vorontsov <anton@enomsg.org>
 -L:    linuxppc-dev@lists.ozlabs.org
 -L:    linux-mmc@vger.kernel.org
 -S:    Maintained
 -F:    drivers/mmc/host/sdhci-pltfm.[ch]
 -
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
  M:    Ben Dooks <ben-linux@fluff.org>
 +M:    Jaehoon Chung <jh80.chung@samsung.com>
  L:    linux-mmc@vger.kernel.org
  S:    Maintained
 -F:    drivers/mmc/host/sdhci-s3c.c
 +F:    drivers/mmc/host/sdhci-s3c*
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) ST SPEAR DRIVER
  M:    Viresh Kumar <viresh.linux@gmail.com>
@@@ -9394,14 -9371,6 +9401,14 @@@ L:    linux-fbdev@vger.kernel.or
  S:    Maintained
  F:    drivers/staging/sm7xxfb/
  
 +STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER
 +M:    Sudip Mukherjee <sudipm.mukherjee@gmail.com>
 +M:    Teddy Wang <teddy.wang@siliconmotion.com>
 +M:    Sudip Mukherjee <sudip@vectorindia.org>
 +L:    linux-fbdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/sm750fb/
 +
  STAGING - SLICOSS
  M:    Lior Dotan <liodot@gmail.com>
  M:    Christopher Harrer <charrer@alacritech.com>
@@@ -9864,7 -9833,7 +9871,7 @@@ F:      include/linux/wl12xx.
  
  TIPC NETWORK LAYER
  M:    Jon Maloy <jon.maloy@ericsson.com>
 -M:    Allan Stephens <allan.stephens@windriver.com>
 +M:    Ying Xue <ying.xue@windriver.com>
  L:    netdev@vger.kernel.org (core kernel code)
  L:    tipc-discussion@lists.sourceforge.net (user apps, general discussion)
  W:    http://tipc.sourceforge.net/
@@@ -9968,7 -9937,6 +9975,7 @@@ F:      drivers/media/pci/tw68
  TPM DEVICE DRIVER
  M:    Peter Huewe <peterhuewe@gmx.de>
  M:    Marcel Selhorst <tpmdd@selhorst.net>
 +R:    Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
  W:    http://tpmdd.sourceforge.net
  L:    tpmdd-devel@lists.sourceforge.net (moderated for non-subscribers)
  Q:    git git://github.com/PeterHuewe/linux-tpmdd.git
@@@ -10174,12 -10142,6 +10181,12 @@@ S: Maintaine
  F:    drivers/net/usb/cdc_*.c
  F:    include/uapi/linux/usb/cdc.h
  
 +USB CHAOSKEY DRIVER
 +M:    Keith Packard <keithp@keithp.com>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    drivers/usb/misc/chaoskey.c
 +
  USB CYPRESS C67X00 DRIVER
  M:    Peter Korsgaard <jacmet@sunsite.dk>
  L:    linux-usb@vger.kernel.org
@@@ -10260,7 -10222,7 +10267,7 @@@ F:   drivers/usb/host/ohci
  
  USB OTG FSM (Finite State Machine)
  M:    Peter Chen <Peter.Chen@freescale.com>
 -T:    git git://github.com/hzpeterchen/linux-usb.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb.git
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    drivers/usb/common/usb-otg-fsm.c
diff --combined sound/core/pcm_native.c
index 8e43610ec9b56a866057c203d563895e582558f9,abe1e811e660df3f71695d1077313493acbdd2ee..d126c03361aef87fb1239df1e42f547c5ce36aa9
@@@ -25,6 -25,7 +25,6 @@@
  #include <linux/slab.h>
  #include <linux/time.h>
  #include <linux/pm_qos.h>
 -#include <linux/aio.h>
  #include <linux/io.h>
  #include <linux/dma-mapping.h>
  #include <sound/core.h>
@@@ -34,7 -35,6 +34,7 @@@
  #include <sound/pcm_params.h>
  #include <sound/timer.h>
  #include <sound/minors.h>
 +#include <linux/uio.h>
  
  /*
   *  Compatibility
@@@ -707,6 -707,23 +707,23 @@@ int snd_pcm_status(struct snd_pcm_subst
        struct snd_pcm_runtime *runtime = substream->runtime;
  
        snd_pcm_stream_lock_irq(substream);
+       snd_pcm_unpack_audio_tstamp_config(status->audio_tstamp_data,
+                                       &runtime->audio_tstamp_config);
+       /* backwards compatible behavior */
+       if (runtime->audio_tstamp_config.type_requested ==
+               SNDRV_PCM_AUDIO_TSTAMP_TYPE_COMPAT) {
+               if (runtime->hw.info & SNDRV_PCM_INFO_HAS_WALL_CLOCK)
+                       runtime->audio_tstamp_config.type_requested =
+                               SNDRV_PCM_AUDIO_TSTAMP_TYPE_LINK;
+               else
+                       runtime->audio_tstamp_config.type_requested =
+                               SNDRV_PCM_AUDIO_TSTAMP_TYPE_DEFAULT;
+               runtime->audio_tstamp_report.valid = 0;
+       } else
+               runtime->audio_tstamp_report.valid = 1;
        status->state = runtime->status->state;
        status->suspended_state = runtime->status->suspended_state;
        if (status->state == SNDRV_PCM_STATE_OPEN)
                snd_pcm_update_hw_ptr(substream);
                if (runtime->tstamp_mode == SNDRV_PCM_TSTAMP_ENABLE) {
                        status->tstamp = runtime->status->tstamp;
+                       status->driver_tstamp = runtime->driver_tstamp;
                        status->audio_tstamp =
                                runtime->status->audio_tstamp;
+                       if (runtime->audio_tstamp_report.valid == 1)
+                               /* backwards compatibility, no report provided in COMPAT mode */
+                               snd_pcm_pack_audio_tstamp_report(&status->audio_tstamp_data,
+                                                               &status->audio_tstamp_accuracy,
+                                                               &runtime->audio_tstamp_report);
                        goto _tstamp_end;
                }
        } else {
  }
  
  static int snd_pcm_status_user(struct snd_pcm_substream *substream,
-                              struct snd_pcm_status __user * _status)
+                              struct snd_pcm_status __user * _status,
+                              bool ext)
  {
        struct snd_pcm_status status;
        int res;
-       
        memset(&status, 0, sizeof(status));
+       /*
+        * with extension, parameters are read/write,
+        * get audio_tstamp_data from user,
+        * ignore rest of status structure
+        */
+       if (ext && get_user(status.audio_tstamp_data,
+                               (u32 __user *)(&_status->audio_tstamp_data)))
+               return -EFAULT;
        res = snd_pcm_status(substream, &status);
        if (res < 0)
                return res;
@@@ -2725,7 -2758,9 +2758,9 @@@ static int snd_pcm_common_ioctl1(struc
        case SNDRV_PCM_IOCTL_SW_PARAMS:
                return snd_pcm_sw_params_user(substream, arg);
        case SNDRV_PCM_IOCTL_STATUS:
-               return snd_pcm_status_user(substream, arg);
+               return snd_pcm_status_user(substream, arg, false);
+       case SNDRV_PCM_IOCTL_STATUS_EXT:
+               return snd_pcm_status_user(substream, arg, true);
        case SNDRV_PCM_IOCTL_CHANNEL_INFO:
                return snd_pcm_channel_info_user(substream, arg);
        case SNDRV_PCM_IOCTL_PREPARE:
@@@ -3033,7 -3068,9 +3068,7 @@@ static ssize_t snd_pcm_write(struct fil
        return result;
  }
  
 -static ssize_t snd_pcm_aio_read(struct kiocb *iocb, const struct iovec *iov,
 -                           unsigned long nr_segs, loff_t pos)
 -
 +static ssize_t snd_pcm_readv(struct kiocb *iocb, struct iov_iter *to)
  {
        struct snd_pcm_file *pcm_file;
        struct snd_pcm_substream *substream;
        runtime = substream->runtime;
        if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
                return -EBADFD;
 -      if (nr_segs > 1024 || nr_segs != runtime->channels)
 +      if (!iter_is_iovec(to))
 +              return -EINVAL;
 +      if (to->nr_segs > 1024 || to->nr_segs != runtime->channels)
                return -EINVAL;
 -      if (!frame_aligned(runtime, iov->iov_len))
 +      if (!frame_aligned(runtime, to->iov->iov_len))
                return -EINVAL;
 -      frames = bytes_to_samples(runtime, iov->iov_len);
 -      bufs = kmalloc(sizeof(void *) * nr_segs, GFP_KERNEL);
 +      frames = bytes_to_samples(runtime, to->iov->iov_len);
 +      bufs = kmalloc(sizeof(void *) * to->nr_segs, GFP_KERNEL);
        if (bufs == NULL)
                return -ENOMEM;
 -      for (i = 0; i < nr_segs; ++i)
 -              bufs[i] = iov[i].iov_base;
 +      for (i = 0; i < to->nr_segs; ++i)
 +              bufs[i] = to->iov[i].iov_base;
        result = snd_pcm_lib_readv(substream, bufs, frames);
        if (result > 0)
                result = frames_to_bytes(runtime, result);
        return result;
  }
  
 -static ssize_t snd_pcm_aio_write(struct kiocb *iocb, const struct iovec *iov,
 -                            unsigned long nr_segs, loff_t pos)
 +static ssize_t snd_pcm_writev(struct kiocb *iocb, struct iov_iter *from)
  {
        struct snd_pcm_file *pcm_file;
        struct snd_pcm_substream *substream;
        runtime = substream->runtime;
        if (runtime->status->state == SNDRV_PCM_STATE_OPEN)
                return -EBADFD;
 -      if (nr_segs > 128 || nr_segs != runtime->channels ||
 -          !frame_aligned(runtime, iov->iov_len))
 +      if (!iter_is_iovec(from))
 +              return -EINVAL;
 +      if (from->nr_segs > 128 || from->nr_segs != runtime->channels ||
 +          !frame_aligned(runtime, from->iov->iov_len))
                return -EINVAL;
 -      frames = bytes_to_samples(runtime, iov->iov_len);
 -      bufs = kmalloc(sizeof(void *) * nr_segs, GFP_KERNEL);
 +      frames = bytes_to_samples(runtime, from->iov->iov_len);
 +      bufs = kmalloc(sizeof(void *) * from->nr_segs, GFP_KERNEL);
        if (bufs == NULL)
                return -ENOMEM;
 -      for (i = 0; i < nr_segs; ++i)
 -              bufs[i] = iov[i].iov_base;
 +      for (i = 0; i < from->nr_segs; ++i)
 +              bufs[i] = from->iov[i].iov_base;
        result = snd_pcm_lib_writev(substream, bufs, frames);
        if (result > 0)
                result = frames_to_bytes(runtime, result);
@@@ -3634,7 -3668,7 +3669,7 @@@ const struct file_operations snd_pcm_f_
        {
                .owner =                THIS_MODULE,
                .write =                snd_pcm_write,
 -              .aio_write =            snd_pcm_aio_write,
 +              .write_iter =           snd_pcm_writev,
                .open =                 snd_pcm_playback_open,
                .release =              snd_pcm_release,
                .llseek =               no_llseek,
        {
                .owner =                THIS_MODULE,
                .read =                 snd_pcm_read,
 -              .aio_read =             snd_pcm_aio_read,
 +              .read_iter =            snd_pcm_readv,
                .open =                 snd_pcm_capture_open,
                .release =              snd_pcm_release,
                .llseek =               no_llseek,
index 95d31d6291ac895bc7e22f650af655113c4cbc18,9015b44a9e1101d47d25ad94934de6420ca8d1a6..57da0ceda03fa7eb0f4ce384ae040703a7c99f5c
@@@ -19,6 -19,7 +19,6 @@@
  #include <sound/tlv.h>
  
  #include <linux/mfd/arizona/core.h>
 -#include <linux/mfd/arizona/gpio.h>
  #include <linux/mfd/arizona/registers.h>
  
  #include "arizona.h"
@@@ -280,7 -281,6 +280,7 @@@ int arizona_init_gpio(struct snd_soc_co
  
        switch (arizona->type) {
        case WM5110:
 +      case WM8280:
                snd_soc_dapm_disable_pin(&codec->dapm, "DRC2 Signal Activity");
                break;
        default:
@@@ -1729,7 -1729,6 +1729,7 @@@ static int arizona_calc_fratio(struct a
  
        switch (fll->arizona->type) {
        case WM5110:
 +      case WM8280:
                if (fll->arizona->rev < 3 || sync)
                        return init_ratio;
                break;
@@@ -1902,7 -1901,7 +1902,7 @@@ static int arizona_is_enabled_fll(struc
  static int arizona_enable_fll(struct arizona_fll *fll)
  {
        struct arizona *arizona = fll->arizona;
-       int ret;
+       unsigned long time_left;
        bool use_sync = false;
        int already_enabled = arizona_is_enabled_fll(fll);
        struct arizona_fll_cfg cfg;
                regmap_update_bits_async(arizona->regmap, fll->base + 1,
                                         ARIZONA_FLL1_FREERUN, 0);
  
-       ret = wait_for_completion_timeout(&fll->ok,
+       time_left = wait_for_completion_timeout(&fll->ok,
                                          msecs_to_jiffies(250));
-       if (ret == 0)
+       if (time_left == 0)
                arizona_fll_warn(fll, "Timed out waiting for lock\n");
  
        return 0;
diff --combined sound/soc/soc-core.c
index 10f0886e78ecc02d8a7df36375d48234e5c1ef97,12b7ff2426da8867177369a4fd603e322b48baca..23732523f87c72e24488e4655ff03cb5271b3f16
@@@ -292,6 -292,9 +292,9 @@@ static const struct file_operations cod
  
  static void soc_init_component_debugfs(struct snd_soc_component *component)
  {
+       if (!component->card->debugfs_card_root)
+               return;
        if (component->debugfs_prefix) {
                char *name;
  
@@@ -455,6 -458,9 +458,9 @@@ static const struct file_operations pla
  
  static void soc_init_card_debugfs(struct snd_soc_card *card)
  {
+       if (!snd_soc_debugfs_root)
+               return;
        card->debugfs_card_root = debugfs_create_dir(card->name,
                                                     snd_soc_debugfs_root);
        if (!card->debugfs_card_root) {
@@@ -476,6 -482,34 +482,34 @@@ static void soc_cleanup_card_debugfs(st
        debugfs_remove_recursive(card->debugfs_card_root);
  }
  
+ static void snd_soc_debugfs_init(void)
+ {
+       snd_soc_debugfs_root = debugfs_create_dir("asoc", NULL);
+       if (IS_ERR(snd_soc_debugfs_root) || !snd_soc_debugfs_root) {
+               pr_warn("ASoC: Failed to create debugfs directory\n");
+               snd_soc_debugfs_root = NULL;
+               return;
+       }
+       if (!debugfs_create_file("codecs", 0444, snd_soc_debugfs_root, NULL,
+                                &codec_list_fops))
+               pr_warn("ASoC: Failed to create CODEC list debugfs file\n");
+       if (!debugfs_create_file("dais", 0444, snd_soc_debugfs_root, NULL,
+                                &dai_list_fops))
+               pr_warn("ASoC: Failed to create DAI list debugfs file\n");
+       if (!debugfs_create_file("platforms", 0444, snd_soc_debugfs_root, NULL,
+                                &platform_list_fops))
+               pr_warn("ASoC: Failed to create platform list debugfs file\n");
+ }
+ static void snd_soc_debugfs_exit(void)
+ {
+       debugfs_remove_recursive(snd_soc_debugfs_root);
+ }
  #else
  
  #define soc_init_codec_debugfs NULL
@@@ -497,6 -531,15 +531,15 @@@ static inline void soc_init_card_debugf
  static inline void soc_cleanup_card_debugfs(struct snd_soc_card *card)
  {
  }
+ static inline void snd_soc_debugfs_init(void)
+ {
+ }
+ static inline void snd_soc_debugfs_exit(void)
+ {
+ }
  #endif
  
  struct snd_pcm_substream *snd_soc_get_dai_substream(struct snd_soc_card *card,
@@@ -595,15 -638,9 +638,9 @@@ int snd_soc_suspend(struct device *dev
                        cpu_dai->driver->suspend(cpu_dai);
        }
  
-       /* close any waiting streams and save state */
-       for (i = 0; i < card->num_rtd; i++) {
-               struct snd_soc_dai **codec_dais = card->rtd[i].codec_dais;
+       /* close any waiting streams */
+       for (i = 0; i < card->num_rtd; i++)
                flush_delayed_work(&card->rtd[i].delayed_work);
-               for (j = 0; j < card->rtd[i].num_codecs; j++) {
-                       codec_dais[j]->codec->dapm.suspend_bias_level =
-                                       codec_dais[j]->codec->dapm.bias_level;
-               }
-       }
  
        for (i = 0; i < card->num_rtd; i++) {
  
@@@ -1261,7 -1298,8 +1298,8 @@@ static int soc_link_dai_widgets(struct 
        capture_w = cpu_dai->capture_widget;
        if (play_w && capture_w) {
                ret = snd_soc_dapm_new_pcm(card, dai_link->params,
-                                          capture_w, play_w);
+                                          dai_link->num_params, capture_w,
+                                          play_w);
                if (ret != 0) {
                        dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
                                play_w->name, capture_w->name, ret);
        capture_w = codec_dai->capture_widget;
        if (play_w && capture_w) {
                ret = snd_soc_dapm_new_pcm(card, dai_link->params,
-                                          capture_w, play_w);
+                                          dai_link->num_params, capture_w,
+                                          play_w);
                if (ret != 0) {
                        dev_err(card->dev, "ASoC: Can't link %s to %s: %d\n",
                                play_w->name, capture_w->name, ret);
@@@ -1322,21 -1361,17 +1361,17 @@@ static int soc_probe_link_dais(struct s
                }
        }
  
+       if (dai_link->dai_fmt)
+               snd_soc_runtime_set_dai_fmt(rtd, dai_link->dai_fmt);
        ret = soc_post_component_init(rtd, dai_link->name);
        if (ret)
                return ret;
  
  #ifdef CONFIG_DEBUG_FS
        /* add DPCM sysfs entries */
-       if (dai_link->dynamic) {
-               ret = soc_dpcm_debugfs_add(rtd);
-               if (ret < 0) {
-                       dev_err(rtd->dev,
-                               "ASoC: failed to add dpcm sysfs entries: %d\n",
-                               ret);
-                       return ret;
-               }
-       }
+       if (dai_link->dynamic)
+               soc_dpcm_debugfs_add(rtd);
  #endif
  
        if (cpu_dai->driver->compress_dai) {
@@@ -1426,7 -1461,6 +1461,6 @@@ static void soc_remove_aux_dev(struct s
  
        /* unregister the rtd device */
        if (rtd->dev_registered) {
-               device_remove_file(rtd->dev, &dev_attr_codec_reg);
                device_unregister(rtd->dev);
                rtd->dev_registered = 0;
        }
@@@ -1560,6 -1594,8 +1594,8 @@@ static int snd_soc_instantiate_card(str
                goto base_error;
        }
  
+       soc_init_card_debugfs(card);
        card->dapm.bias_level = SND_SOC_BIAS_OFF;
        card->dapm.dev = card->dev;
        card->dapm.card = card;
                snd_soc_dapm_new_controls(&card->dapm, card->dapm_widgets,
                                          card->num_dapm_widgets);
  
+       if (card->of_dapm_widgets)
+               snd_soc_dapm_new_controls(&card->dapm, card->of_dapm_widgets,
+                                         card->num_of_dapm_widgets);
        /* initialise the sound card only once */
        if (card->probe) {
                ret = card->probe(card);
                snd_soc_dapm_add_routes(&card->dapm, card->dapm_routes,
                                        card->num_dapm_routes);
  
-       for (i = 0; i < card->num_links; i++) {
-               if (card->dai_link[i].dai_fmt)
-                       snd_soc_runtime_set_dai_fmt(&card->rtd[i],
-                               card->dai_link[i].dai_fmt);
-       }
+       if (card->of_dapm_routes)
+               snd_soc_dapm_add_routes(&card->dapm, card->of_dapm_routes,
+                                       card->num_of_dapm_routes);
  
        snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
                 "%s", card->name);
@@@ -1694,6 -1732,7 +1732,7 @@@ card_probe_error
        if (card->remove)
                card->remove(card);
  
+       soc_cleanup_card_debugfs(card);
        snd_card_free(card->snd_card);
  
  base_error:
@@@ -2372,8 -2411,6 +2411,6 @@@ int snd_soc_register_card(struct snd_so
  
        snd_soc_initialize_card_lists(card);
  
-       soc_init_card_debugfs(card);
        card->rtd = devm_kzalloc(card->dev,
                                 sizeof(struct snd_soc_pcm_runtime) *
                                 (card->num_links + card->num_aux_devs),
  
        ret = snd_soc_instantiate_card(card);
        if (ret != 0)
-               soc_cleanup_card_debugfs(card);
+               return ret;
  
        /* deactivate pins to sleep state */
        for (i = 0; i < card->num_rtd; i++) {
@@@ -2755,7 -2792,7 +2792,7 @@@ int snd_soc_register_component(struct d
  
        ret = snd_soc_register_dais(cmpnt, dai_drv, num_dai, true);
        if (ret < 0) {
 -              dev_err(dev, "ASoC: Failed to regster DAIs: %d\n", ret);
 +              dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
                goto err_cleanup;
        }
  
@@@ -3076,7 -3113,7 +3113,7 @@@ int snd_soc_register_codec(struct devic
  
        ret = snd_soc_register_dais(&codec->component, dai_drv, num_dai, false);
        if (ret < 0) {
 -              dev_err(dev, "ASoC: Failed to regster DAIs: %d\n", ret);
 +              dev_err(dev, "ASoC: Failed to register DAIs: %d\n", ret);
                goto err_cleanup;
        }
  
@@@ -3242,8 -3279,8 +3279,8 @@@ int snd_soc_of_parse_audio_simple_widge
                widgets[i].name = wname;
        }
  
-       card->dapm_widgets = widgets;
-       card->num_dapm_widgets = num_widgets;
+       card->of_dapm_widgets = widgets;
+       card->num_of_dapm_widgets = num_widgets;
  
        return 0;
  }
@@@ -3327,8 -3364,8 +3364,8 @@@ int snd_soc_of_parse_audio_routing(stru
                }
        }
  
-       card->num_dapm_routes = num_routes;
-       card->dapm_routes = routes;
+       card->num_of_dapm_routes = num_routes;
+       card->of_dapm_routes = routes;
  
        return 0;
  }
@@@ -3587,26 -3624,7 +3624,7 @@@ EXPORT_SYMBOL_GPL(snd_soc_of_get_dai_li
  
  static int __init snd_soc_init(void)
  {
- #ifdef CONFIG_DEBUG_FS
-       snd_soc_debugfs_root = debugfs_create_dir("asoc", NULL);
-       if (IS_ERR(snd_soc_debugfs_root) || !snd_soc_debugfs_root) {
-               pr_warn("ASoC: Failed to create debugfs directory\n");
-               snd_soc_debugfs_root = NULL;
-       }
-       if (!debugfs_create_file("codecs", 0444, snd_soc_debugfs_root, NULL,
-                                &codec_list_fops))
-               pr_warn("ASoC: Failed to create CODEC list debugfs file\n");
-       if (!debugfs_create_file("dais", 0444, snd_soc_debugfs_root, NULL,
-                                &dai_list_fops))
-               pr_warn("ASoC: Failed to create DAI list debugfs file\n");
-       if (!debugfs_create_file("platforms", 0444, snd_soc_debugfs_root, NULL,
-                                &platform_list_fops))
-               pr_warn("ASoC: Failed to create platform list debugfs file\n");
- #endif
+       snd_soc_debugfs_init();
        snd_soc_util_init();
  
        return platform_driver_register(&soc_driver);
@@@ -3616,9 -3634,9 +3634,9 @@@ module_init(snd_soc_init)
  static void __exit snd_soc_exit(void)
  {
        snd_soc_util_exit();
+       snd_soc_debugfs_exit();
  
  #ifdef CONFIG_DEBUG_FS
-       debugfs_remove_recursive(snd_soc_debugfs_root);
  #endif
        platform_driver_unregister(&soc_driver);
  }