1. 09 11月, 2017 4 次提交
  2. 23 10月, 2017 5 次提交
    • K
      ASoC: snd_soc_component_driver has non_legacy_dai_naming · 69941bab
      Kuninori Morimoto 提交于
      Codec will be replaced into Component, then Codec side
      doesn't use legacy_dai_naming on snd_soc_register_dais().
      
      This patch adds new non_legacy_dai_naming flag on Component driver
      and use converted its value for snd_soc_register_dais().
      
      When Codec is replaced into Component, Codec driver needs
      to have non_legacy_dai_naming = 1 flags.
      Existing CPU side of course doesn't have this flag, thus CPU calls
      it as true.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      69941bab
    • K
      ASoC: snd_soc_component_driver has endianness · 273d778e
      Kuninori Morimoto 提交于
      Codec will be replaced into Component, then Codec side only
      needs to call fixup_codec_formats() at this point.
      
      This patch adds new endianness flag on Component driver
      and call convert_endianness_formats() (= was fixup_codec_format())
      if endianness was true.
      
      When Codec is replaced into Component, Codec driver needs
      to have endianness = 1 flags.
      Existing CPU side of course doesn't have this flag, thus CPU doesn't
      call it.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      273d778e
    • 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_compr_ops · 9e7e3738
      Kuninori Morimoto 提交于
      Platform will be replaced into Component in the future.
      snd_soc_platform_driver has snd_compr_ops, but snd_soc_component_driver
      doesn't have. To prepare for replacing, this patch adds snd_compr_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>
      9e7e3738
    • 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
  3. 10 10月, 2017 1 次提交
  4. 04 10月, 2017 1 次提交
    • K
      ASoC: soc-core: add component lookup functions · 7dd5d0d9
      Kuninori Morimoto 提交于
      ALSA SoC platform/codec will be replaced to component soon.
      This means 1 device might have multiple components. But current
      unregister component function only checks "dev" to find it.
      This means, unexpected component might be unregistered by current
      function.
      But, it is no problem if driver registered only 1 component.
      
      To prepare avoid this issue, this patch adds new component
      lookup function. it finds component by "dev" and "driver name".
      
      Here, the reason why it uses "driver name" is that "component name"
      was created by fmt_single_name() and difficult to use it from driver.
      Driver of course knows its "driver name", thus, using it is more easy.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7dd5d0d9
  5. 28 9月, 2017 2 次提交
    • K
      ASoC: add Component level set_bias_level · 7ba236ce
      Kuninori Morimoto 提交于
      In current ALSA SoC, Codec only has set_bias_level feature.
      Codec will be merged into Component in next generation ALSA SoC,
      thus current Codec specific feature need to be merged into it.
      This is glue patch for it.
      
      Codec driver has .idle_bias_off for dapm bias. But Component
      driver doesn't have it, and dapm->idle_bias_off is set as "true".
      To keep compatibility, this patch adds "idle_bias_on" instead of
      ".idle_bias_off" on Component driver.
      dapm->idle_bias_off will be set by inverted idle_bias_on.
      
      When we replace Codec to Component, the driver which has
      ".idle_bias_off = true" is just remove it,
      and the driver which doesn't have it will have new
      ".idle_bias_on = true".
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      7ba236ce
    • K
      ASoC: add Component level pcm_new/pcm_free v2 · f523aceb
      Kuninori Morimoto 提交于
      In current ALSA SoC, Platform only has pcm_new/pcm_free feature,
      but it should be supported on Component level. This patch adds it.
      
      The v1 was added commit 99b04f4c ("ASoC: add Component level
      pcm_new/pcm_free") but it called all "card" connected component's
      pcm_new/free, it was wrong.
      This patch calls "rtd" connected component.
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f523aceb
  6. 20 9月, 2017 1 次提交
  7. 31 8月, 2017 3 次提交
  8. 25 8月, 2017 3 次提交
  9. 10 8月, 2017 2 次提交
  10. 07 8月, 2017 2 次提交
  11. 31 7月, 2017 1 次提交
  12. 26 7月, 2017 1 次提交
  13. 17 7月, 2017 1 次提交
    • 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
  14. 25 5月, 2017 1 次提交
    • K
      ASoC: add snd_soc_get_dai_id() function · a180e8b9
      Kuninori Morimoto 提交于
      ALSA SoC needs to know connected DAI ID for detecting.
      It is not a big problem if device/driver was only for sound,
      but getting DAI ID will be difficult if device includes both
      Video/Sound, like HDMI.
      To solve this issue, this patch adds new snd_soc_get_dai_id() and
      its related .of_xlate_dai_id callback on component driver.
      In below case, we can handle Sound port (= port@2) as ID = 0
      if .of_xlate_dai_id has its support.
      
      	hdmi {
      		port@0 { /* VIDEO */ };
      		port@1 { /* VIDEO */ };
      		port@2 { /* SOUND */ };
      	};
      Signed-off-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a180e8b9
  15. 25 4月, 2017 1 次提交
  16. 11 4月, 2017 1 次提交
    • B
      ASoC: jack: add snd_soc_codec_set_jack · d7344010
      Bard Liao 提交于
      There are many codecs with the capability of jack detection. Usually,
      we create a jack on machine driver but there is no common function for
      machine driver to deliver the jack pointer to codec driver.
      snd_soc_codec_set_jack can be used for delivering the jack pointer to
      codec driver and enable the jack detection function. To make it work,
      codec driver need to define a callback function to receive the jack
      pointer and do all necessary procedure for enabling jack detection.
      Signed-off-by: NBard Liao <bardliao@realtek.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d7344010
  17. 25 3月, 2017 2 次提交
  18. 27 1月, 2017 4 次提交
  19. 18 1月, 2017 1 次提交
    • L
      ASoC: core: Add API to use DMI name in sound card long name · 345233d7
      Liam Girdwood 提交于
      Intel DSP platform drivers are used by many different devices but are
      difficult for userspace to differentiate. This patch adds an API to allow
      the DMI name to be used in the sound card long name, thereby helping
      userspace load the correct UCM configuration. Usually machine drivers
      uses their own name as the sound card name (short name), and leave the
      long name and driver name blank. This API will use the DMI info like
      vendor, product and board to make up the card long name. If the machine
      driver has already explicitly set the long name, this API will do nothing.
      
      This patch also allows for further differentiation as many devices that
      share the same DMI name i.e. Minnowboards, UP boards may be configured
      with different codecs or firmwares. The API supports flavoring the DMI
      name into the card longname to provide the extra differentiation required
      for these devices.
      
      For Use Case Manager (UCM) in the user space, changing card long name by
      this API is backward compatible, since the card name does not change. For
      a given sound card, even if there is no device-specific UCM configuration
      file that uses the card long name, UCM will fall back to load the default
      configuration file that uses the card name.
      Signed-off-by: NLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      345233d7
  20. 10 1月, 2017 3 次提交