Commit Graph

292 Commits

Author SHA1 Message Date
Mark Brown 4e872a4682 ASoC: dapm: Don't force card bias level to be updated
Commit 412312 (ASoC: dapm: Make sure all dapm contexts are updated) means
that any DAPM context being updated will have the bias level automatically
set, including the card. We can't safely do this as the card callbacks are
called for each device context and so the management of the card bias is
more complex. Several multi-component cards rely on this behaviour.

Skip updates during the asynchronous run entirely. We should really do them
in the synchronous section but it's not 100% clear which values to pick as
the different DAPM contexts may have different bias levels.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:51:09 +01:00
Mark Brown d8c3bb911f ASoC: dapm: Make sure we update the bias level for CODECs with no op
Commit 412312 (ASoC: dapm: Make sure all dapm contexts are updated)
ensures that we update non-CODEC DAPM contexts but means that if a
CODEC has no set_bias_level() operation it'll not be updated. Fix
that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-25 13:50:21 +01:00
Linus Torvalds bdc0077af5 SCSI misc on 20120724
The most important feature of this patch set is the new async infrastructure
 that makes sure async_synchronize_full() synchronizes all domains and allows
 us to remove all the hacks (like having scsi_complete_async_scans() in the
 device base code) and means that the async infrastructure will "just work" in
 future. The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
 megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure work in
 sas and FC.
 
 Signed-off-by: James Bottomley <JBottomley@Parallels.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJQDjDCAAoJEDeqqVYsXL0M/sMH/jVgBfF1mjR+DQuTscKyD21w
 0BQLn5OmvDZDqo44iqQzNRObw7CxkBkUtHoozsknLijw+KggER653ZOAtUdIHfI/
 /uo7iJQ3J3D/Ezm99HYSpZiF2juZwsBRtFBoKkGqOpMlzFUx5o4hUbH5OcINxnHR
 VmvJU5K1kg8D77Q6zK+Atl14/Rfibc2IoufFmbYdplUAM/tV0BpBSSHJAJvqua76
 NGMl4KJcPZnXe/4LXcxZia5A2efdFFEzaQ2mM9rUVEAgHDAxc0Zg9IoDhGd08FX4
 G55NK+6+bKb9s7bgyva0T/iy817TRCzjteeYNFrb8nBRe7aQbAivaBHQFXIyvdQ=
 =y2sh
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull first round of SCSI updates from James Bottomley:
 "The most important feature of this patch set is the new async
  infrastructure that makes sure async_synchronize_full() synchronizes
  all domains and allows us to remove all the hacks (like having
  scsi_complete_async_scans() in the device base code) and means that
  the async infrastructure will "just work" in future.

  The rest is assorted driver updates (aacraid, bnx2fc, virto-scsi,
  megaraid, bfa, lpfc, qla2xxx, qla4xxx) plus a lot of infrastructure
  work in sas and FC.

  Signed-off-by: James Bottomley <JBottomley@Parallels.com>"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (97 commits)
  [SCSI] Revert "[SCSI] fix async probe regression"
  [SCSI] cleanup usages of scsi_complete_async_scans
  [SCSI] queue async scan work to an async_schedule domain
  [SCSI] async: make async_synchronize_full() flush all work regardless of domain
  [SCSI] async: introduce 'async_domain' type
  [SCSI] bfa: Fix to set correct return error codes and misc cleanup.
  [SCSI] aacraid: Series 7 Async. (performance) mode support
  [SCSI] aha152x: Allow use on 64bit systems
  [SCSI] virtio-scsi: Add vdrv->scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning
  [SCSI] bfa: squelch lockdep complaint with a spin_lock_init
  [SCSI] qla2xxx: remove unnecessary reads of PCI_CAP_ID_EXP
  [SCSI] qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP
  [SCSI] ufs: fix incorrect return value about SUCCESS and FAILED
  [SCSI] ufs: reverse the ufshcd_is_device_present logic
  [SCSI] ufs: use module_pci_driver
  [SCSI] usb-storage: update usb devices for write cache quirk in quirk list.
  [SCSI] usb-storage: add support for write cache quirk
  [SCSI] set to WCE if usb cache quirk is present.
  [SCSI] virtio-scsi: hotplug support for virtio-scsi
  [SCSI] virtio-scsi: split scatterlist per target
  ...
