Age | Commit message (Collapse) | Author |
|
Thanks to Troy Kisky <troy.kisky@boundarydevices.com> for noticing.
- DSP_A format has 1-bit data delay which corresponds to SSM6202 submode 2
- DSP_B has 0-bit data delay which corresponds to submode 1
- Currently driver sets them opposite so swap the submode setting
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
- OMAP McBSP DAI driver claims to support DSP_A format which has 1-bit data
delay but configures link for 0-bit data delay which is in fact DSP_B
- Fix this by changing format from DSP_A to DSP_B
- Fix also TLV320AIC23 codec and OSK5912 machine drivers since the same
error is populated also there
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Added the missing __devexit annotation to wm8350_codec_remove():
sound/soc/codecs/wm8350.c:1546: warning: 'wm8350_codec_remove' defined but not used
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Add SND_SOC_DAIFMT_DSP_A mode option.
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The WM8350 is an integrated audio and power management subsystem which
provides a single-chip solution for portable audio and multimedia systems.
The integrated audio CODEC provides all the necessary functions for
high-quality stereo recording and playback. Programmable on-chip
amplifiers allow for the direct connection of headphones and microphones
with a minimum of external components. A programmable low-noise bias
voltage is available to feed one or more electret microphones.
Additional audio features include programmable high-pass filter in the
ADC input path.
This driver was originally written by Liam Girdwood with further updates
from me.
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>
|
|
This will save some additional power.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The driver now registers the codec and DAI when probed as an I2C device.
Also convert the driver to use a single dynamic allocation to simplify
error handling.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Redo the instantiation of the WM8900 to do most of the initialisation
work when the I2C driver probes rather than when the ASoC device is
instantiated, registering the codec with the ASoC core when done.
Also move all dynamic allocations into a single kmalloc() to simplify
error handling and rename the I2C driver to make output more sensible.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
To avoid confusion the names for the DACs changed:
DACL1 -> DAC Left1
...
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The mux switch related texts fits to on line, no need to wrap
them.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
SND_SOC_DAPM_OUTPUT definition for carkitL/R was missing.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
BUG() should be marked as not returning but for at least some
configurations (including some widely deployed compilers) that's either
not happening or being forgotten by the compiler. Add some extra return
statements to the affected paths.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The module init entries should be __init instead of __devinit.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Fixed the function name of module init entry for twl4030.c, which
conflicted with the existing hardware init function:
sound/soc/codecs/twl4030.c:1278: error: conflicting types for 'twl4030_init'
sound/soc/codecs/twl4030.c:1187: error: previous definition of 'twl4030_init' was here
Also fixed the section type of init function.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
This makes use of the support for delayed DAI registration to allow the
WM8900 I2C device to be registered by general platform/architecture code
rather than as part of the ASoC device probe.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Currently this is done at module probe time since ASoC ties in codec
device probe to the instantiation of the entire ASoC device. Subsequent
patches will refactor the codec drivers to handle probing separately.
Note that the core does not yet use this information.
AC97 is special since the codec is controlled over the AC97 link but
we want to give the machine driver a chance to set up the system before
trying to instantiate since it may need to do configuration before the
AC97 link will operate
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
There is a separate gain control for the Headset output already.
Do not reset the gain to 0 dB at power up.
In power-down, there is no need to set the Headset output gain
to power-down mode, since if the CODECPDZ is in powered off this
setting has no effect.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Adds DAPM muxing, routing for the Handsfree outputs.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Adds DAPM muxing, routing for the Carkit outputs.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Adds DAPM muxing, routing for the Headset outputs.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Adds DAPM muxing, routing for the PreDrive outputs.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Adds DAPM muxing, routing for the Earpiece output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
DAPM event handler is set to filter out invalid MUX settings
for certain outputs.
Earpiece:
- 0 = Off
- 1 = DACL1
- 2 = DACL2
- 3 = *** Invalid ***
- 4 = DACR1
PreDriveL/R:
- 0 = Off/Off
- 1 = DACL1/DACR1
- 2 = DACL2/DACR2
- 3 = *** Invalid/Invalid ***
- 4 = DACR2/DACL2
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add all four APGA switch to DAPM routing and widgets.
Add user control for DA enable for all APGA as normal
control.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add all four DACs to dapm_widgets with power switch.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
- split "Line Playback Switch" into "LineL Playback Switch" and "LineR
Playback Switch"
- split "Line PGA Bypass Playback Volume" into "LineL Left PGA Bypass
Playback Volume" and "LineR Right PGA Bypass Playback Volume"
- split "Line Line2 Bypass Playback Volume" into "LineL Line2 Bypass
Playback Volume" and "LineR Line2 Bypass Playback Volume"
- Added "HP Right PGA Bypass Playback Volume"
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
- Add aic3x_set_headset_detection() function to define the headset
detection mode for tlv32aic3x chips
- added aic3x_button_pressed()
- Read from the real-time registers in aic3x_headset_detected() to query
headset presence without an occured interrupt
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.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: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
All outputs have dedicated gain controls except the
HandsFree output.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add Playback volume controls for all four DACs.
All four paths has three levels of volume controls:
Digital Fine gain, Digital Coarse gain, Analog gain.
The controls are named to reflect their connection to the DACs.
Per DAC volume can be performed, if needed:
amixer sset 'DAC1 Analog' 5,10
DACL1 analog gain to 5
DACR1 analog gain to 10
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Currently ASoC card initialisation is completed by a function called
snd_soc_register_card(). As part of the work to allow independant
registration of cards, codecs and machines in ASoC v2 a new function of
the same name has been added so rename the existing function to
facilitate the merge of v2.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
This reverts commit 9171e5e6a20a9cd4992ff9c7cbee13c6fdf7b0b1.
I can't reproduce the compile warnings any more. The warnings
might be some weird cross-compiling set up.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
Hide annoying uninitialized warnings:
sound/soc/codecs/wm8903.c:382: warning: ‘reg’ may be used uninitialized in this function
sound/soc/codecs/wm8903.c:383: warning: ‘shift’ may be used uninitialized in this function
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
This patch enables more routing functions for tlv320aic3x codecs.
It is now possible to
- control the volume of the PGA bypass path for the HPL, HPR, HPLCOM
and HPRCOM outputs individually
- route right line1 input to the left ADC channel
- route left line1 input to the right ADC channel
- route right mic3 input to left DAC channel
- route left mic3 input to right DAC channel
- route left line1 input to right line1 output
- route right line1 input to left line1 output
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Special handling is required for suspend and resume of AC97 codecs
due to the control path going over the data bus.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
DAI type information is only ever used within ASoC in order to special
case AC97 and for diagnostic purposes. Since modern CPUs and codecs
support multi function DAIs which can be configured for several modes
it is more trouble than it's worth to maintain anything other than a
flag identifying AC97 DAIs so remove the type field and replace it with
an ac97_control flag.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Some of the gain controls in TWL (mostly those which are associated with
the outputs) are implemented in an interesting way:
0x0 : Power down (mute)
0x1 : 6dB
0x2 : 0 dB
0x3 : -6 dB
Inverting not going to help with these.
Custom volsw and volsw_2r get/put functions to handle these gains.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Add CGAIN (Coarse gain control) to TWL4030 codec.
The range of the CGAIN is:
0 dB to 12 dB in 6 dB steps.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
TWL4030 FGAIN volume control has a range:
-62 to 0 dB in 1 dB steps, 0 in the FGAIN means mute.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Keep Soft-volume disabled for now, since if it is enabled
the FGAIN volume controls are not working in the current
configuration:
CODEC_MODE:OPT_MODE = 1
OPTION:ARXR2_EN = 1
OPTION:ARXL2_EN = 1
OPTION:ARXR1_EN = 0
OPTION:ARXL1_VRX_EN = 0
RX_PATH_SEL:RXL1_SEL = 0x0 (or 0x1)
RX_PATH_SEL:RXR1_SEL = 0x0 (or 0x1)
After the patch, FGAIN volume control works.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Print something a bit more verbose to help make errors a little more
obvious.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Liam Girdwood's ASoC v2 work avoids having two different ops structures
for DAIs by merging the members of struct snd_soc_ops into struct
snd_soc_dai_ops, allowing per DAI configuration for everything.
Backport this change.
This paves the way for future work allowing any combination of DAIs to
be connected rather than having fixed purpose CODEC and CPU DAIs and
only allowing CODEC<->CPU interconnections.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
|
Clean up our record of the active streams in shutdown(), fixing
subsequent failures of snd_pcm_hw_constraints_complete after closure of
a stream.
NOTE:
- The ssm2602 allows pairs of non-matching PB/REC rates.
- This is a fix for less evil:
The logic is flawed (e.g. the slave might startup before the
master's rate and sample_bits are set).
Signed-off-by: Karl Beldan <karl.beldan@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
|