Axel Lin [Fri, 23 Sep 2011 05:10:57 +0000 (13:10 +0800)]
ASoC: Remove unneeded mutex_init in wl1273_probe()
Since f0fba2ad "ASoC: multi-component - ASoC Multi-Component Support",
snd_soc_register_codec() now does all the codec list and mutex init.
Thus don't need to call mutex_init(&codec->mutex) in wl1273_probe() any more.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Fri, 23 Sep 2011 06:52:02 +0000 (09:52 +0300)]
ASoC: twl6040: No need to read the INTID register
Since our irq handler has been called, it is granted, that
the reason was either PLUGINT, or UNPLUGINT.
The INTID register has been checked in the MFD part of
twl6040 driver (twl6040-irq.c).
We have no reason to read from chip again here.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Jarkko Nikula [Fri, 23 Sep 2011 08:19:13 +0000 (11:19 +0300)]
ASoC: omap-mcbsp: Do not attempt to change DAI sysclk if stream is active
Attempt to change McBSP CLKS source while another stream is active is not
safe after commit d135865 ("OMAP: McBSP: implement functional clock
switching via clock framework") in 2.6.37.
CLKS parent clock switching using clock framework have to idle the McBSP
before switching and then activate it again. This short break can cause a
DMA transaction error to already running stream which halts and recovers
only by closing and restarting the stream.
This goes more fatal after commit e2fa61d ("OMAP3: l3: Introduce
l3-interconnect error handling driver") in 2.6.39 where l3 driver detects a
severe timeout error and does BUG_ON().
Fix this by not changing any configuration in omap_mcbsp_dai_set_dai_sysclk
if the McBSP is already active. This test should have been here just from
the beginning anyway.
Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
Mark Brown [Wed, 21 Sep 2011 17:19:14 +0000 (18:19 +0100)]
ASoC: Add another DAPM stat for neighbour checks
The number of times we look at a potentially connected neighbour is just
as important as the number of times we actually recurse into looking at
that neighbour so also collect that statistic.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:54 +0000 (11:05 +0300)]
ASoC/MFD: twl6040: Combine bit definitions for Headset control registers
Use one set of defines for the HS bits, since they are identical in both
control register.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:53 +0000 (11:05 +0300)]
ASoC: twl6040/sdp4430: Change legacy DAI name
Change the legacy DAI name from "twl6040-hifi" to "twl6040-legacy" to
be more intuitive.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:52 +0000 (11:05 +0300)]
ASoC: twl6040: Support for AUX L/R output
AUX L/R outputs can be driver from the Handsfree PGA output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:51 +0000 (11:05 +0300)]
ASoC: twl6040: Use consistent names for Headset path
Use "Headset XYZ" for user visible controls, while the internal DAPM
widgets can use "HS XYZ".
In this way we can group the Headset related controls in UI
(alsamixer for example).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:50 +0000 (11:05 +0300)]
ASoC: twl6040: Use consistent names for Handsfree path
Use "Handsfree XYZ" for user visible controls, while the internal DAPM
widgets can use "HF XYZ".
In this way we can group the Handsfree related controls in UI
(alsamixer for example).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:49 +0000 (11:05 +0300)]
ASoC: twl6040: Earphone path correction
Fix the DAPM routing for the earphone path.
Convert the DAPM_SWITCH_E to DAPM_OUT_DRV_E, so we can have correct
power up, and down sequence for EP.
Introduce mute control (Earphone Playback Switch) for users to
enable/disable the EP path.
Note: the EP does not have it's own dedicated DAC. EP is connected to
HSL DAC.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:48 +0000 (11:05 +0300)]
ASoC: twl6040: Introduce SW only shadow register
Software only shadow register to be used by the driver.
For example Earpiece path will need this shadow register.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:47 +0000 (11:05 +0300)]
ASoC: twl6040: Remove strings "NULL" from DAPM route
Replace the string with plain NULL.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:46 +0000 (11:05 +0300)]
ASoC: twl6040: Fix comments for register names
Change the register name strings in the comments for the
twl6040_reg table, so it is easier to search for specific
register.
This is cosmetic change.
Before we had for example:
TWL6040_REG_HSLCTL as register definition.
At the register table we had:
TWL6040_HSLCTL
Searching for TWL6040_HSLCTL resulted no hits.
While if we look for REG_HSLCTL, we can find the places
the register has been used.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 22 Sep 2011 08:05:45 +0000 (11:05 +0300)]
ASoC: twl6040: Lower the power on gain values at startup
The default gains on outputs/inputs are set to 0dB.
This is fixing the pop noise issue at the first playback, which
caused by the wrong starting point of the ramp code.
The ramp code for the outputs expects the gains to be in
their lowest configuration in order to be effective.
After the playback stops, the ramp code takes care of
ramping down the gains to their minimum.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reasons for the replacement:
The current driver for McPDM was developed to support the legacy mode only.
In preparation for the ABE support the current driver stack need the be
replaced.
The new driver is much simpler, easier to extend, and it also fixes some of the
issues with the old stack.
Main changes:
- single file for omap-mcpdm (mcpdm.c/h removed)
- Define names for registers, bits cleaned up, prefixed
- Full-duplex audio operation (arecord | aplay) has been fixed
- Less code
McPDM need to be turned off after all streams has been stopped.
This might cause pop noise on the output, if the codec's DAC is
still powered at this time.
Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Sebastien Guiriec <s-guiriec@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Tue, 2 Aug 2011 11:04:26 +0000 (14:04 +0300)]
ASoC: OMAP4: McPDM: Convert to hwmod/omap_device
In order to probe, and operate correctly, the OMAP McPDM driver needs to
be converted to use hwmod.
The device name has been changed to probe the driver.
Replace the clk_* with pm_runtime_* calls to manage the clocks correctly.
Missing request_mem_region/release_mem_region added.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Peter Ujfalusi [Tue, 2 Aug 2011 10:35:30 +0000 (13:35 +0300)]
ASoC: omap-mcpdm: Fix threshold and dma configuration
DMA packet_size must be configured based on the McPDM FIFO threshold
value, number of channels.
Due to the FIFO operation the DMA muse be configured differently for
playback, and capture.
At the same time fix the McPDM threshold values used for playback, and
capture to avoid broken code.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Peter Ujfalusi [Tue, 30 Aug 2011 11:39:54 +0000 (14:39 +0300)]
ASoC: tpa6130a2: Remove model_id from platform data
The model_id is no longer needed within the platform_data
for the TPA driver since the model of TPA specified
with the device name (tpa6130a2/tpa6140a2).
Also update rx51 (the only affected user) to use the device name rather
than platform data.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Tue, 30 Aug 2011 11:39:52 +0000 (14:39 +0300)]
ASoC: tpa6130a2: Model support cleanup
Use the device name and driver_data to identify
the TPA model supported by the driver.
Board files should use either "tpa6130a2" or
"tpa6140a2" as device name to specify the model
in used on the specific board.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Jarkko Nikula <jarkko.nikula@bitmer.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Dong Aisheng [Mon, 29 Aug 2011 09:15:14 +0000 (17:15 +0800)]
ASoC: soc-core: symmetry checking for each DAIs separately
The orginal code does not cover the case that one DAI such as codec
may be shared between other two DAIs(CPU).
When do symmetry checking, altough the codec DAI requires symmetry,
the two CPU DAIs may still be configured to run on different rates.
We change to check each DAI's state separately instead of only checking
the dai link to prevent this issue.
Signed-off-by: Dong Aisheng <b29396@freescale.com> Tested-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 20 Sep 2011 10:41:54 +0000 (11:41 +0100)]
ASoC: Ensure we generate a driver name
Commit 873bd4c (ASoC: Don't set invalid name string to snd_card->driver
field) broke generation of a driver name for all ASoC cards relying on the
automatic generation of one. Fix this by using the old default with spaces
replaced by underscores.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Takashi Iwai <tiwai@suse.de>
Mark Brown [Tue, 20 Sep 2011 20:43:24 +0000 (21:43 +0100)]
ASoC: Trace and collect statistics for DAPM graph walking
One of the longest standing areas for improvement in ASoC has been the
DAPM algorithm - it repeats the same checks many times whenever it is run
and makes no effort to limit the areas of the graph it checks meaning we
do an awful lot of walks over the full graph. This has never mattered too
much as the size of the graph has generally been small in relation to the
size of the devices supported and the speed of CPUs but it is annoying.
In preparation for work on improving this insert a trace point after the
graph walk has been done. This gives us specific timing information for
the walk, and in order to give quantifiable (non-benchmark) numbers also
count every time we check a link or check the power for a widget and report
those numbers. Substantial changes in the algorithm may require tweaks to
the stats but they should be useful for simpler things.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 20 Sep 2011 14:44:21 +0000 (15:44 +0100)]
ASoC: Add WM5100 driver
The WM5100 is a highly integrated low power audio subsystem with advanced
digital signal processing capabilities including effects, speech clarity
enhancement and active noise cancellation. This initial driver provides
support for basic audio paths, further patches will provide more
complete functionality.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: ssm2602: Do not dereference codec->control_data
The driver assumes that control_data points to the drivers i2c_client struct,
but this is no longer the case since the ASoC core has switched to regmap.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:59:19 +0000 (15:59 +0300)]
ASoC: twl6040: Correct supported number of playback channels
twl6040 supports 5 playback, and 2 capture channels
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:59:18 +0000 (15:59 +0300)]
ASoC: twl6040: Fix the number of channels for vibra
Only mono audio can be used for vibra (DL4 channel).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:28 +0000 (15:39 +0300)]
ASoC: twl6040: Use chip defaults in the initial reg_cache
Reset the twl6040_reg array to hold the chip default values.
The only changed values were for the microphone input selection.
Select no input for the microphones in the twl6040_init_chip function.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:27 +0000 (15:39 +0300)]
ASoC: twl6040: Chip initialization cleanup
There is no need to write to the vio registers at probe time, since most
them either read only, or shared with MFD or not used.
On the other hand it is a good idea to updated the ASICREV register in
the cache at this time.
After power up we need to restore some registers. Clean up the list to
contain only the registers we are going to restore.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:26 +0000 (15:39 +0300)]
MFD: twl6040: Fix power on GPIO handling
Avoid requesting the audpwron gpio in case of ES1.0
revision.
In the past we requested the gpio, but we did not
free it up, since we made the check for the revision
later. This results later checks for gpio validity to
fail, leaving the gpio reserved (even after the driver
has been removed).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:24 +0000 (15:39 +0300)]
MFD: twl6040: Add accessor for revision ID
For client driver to use, if they need chip resvision information.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Peter Ujfalusi [Thu, 15 Sep 2011 12:39:23 +0000 (15:39 +0300)]
MFD: twl6040: Remove global pointer for platform_device
There is no need to keep global pointer for the platform
device, since it is only used for dev_* prints, and the
device pointer available within the twl6040 structure.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
1. add different clkmux mode handling
SAIF can use two instances to implement full duplex (playback &
recording) and record saif may work on EXTMASTER mode which is
using other saif's BITCLK&LRCLK.
The clkmux mode could be set in pdata->init() in mach-specific code.
For generic saif driver, it only needs to know who is his master
and the master id is also provided in mach-specific code.
2. support playback and capture simutaneously however the sample
rates can not be different due to hw limitation.
Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Mon, 19 Sep 2011 08:34:28 +0000 (16:34 +0800)]
ASoC: sn95031: Staticize sn95031_pcm_hw_params
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Vinod Koul <vinod.koul@linux.intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 4 Sep 2011 14:50:31 +0000 (07:50 -0700)]
ASoC: Initial WM8996 headphone impedance measurement support
The WM8996 can measure the impedance of accessories connected to the
headphone output. Implement initial support for this, measuring the
left channel impedance when an accessory is detected and using this
to distinguish between a line load and a headphone load.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Fri, 16 Sep 2011 16:55:06 +0000 (17:55 +0100)]
ASoC: WM8996 only needs bandgap for analogue functionality
Rather than managing the bandgap in the bias level control use a supply
widget as we only actually need to enable it for analogue paths, not
fully digital ones.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Timur Tabi [Fri, 16 Sep 2011 14:16:54 +0000 (09:16 -0500)]
ASoC: support all possible sample rates in the WM8776 driver
The WM8776 supports a continuous range of sample rates rather than
discrete values and supports a wider range of sample rates on the
playback path than is currently supported. Update the constraints on
the DAIs to reflect this.
Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin [Fri, 9 Sep 2011 08:47:00 +0000 (16:47 +0800)]
ASoC: tpa6130a2: Remove obsolete cleanup for clientdata
The i2c core will clear the clientdata pointer automatically,
we don't have to set the `data' field to NULL in remove() or
if probe() failed anymore.
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ben Gardiner [Fri, 9 Sep 2011 21:06:05 +0000 (17:06 -0400)]
ASoC: davinci-pcm: trivial: replace link with actual chan/link
The ambiguously named variable 'link' is used as a temporary throughout
davinci-pcm -- its presence makes grepping (and groking) the code
difficult.
Replace link with the value of link in almost all sites. The exception
is a couple places where the last-assigned link/chan needs to be
returned by a function -- in these cases, rename to last_link.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mika Westerberg [Sun, 11 Sep 2011 09:28:51 +0000 (12:28 +0300)]
ASoC: edb93xx: convert to use snd_soc_register_card()
Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mika Westerberg [Sun, 11 Sep 2011 09:28:50 +0000 (12:28 +0300)]
ASoC: simone: convert to use snd_soc_register_card()
Current method for machine driver to register with the ASoC core is to
use snd_soc_register_card() instead of creating a "soc-audio" platform device.
In addition we use platform_device_register_simple() to create a platform
device for the codec. This function will handle putting and deleting the
device automatically which simplifies the error handling in the machine
driver.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mika Westerberg [Sun, 11 Sep 2011 09:28:49 +0000 (12:28 +0300)]
ASoC: ep93xx-pcm: add MODULE_ALIAS
To get the PCM module loaded automatically by udev et al. we need to add a
proper MODULE_ALIAS.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since the ASoC machine driver is now a platform driver we need to register a
matching platform device.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since the ASoC machine driver is now a platform driver we need to register a
matching platform device.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Since the ASoC machine driver is now a platform driver we need to register
a matching platform device.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mika Westerberg [Sun, 11 Sep 2011 09:28:52 +0000 (12:28 +0300)]
ASoC: snappercl15: convert to use snd_soc_register_card()
Current method for machine driver to register with the ASoC core is to use
snd_soc_register_card() instead of creating a "soc-audio" platform device.
Signed-off-by: Mika Westerberg <mika.westerberg@iki.fi> Reviewed-by: Ryan Mallon <rmallon@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi [Tue, 13 Sep 2011 17:59:37 +0000 (12:59 -0500)]
ASoC: improve asynchronous mode support in the fsl_ssi driver
The Freescale SSI audio controller supports "synchronous" and "asynchronous"
modes. In synchronous mode, playback and capture use the same input clock,
so sample rates must be the same during simultaneous playback and capture.
Unfortunately, the code which supports asynchronous mode is just broken in
various ways. In particular, it was constraining sample sizes as well as
the sample rate.
The fix also allows us to simplify the code by eliminating the 'asynchronous',
'playback', and 'capture' variables that were used to keep track of playback
and capture streams.
Unfortunately, it turns out that simulataneous playback and record does not
actually work on the only platform that supports asynchronous mode: the
Freescale P1022DS reference board. If a second stream is started, the SSI
grinds to halt for both streams. This is true even if the P1022 is configured
for synchronous mode, so it's likely a hardware problem that needs to be
worked around.
Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 11 Sep 2011 09:05:18 +0000 (10:05 +0100)]
ASoC: Disable WM8996 CPVDD supply when not in use
The WM8996 only requires CPVDD when the charge pump is active so control
it separately to the other supplies, only enabling it when the charge pump
is active. This will result in a small power saving on systems which are
able to provide independent software control of the supply.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Mark Brown [Sun, 11 Sep 2011 08:53:50 +0000 (09:53 +0100)]
regulator: Implement deferred disable support
It is a reasonably common pattern for hardware to require some delay after
being quiesced before the disable has finalised, especially in mixed signal
devices. For example, an active discharge may be required to ensure that
the circuit starts up again in a known state. Avoid having to implement
such delays in the regulator API by providing regulator_deferred_disable()
which will do a regulator_disable() a specified number of milliseconds
after it is called.
Due to the reference counting done on regulators a deferred disable can
be cancelled by doing another regulator_enable().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
ASoC: ad193x: Setup regmap read and write flag masks for SPI
Currently register read-back for the ad193x is broken, because it expects bit 0
of the upper byte to be set to indicate a read operation, while the regmap
default for SPI is to use bit 7.
This patch also addresses another oddity of the device. There are SPI and I2C
versions of this codec. In both cases the registers are 8-bit wide and numbered
from 0x0 to 0x10, but in the SPI case there is also a so called
'global address' which is prefixed in-front of the register address. The global
address mimics I2C behaviour and includes a static device address the and the
read/write flag. This basically extends the register address to an 16-bit value
numbered from 0x800 to 0x810. These are the register numbers which are
currently used by the driver. This works, because I2C will ignore the upper
8 bits of the register, but it is still a bit confusing, as there are no such
register numbers in the I2C case.
The approach taken by this patch is to number the registers from 0x00 to 0x10
and encode the global address for SPI mode into the read and write flag masks.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Mon, 5 Sep 2011 18:46:32 +0000 (20:46 +0200)]
regmap: Provide device read and write map interface for merging
Add the externally visible interface introduced by Lars-Peter's commit
6f3064 (regmap: Add support for device specific write and read flag
masks) separately in order to allow merge into other subsystems for
integration with drivers. Drivers relying on this feature will not be
functional until they are merged with the implementation.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Lu Guanqun [Tue, 6 Sep 2011 07:21:43 +0000 (15:21 +0800)]
ASoC: sst_platform: fix memory leak
snd_pcm_hw_constraint_integer() could return -1, in this case, sst platform is
not opened successfully. However the corresponding close callback isn't able
to be called later on to release these two allocated memories, thus resulting
in memory leak.
This patch moves the check for hardware contraints earlier, thus resolving this
issue.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 4 Sep 2011 16:35:47 +0000 (09:35 -0700)]
ASoC: Check that WM8996 FLL started even if we don't have the IRQ
We can directly read the FLL lock status on WM8996 so even if we don't
have an interrupt wired up we can still verify that the FLL started
successfully.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Axel Lin [Fri, 2 Sep 2011 13:47:41 +0000 (21:47 +0800)]
ASoC: Add missing platform_device_put in raumfeld_audio_init error path
Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Daniel Mack <zonque@gmail.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Sun, 4 Sep 2011 15:18:18 +0000 (08:18 -0700)]
ASoC: Fix reporting of partial jack updates
We need to report the entire jack state to the core jack code, not just
the bits that were being updated by the caller, otherwise the status
reported by other detection methods will be omitted from the state seen
by userspace.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Cc: stable@kernel.org