1. 15 8月, 2017 1 次提交
  2. 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
  3. 13 9月, 2016 1 次提交
    • J
      ASoC: constify snd_pcm_ops structures · 115c7254
      Julia Lawall 提交于
      Check for snd_pcm_ops structures that are only stored in the ops field of a
      snd_soc_platform_driver structure or passed as the third argument to
      snd_pcm_set_ops.  The corresponding field or parameter is declared const,
      so snd_pcm_ops structures that have this property can be declared as const
      also.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @r disable optional_qualifier@
      identifier i;
      position p;
      @@
      static struct snd_pcm_ops i@p = { ... };
      
      @ok1@
      identifier r.i;
      struct snd_soc_platform_driver e;
      position p;
      @@
      e.ops = &i@p;
      
      @ok2@
      identifier r.i;
      expression e1, e2;
      position p;
      @@
      snd_pcm_set_ops(e1, e2, &i@p)
      
      @bad@
      position p != {r.p,ok1.p,ok2.p};
      identifier r.i;
      struct snd_pcm_ops e;
      @@
      e@i@p
      
      @depends on !bad disable optional_qualifier@
      identifier r.i;
      @@
      static
      +const
       struct snd_pcm_ops i = { ... };
      // </smpl>
      Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      115c7254
  4. 31 8月, 2015 1 次提交
  5. 20 10月, 2014 1 次提交
  6. 08 1月, 2014 1 次提交
  7. 30 12月, 2013 1 次提交
  8. 17 9月, 2013 1 次提交
  9. 17 5月, 2013 1 次提交
  10. 17 4月, 2013 1 次提交
  11. 09 12月, 2012 1 次提交
  12. 20 1月, 2012 1 次提交
  13. 06 12月, 2011 1 次提交
  14. 01 11月, 2011 1 次提交
  15. 28 4月, 2011 2 次提交
  16. 01 2月, 2011 1 次提交
  17. 26 11月, 2009 1 次提交
  18. 13 11月, 2009 1 次提交