Commit Graph

12237 Commits (4a163c82d600e554ef79e931db6315026e1fc819)

Author SHA1 Message Date
Mark Brown b16db745b5 ASoC: wm8994: Suppress noop updates of FLL K
Using snd_soc_write() means we always write to the register even if it
already contains the newly calculated value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:56:18 +00:00
Mark Brown 2bc16ed8e0 ASoC: wm8994: Push wm8994 private data allocation out into device probe
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:56:06 +00:00
Mark Brown fe4085e84f ASoC: core: Log a warning when machines use soc-audio
snd_soc_register_card() has been available and strongly preferred since
2.6.38 but we're still seeing new drivers using it and the conversion rate
for older machines has been low. Help address both issues by logging a
warning when the soc-audio device probes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-03-02 16:21:25 +00:00
Liam Girdwood 02db110351 ASoC: core: cleanup platform debugfs on probe failure.
Make sure we cleanup the platform debugfs when probe fails.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02 16:20:44 +00:00
Lars-Peter Clausen 016ab467aa ASoC: mxs-pcm: Use dmaengine PCM helper functions
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02 13:47:36 +00:00
Lars-Peter Clausen c307e8e32e ASoC: imx-pcm-dma: Use dmaengine PCM helper functions
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02 13:47:30 +00:00
Lars-Peter Clausen e7f73a1613 ASoC: Add dmaengine PCM helper functions
This patch adds a set of functions which are intended to be used when
implementing a dmaengine based sound PCM driver.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02 13:47:25 +00:00
Mark Brown 1355ab147f ASoC: wm8962: Run the headphone in class G mode when sidetone is enabled
Class W mode with sidetone is not fully supported.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-02 12:01:40 +00:00
Mark Brown 378ec0ca38 ASoC: wm8994: Disable debounce of jack detection on inserted jack
Don't debounce jack detection for inserted jacks, giving improved
responsiveness.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-01 19:06:37 +00:00
Mark Brown df0c016d0b ASoC: wm8962: Remove register default for PLL2
The initial value can be changed depending on system configuration.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-01 12:41:55 +00:00
Jaswinder Singh df8ad33558 ASoC: Samsung: Update email id of the author
I moved on from a great employer and the email-id no longer exists.
Update email-id to a personal one, assuming I don't move on from
myself anytime soon. And when I do, people don't get the eulogies
bounced.

Signed-off-by: Jaswinder Singh <jassisinghbrar@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:37:57 +00:00
Jassi Brar c90887fe98 ASoC: Samsung: Merge two identical if-else clauses
Saves two lines and a hell of a lot of embarrassment looking at the code.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:37:28 +00:00
Mark Brown 62172f4a75 ASoC: wm8994: Remove stub of register access code
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:49 +00:00
Mark Brown e778ba07ed ASoC: wm_hubs: Bomb out if we can't read back the DC servo result
Should have no practical impact but it's safer than trying to soldier on.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:30 +00:00
Mark Brown 6449c9f858 ASoC: wm8996: Remove stub register cache
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:21 +00:00
Mark Brown 1dd4c8e42a ASoC: wm8996: Fix /RESET bounce ordering
We want to leave the device out of rather than in reset.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 23:35:17 +00:00
Mark Brown b9e67e5ef3 ASoC: wm8994: Make sure we don't have MICBIAS on during jackdet mode
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-29 10:28:59 +00:00
Shawn Guo 64902b29cb ASoC: Remove unnecessary -codec from cs4270 driver name
Similar to what commit 1e3ad57 (ASoC: Remove redundant -codec from
WM8776 driver name) does for wm8776 driver, this patch does the same
thing for cs4270 driver.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:20 +00:00
Shawn Guo 7c59bc55e4 ASoC: fsl: align mpc8610_hpcd with p1022_ds on getting codec node
Align mpc8610_hpcd with p1022_ds on getting codec node by just calling
of_parse_phandle.  The bonus point of doing that is we can save
exporting get_node_by_phandle_name() when we consolidate the common
bits between mpc8610_hpcd and p1022_ds into a module, which can be
shared by more machine drivers added later.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:08 +00:00
Shawn Guo fb1a6453bc ASoC: fsl: correct get_dma_channel parameter name
The second parameter of function get_dma_channel is actually a property
name rather than a compatible string, so rename it for less confusing.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:35:04 +00:00
Mark Brown 2c823d14bf ASoC: wm8753: Convert to devm_kzalloc()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 15:25:27 +00:00
Paul Gortmaker 07a38b1b4e ASoC: fix trivial build error in mpc5200_dma.c
Add the obvious header to fix this:

