PLL was not being enabled when it was not bypassed. This patch
enables the PLL when it is used. Additionally, it disables the PLL
when it is bypassed.
Without this patch, the audio on TI DM646x EVM and DM355 EVM
does not work properly. The bit clocks and the frame sync signals
from the codec are not correct and hence the playback/record are faster
than usual for most sample rates. The reason for this was that the PLL
was not enabled when it was not bypassed.
Tested on DM6467 EVM, playback tested on DM355 EVM.
Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The callback function to control register was used by whole controls in
MAX9877 driver, but this causes using many if statement for double
register control or invert.
So, the callback function for double register control is separate
differently, and the code for invert is added in the callback function.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
GCC 4.4.0 doesn't appear to be able to spot that we don't apply any FLL
configuration if the output frequency is zero.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The MAX9877 combines a high-efficiency Class D audio power amplifier
with a stereo Class AB capacitor-less DirectDrive headphone amplifier.
The max9877_add_controls() is called to register the MAX9877 specific
controls on machine specific init() of the machine driver.
The datasheet for the MAX9877 can find at the following url:
http://datasheets.maxim-ic.com/en/ds/MAX9877.pdf
[Slight edit to sort the ALL_CODECS entries -- broonie.]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Due to the flexibility of the WM9081 FLL this should never happen
in a real system.
Reported-by: Jaswinder Singh Rajput <jaswinder@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
We need to use the best value we picked, not the last value we
looked at.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Without MODULE_LICENCE("GPL"), when built as a module it will fail
to load because it uses other GPL symbols from kernel.
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
While the hardware is capable of some limited asynmmetric modes the
driver does not currently support those modes so tell applications
that only symmetric rates are available.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8993 is a highly integrated ultra-low power hi-fi CODEC designed
for portable devices such as multimedia phones.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Nothing uses it and the existing hw_read operation needs to be
refectored so it's easier to remove it rather than work with it.
Support can be re-added if the code requires volatile registers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Register cache space was not being allocated for the final register,
causing bugs when it was used. Allocate space for it.
Also ensure that the final register is displayed in sysfs.
[Commit message rewritten to document actual issue. -- broonie]
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add "set_tristate" callbacks for HiFi and Voice DAIs.
Machine drivers can enable and disable tristate for each
DAI with "snd_soc_dai_set_tristate" function.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The wrong register cache variable was being used to provide the size for
the memcpy(), resulting in a copy of only a void * of data.
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
According to TRM, an external FET controlled by a 1.8V output signal
can be used to reduce the pop-noise heard when the audio amplifier is
switched on. It is suggested that GPIO6 of TWL4030 be used, but any
other gpio can be used instead. This is indicated in machine driver
with the following twl4030_setup_data members:
-hs_extmute. Set to 1 if board has support for EXTMUTE.
-set_hs_extmute. Set to a callback funcion to control an external gpio
line. Set to NULL if MUTE[GPIO6] pin is used.
Codec driver takes care of enabling and disabling this output during
the headset pop attenuation sequence.
Also add a delay to let VMID settle in ramp up sequence.
Signed-off-by: Jorge Eduardo Candelaria <x0107209@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8523 is a high performance stereo DAC with integral charge
pump providing 2Vrms line driver outputs using a single 3.3V power
supply rail.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
SoC dapm adds the suffix "Switch" to SND_SOC_DAPM_SWITCH controls,
removing word "Switch" from HandsfreeL/HandsfreeR widget name
for avoiding to duplicate it.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Event for voice sidetone was being interpreted as an
analog HiFi bypass event because VSTPGA register offset
is less than ARXR2_APGA_CTL offset. Reordering the
register checks allows to handle voice digital bypass
event properly.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
AVDAC clk priority allows to determine the path ADC must
be connected when the codec is in option2 and both HiFi
and Voice paths are enabled.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Voice interface of twl4030 codec supports: CBM_CFM and
CBS_CFS. It doesn't support CBS_CFM.
Signed-off-by: Misael Lopez Cruz <x0052729@ti.com>
Acked-By: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
No need to define second copies of mode and format, they're declared
with exactly the same type at the head of the function and there's no
conflict in their use.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add basic support for integration with the regulator API to WM8580.
Since the core cannot yet disable biases when the CODEC is idle we
simply request and enable the regulators for the entire time the
driver is active.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch mostly follows commit 5998102b90
"ASoC: Refactor WM8731 device registration" to make UDA1380 use standard
device instantiation. Similarly, the I2C device registration temporarily
moves into the magician machine driver before it will find its final
resting place in the board file.
At the same time, platform specific configuration is moved to platform data
and common power/reset GPIO handling moves into the codec driver.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
For best performance the DAC sloping stopband filter should be enabled
below 24kHz and not enabled above that so remove the user visible
control for this and do it autonomously in the driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
For best performance the DAC sloping stopband filter should be
enabled below 24kHz and not enabled above that so remove the
user visible control for this and do it autonomously in the
driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The Blackfin submission was done as a patch against a different tree
and contained a duplicate hunk which will cause us to loose track of the
substream pointers when shutting down. Remove one of the duplicated
hunks.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
These are not supported since performance can not be guaranteed
when they are in use.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
The WM8961 is a low power, high quality stereo CODEC designed for
portable digital applications with headphone and stereo class D speaker
drivers.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Some code analyzer software mistakenly gives
divide by 0 error messages for these lines.
This patch will end its confusion.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix the (likely cut-n-paste) error by commit
16a30fbb0d, which causes the error below:
sound/soc/codecs/twl4030.c: In function 'twl4030_read_reg_cache':
sound/soc/codecs/twl4030.c:152: error: 'cache' undeclared (first use in this function)
Signed-off-by: Takashi Iwai <tiwai@suse.de>