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
Axel Lin [Sat, 3 Sep 2011 05:41:47 +0000 (13:41 +0800)]
ASoC: sn95031: Fix the logic to find free channel
In the case of no free channel available,
current implementation returns 0 instead of negative errno.
This patch fixes the logic to return -EINVAL if no free channel available.
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 [Wed, 24 Aug 2011 19:09:01 +0000 (20:09 +0100)]
ASoC: Allow source specification for CODEC level sysclk
Similarly to PLLs/FLLs some modern CODECs provide selectable system clock
sources. When the clock is the clock for a DAI we do not usually need to
identify which clock is being configured so can use clk_id for the source
clock but with CODEC wide system clocks we will need to specify both the
clock being configured and the source.
Add a source argument to the CODEC driver set_sysclk() operation to
reflect this. As this operation is not as widely used as the DAI
set_sysclk() operation the change is not very invasive. We probably
ought to go and make the same alternation for DAIs at some point.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fabio Estevam [Tue, 30 Aug 2011 03:28:42 +0000 (00:28 -0300)]
ASoC: imx: Fix build warning of unused 'card' variable
Fixes the following warning:
CC sound/soc/imx/imx-pcm-fiq.o
sound/soc/imx/imx-pcm-fiq.c: In function 'imx_pcm_fiq_new':
sound/soc/imx/imx-pcm-fiq.c:243: warning: unused variable 'card'
CC sound/soc/imx/imx-pcm-dma-mx2.o
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Currently the condition for these WARN_ONs is reversed and they are placed
before the actual check whether we are going to write to that register. So if
the codec implements the register_writable callback we'll get a warning for each
writable register when syncing the register cache.
While we are at it change the check to use snd_soc_codec_writable_register
instead of open-coding it.
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>
ASoC: snd_soc_codec_{readable,writable}_register change default to true
Change the default return value of snd_soc_codec_{readable,writable}_register to
true when no codec specific callback for this function is given. Otherwise all
registers of that codec will neither be readable nor writable, which is most
certainly not what we want.
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>
Wolfram Sang [Thu, 25 Aug 2011 13:54:55 +0000 (15:54 +0200)]
ASoC: imx-ssi: use dma_writecombine consistently
If the channel is allocated as writecombine, then mmaping it should also
use writecombine. Also, add a proper device for the call. Ported from a
similar fix for mach-mxs.
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
susan gao [Fri, 26 Aug 2011 19:14:14 +0000 (12:14 -0700)]
ASoC: Add 3D stereo support for wm8996
My first patch to ASoC ever! If I did something wrong, blame Ian.
Signed-off-by: Susan Gao <sgao@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Ben Gardiner [Fri, 26 Aug 2011 16:02:44 +0000 (12:02 -0400)]
ASoC: davinci-mcasp: add support for unsigned PCM formats
Although the McASP supports sign-extending samples in RX or TX [1]; the
davinci-mcasp driver does not touch the {R,X}PBIT or {R,X}PAD field of the
{R,X}FMT registers meaning that the McASP will serialize the bytes it is given
regardless of their signedness. So supporting unsigned formats is as simple
as adding them to the metadata of the davinci-mcasp driver.
Update the FMTBITs reported in the snd_soc_dai_driver and also update the case
statements in davinci-mcasp's hw_params() function so that the McASP can be
connected to CODECs that use unsigned values.
[1] http://www.ti.com/lit/ug/sprufm1/sprufm1.pdf
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>