2012-07-24 18:11:22 -07:00
Mark Brown 15d47763b3 Merge branch 'for-3.5' into for-3.6 2012-07-23 10:45:07 +01:00
Mark Brown 0ff97ebf08 ASoC: dapm: Fix _PRE and _POST events for DAPM performance improvements
Ever since the DAPM performance improvements we've been marking all widgets
as not dirty after each DAPM run. Since _PRE and _POST events aren't part
of the DAPM graph this has rendered them non-functional, they will never be
marked dirty again and thus will never be run again.

Fix this by skipping them when marking widgets as not dirty.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Cc: stable@vger.kernel.org
2012-07-23 10:39:54 +01:00
Dan Williams 2955b47d2c [SCSI] async: introduce 'async_domain' type
This is in preparation for teaching async_synchronize_full() to sync all
pending async work, and not just on the async_running domain.  This
conversion is functionally equivalent, just embedding the existing list
in a new async_domain type.

The .registered attribute is used in a later patch to distinguish
between domains that want to be flushed by async_synchronize_full()
versus those that only expect async_synchronize_{full|cookie}_domain to
be used for flushing.

[jejb: add async.h to scsi_priv.h for struct async_domain]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Tested-by: Eldad Zack <eldad@fogrefinery.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2012-07-20 09:05:54 +01:00
Marek Belisko 98b3cf1290 ASoC: dapm: Fix compilation warning
Fix following:
sound/soc/soc-dapm.c: In function ‘dapm_clock_event’:
sound/soc/soc-dapm.c:1021:1: warning: control reaches end of non-void function [-Wreturn-type]

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-13 15:43:41 +01:00
Mark Brown efcc3c61b9 ASoC: dapm: Allow routes to be deleted at runtime
Since we're now relying on DAPM for things like enabling clocks when we
reparent the clocks for widgets we need to either use conditional routes
(which are expensive) or remove routes at runtime. Add a route removal
API to support this use case.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-07-06 19:06:59 +01:00
Mark Brown fabd03842b ASoC: dapm: Mark widgets as dirty when a route is added
If we add a new route at runtime then we'll need to recheck the connections
to the affected widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-07-06 19:06:59 +01:00
Liam Girdwood 4123128ee4 ASoC: dapm: Make sure all dapm contexts are updated
Make sure we set the bias level for all DAPM contexts when
changing level.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-06 19:05:07 +01:00
Liam Girdwood 01005a729a ASoC: dapm: Fix locking during codec shutdown
Codec shutdown performs a DAPM power sequence that might cause conflicts
and/or race conditions if another stream power event is running simultaneously.
Use card's dapm mutex to protect any potential race condition between them.

Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-07-06 18:58:46 +01:00
Benoît Thébaudeau 32fee7afe7 ASoC: dapm: Fix dapm_set_path_status() connect
dapm_set_path_status() sets connect incorrectly in the case max > 1 with invert.
In that case, the raw disconnect value should be max, which corresponds to the
userspace value 0.

This use case currently does not appear upstream, but it could break
SOC_DAPM_SINGLE() or SOC_DAPM_SINGLE_TLV() elsewhere or in the future.

This patch completes commit 3a9abe8.

Cc: Liam Girdwood <lrg@ti.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: <alsa-devel@alsa-project.org>
Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-03 20:08:29 +01:00
Benoît Thébaudeau da602ab8a1 ASoC: dapm: Remove incomplete stereo code
Stereo is not yet supported by dapm widgets, so remove stereo code from
snd_soc_dapm_get_volsw(), and warn if stereo controls are detected.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-07-03 19:53:54 +01:00
Benoît Thébaudeau 8a720718b3 ASoC: dapm: Fix snd_soc_dapm_put_volsw() connect
snd_soc_dapm_put_volsw() sets connect incorrectly in the case max > 1 with
invert. In that case, the raw disconnect value should be max, which corresponds
to the userspace value 0.

