1. 19 1月, 2011 1 次提交
    • M
      ASoC: Add support for sequencing within · 20e4859d
      Mark Brown 提交于
      With larger devices there may be many widgets of the same type in series
      in an audio path. Allow drivers to specify an additional level of ordering
      within each widget type by adding a subsequence number to widgets and then
      splitting operations on widgets so that widgets of the same type but
      different sequence numbers are processed separately.  A typical example
      would be a supply widget which requires that another widget be enabled
      to provide power or clocking.
      
      SND_SOC_DAPM_PGA_S() and SND_SOC_DAPM_SUPPLY_S() macros are provided
      allowing this to be used with PGAs and supplies as these are the most
      commonly affected widgets.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      20e4859d
  2. 18 12月, 2010 1 次提交
  3. 17 12月, 2010 1 次提交
  4. 16 12月, 2010 3 次提交
    • J
      ASoC: Extend DAPM to handle power changes on cross-device paths · 7be31be8
      Jarkko Nikula 提交于
      Power change event like stream start/stop or kcontrol change in a
      cross-device path originates from one device but codec bias and widget power
      changes must be populated to another devices on that path as well.
      
      This patch modifies the dapm_power_widgets so that all the widgets on a
      sound card are checked for a power change, not just those that are specific
      to originating device. Also bias management is extended to check all the
      devices. Only exception in bias management are widgetless codecs whose bias
      state is changed only if power change is originating from that context.
      
      DAPM context test is added to dapm_seq_run to take care of if power sequence
      extends to an another device which requires separate register writes.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      7be31be8
    • J
      ASoC: Move widgets from DAPM context to snd_soc_card · 97c866de
      Jarkko Nikula 提交于
      Decoupling widgets from DAPM context is required when extending the ASoC
      core to cross-device paths. Even the list of widgets are now kept in
      struct snd_soc_card, the widget listing in sysfs and debugs remain sorted
      per device.
      
      This patch makes possible to build cross-device paths but does not extend
      yet the DAPM to handle codec bias and widget power changes of an another
      device.
      
      Cross-device paths are registered by listing the widgets from device A in
      a map for device B. In case of conflicting widget names between the devices,
      a uniform name prefix is needed to separate them. See commit ead9b919
      "ASoC: Add optional name_prefix for kcontrol, widget and route names" for
      help.
      
      An example below shows a path that connects MONO out of A into Line In of B:
      
      static const struct snd_soc_dapm_route mapA[] = {
      	{"MONO", NULL, "DAC"},
      };
      
      static const struct snd_soc_dapm_route mapB[] = {
      	{"Line In", NULL, "MONO"},
      };
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      97c866de
    • J
      ASoC: Move DAPM paths from DAPM context to snd_soc_card · 8ddab3f5
      Jarkko Nikula 提交于
      Decoupling DAPM paths from DAPM context is a first prerequisite when
      extending ASoC core to cross-device paths. This patch is almost a nullop and
      does not allow to construct cross-device setup but the path clean-up part in
      dapm_free_widgets is prepared to remove cross-device paths between a device
      being removed and others.
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Acked-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      8ddab3f5
  5. 15 12月, 2010 1 次提交
  6. 14 12月, 2010 1 次提交
  7. 22 11月, 2010 1 次提交
  8. 06 11月, 2010 2 次提交
    • J
      ASoC: Move pop time from DAPM context to sound card · 3a45b867
      Jarkko Nikula 提交于
      Based on discussion the dapm_pop_time in debugsfs should be per card rather
      than per device. Single pop time value for entire card is cleaner when the
      DAPM sequencing is extended to cross-device paths.
      
      debugfs/asoc/{card->name}/{codec dir}/dapm_pop_time
      ->
      debugfs/asoc/{card->name}/dapm_pop_time
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      3a45b867
    • L
      ASoC: Decouple DAPM from CODECs · ce6120cc
      Liam Girdwood 提交于
      Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
      required when developing ASoC further. Such as for other ASoC components to
      have DAPM widgets or when extending DAPM to handle cross-device paths.
      
      This patch decouples DAPM related variables from struct snd_soc_codec and
      moves them to new struct snd_soc_dapm_context that is used to encapsulate
      DAPM context of a device. ASoC core and API of DAPM functions are modified
      to use DAPM context instead of codec.
      
      This patch does not change current functionality and a large part of changes
      come because of structure and internal API changes.
      
      Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some
      minor core changes, codecs and machine driver conversions from
      Jarkko Nikula <jhnikula@gmail.com>.
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
      Cc: Manuel Lauss <manuel.lauss@googlemail.com>
      Cc: Mike Frysinger <vapier.adi@gmail.com>
      Cc: Cliff Cai <cliff.cai@analog.com>
      Cc: Kevin Hilman <khilman@deeprootsystems.com>
      Cc: Ryan Mallon <ryan@bluewatersys.com>
      Cc: Timur Tabi <timur@freescale.com>
      Cc: Sascha Hauer <s.hauer@pengutronix.de>
      Cc: Lars-Peter Clausen <lars@metafoo.de>
      Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      Cc: Jassi Brar <jassi.brar@samsung.com>
      Cc: Daniel Gloeckner <dg@emlix.com>
      Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      ce6120cc
  9. 06 9月, 2010 1 次提交
  10. 12 8月, 2010 1 次提交
    • L
      ASoC: multi-component - ASoC Multi-Component Support · f0fba2ad
      Liam Girdwood 提交于
      This patch extends the ASoC API to allow sound cards to have more than one
      CODEC and more than one platform DMA controller. This is achieved by dividing
      some current ASoC structures that contain both driver data and device data into
      structures that only either contain device data or driver data. i.e.
      
       struct snd_soc_codec    --->  struct snd_soc_codec (device data)
                                +->  struct snd_soc_codec_driver (driver data)
      
       struct snd_soc_platform --->  struct snd_soc_platform (device data)
                                +->  struct snd_soc_platform_driver (driver data)
      
       struct snd_soc_dai      --->  struct snd_soc_dai (device data)
                                +->  struct snd_soc_dai_driver (driver data)
      
       struct snd_soc_device   --->  deleted
      
      This now allows ASoC to be more tightly aligned with the Linux driver model and
      also means that every ASoC codec, platform and (platform) DAI is a kernel
      device. ASoC component private data is now stored as device private data.
      
      The ASoC sound card struct snd_soc_card has also been updated to store lists
      of it's components rather than a pointer to a codec and platform. The PCM
      runtime struct soc_pcm_runtime now has pointers to all its components.
      
      This patch adds DAPM support for ASoC multi-component and removes struct
      snd_soc_socdev from DAPM core. All DAPM calls are now made on a card, codec
      or runtime PCM level basis rather than using snd_soc_socdev.
      
      Other notable multi-component changes:-
      
       * Stream operations now de-reference less structures.
       * close_delayed work() now runs on a DAI basis rather than looping all DAIs
         in a card.
       * PM suspend()/resume() operations can now handle N CODECs and Platforms
         per sound card.
       * Added soc_bind_dai_link() to bind the component devices to the sound card.
       * Added soc_dai_link_probe() and soc_dai_link_remove() to probe and remove
         DAI link components.
       * sysfs entries can now be registered per component per card.
       * snd_soc_new_pcms() functionailty rolled into dai_link_probe().
       * snd_soc_register_codec() now does all the codec list and mutex init.
      
      This patch changes the probe() and remove() of the CODEC drivers as follows:-
      
       o Make CODEC driver a platform driver
       o Moved all struct snd_soc_codec list, mutex, etc initialiasation to core.
       o Removed all static codec pointers (drivers now support > 1 codec dev)
       o snd_soc_register_pcms() now done by core.
       o snd_soc_register_dai() folded into snd_soc_register_codec().
      
      CS4270 portions:
      Acked-by: NTimur Tabi <timur@freescale.com>
      
      Some TLV320aic23 and Cirrus platform fixes.
      Signed-off-by: NRyan Mallon <ryan@bluewatersys.com>
      
      TI CODEC and OMAP fixes
      Signed-off-by: NPeter Ujfalusi <peter.ujfalusi@nokia.com>
      Signed-off-by: NJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
      Signed-off-by: NJarkko Nikula <jhnikula@gmail.com>
      
      Samsung platform and misc fixes :-
      Signed-off-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NJoonyoung Shim <jy0922.shim@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NJassi Brar <jassi.brar@samsung.com>
      Signed-off-by: NSeungwhan Youn <sw.youn@samsung.com>
      
      MPC8610 and PPC fixes.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      
      i.MX fixes and some core fixes.
      Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
      
      J4740 platform fixes:-
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      
      CC: Tony Lindgren <tony@atomide.com>
      CC: Nicolas Ferre <nicolas.ferre@atmel.com>
      CC: Kevin Hilman <khilman@deeprootsystems.com>
      CC: Sascha Hauer <s.hauer@pengutronix.de>
      CC: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
      CC: Kuninori Morimoto <morimoto.kuninori@renesas.com>
      CC: Daniel Gloeckner <dg@emlix.com>
      CC: Manuel Lauss <mano@roarinelk.homelinux.net>
      CC: Mike Frysinger <vapier.adi@gmail.com>
      CC: Arnaud Patard <apatard@mandriva.com>
      CC: Wan ZongShun <mcuos.com@gmail.com>
      Acked-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: NLiam Girdwood <lrg@slimlogic.co.uk>
      f0fba2ad
  11. 31 5月, 2010 1 次提交
  12. 10 5月, 2010 2 次提交
  13. 16 3月, 2010 2 次提交
  14. 06 3月, 2010 1 次提交
  15. 25 1月, 2010 1 次提交
  16. 06 10月, 2009 1 次提交
  17. 09 9月, 2009 1 次提交
    • M
      ASoC: Allow per-route connectedness checks for supplies · 215edda3
      Mark Brown 提交于
      Some chips with complex internal supply (particularly clocking)
      arragements may have multiple options for some of the supply
      connections. Since these don't affect user-visible audio routing
      the expectation would be that they would be managed automatically
      by one of the drivers.
      
      Support these users by allowing routes to have a connected function
      which is queried before the connectedness of the path is checked as
      normal. Currently this is only done for supplies, other widgets
      could be supported but are not currently since the expectation for
      them is that audio routing will be under the control of userspace.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      215edda3
  18. 22 8月, 2009 1 次提交
    • M
      ASoC: Add DAPM widget power decision debugfs files · 79fb9387
      Mark Brown 提交于
      Currently when built with DEBUG DAPM will dump information about
      the power state decisions it is taking for each widget to dmesg.
      This isn't an ideal way of getting the information - it requires
      a kernel build to turn it on and off and for large hub CODECs the
      volume of information is so large as to be illegible. When the
      output goes to the console it can also cause a noticable impact
      on performance simply to print it out.
      
      Improve the situation by adding a dapm directory to our debugfs
      tree containing a file per widget with the same information in
      it. This still requires a decision to build with debugfs support
      but is easier to navigate and much less intrusive.
      
      In addition to the previously displayed information active streams
      are also shown in these files.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      79fb9387
  19. 18 8月, 2009 1 次提交
    • M
      ASoC: Add input and output AIF widgets · 010ff262
      Mark Brown 提交于
      Currently DAPM interfaces with the audio streams to and from the
      processor at the DAC and ADC widgets. As the digital capabilities
      of parts increases this is becoming a less and less able to meet
      the needs of parts.
      
      To meet the needs of these devices create new widgets interfacing
      with the TDM bus but not integrated into any other functionality.
      Audio can then be routed to and from these widgets using existing
      routing widgets.
      
      A slot number is provided in the definition but this is currently
      not used yet. This is intended to support devices which can use
      more than one TDM slot on a single interface.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      010ff262
  20. 24 6月, 2009 1 次提交
  21. 18 5月, 2009 2 次提交
    • M
      ASoC: Integrate bias management with DAPM power management · 452c5eaa
      Mark Brown 提交于
      Rather than managing the bias level of the system based on if there is
      an active audio stream manage it based on there being an active DAPM
      widget. This simplifies the code a little, moving the power handling
      into one place, and improves audio performance for bypass paths when no
      playbacks or captures are active.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      452c5eaa
    • M
      ASoC: Split DAPM power checks from sequencing of power changes · 6d3ddc81
      Mark Brown 提交于
      DAPM has always applied any changes to the power state of widgets as soon
      as it has determined that they are required. Instead of doing this store
      all the changes that are required on lists of widgets to power up and
      down, then iterate over those lists and apply the changes. This changes
      the sequence in which changes are implemented, doing all power downs
      before power ups and always using the up/down sequences (previously they
      were only used when changes were due to DAC/ADC power events). The error
      handling is also changed so that we continue attempting to power widgets
      if some changes fail.
      
      The main benefit of this is to allow future changes to do optimisations
      over the whole power sequence and to reduce the number of walks of the
      widget graph required to check the power status of widgets.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      6d3ddc81
  22. 23 4月, 2009 1 次提交
    • M
      ASoC: Add power supply widget to DAPM · 246d0a17
      Mark Brown 提交于
      Many modern CODECs have shared resources on chip which must be enabled
      for portions of the chip to work but which can be disabled at other times
      in order to achieve power savings. Examples of such resources include
      power supplies and some internal clocks.
      
      Since these widgets are dependencies for the audio path but do not carry
      audio signals they require slightly different handling to most widgets -
      they do not contribute to the audio path and so should not be counted as
      either inputs or outputs during path walks.
      
      Cases where one supply provides a supply for another will require
      additional work. There is also room for more optimisation of the graph
      walking to avoid repeated checks for the same thing.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      246d0a17
  23. 21 4月, 2009 1 次提交
  24. 13 4月, 2009 1 次提交
  25. 01 3月, 2009 1 次提交
  26. 23 1月, 2009 1 次提交
  27. 09 1月, 2009 1 次提交
  28. 08 1月, 2009 2 次提交
  29. 06 1月, 2009 1 次提交
  30. 16 10月, 2008 1 次提交
  31. 13 10月, 2008 1 次提交
  32. 29 7月, 2008 1 次提交
  33. 10 7月, 2008 1 次提交