summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: WM8990: Fix kcontrol's private value use in put callbackJarkko Nikula2009-02-061-1/+3
| | | | | | | | | | | | | | | Function wm899x_outpga_put_volsw_vu misuses the kcontrol's private value by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf. This is very similar fix than fix to TLV320AIC3X codec made by Eero Nurkkala <ext-eero.nurkkala@nokia.com>. This fix is compile tested only. Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TLV320AIC3X: Fix kcontrol's private value use in put callbackEero Nurkkala2009-02-061-4/+7
| | | | | | | | | | | | | | Function snd_soc_dapm_put_volsw_aic3x misuses the kcontrol's private value by still accessing it as bitfields even SOC_SINGLE_VALUE constructs it as a pointer into struct soc_mixer_control after the commit 4eaa9819dc08d7bfd1065ce530e31b18a119dcaf. This was causing arbitrary register writes when touching the controls defined with SOC_DAPM_SINGLE_AIC3X. Signed-off-by: Eero Nurkkala <ext-eero.nurkkala@nokia.com> Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ALSA: ASoC: email - update email addresses.Liam Girdwood2009-02-032-3/+2
| | | | | | | | This just updates my email address on some drivers I'd forgotten in a previous patch. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: Fix null string usage with WM8753 DAIsMark Brown2009-01-291-1/+8
| | | | | | | | | The WM8753 driver multiplexes the DAI structures it exposes to the outside world, leaving them uninitialised until the codec probes. Since the DAI name is used during the registration and setup process provide a dummy name. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Module unloading fixPeter Ujfalusi2009-01-091-0/+2
| | | | | | | | Call the snd_soc_free_pcm and snd_soc_dapm_free when the codec driver is unloaded. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Change the soc_value_enum back to soc_enumPeter Ujfalusi2009-01-081-5/+5
| | | | | | | The soc_value_enum has been merged to soc_enum. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control busesMark Brown2009-01-061-5/+15
| | | | | | | | | | | | | | For codecs that have both SPI and I2C support we need to ensure that we don't try to make the codec driver built in when I2C is modular since that won't link. Do this by creating a helper variable which uses conditional defaults to pick up the correct value for all combinations. We don't need to do anything special for I2C-only codecs since a conditional select passes on the full value for a tristate. Reported-by: Ingo Molnar <mingo@elte.hu> Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Convert the bitfield enums to VALUE_ENUM typePeter Ujfalusi2009-01-051-63/+55
| | | | | | | | | Convert the bitfield coded enums to the new VALUE_ENUM type. Remove the enum check, since the VALUE_ENUM type can handle the bitfield coding and also handles the 'holes' in the bitfield. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: DAPM based capture implementationPeter Ujfalusi2008-12-312-172/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ASoC: TWL4030: Make the enum filter generic for twl4030Peter Ujfalusi2008-12-311-16/+14
| | | | | | | | | Modify the enum filter to more generic that it will filter out the enums with text "Invalid". The enum filter also required for the capture path. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix DSP formats in SSM2602 audio codecJarkko Nikula2008-12-221-2/+2
| | | | | | | | | | | | 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>
* ASoC: Fix incorrect DSP format in OMAP McBSP DAI and affected driversJarkko Nikula2008-12-221-1/+1
| | | | | | | | | | | | - 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>
* ALSA: ASoC - Add missing __devexit annotation to wm8350.cTakashi Iwai2008-12-201-1/+1
| | | | | | | 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>
* ALSA: ASoC: tlv320aic3x add dsp_aTroy Kisky2008-12-202-0/+6
| | | | | | | 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>
* ASoC: Add WM8350 AudioPlus codec driverMark Brown2008-12-184-0/+1609
| | | | | | | | | | | | | | | | | | 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>
* ASoC: TWL4030: hands-free start-up sequence.Stanley.Miao2008-12-112-4/+36
| | | | | | | | 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>
* ASoC: Stop WM8903 SYSCLK when suspendingMark Brown2008-12-101-3/+6
| | | | | | This will save some additional power. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Convert WM8903 driver to register at I2C probe timeMark Brown2008-12-102-138/+97
| | | | | | | | 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>
* ASoC: Convert WM8900 to do more work at I2C probe timeMark Brown2008-12-102-85/+81
| | | | | | | | | | | 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>
* ASoC: TWL4030: Change the name for the DACsPeter Ujfalusi2008-12-101-8/+8
| | | | | | | | | 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>
* ASoC: TWL4030: Small cleanupPeter Ujfalusi2008-12-101-6/+3
| | | | | | | | 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>
* ASoC: TWL4030: Add missing Carkit outputPeter Ujfalusi2008-12-101-0/+2
| | | | | | | 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>
* ASoC: Work around warnings from some build environmentsMark Brown2008-12-101-0/+2
| | | | | | | | | 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>
* ALSA: ASoC - Fix wrong section typesTakashi Iwai2008-12-1019-19/+19
| | | | | | The module init entries should be __init instead of __devinit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ALSA: ASoC - Fix module init entry for twl4030.cTakashi Iwai2008-12-101-2/+2
| | | | | | | | | | | 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>
* ASoC: Convert WM8900 to allow registration by machine codeMark Brown2008-12-091-77/+20
| | | | | | | | 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>
* ASoC: Register non-AC97 codec DAIsMark Brown2008-12-0921-4/+253
| | | | | | | | | | | | | | 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>
* ASoC: TWL4030: Do not alter the Headset output volume on power-up/downPeter Ujfalusi2008-12-091-10/+2
| | | | | | | | | | | 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>
* ASoC: TWL4030: DAPM mapping of the Handsfree outputsPeter Ujfalusi2008-12-091-0/+41
| | | | | | | 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>
* ASoC: TWL4030: DAPM mapping of the Carkit outputsPeter Ujfalusi2008-12-091-0/+37
| | | | | | | 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>
* ASoC: TWL4030: DAPM mapping of the Headset outputsPeter Ujfalusi2008-12-091-0/+39
| | | | | | | 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>
* ASoC: TWL4030: DAPM mapping of the PreDriv outputsPeter Ujfalusi2008-12-091-0/+45
| | | | | | | 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>
* ASoC: TWL4030: DAPM mapping of the Earpiece outputPeter Ujfalusi2008-12-091-0/+27
| | | | | | | 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>
* ASoC: TWL4030: Add DAPM event handler for output MUX selectionPeter Ujfalusi2008-12-091-0/+24
| | | | | | | | | | | | | | | | | | | | | 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>
* ASoC: TWL4030: Add Analog PGA control switch to DAPMPeter Ujfalusi2008-12-091-2/+23
| | | | | | | | | 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>
* ASoC: TWL4030: Correct DAPM_DAC with power controlPeter Ujfalusi2008-12-091-4/+11
| | | | | | | 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>
* ASoC: tlv320aic3x: control additions and cleanupsDaniel Mack2008-12-051-5/+13
| | | | | | | | | | | | | - 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>
* ASoC: tlv320aic3x: headset/button press supportDaniel Mack2008-12-032-3/+74
| | | | | | | | | | | - 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>
* ASoC: Fix WM8903 right mixer bypass pathMark Brown2008-12-031-4/+4
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Add input selection and gain controlsGrazvydas Ignotas2008-12-032-3/+190
| | | | | | | | | | | | | | | | | | | 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>
* ASoC: Don't free static data in WM9713Mark Brown2008-12-011-1/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Add volume controls for outputsPeter Ujfalusi2008-12-011-0/+21
| | | | | | | | 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>
* ASoC: TWL4030: Change the common playback volume controlsPeter Ujfalusi2008-12-011-8/+29
| | | | | | | | | | | | | | | 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>
* ASoC: TWL4030: Change the capture volume control to TLVPeter Ujfalusi2008-12-011-3/+11
| | | | | | | | 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>
* ASoC: Remove in-code changelog from AD73311 driverMark Brown2008-12-011-3/+0
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Rename snd_soc_register_card() to snd_soc_init_card()Mark Brown2008-12-0125-25/+25
| | | | | | | | | | 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>
* Revert "ALSA: soc - Fix compile warnings in wm8903.c"Takashi Iwai2008-12-011-2/+2
| | | | | | | | | 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>
* ALSA: soc - Fix compile warnings in wm8903.cTakashi Iwai2008-12-011-2/+2
| | | | | | | | 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>
* ASoC: Allow more routing features for tlv320aic3xDaniel Mack2008-11-262-30/+78
| | | | | | | | | | | | | | | | | 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>
* ASoC: Flag AD1980 as an AC97 interfaceMark Brown2008-11-241-0/+1
| | | | | | | 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>