This use case currently does not appear upstream, but it could break
SOC_DAPM_SINGLE() or SOC_DAPM_SINGLE_TLV() elsewhere or in the future.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-29 08:13:32 +01:00
Mark Brown d1e16c1a61 Linux 3.5-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJP53AxAAoJEHm+PkMAQRiGs2QH/RaqkXz96fwjhDcyiKpDqA3c
 kGuS5mz5cOhnqKSmR88HFm6pwuhLux/qSJzeAmoQy1MC8a0ACx7AnANW0lfN3/qe
 /HGYz8h60yCL/fhn8/bUYtdt9xsoDqoDcq/ooFl9mcsJGWbC6WeMSZU5dAUYqviE
 qFrp5zjY07FG53CRGT0hFpezQNwNL+VLH30CF9LD+fJLPVEYum2zBNGXWM42rcw5
 fxzGL/6SO8YqA/Upic1ht6HAd6s5LOrlST7qvnyXUMvRXN5z/Y92ueYJZefkS1Om
 ohuLIKM2bv9/dJS67H8N2baSKGCzBdfSe5/5WaHdLYW9MiVju0wRl6HPJtAMrkk=
 =H8t8
 -----END PGP SIGNATURE-----

Merge tag 'v3.5-rc4' into for-3.6

Linux 3.5-rc4 contains some bug fixes which overlap with new features.
2012-06-25 09:52:59 +01:00
Mark Brown 62d4a4b99d ASoC: dapm: Try to add all routes even if one fails
We may as well print as many errors as we can in one go rather than
requiring developers to iterate through all their typos.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-06-23 12:11:31 +01:00
Liam Girdwood 90c6ce0d54 ASoC: dapm: Fix input list to use source widgets
We should only add source widgets to the input list.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-08 06:56:41 +08:00
Mark Brown 165961efc0 ASoC: dapm: The clock API is even less consistent than thought
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-05 10:44:23 +01:00
Mark Brown ec02995ada ASoC: dapm: Bodge for lack of a widely available clk API
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-06-04 11:23:50 +01:00
Liam Girdwood d298caae9a ASoC: dapm: Fix connected widget capture path query.
Make sure we check the correct path for capture.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-04 10:53:58 +01:00
Mark Brown 695594f1b7 ASoC: dapm: Use devm_clk_get()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-06-04 10:49:11 +01:00
Ola Lilja d7e7eb9155 ASoC: core: Add widget SND_SOC_DAPM_CLOCK_SUPPLY
Adds a supply-widget variant for connection to the clock-framework.
This widget-type corresponds to the variant for regulators.

Signed-off-by: Ola Lilja <ola.o.lilja@stericsson.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-06-03 13:06:38 +01:00
Mark Brown dc2af52c0d Linux 3.4-rc7
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPrxCRAAoJEHm+PkMAQRiGQAgH/icr6rDF/e7Y7LoNErjVag94
 +PUhYx851xH3ApPlB1fBaU1ZTvQS2Pb34B8G8WrqWJ+yTs4XfE9sCPj2yb+7ySA8
 vb0vPsErVvAcRWv8sP22NF2ERKNFj/PtSNAcAUJHb5djrRmJcZJ3aw03cdY/INAS
 2OqJEoMc2IBa5Z+WePQJ8N+J2YgDSDdCnpBKNuSHDGN0rBm4suiWY8PWXgTzMAhG
 TNgNrKIlN8bnaX4hPJr6ooN+sxInkUl8ZglAPxwwjVtmYvGch4FiowpDC7BQbSGB
 WFSVsIuv3jMI6VaYDo/NQOFDQqqoK4h7DmBIqbL5eXBRTJg9xW+1A8zloGd4Rks=
 =IWBQ
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc7' into for-3.5

Linux 3.4-rc7

Conflicts):
	drivers/base/regmap/regmap.c         (overlap with bug fixes)
	sound/soc/blackfin/bf5xx-ssm2602.c   (overlap with bug fixes)
2012-05-13 13:32:54 +01:00
Mark Brown 9747cec21e ASoC: dapm: Move CODEC<->CODEC params off stack
Reduce our stack consumption by moving the params off the stack, they
are reasonably large and might be an issue on platforms with small stacks.

