1. 05 10月, 2011 4 次提交
  2. 04 10月, 2011 7 次提交
  3. 29 9月, 2011 1 次提交
  4. 24 9月, 2011 1 次提交
    • M
      ASoC: Don't force bias on ground referenced devices · 85a843c5
      Mark Brown 提交于
      Currently we force all devices in the system to be at the same bias level.
      This is due to concerns about power or pop/click impacts from either
      ramping VMID or mismatching VMID on the analogue I/O lines between
      connected devices but does mean we power devices up more often than we
      really need to.
      
      If a device flags idle_bias_off this will usually mean that it's either
      all digital or ground referenced (in which case the idle and powered bias
      levels are identical) so this concern does not apply and we can save some
      power by leaving it off when not needed itself.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      85a843c5
  5. 23 9月, 2011 1 次提交
  6. 21 9月, 2011 2 次提交
    • M
      ASoC: Factor out per-widget DAPM power checks · 7c81beb0
      Mark Brown 提交于
      The indentation is getting a little deep. Should be straight code motion,
      no functional changes.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      7c81beb0
    • M
      ASoC: Trace and collect statistics for DAPM graph walking · de02d078
      Mark Brown 提交于
      One of the longest standing areas for improvement in ASoC has been the
      DAPM algorithm - it repeats the same checks many times whenever it is run
      and makes no effort to limit the areas of the graph it checks meaning we
      do an awful lot of walks over the full graph. This has never mattered too
      much as the size of the graph has generally been small in relation to the
      size of the devices supported and the speed of CPUs but it is annoying.
      
      In preparation for work on improving this insert a trace point after the
      graph walk has been done. This gives us specific timing information for
      the walk, and in order to give quantifiable (non-benchmark) numbers also
      count every time we check a link or check the power for a widget and report
      those numbers. Substantial changes in the algorithm may require tweaks to
      the stats but they should be useful for simpler things.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      de02d078
  7. 19 9月, 2011 1 次提交
  8. 31 8月, 2011 1 次提交
  9. 16 8月, 2011 1 次提交
  10. 26 7月, 2011 2 次提交
  11. 21 7月, 2011 1 次提交
  12. 17 7月, 2011 1 次提交
  13. 06 7月, 2011 1 次提交
  14. 20 6月, 2011 1 次提交
  15. 14 6月, 2011 2 次提交
    • L
      ASoC: dapm - Refactor widget IO functions in preparation for platform widgets. · 0445bdf4
      Liam Girdwood 提交于
      This time with soc_widget_update_bits reflecting recent soc_update_bits changes.
      
      Currently widget IO is tightly coupled to the CODEC drivers. Future platform DSP
      devices have mixer components that can alter power usage and hence require full
      DAPM support.
      
      This provides a generic widget IO operation wrapper in preparation for
      future patches that implement platform driver DAPM.
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      0445bdf4
    • M
      ASoC: Add weak routes for sidetone style paths · bf3a9e13
      Mark Brown 提交于
      Normally DAPM will power up any connected audio path. This is not ideal
      for sidetone paths as with sidetone paths the audio path is not wanted in
      itself, it is only desired if the two paths it provides a sidetone between
      are both active. If the sidetone path causes a power up then it can be
      hard to minimise pops as we first power up either the sidetone or the main
      output path and then power the other, with the second power up potentially
      introducing a DC offset.
      
      Address this by introducing the concept of a weak path. If a path is marked
      as weak then DAPM will ignore that path when walking the graph, though all
      the relevant controls are still available to the application layer to allow
      these paths to be configured.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      bf3a9e13
  16. 09 6月, 2011 1 次提交
  17. 07 6月, 2011 7 次提交
  18. 27 5月, 2011 1 次提交
    • S
      ASoC: Fix dapm_is_shared_kcontrol so everything isn't shared · 1007da06
      Stephen Warren 提交于
      Commit af46800b ("ASoC: Implement mux control sharing") introduced
      function dapm_is_shared_kcontrol.
      
      When this function returns true, the naming of DAPM controls is derived
      from the kcontrol_new. Otherwise, the name comes from the widget (and
      possibly a widget's naming prefix).
      
      A bug in the implementation of dapm_is_shared_kcontrol made it return 1
      in all cases. Hence, that commit caused a change in control naming for
      all controls instead of just shared controls.
      
      Specifically, a control is always considered shared because it is always
      compared against itself. Solve this by never comparing against the widget
      containing the control being created.
      
      Equally, controls should never be shared between DAPM contexts; when the
      same codec is instantiated multiple times, the same kcontrol_new will be
      used. However, the control should no be shared between the multiple
      instances.
      
      I tested that with the Tegra WM8903 driver:
      * Shared is now mostly 0 as expected, and sometimes 1.
      * The expected controls are still generated after this change.
      
      However, I don't have any systems that have a widget/control naming
      prefix, so I can't test that aspect.
      
      Thanks for Jarkko Nikula for pointing out how to fix this.
      Reported-by: NLiam Girdwood <lrg@ti.com>
      Tested-by: NJarkko Nikula <jhnikula@gmail.com>
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      1007da06
  19. 26 5月, 2011 1 次提交
    • J
      ASoC: Fix power down for widgetless per-card DAPM context case · ea77b947
      Jarkko Nikula 提交于
      Commit 52ba67bf ("ASoC: Force all DAPM contexts into the same bias state")
      powers up all the DAPM contexts in a card if any DAPM context becomes
      active. Unfortunately power down newer happens if per-card DAPM context
      doesn't have any widgets.
      
      Reason for this is that power state of per-card DAPM context without
      widgets is never cleared and thus all the DAPM contexts remain permanently
      active. Test for widgetless calling DAPM context in dapm_power_widgets()
      doesn't work for per-card DAPM context since power change is never
      originating from widgetless per-card DAPM context.
      
      Fix this by pre-clearing power state flag of non-codec DAPM context at the
      beginning of power sequence.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      ea77b947
  20. 04 5月, 2011 3 次提交
    • S
      ASoC: Implement mux control sharing · af46800b
      Stephen Warren 提交于
      Control sharing is enabled when two widgets include pointers to the
      same kcontrol_new in their definition. Specifically:
      
      static const struct snd_kcontrol_new adcinput_mux =
      	SOC_DAPM_ENUM("ADC Input", adcinput_enum);
      
      static const struct snd_soc_dapm_widget wm8903_dapm_widgets[] = {
        SND_SOC_DAPM_MUX("Left ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
        SND_SOC_DAPM_MUX("Right ADC Input", SND_SOC_NOPM, 0, 0, &adcinput_mux),
      };
      
      This is useful when a single register bit or field affects multiple
      muxes at once. The common case is to have separate control bits or
      fields for each mux (channel). An alternative way of looking at this
      is that the mux is a stereo (or even n-channel) mux, rather than
      independant mono muxes.
      
      Without this change, a separate kcontrol will be created for each
      DAPM_MUX. This has the following disadvantages:
      
      * Confuses the user/programmer with redundant controls that don't
        map to separate hardware.
      
      * When one of the controls is changed, ASoC fails to update the DAPM
        logic for paths solely affected by the other controls impacted by
        the same register bits. This causes some paths not to be correctly
        powered up or down. Prior to this change, to work around this, the
        user or programmer had to manually toggle all duplicate controls away
        from the intended setting, and then back to it.
      
      Control sharing implies that the control is named based on the
      kcontrol_new itself, not any of the widgets that are affected by it.
      
      Control sharing is implemented by: When creating kcontrols, if a
      kcontrol does not yet exist for a particular kcontrol_new, then a new
      kcontrol is created with a list of widgets containing just a single
      entry. This is the normal case. However, if a kcontrol does already
      exists for the given kcontrol_new, the current widget is simply added
      to that kcontrol's list of affected widgets.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      af46800b
    • S
      ASoC: Store a list of widgets in a DAPM mux/mixer kcontrol · fafd2176
      Stephen Warren 提交于
      A future change will allow multiple widgets to be affected by the same
      control. For example, a single register bit that controls separate muxes
      in both the L and R audio paths.
      
      This change updates the code that handles relevant controls to be able
      to iterate over a list of affected widgets. Note that only the put
      functions need significant modification to implement the iteration; the
      get functions do not need to iterate, nor unify the results, since all
      affected widgets reference the same kcontrol.
      
      When creating the list of widgets, always create a 1-sized list, since
      the control sharing is not implemented in this change.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      fafd2176
    • S
      ASoC: Add w->kcontrols, and populate it · fad59888
      Stephen Warren 提交于
      Future changes will need reference to the kcontrol created for a given
      kcontrol_new. Store the created kcontrol values now.
      Signed-off-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      fad59888