sound/soc/fsl/mpc5200_dma.c:301: error: implicit declaration of function 'DMA_BIT_MASK'
sound/soc/fsl/mpc5200_dma.c:301: error: initializer element is not constant

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 14:56:30 +00:00
Shawn Guo 1e1d7e593e ASoC: imx: let SND_MXC_SOC_FIQ select FIQ
CONFIG_FIQ is only needed when CONFIG_SND_MXC_SOC_FIQ is selected to
build imx-pcm-fiq.c, so let SND_MXC_SOC_FIQ select FIQ.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-27 14:36:10 +00:00
Viresh Kumar b1dd5897f5 ASoC: core: Don't overwrite .poweroff in snd_soc_pm_ops
SET_SYSTEM_SLEEP_PM_OPS writes .poweroff = *_resume once. Then we overwrite it
again explicitly as .poweroff = snd_soc_poweroff. Even though it works, as the
second one overwrites the first one, this is not the correct way. Fix this by
expanding SET_SYSTEM_SLEEP_PM_OPS in our structure.

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-24 14:46:26 +00:00
Mark Brown 0512615db6 ASoC: wm8962: Convert interrupt handler to direct regmap usage
Avoids potential locking issues with anything that needs the CODEC lock.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23 22:06:58 +00:00
Mark Brown d690516c6d ASoC: wm8962: Remove mistakenly committed debug logging
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-23 15:46:25 +00:00
Mark Brown 2901d6ebe1 ASoC: ak4104: Convert to direct regmap API usage
Since the cache is currently open coded this is more of a win than for
most devices.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:14:18 +00:00
Mark Brown 34baf22020 ASoC: ak4104: Use snd_soc_write() rather than internal write function
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:14:14 +00:00
Mark Brown afad95f825 ASoC: ak4104: Use snd_soc_update_bits() for read/modify/write
Don't use the internal I/O functions directly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Daniel Mack <zonque@gmail.com>
2012-02-23 15:13:54 +00:00
Lars-Peter Clausen 95a771ca16 ASoC: mxs-pcm: Request DMA channel early
Request the DMA channel in the PCM open callback instead of the hwparams
callback, this allows us to let open fail if no dma channel is available. This
also fixes a bug where the channel will be requested multiple times if hwparams
is called multiple times.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Lars-Peter Clausen 4564d10f30 ASoC: imx-pcm: Request DMA channel early
Request the DMA channel in the pcm open callback. This allows us to let open
fail if there is no dma channel available.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Lars-Peter Clausen 91a38540f5 ASoC: imx-ssi: Set dma data early
Move the call to snd_soc_dai_set_dma_data from the hw_params callback to the
startup callback. This allows us to use the dma data in the pcm driver's open
callback.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-22 13:21:49 +00:00
Mark Brown f7085641ee ASoC: wm8994: Move wm_hubs callback before we start ramping VMID
Allows the generic code to set up for that.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 23:10:41 +00:00
Mark Brown 1ec1cdfbb3 ASoC: wm8996: Convert to use DAPM routes for stream connections
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:37:46 +00:00
Mark Brown cdaaf301da ASoC: wm5100: Implement DRC coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:34:50 +00:00
Mark Brown 29e3cc1597 ASoC: wm8996: Implement DRC coefficient configuration
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:34:49 +00:00
Mark Brown f831b055ec ASoC: core: Add support for masking out parts of coefficient blocks
Chip designers frequently include things like the enable and disable
controls for algorithms in the register blocks which also hold the
coefficients. Since it's desirable to split out the enable/disable
control from userspace the plain SND_SOC_BYTES() isn't optimal for
these devices.