Reported-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ackeded-by: Liam Girdwood <lrg@ti.com>
2012-04-27 18:38:32 +01:00
Linus Torvalds 2390c0fca6 sound fixes for 3.4-rc5
A workaround for an ASUS laptop and a few ASoC changes;
 most of the commits are tagged for stable, too.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQIcBAABAgAGBQJPmUKpAAoJEGwxgFQ9KSmk3eIP/iGu1az70dixqEjfOifTcJcv
 V3VS5HIko0n3+iAkBQr+lo7RLnMQsqy5DQzv6h8FVzuyYgYVvT2eKLPEUh1p+LNw
 tZaosfrrnvGhthF5uDVKUeDe69wujfW68gLJJdp+dnUU28RG/cCuUu4+ae2nCBE+
 Glus4Zn5wC06P2Uuv67AHYiraCahiuwbrrXAYa0X8glEE7Vpg5t09d3l/KHBIbFH
 g46UF5D7LYoMHEThgeyYgq8lEK2THUJlLl887dZTjSqS9ps52cOyRlQmljRvvDXw
 BNdOSSu0YqRBX0ja7kIkadCVfZpQEyqfW6ISETozchPYogO9SHXz0plEB/OXWB+q
 dUwJGRdoWeJtW/jyd4RHIJlxYektY1ygUsrCeKdIM3lO3M8RnwMosUcy0rW9yKsA
 C8BIJz6KdEsiOHpTvvadln5MoarvoPIQXdw8yahJnisd5Kbrx1bQX8PPLhOatRpF
 U125ywvif5miV66+0ocnTB2eNJTy4zyokpR6JAQ1z9I+IZOF4mwH+OgLEGlTm28k
 Dn/UCxYhEGvLH0vrtU/WiPXE42Jw1ZeRRn56ErWPWOpRBzaJjK4hRu9zFK3cL9xh
 bBfP4hsMq2X8lW5nIFz5FLeocnIaMe0CCyNH9X+EoH+BS9HVx274a63t0te8fKtV
 E457r7iBnssONY4WIG2l
 =KjOE
 -----END PGP SIGNATURE-----

Merge tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A workaround for an ASUS laptop and a few ASoC changes; most of the
  commits are tagged for stable, too."

* tag 'sound-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: wm8994: Improve sequencing of AIF channel enables
  ALSA: HDA: Add external mic quirk for Asus Zenbook UX31E
  ASoC: fsi: update for dmaengine prep_slave_sg fallout.
  ASoC: core: Fix card RTD count for deferred probe.
  ASoC: cs42l73: don't use negative array index
  ASoC: dapm: Ensure power gets managed for line widgets
2012-04-26 15:32:39 -07:00
Liam Girdwood 618dae11f8 ASoC: dpcm: Add runtime dynamic route update
This patch allows DPCM to dynamically alter the FE to BE PCM links
at runtime based on mixer setting updates. DAPM is looked up after
every mixer update and we perform a DPCM runtime update if the
mixer has a change of value.

This patchs adds/changes the following :-

 o Adds DPCM runtime update core.
 o Changes soc_dapm_mixer_update_power() and soc_dapm_mux_update_power()
   to return if a change has occured rather than 0. No other users check
   atm.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-26 17:48:19 +01:00
Liam Girdwood ec2e3031b6 ASoC: dapm: Add API call to query valid DAPM paths
In preparation for ASoC DSP support.

Add a DAPM API call to determine whether a DAPM audio path is valid between
source and sink widgets. This also takes into account all kcontrol mux and mixer
settings in between the source and sink widgets to validate the audio path.

This will be used by the DSP core to determine the runtime DAI mappings
between FE and BE DAIs in order to run PCM operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-18 18:23:00 +01:00
Fabio Estevam 516541a00c ASoC: soc-dapm: Use '%llx' with 'u64' type.
Fix the following build warning:

sound/soc/soc-dapm.c: In function 'snd_soc_dai_link_event':
sound/soc/soc-dapm.c:2913: warning: format '%lx' expects type 'long unsigned int', but argument 3 has type 'u64'

