Commit Graph

288033 Commits

Author SHA1 Message Date
Shawn Guo
15ca1b19c6 ASoC: imx: move SND_SOC_AC97_BUS selection down to machine driver
SND_SOC_AC97_BUS is selected to enable the AC97 support in soc-core.
Rather than selecting the option under SND_IMX_SOC, it's better to
leave the selection to individual machine driver which knows if AC97
support is needed or not.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 13:32:27 +00:00
Shawn Guo
9a3a101c1a ASoC: imx: initialize dma_params burstsize just in imx-ssi
It's not necessary for imx-pcm-dma-mx2 to access imx_ssi.dma_params
for burstsize initialization.  Instead, it can just be done in imx-ssi
probe function once.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 13:26:02 +00:00
Mark Brown
1defde2a50 ASoC: wm8994: Factor out WM1811A detection mode setting
Push everything through one function for active use cases, should be
no practical effect.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:59:01 +00:00
Mark Brown
28e33269a7 ASoC: wm8994: Don't bother updating the jackdet mode needlessly
If we're not doing jackdet it's not needed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:58:36 +00:00
Mark Brown
afaf159120 ASoC: wm8994: Disable JACKDET when disabling detecton
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:57:48 +00:00
Mark Brown
7d464b201f ASoC: wm8994: Make sure we sync DAPM on WM8958 detection mode changes
Normally this will have no effect as we set detection up at system startup
before DAPM syncs take effect, this will only be useful if the system
enables and disables detection at runtime.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:57:37 +00:00
Mark Brown
67109cbea1 ASoC: wm_hubs: Disable cache of the DC servo calibration for WM1811
The WM1811 DC servo is able to run much faster than previous devices so
the benefit of skipping calibration is not useful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-03-04 01:56:47 +00:00
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
Leon Romanovsky
6334018f70 ASoC: DT: Update digital microphone binding documentation to PAZ00 board.
This patch updates device tree binding documentation to add digital
microphone to PAZ00 board.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-02-28 12:37:21 +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
Mark Brown
8215045181 New interfaces to allow other subsystems to gather information about the
regmap, allowing them to build further subsystem specific generic
 features on top of the regmap.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJPQriPAAoJEBus8iNuMP3d7H8P/0i0E0oGphczp6PiyNludQts
 8xLeSSeNIM2tD78+jg16nBswNxp31mF0n1ueLEK3vblxAJaSm4x3FwD7+ssYcQnn
 ItFeFhumBP2qISlSLjMLK+D7g7cxJQRoTuq6fjRxwjLQGhC3eHXz+aeNz+U92gLD
 QM3hPKckGHkAJAg7jZmRk0BkH9TODoX+6QCXUxY+bEgxWSTC2nrEoFjoVv1dqGgj
 1xPBVTEq3w1QLDy+JUuLVXCvv8ieoQ37j+9Qyciln+ive8oC1rm14wl7pSB/qIV+
 MeBSjxc/Hv6l+jCEWa5fxf1RqRh3P5utcPQmuMWXHJhJ3HFheCv2d4/ZL3NiVi0I
 NNGUATgfIxnSYfeN8ft9v2v7p7tWTQI+UFTfeQal1LhFY74p6JGuGcGtM536pRjG
 qyhc2hDKc95TYCOTnaPGqWsczxZ1Lt4XkSAUuW7Nop43qynrlngSfHw8qn/QbyUW
 S6xrzk72WQD3i0HwhWgaP0PsH4GGlEgbOqMUhppHbbvSC2VZ3K9HsHLJZLKjX3qC
 8YP34oOohwDK3EOCGfdV1w7SPn3NU0DglTPi5Og+h39cN4xh+vAHAZkUKdA35IEM
 9EANjeIWmGyZoFVgrj+NWtuz2wvboZrOEhuRSJBcbQF8LUpWYkEkGuhHM6lRSH66
 7K37XUEQwjbXTR/rcpaI
 =KhUJ
 -----END PGP SIGNATURE-----

Merge tag 'topic/introspection' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into HEAD

New interfaces to allow other subsystems to gather information about the
regmap, allowing them to build further subsystem specific generic
features on top of the regmap.

Merged into ASoC in order to allow us to implement SND_SOC_BYTES_MASK()
controls which need to know the word size of the underlying registers.
2012-02-21 19:34:01 +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