Age | Commit message (Collapse) | Author |
|
Signed-off-by: Thomas Weber <weber@corscience.de>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Remove the register descriptions from the twl4030.h file and use
the linux/mfd/twl4030-codec.h instead, which has the codec
related register descriptions also.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
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>
|
|
Shadow, non HW register for dealing with the HandsfreeL/R
muting.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
twl4030_setup_data structure can be passed from platform drivers to
the codec via the snd_soc_device->codec_data pointer.
Currently the setup data has support for the Headset pop-removal
related configuration, which differs from board to board.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Enable TWL4030 VTXL/VTXR and VRX digital filters for uplink
and downlink paths, respectively.
This patch also corrects voice 8/16kHz mode selection bit
(SEL_16K) of CODEC_MODE register.
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>
|
|
Support for 4 channel TDM (SND_SOC_DAIFMT_DSP_A) for twl4030
codec.
The channel allocations are:
Playback:
TDM i2s TWL RX
Channel 1 Left SDRL2
Channel 3 Right SDRR2
Channel 2 -- SDRL1
Channel 4 -- SDRR1
Capture:
TDM i2s TWL TX
Channel 1 Left TXL1
Channel 3 Right TXR1
Channel 2 -- TXL2
Channel 4 -- TXR2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add Voice DAI to support the PCM voice interface of the twl4030 codec.
The PCM voice interface can be used with 8-kHz(voice narrowband) or
16-kHz(voice wideband) sampling rates, and 16bits, and mono RX and mono
TX or stereo TX.
The PCM voice interface has two modes
- PCM mode1 : This uses the normal FS polarity and the rising edge of
the clock signal.
- PCM mode2 : This uses the FS polarity inverted and the falling edge
of the clock signal.
If the system master clock is not 26MHz or the twl4030 codec mode is not
option2, the voice PCM interface is not available.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.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>
|
|
This patch adds the analog loopback/bypass support for twl4030 codec.
Details for the implementation:
It seams that the analog loopback needs the DAC powered on on the channel,
where the loopback is selected. The switch for the DACs has been moved from
the DAPM_DAC to the "Analog XX Playback Mixer". In this way the DAC will be
powered while the audio playback is used or/and the loopback is enabled for
the channel.
The twl4030 codec powering has been reworked. Now the codec will be powered as
long as it does not receives the SND_SOC_BIAS_OFF event. The exceptions are
when the given change in the registers needs the codec power down/up cycle in
order to take effect. Otherwise the codec is on.
When the codec enters to STANDBY state and none of the loopback paths are
enabled, than the amplifiers, which are no in the DAPM path are forced to turn
off and the PLL is disabled. When playback/capture starts the disabled gains
are restored and the PLL is enabled.
When one of the loopback enabled in STANDBY mode, the disabled gains are
restored and the PLL is enabled also.
In short: the codec always goes to the lowest power state based on the
bias_level and the bypass_state.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This patch adds DAPM implementaion for the capture path
on twlx030.
TWL has two physical ADC and two digital microphone (stereo) connections.
The CPU interface has four microphone channels.
For simplicity the microphone channel paths are named as:
TX1 (Left/Right) - when using i2s mode, only the TX1 data is valid
TX2 (Left/Right)
Input routing (simplified version):
There is two levels of mux settings for TWL in input path:
Analog input mux:
ADCL <- {Off, Main mic, Headset mic, AUXL, Carkit mic}
ADCR <- {Off, Sub mic, AUXR}
Analog/Digital mux:
TX1 Analog mode:
TX1L <- ADCL
TX1R <- ADCR
TX1 Digital mode:
TX1L <- Digimic0 (Left)
TX1R <- Digimic0 (Right)
TX2 Analog mode:
TX2L <- ADCL
TX2R <- ADCR
TX2 Digital mode:
TX2L <- Digimic1 (Left)
TX2R <- Digimic1 (Right)
The patch provides the following user controls for the capture path:
Mux settings:
"TX1 Capture Route": {Analog, Digimic0}
"TX2 Capture Route": {Analog, Digimic1}
"Analog Left Capture Route": {Off, Main Mic, Headset Mic, AUXL, Carkit Mic}
"Analog Right Capture Route": {Off, Sub Mic, AUXR}
Volume/Gain controls:
"TX1 Digital Capture Volume": Stereo gain control for TX1 path
"TX2 Digital Capture Volume": Stereo gain control for TX2 path
"Analog Capture Volume": Stereo gain control for the analog path only
Important things for the board files:
Microphone bias:
"Mic Bias 1": Bias for Main mic or for digimic0 (analog or digital path)
"Mic Bias 2": Bias for Sub mic or for digimic1 (analog or digital path)
"Headset Mic Bias": Bias for Headset mic
When the routing configured correctly only the needed components will be
powered/enabled.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
A special start-up sequence is required to reduce the pop-noise of Class D
amplifier when enable hands-free on TWL4030.
Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The TWL4030 codec device has two ADCs. Both of them can have
several inputs routed to them, but TRM says that only one source
can be selected for every ADC, even though every source has a
dedicated bit in the registers.
This patch adds input source controls. It modifies default register
values to have no inputs selected and ADCs disabled. When some
input is selected, control handlers enable apropriate input
amplifier and ADC. If a microphone is selected, bias power is
automatically enabled. When some input is deselected, unused
chip parts are disabled.
Microphone and line input recording tested on OMAP3 pandora board.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|