'%llx' should be used with 'u64' type.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-16 19:36:46 +01:00
Mark Brown c74184ed30 ASoC: core: Support transparent CODEC<->CODEC DAI links
Rather than having the user half start a stream but avoid any DMA to
trigger data flow on links which don't pass through the CPU create a
DAPM route between the two DAI widgets using a hw_params configuration
provided by the machine driver with the new 'params' member of the
dai_link struct.  If no configuration is provided in the dai_link then
use the old style even for CODEC<->CODEC links to avoid breaking
systems.

This greatly simplifies the userspace usage of such links, making them
as simple as analogue connections with the stream configuration being
completely transparent to them.

This is achieved by defining a new dai_link widget type which is created
when CODECs are linked and triggering the configuration of the link via
the normal PCM operations from there.  It is expected that the bias
level callbacks will be used for clock configuration.

Currently only the DAI format, rate and channel count can be configured
and currently the only DAI operations which can be called are hw_params
and digital_mute().  This corresponds well to the majority of CODEC
drivers which only use other callbacks for constraint setting but there
is obviously much room for extension here.  We can't simply call
hw_params() on startup as things like the system clocking configuration
may change at runtime and in future it will be desirable to offer some
configurability of the link parameters.

At present we are also restricted to a single DAPM link for the entire
DAI.  Once we have better support for channel mapping it would also be
desirable to extend this feature so that we can propagate per-channel
power state over the link.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-04-16 19:36:29 +01:00
Mark Brown 1eee1b3833 ASoC: dapm: Allow DAI widgets to be routed through
In order to allow CODEC<->CODEC links to function we will need to allow
DAPM paths to be created that pass through DAIs rather than only ones
that are source or sunk at the DAI.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-04-16 19:36:29 +01:00
Dan Carpenter 60884c2767 ASoC: dapm: release lock on error paths
We added locking here but there were a couple error paths where we
forgot to drop the lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-15 10:46:17 +01:00
Mark Brown 7e1f7c8a6e ASoC: dapm: Ensure power gets managed for line widgets
Line widgets had not been included in either the power up or power down
sequences so if a widget had an event associated with it that event would
never be run. Fix this minimally by adding them to the sequences, we
should probably be doing away with the specific widget types as they all
have the same priority anyway.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-04-12 19:36:52 +01:00
Mark Brown 1eecb8280b Linux 3.4-rc2
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPgOpXAAoJEHm+PkMAQRiG8eUIAJ3Hjo0o5hqzxol8LWHDGF8s
 3h59qwRtts82u2psStZULPLbBzw6yjn8U5Mcrh7pffwCG2BzBL5rXcmXfvoPaET3
 TjylIj986Jv+jwZyuyZcLzYyoUtgjtq7hnt4tgVVEPlexYs7LxUl8vO8QjxT+bVO
 7eKgzLsXlBC9kw4P5M7kOBQ9NE5vmEcKf+fB3Hu3DqfVJtw9Lb7EeDQj/cbQsGqI
 vavSxe7lMTPsgMP2+hRz4txGTDJNRazkO2BdwfYrcNwTSa8tfBFlamww3y4+eJtq
 MFQfdNxQpumh2++T4IC2i/nLaawH7kWj2EdaRCRLMy9hVlb/v8/wcgd+1nfLkU8=
 =0on9
 -----END PGP SIGNATURE-----

Merge tag 'v3.4-rc2' into for-3.5

Linux 3.4-rc2 contains some bug fixes we need, including the addition of
an export for regcache_sync_region().
2012-04-09 11:53:45 +01:00
Stephen Boyd 234e340582 simple_open: automatically convert to simple_open()
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-05 15:25:50 -07:00
Mark Brown 497098beff ASoC: dapm: Remove bodges for no-widget CODECs
Now that we're creating widgets for all DAIs there should be no more
need for the bodges we've been carrying for non-DAPM CODEC drivers so
remove them.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Timur Tabi <timur@freescale.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-04-01 11:28:28 +01:00
Mark Brown e06ab3b8e8 ASoC: dapm: Only lock CODEC for I/O if not using regmap
If we do use regmap then regmap will take care of things for us. We
actually already have this check at a higher level for the current
users but this makes sure we do the right thing in the future too if
we need to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-04-01 11:28:23 +01:00
Liam Girdwood 49575fb52b ASoC: DAPM: Make sure DAPM widget IO ops hold the component mutex
Currently not all DAPM widget IO ops are holding their component mutex
(codec or platform). Make sure this is now held for DAPM widget IO operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:22 +01:00
Liam Girdwood a3cc056b64 ASoC: dapm: Add regulator member to struct dapm_widget
Currently DAPM widgets use the private data for their regulator.
Add a regulator * for widgets to use instead of private data.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:22 +01:00
Liam Girdwood 3cd043436c ASoC: dapm: Rename dapm mutex subclass to better match usage
Rename SND_SOC_DAPM_CLASS_PCM to SND_SOC_DAPM_CLASS_RUNTIME to
better match the usage and align with card mutex too.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:22 +01:00
Liam Girdwood d9b0951b96 ASoC: dapm: Add platform stream event support
Currently stream events are only perfomed on codec stream widgets only.
There is now a need to be able to perform stream events on platform
widgets too.