Add a SND_SOC_BYTES_MASK() which allows a bitmask from the first word
of the block to be excluded from the control. This supports the needs
of devices I've looked at and lets us have a reasonably simple API.
Further controls can be added in future if that's needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:48 +00:00
Mark Brown 71d08516b8 ASoC: core: Add SND_SOC_BYTES control for coefficient blocks
Allow devices to export blocks of registers to the application layer,
intended for use for reading and writing coefficient data which can't
usefully be worked with by the kernel at runtime (for example, due to
requiring complex and expensive calculations or being the results of
callibration procedures). Currently drivers are using platform data to
provide configurations for coefficient blocks which isn't at all
convenient for runtime management or configuration development.

Currently only devices using regmap are supported, an error will be
generated for any attempt to work with a byte control on a non-regmap
device. There's no fundamental block to other devices so support could
be added if required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:48 +00:00
Mark Brown 2b4bdee292 ASoC: io: Retrieve val_bytes from the regmap API
Allow us to build infrastructure which needs to know the size of a value
without requiring regmap based drivers to supply this information to both
ASoC and regmap by asking regmap for the value.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-21 19:34:47 +00:00
Lars-Peter Clausen 8949490f70 ASoC: mxs-pcm: Remove unused fields from struct mxs_pcm_runtime_data
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Lars-Peter Clausen f691402457 ASoC: imx-pcm: Remove unused fields from imx_pcm_runtime_data struct
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Lars-Peter Clausen e54e2f81da ASoC: imx-pcm: Remove empty prepare callback
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 19:29:59 +00:00
Mark Brown 07fb9d9e93 ASoC: wm8994: Support external capacitors on MICBIAS2 with jack detection
When an external capacitor is connected to MICBIAS2 on devices with
jack detection (which is not required but may be done in some systems)
then the loading may mean that better performance is obtained when
the microphone bias is enabled normally rather than using the low power
mode. Provide platform data allowing systems to indicate if they require
this.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 16:49:53 +00:00
Mark Brown 55a2778685 ASoC: wm8994: Actively discharge idle MICBIAS with jack detect
This minimises the chance of any external capacitors that are fitted
being discharged into headphones as they insert.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 16:49:49 +00:00
Mark Brown 29fdc3605c ASoC: wm8994: Enable headphone startup mode 1 for WM1811 and WM8958
The latest recommendation for optimal performance.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 10:57:47 +00:00
Peter Ujfalusi 3b8a079516 ASoC: twl4030: Debug code cleanup
Replace the printk(KERN_ERR* instances with dev_err in the driver.
While we are here clean up some of the debug messages as well.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:58:47 +00:00
Mark Brown 26422625d5 ASoC: wm_hubs: Convert headphone driver to output driver widget
Mostly for neatness, though it may help with sequencing in some
situations.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:52:09 +00:00
Mark Brown fdd48f9d19 ASoC: wm8776: Add WM8775 device ID to the WM8776
The WM8775 is register compatible with the WM8776 so can be supported with
the same driver though it is an ADC only part. Add the device ID to the
WM8776 driver, further updates will be added in the future.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-21 09:13:59 +00:00
Mark Brown 38d78bafb9 ASoC: ak4104: Convert to module_spi_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:01:01 +00:00
Mark Brown 65b30bee58 ASoC: ak4104: Remove uninformative print on probe()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 22:00:54 +00:00
Shawn Guo cbdfb661ff ASoC: imx/mxs: remove redundant SND_PCM selection
SND_PCM is already selected by SND_SOC, there is no need for
SND_IMX_SOC and SND_MXS_SOC to select it again.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-20 07:45:43 -08:00
Kuninori Morimoto 7da9ced606 ASoC: fsi: Add DMAEngine support
This patch supports DMAEngine to FSI driver.
It supports only Tx case at this point.
If platform/cpu doesn't support DMAEngine, FSI driver will
use PIO transfer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-19 18:36:16 -08:00
Mark Brown fa2c8f4017 Linux 3.3-rc4
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iQEcBAABAgAGBQJPQDoTAAoJEHm+PkMAQRiGMpYH/ibfyIFBrKMD1v/s9oNvp8rS
 c7J7E7mHZOylCHrpIS3lX3ZbOfOe33Ln0Z59f1/TcV4CMMz0NrKYcTC8erj/H/DA
 8DRYegiczWKqiXRgktwaZXkJcwXYdOOL1WQYxuzzbZcwRrNBY2QpH7Zu8Bj+TPAy
 d4fvJHWdlh4sbWVdQmLRbp04UB9J/Z5/uWmSNvVQjLLdRlD+mEBbt7JjiNY6sUVC
 2sJoAs9F3UlHu7VaN+JIhMOGZ3GqOpHGBxN/aWxJ/7GsXdXuAfCrxoPxaAe4xzOa
 HndN5ZDyg02Vy5uDeUzj+HJPW3M8L4Q0nwxAYb3ZnQ5tbpu1Q2cHfIBealomWCQ=
 =R91X
 -----END PGP SIGNATURE-----

Merge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
resolved below within the FSI driver and allow the application of the
dmaeengine conversion that depends on this resolution.

Linux 3.3-rc4

Conflicts:
	sound/soc/sh/fsi.c
2012-02-19 18:35:12 -08:00
Axel Lin a387419612 ASoC: Add __devinit annotation for pxa2xx_ac97_probe
This fixes below build warning:
WARNING: vmlinux.o(.text+0x1e632c): Section mismatch in reference from the function pxa2xx_ac97_probe() to the function .devinit.text:pxa2xx_ac97_hw_probe()
The function pxa2xx_ac97_probe() references
the function __devinit pxa2xx_ac97_hw_probe().
This is often because pxa2xx_ac97_probe lacks a __devinit
annotation or the annotation of pxa2xx_ac97_hw_probe is wrong.

Also rename pxa_ac97_dai to pxa_ac97_dai_driver to fix below build warning:

  LD      sound/soc/pxa/built-in.o
WARNING: sound/soc/pxa/built-in.o(.data+0x18c): Section mismatch in reference from the variable pxa_ac97_dai to the function .devinit.text:pxa2xx_ac97_probe()
The variable pxa_ac97_dai references
the function __devinit pxa2xx_ac97_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-19 18:13:02 -08:00
Fabio Estevam 0837fc6243 ASoC: soc-core: Show the returned values on error messages
Showing the returned values on error messages is useful information.

While at it, use pr_err/pr_warn whenever possible.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 13:51:01 -08:00
Mark Brown d5a7f23f9c ASoC: wm8996: Make sure we bounce /RESET to reset
While it matches the current code only bringing the device out of reset
isn't actually doing what the function says so make sure we set the GPIO
high before we pull it low.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 13:50:51 -08:00
Mark Brown 8005f394ab ASoC: wm8996: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:40 -08:00
Mark Brown 7813561a39 ASoC: wm8993: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:39 -08:00
Mark Brown 9d50a764b5 ASoC: wm8962: Convert to module_i2c_driver()
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:15:36 -08: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
Mark Brown 5567d8c621 ASoC: wm8994: Convert to use DAI widget routing rather than streams
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:28 -08:00
Mark Brown fe360685f9 ASoC: dapm: Convert stream events to use DAI widgets
This means we don't need to walk through every single widget in the system
for each stream event which is a bit less silly.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:21 -08:00
Mark Brown 888df395eb ASoC: dapm: Implement and instantiate DAI widgets
In order to allow us to do smarter things with DAI links create DAPM
widgets which directly represent the DAIs in the DAPM graph. These are
automatically created from the DAIs as we probe the card with references
held in both directions between the widget and the DAI.

The widgets are not made available for direct instantiation by drivers,
they are created automatically from the DAIs.  Drivers should be updated
to create stream routes using DAPM maps rather than by annotating AIF
and DAC widgets with streams.

In order to ease transition to this model from existing drivers we
automatically create DAPM routes between the DAI widgets and the existing
stream widgets which are started and stopped by the DAI widgets, though
the old stream handling mechanism is still in place.  This also has the
nice effect of removing non-DAPM devices as any device with a DAI
acquires a widget automatically which will allow future simplifications
to the core DAPM logic.

The intention is that in future the AIF and DAI widgets will gain the
ability to interact such that we are able to manage activity on
individual channels independantly rather than powering up and down the
entire AIF as we do currently.

Currently we only generate these for CODECs, mostly as I have no systems
with non-CODEC DAPM to integrate with. It should be a simple matter of
programming to add the additional hookup for these.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:10 -08:00
Mark Brown 3056557f3b ASoC: dapm: Constify lots of names that are never modified
Neater and avoids warnings when used in other places where const strings
are desired.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:06 -08:00
Mark Brown 7bd3a6f34c ASoC: dapm: Supply the DAI and substream when calling stream events
In order to allow us to do something smarter than iterate through widgets
doing strcmp() to work out what to power up for stream events change the
interface used to generate them to be based on the combination of a DAI
and a stream direction rather than just a simple string identifying the
stream.

At some point we'll probably want a set of channels too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:10:01 -08:00
Mark Brown 5ba06fc969 ASoC: dapm: Refactor snd_soc_dapm_new_widget() to return the widget
Let the caller fiddle with the widget after we're done in order to
facilitate further refactoring.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:09:56 -08:00
Mark Brown ce0e9f0ede ASoC: dapm: Unexport snd_soc_dapm_new_control()
Everything now uses snd_soc_dapm_new_controls() instead so we don't need
to make it part of the external API.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-17 08:09:52 -08:00
Axel Lin 059ad76028 ASoC: Change spitz_ext_control to take dapm as argument.
This fixes below build warning:
  CC      sound/soc/pxa/spitz.o
sound/soc/pxa/spitz.c: In function 'spitz_startup':
sound/soc/pxa/spitz.c:116: warning: passing argument 1 of 'spitz_ext_control' from incompatible pointer type
sound/soc/pxa/spitz.c:47: note: expected 'struct snd_soc_card *' but argument is of type 'struct snd_soc_codec *'

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-17 08:09:33 -08:00
Mark Brown a1fa92130c ASoC: ak4535: Convert to direct regmap API usage
I suspect the timer register may also be volatile.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown 7e11a53516 ASoC: ak4535: Remove bitrotted driver version
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:45 -08:00
Mark Brown b08c576434 ASoC: ak4535: Make I2C usage unconditional
Convert to module_i2c_driver() too.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown d69280be41 ASoC: ak4535: Remove -codec from driver name
Redundant, the device is only a CODEC.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 23:04:43 -08:00
Mark Brown d23031a4d3 ASoC: wm8962: Convert to runtime PM for bias off management
This allows userspace control of final power off, allowing policy decisions
for register configuration retention.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:04 -08:00
Mark Brown a968d9db3b ASoC: wm8962: Don't automatically enable and disable FLL
Only enable and disable the FLL when explicitly told to, supporting some
additional use cases and making the driver behaviour more standard.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:03 -08:00
Mark Brown 5aa9b858ef ASoC: wm8962: Clean up register dump cruft
No longer needed with regmap.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown 07fabd1bfb ASoC: wm8962: Add new SYSCLK ratios for new device revisions
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:02 -08:00
Mark Brown eeba1f8b6a ASoC: wm8962: Log the selected SYSCLK ratio
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:01 -08:00
Mark Brown 1993502d24 ASoC: wm8962: Only configure BCLK in hw_params when audio is active
Otherwise we might not have a sensible clocking setup ready.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:32:00 -08:00
Mark Brown 71de4d27c8 ASoC: wm8962: Update the clocking when setting system clock
Make sure we update for any changes in cases where we reconfigure while
live (eg, for analogue bypass).

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 22:31:59 -08:00
Liam Girdwood 0e66821f63 ASoC: spitz: Fix kcontrols to use card instead of codec
Machine kcontrols now use card instead of codec for thier "chip".

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-16 08:24:40 -08:00
Axel Lin 905b41956c ASoC: Show device id in the debug message
Show the id we read when the id mismatch is detected.
This is useful for debugging.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 22:19:55 -08:00
Axel Lin 916be22c15 ASoC: Get correct revision id for wm2200
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 18:18:56 -08:00
Sebastien Guiriec 731f1ab290 ASoC: core: add platform DAPM debugfs support
Allow platform widgets to be visible in debugfs like codec widgets.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 08:05:18 -08:00
Mark Brown 48a8c3943d ASoC: dapm: Convert pin switches to use snd_soc_card
Since the addition of the non-CODEC control adds card controls like the
DAPM pin switch have been broken as they are expecting the private data
for the control to be the CODEC but it's now the card. Fix that for the
pin switches, an audit of other drivers is required.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
2012-02-15 08:01:31 -08:00
Liam Girdwood 64e60f9f9e ASoC: core: Convert CODEC debugfs init to use dev_warn()
Update the codec debugfs initialisation to use dev_warn() instead of
printk(KERN_WARNING).

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:59:04 -08:00
Liam Girdwood 8078d87f9d ASoC: dapm: Notify stream event to all card components.
Currently when DAPM widgets are power sequenced the stream_event()
completion callback is only called for the stream_event originator
DAPM context. Other components in the card may also be interested so
make sure they are also notified of any widget power events.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Liam Girdwood 6c120e19fa ASoC: dapm - Make DAPM reset code a separate function.
It's useful to export the DAPM reset as a static function for future use
by other DAPM functions. e.g. The dynamic PCM query widgets resets the DAPM
graph before working out active paths.

Signed-off-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-15 07:56:49 -08:00
Mark Brown 65f01ef09e ASoC: wm8994: Use slow start for VMID
Improves performance on power up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:17 -08:00
Mark Brown da157875cd ASoC: wm9081: Use idle_bias_off
The main role of the WM9081 is as a class D speaker amplifier so there
is no concern about pops. There are also very few registers and a fast
power up time so we can happily mark the driver as idle_bias_off.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:06 -08:00
Mark Brown 68fcde97e4 ASoC: wm9081: Move WM9081 IRQ platform data handling into I2C probe
Better style and better supports idle_bias_off which we're going to
implement.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-14 18:13:05 -08:00
Daniel T Chen 27c3afe6e1 ALSA: intel8x0: Fix default inaudible sound on Gateway M520
BugLink: https://bugs.launchpad.net/bugs/930842

The reporter states that audio is inaudible by default without muting
'External Amplifier'. Add a quirk to handle his SSID so that changing
the control is not necessary.

Reported-and-tested-by: Benjamin Carlson <elderbubba0810@gmail.com>
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-14 09:33:47 +01:00
Takashi Iwai 675c67afb6 A simple fix from Morimoto-san for the pointer() operation in the FSI
driver.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPOZeyAAoJEBus8iNuMP3duOcP/AjGPC2hX+TH0SXYvZnTMUud
 gWM8qBKE3DS887G3eX4zqt/1Kkhw8AA47H+28NaqEATVHBmaPXxRw+phnEFcU3ZC
 h0LzO5gMtx3RcfwisHtRNTMf4Ps74/vjaYMqViknWMRxU7gtSvtCvmoOJqSvBBAy
 J2a3//jWPCGyKQ1lc4diT/vr5f+YNi9VHlMDeauYS86wCslvi+cPgBsrVMz9rYsF
 hXKnbMowNr5G50Gnh20tMwkYFmXgbGFkQIoZzWpik5O4fr1lk36ftCOjdLSVSNqb
 CY470PUjEEy75wZigQ9gO+Dxc4/iUgMyC5R0qKEYI60cEOrXqurt3i+DqRvJwS9+
 nqyJnoX46kzUbYj9+PAdtYudZc4mO0MMqSiF5iTB6uAQna3Cw6pCHjEY0Aw6VhdM
 1KrkF0GhPjKl0uDM2ScYlW7965aNpjwlSVEwn7VPmowfMCCRv7tFR1n6dMhgtkhB
 TrZBs4IRHeONa/pLmf1GGeOGb8Ij7Iz5b4ggulqmHJrcLpt7WfWvWfT7bhR59yMx
 QEjCT1GPu8WUY8BgF37JwhVmI96+3NH5GPJmrA/DPIftmXd+e9iQS3DhdunGpCfu
 E0pCs/xKtQZ96CYAtPeb7J2QlzDeS+e/8NcazQeqgyg3KT6NA4wN+k5zSreekzyS
 bTuf9uJ6HWy7CURbP58c
 =xHrB
 -----END PGP SIGNATURE-----

Merge tag 'asoc-3.3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

A simple fix from Morimoto-san for the pointer() operation in the FSI
driver.
2012-02-14 09:24:58 +01:00
Mark Brown 1f5cafb2c8 ASoC: wm8988: Remove unneded -codec from driver name
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:22 -08:00
Mark Brown d2dc0a7782 ASoC: wm8988: Convert to direct regmap API usage
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:21 -08:00
Mark Brown 2dbc34d827 ASoC: wm9081: Use module_i2c_driver
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:38:01 -08:00
Leon Romanovsky dd7d3a2417 ASoC: tegra+alc5632: Added digital microphone DAPM widget.
ALC5632 codec supports digital microphone. This patch adds DAPM widget.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-13 11:37:35 -08:00
Takashi Iwai a68f20ef80 Merge branch 'fix/acer-alc889-fix' into fix/hda
Conflicts:
	sound/pci/hda/patch_realtek.c

Merged back the fix for Acer Aspire 6935 with ALC889 codec.
The fix commit was based on 3.2 kernel so that it can be applied to
stable kernel cleanly.
2012-02-13 15:34:31 +01:00
Takashi Iwai 02a237b24d ALSA: hda - Fix silent speaker output on Acer Aspire 6935
Since 3.2 kernel, the driver starts trying to assign the multi-io DACs
before the speaker, thus it assigns DAC2/3 for multi-io and DAC4 for
the speaker for a standard laptop setup like a HP, a speaker, a mic-in
and a line-in.  However, on Acer Aspire 6935, it seems that the
speaker pin 0x14 must be connected with either DAC1 or 2; otherwise it
results in silence by some reason, although the codec itself allows
the routing to DAC3/4.

As a workaround, the connection list of each pin is reduced to be
mapped to either only DAC1/2 or DAC3/4, so that the compatible
assignment as in kernel 3.1 is achieved.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=42740

Cc: <stable@kernel.org> [v3.2+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 15:26:41 +01:00
Takashi Iwai fc1156c0b0 ALSA: hda - Fix initialization of secondary capture source on VT1705
VT1705 codec has two ADCs where the secondary ADC has no MUX but only
a fixed connection to the mic pin.  This confused the driver and it
tries always overriding the input-source selection by assumption of
the existing MUX for the secondary ADC, resulted in resetting the
input-source at each time PM (including power-saving) occurs.

The fix is simply to check the existence of MUX for secondary ADCs in
the initialization code.

Tested-by: Anisse Astier <anisse@astier.eu>
Cc: <stable@kernel.org> [v3.1+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-02-13 15:04:06 +01:00
Mark Brown e85b26ce3a ASoC: wm8994: Actively discharge VMID when not in use
Ensure we're in a known state when we restart.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-11 23:11:22 +00:00