1. 25 8月, 2017 2 次提交
  2. 07 8月, 2017 1 次提交
  3. 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
  4. 25 4月, 2017 1 次提交
  5. 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
  6. 25 3月, 2017 2 次提交
  7. 27 1月, 2017 4 次提交
  8. 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
  9. 10 1月, 2017 3 次提交
  10. 01 1月, 2017 1 次提交
    • S
      ASoC: Fix binding and probing of auxiliary components · d2e3a135
      Sylwester Nawrocki 提交于
      Currently binding of auxiliary devices doesn't work as in
      soc_bind_aux_dev() function a bound component is not being added
      to any list and in soc_probe_aux_devices() we are trying to walk
      the component_dev_list list to probe auxiliary components but
      at that time this list doesn't contain any auxiliary components
      since they are being added to the card only in soc_probe_component().
      
      This patch adds a list to the card where are stored bound but not
      probed auxiliary devices, so that all aux devices can be probed.
      
      Fixes: 1a653aa4 "ASoC: core: replace aux_comp_list to component_dev_list"
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d2e3a135
  11. 16 12月, 2016 1 次提交
  12. 02 12月, 2016 3 次提交
  13. 01 12月, 2016 1 次提交
    • R
      ASoC: core: Add component pin control functions · 1b4d9c22
      Richard Fitzgerald 提交于
      It's often the case that a codec driver will need to control its
      own pins. However, if a name_prefix has been applied to this codec it
      must be included in the name passed to any of the snd_soc_dapm_x_pin()
      functions.
      
      The behaviour of the existing pin control functions is reasonable, since
      you may want to search for a fully-specified name within the scope of an
      entire card. This means that we can't apply the prefix in these functions
      because it will break card-scope searches.
      
      Constructing a prefixed string "manually" in codec drivers leads to a lot
      of repetition of the same code.
      
      To make this tidier in codec drivers this patch adds a new set of
      equivalent functions that take a struct snd_soc_component instead of a
      dapm context and automatically add the component's name_prefix to the
      given name. This makes it a simple change in codec drivers to be
      prefix-safe.
      
      The new functions are not quite trivial enough to be inlines and the
      compiler won't be able to compile-away any part of them.
      
      Although it looks somewhat inefficient to have to allocate a temporary
      buffer and combine strings, the current design of the widget list
      doesn't lend itself to a more optimized implementation - it's a single
      list of all widgets on a card and is searched linearly for a matching
      string. As pin state changes are generally low-frequency events it's
      unlikely to be a significant issue - at least not enough to rewrite the
      widget list handling just for this.
      Signed-off-by: NRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      1b4d9c22
  14. 11 11月, 2016 5 次提交
  15. 05 11月, 2016 1 次提交
    • M
      ASoC: Define API to find a dai link · 17fb1755
      Mengdong Lin 提交于
      Define the API to find an existing DAI link of the soc card by matching
      the ID, name and stream name.
      
      Some cards may use unique ID for each DAI link, so matching ID is enough,
      and name or stream name are not necessary. But user need to specify name
      or stream name as well if not sure whether link ID is unique since most
      cards use 0 as the default link ID.
      
      Topology can use this API to find an existing BE link and configure it.
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      17fb1755
  16. 24 10月, 2016 3 次提交
  17. 09 8月, 2016 1 次提交
  18. 08 8月, 2016 1 次提交
  19. 30 5月, 2016 1 次提交
    • S
      ASoC: Introduce SOC_SINGLE_S8_TLV() macro · dcc0799b
      Srinivas Kandagatla 提交于
      This patch introduces SOC_SINGLE_S8_TLV() macro for volume control
      on chips which supports both negative and positive gains with sign
      bit on a 8 bit register, Gain ranges from -128 to +127 with a
      predefined step size.
      Currently we only have support to DOUBLE_S8_TLV() which does not fit
      for cases where we just have separate gain control register for each
      channel.
      
      One of the Qualcomm SOC msm8916 has such gain control register whose gain
      range is from -38.4dB to +38.4dB with step size of 0.3dB.
      Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      dcc0799b
  20. 21 4月, 2016 2 次提交
  21. 16 2月, 2016 1 次提交
  22. 10 1月, 2016 2 次提交
    • M
      ASoC: Make aux_dev more like a generic component · f2ed6b07
      Mengdong Lin 提交于
      aux_dev is mainly used by the machine driver to specify analog devices,
      which are registered as codecs. Making it more like a generic component
      can help the machine driver to use it to specify any component with
      topology info by name.
      
      Details:
      - Remove the stub 'rtd_aux' array from the soc card.
      - Add a list 'aux_comp_list' to store the components of aux_devs.
        And add a list head 'list_aux' to struct snd_soc_component, for adding
        such components to the above list.
      - Add a 'init' ops to a component for machine specific init.
        soc_bind_aux_dev() will set it to be aux_dev's init. And it will be
        called when probing the component.
      - soc_bind_aux_dev() will also search components by name of an aux_dev,
        since it may not be a codec.
      - Move probing of aux_devs before checking new DAI links brought by
        topology.
      - Move removal of aux_devs later than removal of links. Because topology
        of aux components may register DAIs and the DAI drivers will go with
        removal of the aux components, we want soc_remove_link_dais() to remove
        the DAIs at first.
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      f2ed6b07
    • M
      ASoC: Support registering a DAI dynamically · 68003e6c
      Mengdong Lin 提交于
      Define API snd_soc_register_dai() to add a DAI dynamically and
      create the DAI widgets. Topology can use this API to register DAIs
      when probing a component with topology info. These DAIs's playback
      & capture widgets will be freed when the sound card is unregistered
      and the DAIs will be freed when cleaning up the component.
      
      And a dobj is embedded into the struct snd_soc_dai_driver. Topology
      can use the dobj to find the DAI drivers created by it and free them
      when the topology component is removed.
      Signed-off-by: NMengdong Lin <mengdong.lin@linux.intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      68003e6c
  23. 31 12月, 2015 1 次提交
    • C
      ASoC: Use nested lock for snd_soc_dapm_mutex_lock · 783513ee
      Charles Keepax 提交于
      snd_soc_dapm_mutex_lock currently uses the un-nested call which can
      cause lockdep warnings when called from control handlers (a relatively
      common usage) and using modules. As creating the control causes a
      potential mutex inversion with the handler, creating the control will
      take the controls_rwsem under the dapm_mutex and accessing the control
      will take the dapm_mutex under controls_rwsem.
      
      All the users look like they want to be using the runtime class of the
      lock anyway, so this patch just changes snd_soc_dapm_mutex_lock to use
      the nested call, with the SND_SOC_DAPM_CLASS_RUNTIME class.
      
      Fixes: f6d5e586 ("ASoC: dapm: Add helpers to lock/unlock DAPM mutex")
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      783513ee