e.g. we have the ABE platform driver with several DAI links
to dummy codecs. We need to be able to perform stream events on any
of the dummy codec DAI links.

This patch also removes the snd_soc_dai * parameter since it's already
contained within the rtd * parameter.

Finally makle stream event return void since no one checks it anyway.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:22 +01:00
Liam Girdwood 4edbb34577 ASoC: dapm: lock mixer & mux update power with DAPM mutex
Both snd_soc_dapm_mux_update_power() and snd_soc_dapm_mixer_update_power() can
be called internally within DAPM core (with DAPM mutex held) and externally.

Provide some wrappers so that external users of both functions do not have to
remember to hold the DAPM mutex.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:21 +01:00
Liam Girdwood a73fb2df01 ASoC: dapm: Use DAPM mutex for DAPM ops instead of codec mutex
It has now become necessary to use a DAPM mutex instead of the codec
mutex to lock the DAPM operations. This is due to the recent multi
component support and forth coming Dynamic PCM updates.

Currently we lock DAPM operations with the codec mutex of the calling
RTD context. However, DAPM operations can span the whole card context
and all components.

This patch updates the DAPM operations that use the codec mutex to
now use the DAPM mutex PCM subclass for all DAPM ops.

We also add a mutex subclass for DAPM init and PCM operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-04-01 11:28:21 +01:00
Takashi Iwai cb3f2adc03 Merge branch 'topic/asoc' into for-linus 2012-03-18 18:22:37 +01:00
Mark Brown 80f48143ff ASoC: Revert widget I/O locking for 3.4
The widget locking depends on some of the other locking changes which
are queued up for 3.5 not 3.4 so revert the locking changes and reapply
them in 3.5.

This reverts commit 66bf93212f and
96acc357be.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-03-12 10:37:23 +00:00
Mark Brown 66bf93212f ASoC: dapm: Only lock CODEC for I/O if not using regmap
If we do use regmap then regmap will take care of things for us. We
actually already have this check at a higher level for the current
users but this makes sure we do the right thing in the future too if
we need to.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-03-07 11:53:00 +00:00
Liam Girdwood 96acc357be ASoC: DAPM: Make sure DAPM widget IO ops hold the component mutex
Currently not all DAPM widget IO ops are holding their component mutex
(codec or platform). Make sure this is now held for DAPM widget IO operations.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-06 20:07:03 +00:00
Liam Girdwood f1e90af2b5 ASoC: dapm: Use dev_warn for debugfs warning message
Remove printk(KERN_WARNING) and use dev_warn() instead.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-06 20:06:53 +00:00
Mark Brown f13ebada17 ASoC: dapm: Show if widgets are forced in debugfs
The information was not otherwise visible.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-03-05 14:50:18 +00:00
Mark Brown 7679e42ec8 ASoC: dapm: Check for bias level when powering down
Recent enhancements in the bias management means that we might not be
in standby when the CODEC is idle and can have active widgets without
being in full power mode but the shutdown functionality assumes these
things. Add checks for the bias level at each stage so that we don't
do transitions other than the ON->PREPARE->STANDBY->OFF ones that the
drivers are expecting.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
2012-02-23 15:13:02 +00:00
Mark Brown 1a8b2d9d5b ASoC: dapm: Only mark pin widgets as dirty if we actually change state
Small optimisation for noop state updates.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:33 -08:00