1. 14 Jan, 2014 6 commits
    • Lars-Peter Clausen's avatar
      ASoC: generic-dmaengine-pcm: Check DMA residue granularity · 478028e0
      Lars-Peter Clausen authored
      The dmaengine framework now exposes the granularity with which it is able to
      report the transfer residue for a certain DMA channel. Check the granularity in
      the generic dmaengine PCM driver and
      	a) Set the SNDRV_PCM_INFO_BATCH if the granularity is per period or worse.
      	b) Fallback to the (race condition prone) period counting if the driver does
      	not support any residue reporting.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      478028e0
    • Lars-Peter Clausen's avatar
      ASoC: generic-dmaengine-pcm: Check NO_RESIDUE flag at runtime · 93b943ed
      Lars-Peter Clausen authored
      Currently we have two different snd_soc_platform_driver structs in the generic
      dmaengine PCM driver. One for dmaengine drivers that support residue reporting
      and one for those which do not. When registering the PCM component we check
      whether the NO_RESIDUE flag is set or not and use the corresponding
      snd_soc_platform_driver. This patch modifies the driver to only have one
      snd_soc_platform_driver struct where the pointer() callback checks the
      NO_RESIDUE flag at runtime. This allows us to set the NO_RESIDUE flag after the
      PCM component has been registered. This becomes necessary when querying whether
      the dmaengine driver supports residue reporting from the dmaengine driver itself
      since the DMA channel might only be requested after the PCM component has been
      registered.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      93b943ed
    • Lars-Peter Clausen's avatar
      dma: pl330: Set residue_granularity · bfb9bb42
      Lars-Peter Clausen authored
      The pl330 driver currently does not support residue reporting, so set the
      residue granularity to DMA_RESIDUE_GRANULARITY_DESCRIPTOR.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      bfb9bb42
    • Lars-Peter Clausen's avatar
      dma: Indicate residue granularity in dma_slave_caps · 50720563
      Lars-Peter Clausen authored
      This patch adds a new field to the dma_slave_caps struct which indicates the
      granularity with which the driver is able to update the residue field of the
      dma_tx_state struct. Making this information available to dmaengine users allows
      them to make better decisions on how to operate. E.g. for audio certain features
      like wakeup less operation or timer based scheduling only make sense and work
      correctly if the reported residue is fine-grained enough.
      
      Right now four different levels of granularity are supported:
      	* DESCRIPTOR: The DMA channel is only able to tell whether a descriptor has
      	  been completed or not, which means residue reporting is not supported by
      	  this channel. The residue field of the dma_tx_state field will always be
      	  0.
      	* SEGMENT: The DMA channel updates the residue field after each successfully
      	  completed segment of the transfer (For cyclic transfers this is after each
      	  period). This is typically implemented by having the hardware generate an
      	  interrupt after each transferred segment and then the drivers updates the
      	  outstanding residue by the size of the segment. Another possibility is if
      	  the hardware supports SG and the segment descriptor has a field which gets
      	  set after the segment has been completed. The driver then counts the
      	  number of segments without the flag set to compute the residue.
      	* BURST: The DMA channel updates the residue field after each transferred
      	  burst. This is typically only supported if the hardware has a progress
      	  register of some sort (E.g. a register with the current read/write address
      	  or a register with the amount of bursts/beats/bytes that have been
      	  transferred or still need to be transferred).
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Acked-by: default avatarVinod Koul <vinod.koul@intel.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      50720563
    • Mark Brown's avatar
      Merge branch 'topic/samsung' of... · 8e6714ac
      Mark Brown authored
      Merge branch 'topic/samsung' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma
      8e6714ac
    • Mark Brown's avatar
      Merge branch 'topic/axi' of... · 67c2fe2f
      Mark Brown authored
      Merge branch 'topic/axi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-dma
      67c2fe2f
  2. 30 Dec, 2013 2 commits
  3. 17 Dec, 2013 1 commit
  4. 16 Dec, 2013 2 commits
  5. 12 Dec, 2013 2 commits
    • Mark Brown's avatar
      ASoC: samsung: Use ASoC dmaengine code where possible · d37bdf73
      Mark Brown authored
      Since all Exynos platforms have been converted to dmaengine and many of
      the older platforms are in the process of conversion they do not need to
      use the legacy s3c-dma APIs for DMA but can instead use the standard ASoC
      dmaengine helpers. This both allows them to benefit from improvements
      implemented in the generic code and supports multiplatform.
      
      This patch includes some fixes from Padma for Exynos SoCs, her testing
      was on a slightly earlier version of the patch due to unrelated breakage
      preventing testing.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Tested By: Padmavathi Venna <padma.v@samsung.com>
      d37bdf73
    • Mark Brown's avatar
      ASoC: samsung: Provide helper for DMA init · 3688569e
      Mark Brown authored
      In preparation for using the dmaengine helpers in ASoC rather than the
      dmaengine wrappers for the Samsung API wrap the configuration of dma_data.
      The dmaengine code expects different data to that used by the legacy API.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      3688569e
  6. 11 Dec, 2013 3 commits
  7. 10 Dec, 2013 1 commit
    • Stephen Warren's avatar
      dma: add channel request API that supports deferred probe · 0ad7c000
      Stephen Warren authored
      dma_request_slave_channel() simply returns NULL whenever DMA channel
      lookup fails. Lookup could fail for two distinct reasons:
      
      a) No DMA specification exists for the channel name.
         This includes situations where no DMA specifications exist at all, or
         other general lookup problems.
      
      b) A DMA specification does exist, yet the driver for that channel is not
         yet registered.
      
      Case (b) should trigger deferred probe in client drivers. However, since
      they have no way to differentiate the two situations, it cannot.
      
      Implement new function dma_request_slave_channel_reason(), which performs
      identically to dma_request_slave_channel(), except that it returns an
      error-pointer rather than NULL, which allows callers to detect when
      deferred probe should occur.
      
      Eventually, all drivers should be converted to this new API, the old API
      removed, and the new API renamed to the more desirable name. This patch
      doesn't convert the existing API and all drivers in one go, since some
      drivers call dma_request_slave_channel() then dma_request_channel() if
      that fails. That would require either modifying dma_request_channel() in
      the same way, or adding extra error-handling code to all affected
      drivers, and there are close to 100 drivers using the other API, rather
      than just the 15-20 or so that use dma_request_slave_channel(), which
      might be tenable in a single patch.
      
      acpi_dma_request_slave_chan_by_name() doesn't currently implement
      deferred probe. It should, but this will be addressed later.
      Acked-by: default avatarDan Williams <dan.j.williams@intel.com>
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
      0ad7c000
  8. 09 Dec, 2013 8 commits
    • Stephen Warren's avatar
      ASoC: dmaengine: add custom DMA config to snd_dmaengine_pcm_config · 194c7dea
      Stephen Warren authored
      Add fields to struct snd_dmaengine_pcm_config to allow custom:
      
      - DMA channel names.
      
        This is useful when the default "tx" and "rx" channel names don't
        apply, for example if a HW module supports multiple channels, each
        having different DMA channel names. This is the case with the FIFOs
        in Tegra's AHUB. This new facility can replace
        SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME.
      
      - DMA device
      
        This allows requesting DMA channels for a device other than the device
        which is registering the "PCM" driver. This is quite unusual, but is
        currently useful on Tegra. In much HW, and in Tegra20, each DAI HW
        module contains its own FIFOs which DMA writes to. However, in Tegra30,
        the DMA FIFOs were split out AHUB HW module, which then routes the data
        through a cross-bar, and into the DAI HW modules. However, the current
        ASoC driver structure does not expose this detail, and acts as if the
        FIFOs are still part of the DAI HW modules. Consequently, the "PCM"
        driver is registered with the DAI HW module, yet the DMA channels must
        be looked up in the AHUB HW module's device tree node. This new config
        field allows that to happen. Eventually, the Tegra drivers will be
        reworked to fully expose the AHUB, and this config field can be
        removed.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      194c7dea
    • Mark Brown's avatar
      a715d01e
    • Stephen Warren's avatar
      ASoC: don't leak on error in snd_dmaengine_pcm_register · 6b9f3e65
      Stephen Warren authored
      If snd_dmaengine_pcm_register()'s call to snd_soc_add_platform() fails,
      all objects allocated during registration are leaked. Fix this by adding
      error-handling code.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      6b9f3e65
    • Stephen Warren's avatar
      ASoC: restructure dmaengine_pcm_request_chan_of() · 11b3a7ad
      Stephen Warren authored
      Restructure the internals of dmaengine_pcm_request_chan_of() as a loop
      over all channels to be allocated. This makes it easier to add logic
      that applies to all allocated channels, without having to duplicate that
      logic in each of the half-duplex/full-duplex paths.
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      11b3a7ad
    • Lars-Peter Clausen's avatar
      ASoC: Add support for the Analog Devices AXI-SPDIF driver · 429e4374
      Lars-Peter Clausen authored
      This patch adds a ASoC driver for the AXI-SPDIF softcore. The core implements a
      simple SPDIF transmitter and is used on some Analog Devices' reference designs
      for various FPGA platforms. For now the driver only support the PL330 as the the
      DMA controller.
      
      The driver uses the generic PCM dmaengine driver for its PCM. The only
      restriction is that we need to set the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag as
      the dmaengine driver for the DMA core (PL330) that is used with this core has no
      residue reporting capabilities yet. This will be fixed in the future though.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      429e4374
    • Lars-Peter Clausen's avatar
      dt: Add bindings documentation for the ADI AXI-SPDIF audio controller · d7b528ef
      Lars-Peter Clausen authored
      This patch adds the devicetree documentation for the ADI AXI-SPDIF audio
      controller. The controller has:
       * One set of memory mapped register
       * Two clocks, one for the memory mapped register interface, one used as the
         audio reference clock
       * A DMA interface for the transmit data
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      d7b528ef
    • Lars-Peter Clausen's avatar
      ASoC: Add support for the Analog Devices AXI-I2S core · 8f2fe346
      Lars-Peter Clausen authored
      This patch adds support for the AXI-I2S softcore. The core implements a simple
      bidirectional I2S transceiver and is used by Analog Devices in some of their
      reference designs for various FPGA platforms.
      
      The driver uses the generic PCM dmaengine driver for its PCM. The only
      restriction is that we need to set the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag as
      the dmaengine driver for the DMA core (PL330) that is used with this core has no
      residue reporting capabilities yet. This will be fixed in the future though.
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      8f2fe346
    • Lars-Peter Clausen's avatar
      dt: Add bindings documentation for the ADI AXI-I2S controller · 00e6cb2a
      Lars-Peter Clausen authored
      This patch adds the devicetree documentation for the ADI AXI-SPDIF audio
      controller. The controller has:
       * One set of memory mapped register
       * Two clocks, one for the memory mapped register interface, one used as the
         audio reference clock
       * One DMA interface each for the transmit and receive data
      Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
      Cc: devicetree@vger.kernel.org
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      00e6cb2a
  9. 04 Dec, 2013 1 commit
    • Mark Brown's avatar
      Merge tag 's3c64xx-dmaengine' of... · beaec3aa
      Mark Brown authored
      Merge tag 's3c64xx-dmaengine' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into asoc-samsung
      
      ARM: s3c64xx: Convert to dmaengine
      
      This series of commits from Tomasz converting s3c64xx to use dmaengine
      rather than the old s3c-dma API missed the v3.13 merge window - Kukjin
      said that he'd applied it (which should mean it's OK from a review point
      of view) but it didn't make it into -next or a pull request.
      
      Since a s3c64xx based system is one of my primary development platforms
      it'd be really helpful if I could merge this into both ASoC and SPI,
      I've got some patches for ASoC ready to go converting to use dmaengine
      directly which help with multiplatform and there's some other dmaengine
      work for SPI in progress too.  I've therefore made this signed tag, it'd
      be great if it could be merged into both arm-soc and those two trees.
      beaec3aa
  10. 02 Dec, 2013 1 commit
  11. 28 Nov, 2013 1 commit
  12. 24 Nov, 2013 6 commits
  13. 22 Nov, 2013 6 commits
    • Linus Torvalds's avatar
      Linux 3.13-rc1 · 6ce4eac1
      Linus Torvalds authored
      6ce4eac1
    • Linus Torvalds's avatar
      Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of... · 57498f9c
      Linus Torvalds authored
      Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
      
      Pull minor eCryptfs fix from Tyler Hicks:
       "Quiet static checkers by removing unneeded conditionals"
      
      * tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
        eCryptfs: file->private_data is always valid
      57498f9c
    • Linus Torvalds's avatar
      Merge tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · e48f88a3
      Linus Torvalds authored
      Pull second set of sound fixes from Takashi Iwai:
       "A collection of small fixes in HD-audio quirks and runtime PM, ASoC
        rcar, abs8500 and other codecs.  Most of commits are for stable
        kernels, too"
      
      * tag 'sound-fix2-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Set current_headset_type to ALC_HEADSET_TYPE_ENUM (janitorial)
        ALSA: hda - Provide missing pin configs for VAIO with ALC260
        ALSA: hda - Add headset quirk for Dell Inspiron 3135
        ALSA: hda - Fix the headphone jack detection on Sony VAIO TX
        ALSA: hda - Fix missing bass speaker on ASUS N550
        ALSA: hda - Fix unbalanced runtime PM notification at resume
        ASoC: arizona: Set FLL to free-run before disabling
        ALSA: hda - A casual Dell Headset quirk
        ASoC: rcar: fixup dma_async_issue_pending() timing
        ASoC: rcar: off by one in rsnd_scu_set_route()
        ASoC: wm5110: Add post SYSCLK register patch for rev D chip
        ASoC: ab8500: Revert to using custom I/O functions
        ALSA: hda - Also enable mute/micmute LED control for "Lenovo dock" fixup
        ALSA: firewire-lib: include sound/asound.h to refer to snd_pcm_format_t
        ALSA: hda - Select FW_LOADER from CONFIG_SND_HDA_CODEC_CA0132_DSP
        ALSA: hda - Enable mute/mic-mute LEDs for more Thinkpads with Realtek codec
        ASoC: rcar: fixup mod access before checking
      e48f88a3
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · aecde27c
      Linus Torvalds authored
      Pull DRM fixes from Dave Airlie:
       "I was going to leave this until post -rc1 but sysfs fixes broke
        hotplug in userspace, so I had to fix it harder, otherwise a set of
        pulls from intel, radeon and vmware,
      
        The vmware/ttm changes are bit larger but since its early and they are
        unlikely to break anything else I put them in, it lets vmware work
        with dri3"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (36 commits)
        drm/sysfs: fix hotplug regression since lifetime changes
        drm/exynos: g2d: fix memory leak to userptr
        drm/i915: Fix gen3 self-refresh watermarks
        drm/ttm: Remove set_need_resched from the ttm fault handler
        drm/ttm: Don't move non-existing data
        drm/radeon: hook up backlight functions for CI and KV family.
        drm/i915: Replicate BIOS eDP bpp clamping hack for hsw
        drm/i915: Do not enable package C8 on unsupported hardware
        drm/i915: Hold pc8 lock around toggling pc8.gpu_idle
        drm/i915: encoder->get_config is no longer optional
        drm/i915/tv: add ->get_config callback
        drm/radeon/cik: Add macrotile mode array query
        drm/radeon/cik: Return backend map information to userspace
        drm/vmwgfx: Make vmwgfx dma buffers prime aware
        drm/vmwgfx: Make surfaces prime-aware
        drm/vmwgfx: Hook up the prime ioctls
        drm/ttm: Add a minimal prime implementation for ttm base objects
        drm/vmwgfx: Fix false lockdep warning
        drm/ttm: Allow execbuf util reserves without ticket
        drm/i915: restore the early forcewake cleanup
        ...
      aecde27c
    • Linus Torvalds's avatar
      Merge tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · e3414786
      Linus Torvalds authored
      Pull PCI updates from Bjorn Helgaas:
       "Miscellaneous
         - Remove duplicate disable from pcie_portdrv_remove() (Yinghai Lu)
         - Fix whitespace, capitalization, and spelling errors (Bjorn Helgaas)"
      
      * tag 'pci-v3.13-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
        PCI: Fix whitespace, capitalization, and spelling errors
      e3414786
    • Linus Torvalds's avatar
      Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending · b0e3636f
      Linus Torvalds authored
      Pull SCSI target updates from Nicholas Bellinger:
       "Things have been quiet this round with mostly bugfixes, percpu
        conversions, and other minor iscsi-target conformance testing changes.
      
        The highlights include:
      
         - Add demo_mode_discovery attribute for iscsi-target (Thomas)
         - Convert tcm_fc(FCoE) to use percpu-ida pre-allocation
         - Add send completion interrupt coalescing for ib_isert
         - Convert target-core to use percpu-refcounting for se_lun
         - Fix mutex_trylock usage bug in iscsit_increment_maxcmdsn
         - tcm_loop updates (Hannes)
         - target-core ALUA cleanups + prep for v3.14 SCSI Referrals support (Hannes)
      
        v3.14 is currently shaping to be a busy development cycle in target
        land, with initial support for T10 Referrals and T10 DIF currently on
        the roadmap"
      
      * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (40 commits)
        iscsi-target: chap auth shouldn't match username with trailing garbage
        iscsi-target: fix extract_param to handle buffer length corner case
        iscsi-target: Expose default_erl as TPG attribute
        target_core_configfs: split up ALUA supported states
        target_core_alua: Make supported states configurable
        target_core_alua: Store supported ALUA states
        target_core_alua: Rename ALUA_ACCESS_STATE_OPTIMIZED
        target_core_alua: spellcheck
        target core: rename (ex,im)plict -> (ex,im)plicit
        percpu-refcount: Add percpu-refcount.o to obj-y
        iscsi-target: Do not reject non-immediate CmdSNs exceeding MaxCmdSN
        iscsi-target: Convert iscsi_session statistics to atomic_long_t
        target: Convert se_device statistics to atomic_long_t
        target: Fix delayed Task Aborted Status (TAS) handling bug
        iscsi-target: Reject unsupported multi PDU text command sequence
        ib_isert: Avoid duplicate iscsit_increment_maxcmdsn call
        iscsi-target: Fix mutex_trylock usage in iscsit_increment_maxcmdsn
        target: Core does not need blkdev.h
        target: Pass through I/O topology for block backstores
        iser-target: Avoid using FRMR for single dma entry requests
        ...
      b0e3636f