1. 11 7月, 2018 2 次提交
  2. 03 7月, 2018 1 次提交
    • L
      ASoC: core: Allow topology to override machine driver FE DAI link config. · a655de80
      Liam Girdwood 提交于
      Machine drivers statically define a number of DAI links that currently
      cannot be changed or removed by topology. This means PCMs and platform
      components cannot be changed by topology at runtime AND machine drivers
      are tightly coupled to topology.
      
      This patch allows topology to override the machine driver DAI link config
      in order to reuse machine drivers with different topologies and platform
      components. The patch supports :-
      
      1) create new FE PCMs with a topology defined PCM ID.
      2) destroy existing static FE PCMs
      3) change the platform component driver.
      4) assign any new HW params fixups.
      5) assign a new card name prefix to differentiate this topology to userspace.
      
      The patch requires no changes to the machine drivers, but does add some
      platform component flags that the platform component driver can assign
      before loading topologies.
      Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a655de80
  3. 02 7月, 2018 1 次提交
  4. 28 6月, 2018 2 次提交
    • J
      ASoC: dpcm: extend channel merging to the backend cpu dai · 4f2bd18b
      Jerome Brunet 提交于
      Extend dpcm_merge_chan to also check backend cpu dai channels
      capabilities. Apply the same policy as soc_pcm_init_runtime_hw() for
      multicodec links and only check cpu dai in this case.
      
      Cc: Jiada Wang <jiada_wang@mentor.com>
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      4f2bd18b
    • J
      ASoC: dpcm: improve runtime update predictability · de15d7ff
      Jerome Brunet 提交于
      As it is, dpcm_runtime_update() performs the old path and new path
      update of a frontend before going on to the next frontend DAI.
      Depending the order of the FEs within the rtd list, the result of
      the update might be different.
      
      For example:
       * Frontend A connected to backend C, with a 48kHz playback
       * Frontend B connected to backend D, with a 44.1kHz playback
       * FE A appears before FE B in the rtd list of the card.
      
      If we reparent BE C to FE B (disconnecting BE D):
      * old path update of FE A will run first, and BE C will get hw_free()
        and shutdown()
      * new path update of FE B will run after and BE C, which is stopped,
        so it will be configured at 44.1kHz, as expected
      
      If we reparent BE D to FE A (disconnecting BE C):
      * new path update of FE A will run first but since BE D is still running
        at 44.1kHz, it won't be reconfigured (no call to startup() or
        hw_params())
      * old path update of FE B runs after, nothing happens
      * In this case, we end up with a BE playing at 44.1kHz a stream which is
        supposed to be played at 48Khz (too slow)
      
      To improve this situation, this patch performs all the FE old paths update
      before going on to update the new paths. With this, the result should
      no longer depend on the order of the FE within the card rtd list.
      
      Please note that there might be a small performance penalty since
      dpcm_process_paths() is called twice per stream direction.
      Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      de15d7ff
  5. 22 6月, 2018 1 次提交
  6. 19 6月, 2018 1 次提交
    • C
      ASoC: pcm: Tidy up open/hw_params handling · 244e2936
      Charles Keepax 提交于
      Currently, the core will continue processing open/hw_params
      component callbacks after one has failed even though it will abort
      immediately afterwards. This is unnecessary and also has the issue
      that close/hw_free will be called on the component which failed
      open/hw_params which could result in issues if the driver doesn't
      expect this behaviour.
      
      Update the core to abort processing open/hw_params when an error
      is hit and only call close/hw_free for those components that were
      successfully opened.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.cirrus.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      244e2936
  7. 30 5月, 2018 1 次提交
  8. 29 5月, 2018 2 次提交
  9. 21 5月, 2018 1 次提交
  10. 09 5月, 2018 2 次提交
  11. 26 4月, 2018 1 次提交
  12. 19 4月, 2018 1 次提交
  13. 18 4月, 2018 1 次提交
    • L
      ASoC: core: Allow topology to override machine driver FE DAI link config. · 45f8cb57
      Liam Girdwood 提交于
      Machine drivers statically define a number of DAI links that currently
      cannot be changed or removed by topology. This means PCMs and platform
      components cannot be changed by topology at runtime AND machine drivers
      are tightly coupled to topology.
      
      This patch allows topology to override the machine driver DAI link config
      in order to reuse machine drivers with different topologies and platform
      components. The patch supports :-
      
      1) create new FE PCMs with a topology defined PCM ID.
      2) destroy existing static FE PCMs
      3) change the platform component driver.
      4) assign any new HW params fixups.
      
      The patch requires no changes to the machine drivers, but does add some
      platform component flags that the platform component driver can assign
      before loading topologies.
      Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      45f8cb57
  14. 19 3月, 2018 1 次提交
  15. 25 1月, 2018 1 次提交
  16. 24 1月, 2018 1 次提交
  17. 23 10月, 2017 2 次提交
    • K
      ASoC: snd_soc_component_driver has pmdown_time · fbb16563
      Kuninori Morimoto 提交于
      Current snd_soc_runtime_ignore_pmdown_time() tallys all Codec and
      CPU's "ignore_pmdown_time". Now, CPU (= via compoent)
      ignore_pmdown_time is fixed as "true". Codec's one is copied from Codec
      driver. This means Codec side default is "false".
      
      Current all Codec driver will be replaced into Component, thus, we can
      use for_each_rtdcom() for this totalization. This patch adds new
      "pmdown_time" on Component driver. Its inverted value will be used
      for this "ignore" totalizaton.
      
      Of course all existing Component driver doesn't have its settings now,
      thus, all existing "pmdown_time" is "false". This means all
      Components will ignore pmdown time. This is current CPU behavior.
      To keep compatibility, snd_soc_runtime_ignore_pmdown_time() totalize
      Component's inverted "pmdown_time" (= total will be true) and
      Codec's "ignore_pmdown_time" (= depends on Codec driver settings).
      Because It is using AND operation, its result is based on Codec driver
      settings only.
      This means this operation can keep compatibility and doesn't have
      nonconformity.
      
      When we replace Codec to Component, the driver which has
      ".ignore_pmdown_time = true" will be just removed,
      and the driver which doesn't have it will have new
      ".pmdown_time = true".
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      fbb16563
    • K
      ASoC: snd_soc_component_driver has snd_pcm_ops · b8135864
      Kuninori Morimoto 提交于
      Platform will be replaced into Component in the future.
      snd_soc_platform_driver has snd_pcm_ops, but snd_soc_component_driver
      doesn't have it. To prepare for replacing, this patch adds snd_pcm_ops
      on component driver.
      
      platform will be replaced into component, and its code will be removed.
      But during replacing, both platform and component process code exists.
      To keep compatibility, to avoid platform NULL access and to avoid
      platform/component duplicate operation during replacing process, this
      patch has such code. Some of this code will be removed when platform was
      removed.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      b8135864
  18. 28 9月, 2017 2 次提交
  19. 27 9月, 2017 1 次提交
  20. 26 9月, 2017 1 次提交
  21. 20 9月, 2017 1 次提交
    • J
      ASoC: soc-pcm: check symmetry after hw_params · 957ce0c6
      jiada wang 提交于
      hw_params may be fixup by be_hw_params_fixup, calling
      soc_pcm_params_symmetry() before hw_params will have issue
      if there is hw_params changes in be_hw_params_fixup.
      
      For example, with following use case
      1. a dai-link which is able to convert sample rate on BE side
      2. set BE playback and capture sample rate to 44100Hz
      3. play a 48000Hz audio stream with this dai-link
      4. record from this dai-link with 44100Hz sample rate
      
      Got following error message when record starts
      [  495.013527]  be_link_ak4613: ASoC: unmatched rate symmetry: 48000 - 44100
      [  495.021729]  be_link_ak4613: ASoC: hw_params BE failed -22
      [  495.028589]  rsnd_link0: ASoC: hw_params BE failed -22
      
      Because in soc_pcm_hw_params(), FE rate is still having value before
      it is fixup by be_hw_params_fixup(), when soc_pcm_params_symmetry() checks
      symmetry, thus soc_pcm_params_symmetry() complains about the unmatched rate
      between the active stream and the new stream tries to start.
      
      This patch moves soc_pcm_params_symmetry() after hw_params to resolve the
      above issue.
      Signed-off-by: NJiada Wang <jiada_wang@mentor.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      957ce0c6
  22. 10 8月, 2017 1 次提交
  23. 31 7月, 2017 1 次提交
  24. 17 7月, 2017 2 次提交
    • J
      ASoC: fix pcm-creation regression · c641e5b2
      Johan Hovold 提交于
      This reverts commit 99b04f4c ("ASoC: add Component level
      pcm_new/pcm_free"), which started calling the pcm_new callback for every
      component in a *card* when creating a new pcm, something which does not
      seem to make any sense.
      
      This specifically led to memory leaks in systems with more than one
      platform component and where DMA memory is allocated in the
      platform-driver callback. For example, when both mcasp devices are being
      used on an am335x board, DMA memory would be allocated twice for every
      DAI link during probe.
      
      When CONFIG_SND_VERBOSE_PROCFS was set this fortunately also led to
      warnings such as:
      
      WARNING: CPU: 0 PID: 565 at ../fs/proc/generic.c:346 proc_register+0x110/0x154
      proc_dir_entry 'sub0/prealloc' already registered
      
      Since there seems to be no users of the new component callbacks, and the
      current implementation introduced a regression, let's revert the
      offending commit for now.
      
      Fixes: 99b04f4c ("ASoC: add Component level pcm_new/pcm_free")
      Signed-off-by: NJohan Hovold <johan@kernel.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      Tested-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable <stable@vger.kernel.org>	# 4.10
      c641e5b2
    • B
      ASoC: do not close shared backend dailink · b1cd2e34
      Banajit Goswami 提交于
      Multiple frontend dailinks may be connected to a backend
      dailink at the same time. When one of frontend dailinks is
      closed, the associated backend dailink should not be closed
      if it is connected to other active frontend dailinks. Change
      ensures that backend dailink is closed only after all
      connected frontend dailinks are closed.
      Signed-off-by: NGopikrishnaiah Anandan <agopik@codeaurora.org>
      Signed-off-by: NBanajit Goswami <bgoswami@codeaurora.org>
      Signed-off-by: NPatrick Lai <plai@codeaurora.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      Cc: stable@vger.kernel.org
      b1cd2e34
  25. 03 6月, 2017 2 次提交
    • T
      ALSA: pcm: Drop the old copy and silence ops · 2ae48354
      Takashi Iwai 提交于
      Now that all users of old copy and silence ops have been converted to
      the new PCM ops, the old stuff can be retired and go away.
      Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ae48354
    • T
      ALSA: pcm: Introduce copy_user, copy_kernel and fill_silence ops · 29d1a873
      Takashi Iwai 提交于
      For supporting the explicit in-kernel copy of PCM buffer data, and
      also for further code refactoring, three new PCM ops, copy_user,
      copy_kernel and fill_silence, are introduced.  The old copy and
      silence ops will be deprecated and removed later once when all callers
      are converted.
      
      The copy_kernel ops is the new one, and it's supposed to transfer the
      PCM data from the given kernel buffer to the hardware ring-buffer (or
      vice-versa depending on the stream direction), while the copy_user ops
      is equivalent with the former copy ops, to transfer the data from the
      user-space buffer.
      
      The major difference of the new copy_* and fill_silence ops from the
      previous ops is that the new ops take bytes instead of frames for size
      and position arguments.  It has two merits: first, it allows the
      callback implementation often simpler (just call directly memcpy() &
      co), and second, it may unify the implementations of both interleaved
      and non-interleaved cases, as we'll see in the later patch.
      
      As of this stage, copy_kernel ops isn't referred yet, but only
      copy_user is used.
      Reviewed-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Acked-by: NMark Brown <broonie@kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      29d1a873
  26. 10 1月, 2017 3 次提交
  27. 07 1月, 2017 1 次提交
  28. 16 12月, 2016 1 次提交
  29. 23 11月, 2016 1 次提交
  30. 27 9月, 2016 1 次提交