Allow the regmap API to use asynchronous I/O where supported to minimise
the delay between transfers, reducing firmware download times.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Maximise robustness for the widest range of firmwares by ensuring the DSP
is in a consistent state when halted.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch correctly releases the firmware if the magic string in the
firmware header does not match.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Sets the ADSP1 clock rate to match the system clock
rate. To support this the codec driver provides
details of register containing the system clock
control bits.
Signed-off-by: Chris Rattray <crattray@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Implement support for a new revision of the coefficeint file format for
ADSP cores.
Since coefficient file format 0 has not been widely deployed and is very
unlikely to ever be used with this driver code support for it has been
removed.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There are many firmwares available for ADSP devices. Add basic support
for selecting between them, including a couple of feature sets in the
set of available firmware to start off with.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
WMDR coefficient files can specify coefficients in terms of algorithm
specific data regions. Record the start addresses of these regions while
parsing the algorithms and then use them to handle coefficients with
these formats.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If we run into I/O problems the algorithm count may be crazy, validate it
before we proceed and dump the read data for diagnostic purposes.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ADSP devices report information on the algorithms loaded on them. Parse
this data and use it to allow coefficients to be configured for specific
algorithms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Otherwise we won't run correctly on systems that require this for larger
data transfers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When probing aux_dev, initializing is as below:
device_initialize()
device_add()
So when remove aux_dev, we need do as below:
device_del()
device_put()
Otherwise, the rtd_release() will not be called.
So here using device_unregister() to replace device_del(),
like the action in soc_remove_link_dais().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
After called device_initialize(), even device_add() returns
error, we still need use the put_device() to release the reference
to call rtd_release(), which will do the free() action.
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In the case of no-match, return -EINVAL instead of 0.
Since we assign i to ret in the for loop, ret always less than
ARRAY_SIZE(clk_map_table). Thus remove the boundary checking for ret.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Update lm49453_reg_defs values as per LM49453 HW revision-B
Signed-off-by: M R Swami Reddy <mr.swami.reddy@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The FLL source constants were numbered as a simple enumeration but were
being used in the code as direct values to be written to the registers.
Renumber the constants to reflect the usage.
Reported-by: Ryo Tsutsui <Ryo.Tsutsui@wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
ARIZONA_AIF1_RATE_MASK is 0x7800 /* AIF1_RATE - [14:11] */
Thus we need left shift ARIZONA_AIF1_RATE_SHIFT when setting aif1 rate.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
The mode variable is either 0 or 1.
To update mode setting, the mask should be BIT(0) rather than BIT(1).
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Omair M. Abdullah <omair.m.abdullah@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3.
From Eric Nelson:
"We also found that for the microphones we have here (commodity PC boom mics) a
default value of 2 for the gain gives the best results."
So change the default microphone gain as well.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
According to the defines in wm2200.h:
/*
* R1284 (0x504) - Audio IF 1_5
*/
We should not left shift 1 bit for fmt_val when setting dai format.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
Although we've had macros defining double _RANGE controls for a while now
they've not actually been backed up properly by the implementation, it's
treated everything as mono. Fix that by implementing the handling in the
stereo controls, ensuring that the mono controls don't mistakenly get
treated as stereo.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>