1. 05 10月, 2019 1 次提交
  2. 27 7月, 2018 1 次提交
  3. 26 7月, 2018 1 次提交
    • T
      ASoC: dmaengine: Fix missing __user prefix in copy_user callback · 40d1299f
      Takashi Iwai 提交于
      It seems that __user prefix was forgotten to be added to
      dmaengine_copy_user callback while we refactored the user-copy PCM
      core.
      
      This patch adds the missing prefix, remove the superfluous cast, and
      add the needed cast (__force is needed for downgrading from user
      pointer to kernel pointer), too.
      
      Spotted by a sparse warning like:
        sound/soc/soc-generic-dmaengine-pcm.c:397:27: warning: incorrect type in initializer (incompatible argument 4 (different address spaces))
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      40d1299f
  4. 10 7月, 2018 1 次提交
    • M
      dmaengine: add support for reporting pause and resume separately · d8095f94
      Marek Szyprowski 提交于
      'cmd_pause' DMA channel capability means that respective DMA engine
      supports both pausing and resuming given DMA channel. However, in some
      cases it is important to know if DMA channel can be paused without the
      need to resume it. This is a typical requirement for proper residue
      reading on transfer timeout in UART drivers. There are also some DMA
      engines with limited hardware, which doesn't really support resuming.
      
      Reporting pause and resume capabilities separately allows UART drivers to
      properly check for the really required capabilities and operate in DMA
      mode also in systems with limited DMA hardware. On the other hand drivers,
      which rely on full channel suspend/resume support, should now check for
      both 'pause' and 'resume' features.
      
      Existing clients of dma_get_slave_caps() have been checked and the only
      driver which rely on proper channel resuming is soc-generic-dmaengine-pcm
      driver, which has been updated to check the newly added capability.
      Existing 'cmd_pause' now only indicates that DMA engine support pausing
      given DMA channel.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NVinod Koul <vkoul@kernel.org>
      d8095f94
  5. 02 7月, 2018 1 次提交
  6. 27 2月, 2018 1 次提交
  7. 26 2月, 2018 3 次提交
  8. 22 2月, 2018 1 次提交
    • F
      ASoC: soc-generic-dmaengine-pcm: Add a DMA debugfs_prefix entry · f0b3bdbd
      Fabio Estevam 提交于
      After the conversion from platform to component the following warnings
      are seen:
      
      fsl-ssi-dai 2028000.ssi: ASoC: Failed to create component debugfs
      directory
      fsl-spdif-dai 2004000.spdif: ASoC: Failed to create component debugfs
      directory
      
      As explained by Mark Brown:
      
      "It's a legit warning - we shouldn't really be creating two components
      for the same device.  However this is a bit of a corner case as it's the
      dmaengine platform driver which is kind of a virtual device, it's not
      really the device that we use with DMA that's being represented but
      rather the link between that and the DMA controller."
      
      Disambiguate the DMA component name by adding a "dma" debugfs_prefix
      entry.
      Suggested-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f0b3bdbd
  9. 12 2月, 2018 1 次提交
  10. 24 1月, 2017 1 次提交
  11. 26 10月, 2016 1 次提交
  12. 28 4月, 2016 1 次提交
    • M
      ASoC: dmaengine_pcm: Add support for packed transfers · 73fe01cf
      Matthias Reichl 提交于
      dmaengine_pcm currently only supports setups where FIFO reads/writes
      correspond to exactly one sample, eg 16-bit sample data is transferred
      via 16-bit FIFO accesses, 32-bit data via 32-bit accesses.
      
      This patch adds support for setups with fixed width FIFOs where
      multiple samples are packed into a larger word.
      
      For example setups with a 32-bit wide FIFO register that expect
      16-bit sample transfers to be done with the left+right sample data
      packed into a 32-bit word.
      
      Support for packed transfers is controlled via the
      SND_DMAENGINE_PCM_DAI_FLAG_PACK flag in snd_dmaengine_dai_dma_data.flags
      
      If this flag is set dmaengine_pcm doesn't put any restriction on the
      supported formats and sets the DMA transfer width to undefined.
      
      This means control over the constraints is now transferred to the DAI
      driver and it's responsible to provide proper configuration and
      check for possible corner cases that aren't handled by the ALSA core.
      Signed-off-by: NMatthias Reichl <hias@horus.com>
      Acked-by: NLars-Peter Clausen <lars@metafoo.de>
      Tested-by: NMartin Sperl <kernel@martin.sperl.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      73fe01cf
  13. 28 4月, 2015 1 次提交
    • L
      ASoC: dmaengine_pcm: Make FLAG_NO_RESIDUE internal · acde50a7
      Lars-Peter Clausen 提交于
      Whether residue can be reported or not is not a property of the audio
      controller but of the DMA controller. The FLAG_NO_RESIDUE was initially
      added when the DMAengine framework had no support for describing the residue
      reporting capabilities of the controller. Support for this was added quite a
      while ago and recently the DMAengine framework started to complain if a
      driver does not describe its capabilities and a lot of patches have been
      merged that add support for this where it was missing. So it should be safe
      to assume that driver on actively used platforms properly implement the DMA
      capabilities API.
      
      This patch makes the FLAG_NO_RESIDUE internal and no longer allows audio
      controller drivers to manually set the flag. If a DMA driver against
      expectations does not support reporting its capabilities for now the generic
      DMAengine PCM driver will now emit a warning and simply assume that residue
      reporting is not supported. In the future this might be changed to aborting
      with an error.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      acde50a7
  14. 06 1月, 2015 1 次提交
  15. 22 12月, 2014 1 次提交
  16. 19 8月, 2014 1 次提交
    • L
      ASoC: Consolidate platform and CODEC probe/remove · f1d45cc3
      Lars-Peter Clausen 提交于
      The platform and CODEC probe and remove code is now largely identical. This
      patch consolidates it at the component level.
      
      The resulting code is slightly larger due to all the boiler plate code setting
      up the indirection for the table based control and DAPM registration.  Once all
      drivers have been update to no longer use the snd_soc_codec_driver and
      snd_soc_platform_driver specific fields for this the indirection can be removed
      again.
      
      This patch contains two noteworthy hacks that are only meant to be temporary to
      be able to update drivers and the core in separate incremental patches.
      
      The first hack is related to that some DPCM platforms expect that the DAPM
      widgets for the DAIs of a snd_soc_component are created in the DAPM context of
      the snd_soc_platform that has the same parent device. For handling this the
      steal_sibling_dai_widgets attribute is introduced. It gets set for
      snd_soc_platforms that register DAPM elements. When creating the DAI widgets for
      a component this flag is checked and if it is found on one of the siblings the
      component will not create any DAI widgets in its own DAPM context. If the
      attribute is set on a platform it will look for siblings components and create
      DAI widgets for them in its own context. The fix for this will be to update
      the offending drivers to only register a single component rather than two.
      
      The second hack deals with the fact that the ASoC card suspend and resume code
      still needs a list of CODECs that have been registered for the card. To handle
      this the generic probe and remove path have a check to see if the component is
      CODEC and if yes add/remove it to the card's CODEC list. While it is possible to
      clean up the suspend/resume code to not need the CODEC list anymore this is a
      bit of a chicken and egg problem since it will become easier to clean up the
      suspend/resume code once there is a unified component layer.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      f1d45cc3
  17. 05 7月, 2014 1 次提交
  18. 16 1月, 2014 1 次提交
  19. 15 1月, 2014 2 次提交
    • L
      ASoC: generic-dmaengine-pcm: Check DMA residue granularity · 478028e0
      Lars-Peter Clausen 提交于
      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: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      478028e0
    • L
      ASoC: generic-dmaengine-pcm: Check NO_RESIDUE flag at runtime · 93b943ed
      Lars-Peter Clausen 提交于
      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: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      93b943ed
  20. 17 12月, 2013 1 次提交
  21. 12 12月, 2013 1 次提交
  22. 11 12月, 2013 1 次提交
  23. 10 12月, 2013 3 次提交
  24. 02 12月, 2013 1 次提交
  25. 08 11月, 2013 1 次提交
  26. 07 11月, 2013 1 次提交
  27. 26 10月, 2013 1 次提交
  28. 24 10月, 2013 2 次提交
  29. 20 10月, 2013 2 次提交
    • L
      ASoC: dmaengine-pcm: Provide default config · fa654e08
      Lars-Peter Clausen 提交于
      This patch adds some default settings for the generic dmaengine PCM driver for
      the case that no config has been supplied. The following defaults are used:
      	* Use snd_dmaengine_pcm_prepare_slave_config for preparing the DMA slave
      	  config.
      	* 512kB for the prealloc buffer size. This value has been chosen based on
      	  'feels about right' and is not backed up by any scientific facts. We
      	  may need to come up with something smarter in the future but it should
      	  work fine for now.
      
      With this infrastructure in place we can finally write DAI drivers which are
      independent of the DMA controller they are connected to. This is e.g. useful if
      the DAI IP core is reused across different SoCs, but the SoCs uses different DMA
      controllers.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      fa654e08
    • L
      ASoC: dmaengine-pcm: Add support for querying DMA capabilities · c0de42bf
      Lars-Peter Clausen 提交于
      Currently each platform making use the the generic dmaengine PCM driver still
      needs to provide a custom snd_pcm_hardware struct which specifies the
      capabilities of the DMA controller, e.g. the maximum period size that can be
      supported. This patch adds code which uses the newly introduced
      dma_get_slave_caps() API to query this information from the dmaengine driver.
      The new code path will only be taken if the 'pcm_hardware' field of the
      snd_dmaengine_pcm_config struct is NULL.
      
      The patch also introduces a new 'fifo_size' field to the
      snd_dmaengine_dai_dma_data struct which is used to initialize the
      snd_pcm_hardware 'fifo_size' field and needs to be set by the DAI driver.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@linaro.org>
      c0de42bf
  30. 23 4月, 2013 2 次提交
  31. 22 4月, 2013 1 次提交
  32. 17 4月, 2013 1 次提交