aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)Author
2009-08-03ASoC: Add I/O control bus information to factored out cache setupMark Brown
While writes tend to be able to use a fairly bus independant format to do the writes reads are all bus specific. To allow us to factor out this code include the bus type as a parameter when setting up the cache. Initially just use this to factor out hw_write_t for I2C. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-10Merge branch 'tlv320aic3x' into reg-cacheMark Brown
2009-07-05ASoC: Factor out WM8580 register cache codeMark Brown
Note the slightly tricky cache usage in the volume update function due to the requirement for a separate write for the VU bit. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Remove use of hw_read from TLV320AIC3x driverMark Brown
The TLV320AIC3x driver is currently the only user of the CODEC hw_read operation and is jumping through some hoops in order to do so. In order to support future refactoring to make the hw_read operation more usable unwrap the usage in this driver to avoid its use. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Remove unused AK4535 hardware read functionalityMark Brown
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>
2009-07-05ASoC: Begin to factor out register cache I/O functionsMark Brown
A lot of CODECs share the same register data formats and therefore replicate the code to manage access to and caching of the register map. In order to reduce code duplication centralised versions of this code will be introduced with drivers able to configure the use of the common code by calling the new snd_soc_codec_set_cache_io() API call during startup. As an initial user the 7 bit address/9 bit data format used by many Wolfson devices is supported for write only CODECs and the drivers with straightforward register cache implementations are converted to use it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Fix leaks in WM8988 registration error handlingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Fix WM8960 leaks on probe failureMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-05ASoC: Fix leaks in WM8731 probe error handlingMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-07-03ASoC: TWL4030: Add tristate callbacks for HiFi and VoiceLopez Cruz, Misael
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>
2009-07-02ASoC: TWL4030: Add EXTMUTE to reduce pop-noise effectCandelaria Villareal, Jorge
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>
2009-07-01ASoC: Add WM8523 CODEC driverMark Brown
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>
2009-06-29ASoC: Fix WM8961 suspend function typeMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-26ASoC: Remove word "Switch" from Handsfree switch nameLopez Cruz, Misael
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>
2009-06-25Merge branch 'for-2.6.31' into for-2.6.32Mark Brown
2009-06-25ASoC: Add core suspend and resume callbacks to WM8961Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-23ASoC: TWL4030: Correct bypass event for voice sidetoneLopez Cruz, Misael
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>
2009-06-23ASoC: TWL4030: Add AVADC Clock PriorityLopez Cruz, Misael
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>
2009-06-22ASoC: TWL4030: Fix voice interface clock mastersLopez Cruz, Misael
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>
2009-06-22Merge branch 'wm8961' into for-2.6.32Mark Brown
2009-06-20ASoC: Staticise put_twl4030_opmode_enum_double()Mark Brown
It's an operation for a control and doesn't need to be exported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-20ASoC: Fix shadowed variables in twl4030Mark Brown
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>
2009-06-17ASoC: Regulator support for WM8580Mark Brown
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>
2009-06-15ASoC: UDA1380: refactor device registrationPhilipp Zabel
This patch mostly follows commit 5998102b9095fdb7c67755812038612afea315c5 "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>
2009-06-13ASoC: Add suspend and resume callbacks to Wolfson CODEC driversMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-13ASoC: Automatically manage WM8350 sloping stopband filterMark Brown
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>
2009-06-13ASoC: Automatically manage WM8900 sloping stopband filterMark Brown
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>
2009-06-13ASoC: Automatically control WM8903 sloping stopband filterMark Brown
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>
2009-06-13ASoC: Revert duplicated code in SSM2602 driverMark Brown
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>
2009-06-12ASoC: Remove odd bit clock ratios for WM8903Mark Brown
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
2009-06-12ASoC: Add WM8961 driverMark Brown
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>
2009-06-06ASoC: codec tlv320aic23 fix bogus divide by 0 messageTroy Kisky
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>
2009-06-04ASoC: Fix build error in twl4030.cTakashi Iwai
Fix the (likely cut-n-paste) error by commit 16a30fbb0d3aa4ee829a2dd3d0e314e2b5ae96a9, 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>
2009-06-03ASoC: SSM2602: assign last substream to the master when shutting downCliff Cai
Fixes crash when shutting down. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-03ASoC: SSM2602: remove unsupported sample ratesCliff Cai
Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-06-01ASoC: TWL4030: Check the interface format for 4 channel modePeter Ujfalusi
In addition to the operating mode check, also check the codec's interface format in case of four channel mode. If the codec is not in TDM (DSP_A) mode, return with error. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-29ASoC: TWL4030: Use reg_cache in twl4030_init_chipPeter Ujfalusi
Use the codec->reg_cache instead of the array directly in twl4030_init_chip for setting the default values. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28ASoC: Initialise dev for the dummy S/PDIF DAIMark Brown
Also include the header to make sure the DAI is prototyped. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28ASoC: Add dummy S/PDIF codec supportChaithrika U S
McASP on DM646x can operate in DIT (S/PDIF) where no codec is needed. This patch provides stub codec that can be used in these configurations. On DM646x EVM the McASP1 is connected to the S/PDIF out. Signed-off-by: Steve Chen <schen@mvista.com> Signed-off-by: Pavel Kiryukhin <pkiryukhin@ru.mvista.com> Signed-off-by: Naresh Medisetty <naresh@ti.com> Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-28ASoC: correct print specifiers for unsignedsRoel Kluin
Unsigned variables should use `%u' rather than `%d'. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-25ASoC: TWL4030: HandsfreeL/R mute DAPM switchPeter Ujfalusi
Add DAPM switch for HeadsetL/R mute. Since all bits are are needed for the HFL/R pop removal to work the switch is using the SW_SHADOW no HW register for the HandsfreeL/R mute. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-25ASoC: TWL4030: Add shadow registerPeter Ujfalusi
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>
2009-05-25ASoC: TWL4030: Handsfree pop removal redesignPeter Ujfalusi
Move the HandsfreeL/R (IHFL/R) pop removal code from the DAPM_MUX_E to a more appropriate DAPM_PGA_E widget. Also fix the power-up sequence to match with the TRM. The power-down sequence is not described in the TRM, so do it in a way, which seams like the correct sequence. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24ASoC: Fix minor issues in STAC9766 driverMark Brown
Fairly minor issues: - Don't register the DAIs, it's not required for AC97 devices. - Make unexported functions static. - Wrap some excessively long lines. - Undo tab/space breakage. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-24ASoC: Codec for STAC9766 used on the EfikaJon Smirl
Datasheet: http://www.idt.com/products/getDoc.cfm?docID=13134007 Signed-off-by: Jon Smirl <jonsmirl@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-23ASoC: Fix WM9081 PowerPC compiler issuesMark Brown
Ensure that we always set a new sysclk when using the FLL in master mode and pick out the correct value for the sample rate in hw_params(). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driverMark Brown
The WM9081 is designed to provide high power output at low distortion levels in space-constrained portable applications. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22ASoC: TWL4030: Differentiate the playback streamsPeter Ujfalusi
Give unique stream names for the two playback streams so DAPM can figure out which codec_dai is in use. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-05-22ASoC: TWL4030: Add support for platform dependent configurationPeter Ujfalusi
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>
2009-05-20ASoC: TWL4030: Move the Headset pop-attenuation code to PGA eventPeter Ujfalusi
This patch adds SND_SOC_DAPM_PGA_E to the headset path, which handles the headset ramp up and down sequences needed for the pop noise removal. With this patch the order of the internal components in the twl4030 codec is turned on and off in a correct order. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Tested-by: Anuj Aggarwal <anuj.aggarwal@ti.com> Tested-by: Jarkko Nikula <jhnikula@gmail.com> Tested-by: Misael Lopez Cruz <x0052729@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>