Add DSP_A interface format support by setting the LRP bit in
DSP mode.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8988 is a low power, high quality stereo CODEC designed for
portable digital audio applications.
The device integrates complete interfaces to 2 stereo headphone or line
out ports. External component requirements are drastically reduced as no
separate headphone amplifiers are required. Advanced on-chip digital
signal processing performs graphic equaliser, 3-D sound enhancement and
automatic level control for the microphone or line input.
The WM8988 can operate as a master or a slave, with various master clock
frequencies including 12 or 24MHz for USB devices, or standard 256fs
rates like 12.288MHz and 24.576MHz. Different audio sample rates such as
96kHz, 48kHz, 44.1kHz are generated directly from the master clock
without the need for an external PLL.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ak4535_remove() from sound/soc/codecs/ak4535.c calls
i2c_unregister_device() with a possibly null pointer.
This bug was found by smatch (http://repo.or.cz/w/smatch.git/).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Adds the needed code to be able to use 96KHz playback.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Without this the WM9705 driver fails badly when resuming.
Tested-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
In case of duplex mode (capture and playback at the same time), the second
stream has to have the same parameters (rate, sample size) as the already
running stream.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
TWL4030 supports 96KHz sample playback, but only playback.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
There is an AVDD supply as well, normally one or more of the other
upplies would be tied to it.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The active discharge does not bring sufficient benefit to justify the
lengthy times involved so don't do that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CC sound/soc/codecs/twl4030.o
sound/soc/codecs/twl4030.c:1400: warning: braces around scalar initializer
sound/soc/codecs/twl4030.c:1400: warning: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1401: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1401: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1401: warning: initialization from incompatible pointer type
sound/soc/codecs/twl4030.c:1402: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1402: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1402: warning: excess elements in scalar initializer
sound/soc/codecs/twl4030.c:1402: warning: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1403: error: field name not in record or union initializer
sound/soc/codecs/twl4030.c:1403: error: (near initialization for 'twl4030_dai.ops')
sound/soc/codecs/twl4030.c:1403: warning: excess elements in scalar initializer
sound/soc/codecs/twl4030.c:1403: warning: (near initialization for 'twl4030_dai.ops')
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The drivers are basically duplicating the same code over and over.
As snd_soc_cnew is going to be made static some time after the next
merge window, we might as well convert them now.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Refactor the WM8580 device registration to probe via standard I2C device
registration, registering the DAIs once the device has probed via I2C.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Merge Eric Maio's patch to merge snd_soc_dai_ops out of line. Fixed
merge issues and updated drivers, plus an issue with the ops for the two
s3c2443 AC97 DAIs having been merged.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8400 is a highly integrated audio CODEC and power management unit
intended for mobile multimedia application. This driver supports the
primary audio CODEC features, including:
- 1W speaker driver
- Fully differential headphone output
- Up to 4 differential microphone inputs
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This adds a driver for the SPI connected AK4104 S/PDIF transmitter
device. Its features are fairly simple, but as there is need to set up
certain bits in the IEC958 information, this better goes into a real
driver.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Mark Brown <broonie@sirena.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Removes numbers from the list of features/limitations and makes it
reflect recent changes to the code.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Reported-by: Rob Maris <maris.rob@vdi.de>
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Enum type for selecting the desired ramp delay for the headset output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Considering the fact that most cpu_dai or codec_dai are using a same
'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better
made a pointer instead, to make sharing easier and code a bit cleaner.
The patch below is rather preliminary since the asoc tree is being
actively developed, and this touches almost every piece of code,
(and possibly many others in development need to be changed as
well). Building of all codecs are OK, yet to every SoC, I didn't test
that.
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When setting WM8510_MCLKDIV the pll was turned off.
When setting pll frequency you got twice the expected freq, because
the code calculated with postscaler of 8, but the hardware divide by 4.
Signed-off-by: Jonas Andersson <jonas@microbit.se>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Only allow SND_SOC_DAIFMT_CBS_CFS for the playback DAI.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If the UDA1380's interpolator or decimator are set to be clocked from
the WSPLL (which syncs to the WSI signal), the DAI link must be running
to change the interpolator/decimator registers (which include volume
controls and digital mute setting).
* Queue work in the alsa PCM_START .trigger to flush registers
as soon as the link is running. This replaces the .prepare
and .digital_mute callbacks.
* Use the SILENCE override instead of MTM for muting and remove
its alsa control to avoid confusion.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This removes a misspelled comment and got rid of superfluous switch
case.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Added support for scenarios where the Cirrus CS4270 audio codec is slave
to the bitclk and lrclk. Mixed setups are unsupported.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8753.c: In function 'wm8753_probe':
sound/soc/codecs/wm8753.c:1577: error: implicit declaration of function 'wm8753_add_controls'
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This will reduce the number of writes done on resume, allowing that to
complete faster (especially on systems with very slow I2C like the
current Samsung driver).
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The base support for the only in-tree user, the GTA01, is out of tree
and will be updated separately.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch should be pure code motion, separating that out from the
functional changes to move to new style device registration.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This avoids temporarily enabling the ouput stages during startup which
can cause audible effets in the output stages.
Reported-by: Fredrik Redgård <rik@svep.se>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds the digital loopback/bypass support for twl4030 codec.
The digital loopback will let the digimic0 (routed in the TX1 capture path
inside of TWL4030) data to be routed back to the RX2 playback path
(I2S stereo). It can also route the analog capture date routed through the
TX1 back to RX2.
Effectively the digital loopback is routing the audio from the TX1 capture path
to the RX2 playback path.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Move the WM8731 driver to use a more standard device registration
scheme where the device can be registered independantly of the ASoC
probe.
As a transition measure push the current manual code for registering
the WM8731 into the individual machine driver probes. This allows
separate patches to update the relevant architecture files with less
risk of merge issues.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is a pure code motion patch intended to improve reviewability of a
following patch moving WM8731 to use more standard device registration.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8731 bias level configuration function was written slightly
obscurely - streamline the code a little and refresh the comments.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
WM8753 uses a tricky way to switch DAIs "on the fly", for that it
registers 2 dummy DAIs and substitutes them depending on mixer control.
List element of registered dummy DAIs should be preserved to allow
unregistering of DAIs on module unload.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Update the CS4270 codec driver to allow applications to use the mixer to
control Digital Loopback, Soft Ramp, Zero Cross, Popguard, and Auto-Mute.
Soft Ramp, Zero Cross, and Auto-Mute are disabled by the driver when it first
initializes the hardware, but these features either don't work or interfere
with normal ALSA behavior. However, they can now be re-enabled by an
application if desired.
Remove CONFIG_SND_SOC_CS4270_HWMUTE and always allow ASoC to control the mute
bits. The driver previously and erroneously assumed that these bits
control only external muting circuitry, but they also control internal
muting circuitry, so they should always be used.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
TLV320AIC3X volume controls are logarithmic. Export their dB ranges.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is a minor fix but helps to define dB ranges for volume controls.
Only DAC digital volume has full register value range from 0 to 127 but
ADC PGA gain and output stage volume controls don't.
For ADC PGA, maximum value is 119 and then it saturates to the same
gain value of 59.5 dB. For output stages, value 117 corresponds to -78.3 dB
and is muted for values 118 and above.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>