summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'fix/asoc' into for-linusTakashi Iwai2009-07-261-1/+10
|\ | | | | | | | | * fix/asoc: ASoC: tlv320aic3x: Enable PLL when not bypassed
| * ASoC: tlv320aic3x: Enable PLL when not bypassedChaithrika U S2009-07-231-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PLL was not being enabled when it was not bypassed. This patch enables the PLL when it is used. Additionally, it disables the PLL when it is bypassed. Without this patch, the audio on TI DM646x EVM and DM355 EVM does not work properly. The bit clocks and the frame sync signals from the codec are not correct and hence the playback/record are faster than usual for most sample rates. The reason for this was that the PLL was not enabled when it was not bypassed. Tested on DM6467 EVM, playback tested on DM355 EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Sound: remove direct access of driver_dataGreg Kroah-Hartman2009-07-121-2/+2
|/ | | | | | | | | | | | This is the last in-kernel direct usage of driver_data, replace it with the proper dev_get/set_drvdata() calls. Cc: Takashi Iwai <tiwai@suse.de> Cc: Jaroslav Kysela <perex@perex.cz> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* ASoC: Fix wm8753 register cache size and initializationLars-Peter Clausen2009-07-031-2/+2
| | | | | | | | | | | | Register cache space was not being allocated for the final register, causing bugs when it was used. Allocate space for it. Also ensure that the final register is displayed in sysfs. [Commit message rewritten to document actual issue. -- broonie] Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Fix register cache initialisation for WM8753Mark Brown2009-07-031-1/+1
| | | | | | | | | The wrong register cache variable was being used to provide the size for the memcpy(), resulting in a copy of only a void * of data. Reported-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
* ASoC: Revert duplicated code in SSM2602 driverMark Brown2009-06-131-4/+0
| | | | | | | | | 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>
* ASoC: Remove odd bit clock ratios for WM8903Mark Brown2009-06-121-4/+0
| | | | | | | | 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
* ASoC: codec tlv320aic23 fix bogus divide by 0 messageTroy Kisky2009-06-061-5/+5
| | | | | | | | | 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>
* ASoC: Fix build error in twl4030.cTakashi Iwai2009-06-041-0/+1
| | | | | | | | | 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>
* ASoC: SSM2602: assign last substream to the master when shutting downCliff Cai2009-06-031-9/+16
| | | | | | | | 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>
* ASoC: SSM2602: remove unsupported sample ratesCliff Cai2009-06-031-5/+3
| | | | | | 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>
* ASoC: TWL4030: Check the interface format for 4 channel modePeter Ujfalusi2009-06-011-3/+9
| | | | | | | | | 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>
* ASoC: TWL4030: Use reg_cache in twl4030_init_chipPeter Ujfalusi2009-05-291-2/+2
| | | | | | | | 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>
* ASoC: Initialise dev for the dummy S/PDIF DAIMark Brown2009-05-281-1/+3
| | | | | | Also include the header to make sure the DAI is prototyped. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add dummy S/PDIF codec supportChaithrika U S2009-05-284-0/+92
| | | | | | | | | | | | 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>
* ASoC: correct print specifiers for unsignedsRoel Kluin2009-05-2810-16/+16
| | | | | | | | 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>
* ASoC: TWL4030: HandsfreeL/R mute DAPM switchPeter Ujfalusi2009-05-251-2/+16
| | | | | | | | | 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>
* ASoC: TWL4030: Add shadow registerPeter Ujfalusi2009-05-252-2/+12
| | | | | | | | 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>
* ASoC: TWL4030: Handsfree pop removal redesignPeter Ujfalusi2009-05-251-19/+59
| | | | | | | | | | | 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>
* ASoC: Fix minor issues in STAC9766 driverMark Brown2009-05-241-36/+29
| | | | | | | | | | 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>
* ASoC: Codec for STAC9766 used on the EfikaJon Smirl2009-05-244-0/+497
| | | | | | | 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>
* ASoC: Fix WM9081 PowerPC compiler issuesMark Brown2009-05-231-2/+4
| | | | | | | 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>
* ASoC: WM9081 mono DAC with integrated 2.6W class AB/D amplifier driverMark Brown2009-05-224-0/+2325
| | | | | | | 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>
* ASoC: TWL4030: Differentiate the playback streamsPeter Ujfalusi2009-05-221-6/+6
| | | | | | | | 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>
* ASoC: TWL4030: Add support for platform dependent configurationPeter Ujfalusi2009-05-222-3/+24
| | | | | | | | | | | 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>
* ASoC: TWL4030: Move the Headset pop-attenuation code to PGA eventPeter Ujfalusi2009-05-201-25/+91
| | | | | | | | | | | | | | | 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>
* ASoC: TWL4030: Change DAPM routings and controls for DACs and PGAsPeter Ujfalusi2009-05-201-70/+71
| | | | | | | | | | | | | | | | | | | | | | | Restructuring the twl4030 codec's DAPM routing to be able to handle the power sequences correctly. The twl4030 codec internal implementation have this order: DAC -> Analog PGA -> Mixer/Mux While the ASoC framework expects the following order: DAC -> Mixer -> Analog PGA This patch moves the Analog PGA handling from SND_SOC_DAPM_PGA to _MIXER and adds two levels of mixer to handle the digital and analog loopback functionality. Now the analog loopback does not powers on any of the DACs. 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>
* ASoC: TWL4030: Add control for selecting codec operation modeLopez Cruz, Misael2009-05-191-0/+47
| | | | | | | | | | | | | | Add a control for selecting the codec operation mode. TWL4030 codec has two modes: - Option 1. Audio only (4 audio DACs) - Option 2. Voice/Audio (2 audio DACs and voice ADC/DAC) Control is restricted when a stream is ongoing, since codec's operation mode cannot be changed on-the-fly. Signed-off-by: Misael Lopez Cruz <x0052729@ti.com> Acked-by: Peter Ujflausi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Fix Analog capture path for AUXRPeter Ujfalusi2009-05-191-1/+1
| | | | | | | AUXR is selected by bit 2 and not by bit 1 in the ANAMICR register. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Enable/disable voice digital filtersMisael Lopez Cruz2009-05-182-1/+38
| | | | | | | | | | | | 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>
* ASoC: Add missing __devexit in wm8940.cTakashi Iwai2009-05-151-1/+1
| | | | Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: Support AC97 link off by default on WM9712Marek Vasut2009-05-141-0/+2
| | | | | | | | | | | | | The WM9712 can be configured by resistor strapping GPIO4 to behave like the WM9713 and default to leaving the AC97 link disabled after cold reset until a warm reset occurs. In this configuration we need to issue a warm reset after cold to bring the link up so do so. The warm reset will be harmless on systems that don't need it. [Changelog rewritten to document the reasoning. -- broonie] Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: change DAPM for analog microphone selectionJoonyoung Shim2009-05-121-33/+19
| | | | | | | | | | | The inputs of the twl4030 codec can be mixed, so we will use the mixer DAPM for the analog microphone registers(0x05, 0x06), but if we enable more than one input at the same time, the input impedance of the input amplifier will be reduced. 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>
* ASoC: remove driver_data direct access of struct deviceRoel Kluin2009-05-113-6/+6
| | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: TWL4030: Fix typo in twl4030_codec_mute functionPeter Ujfalusi2009-05-081-1/+1
| | | | | | | | | Copy-paste error: TWL4030_PRECKL_GAIN >> TWL4030_PRECKR_GAIN It has not caused problems, since TWL4030_PRECKL_GAIN == TWL4030_PRECKR_GAIN == 0x30 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs4270: add power management supportDaniel Mack2009-05-071-1/+57
| | | | | | Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: cs4270: introduce CS4270_I2C_INCRDaniel Mack2009-05-051-1/+2
| | | | | | | | Replace the magic 0x80 value with a suitable macro definition. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* Merge branch 'for-2.6.30' into for-2.6.31Mark Brown2009-05-051-20/+20
|\
| * ASoC: Fix errors in WM8990Jinyoung Park2009-05-051-20/+20
| | | | | | | | | | | | | | | | | | The mis-typing exist in dapm controller definitions and dapm route definitions, so happen mis-matched error when snd_soc_dapm_add_routes(). Cc: stable@kernel.org Signed-off-by: Jinyoung Park <parkjy@mtekvision.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com
* | ASoC: TWL4030: Add VIBRA outputPeter Ujfalusi2009-05-051-0/+61
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for the VIBRA output on TWL4030 codec. The VIBRA output can be driven with audio data or with local vibrator driver. Add the needed DAPM elements and routes for the VIBRA output and controls for the VIBRA driver configuration. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: TWL4030: Add voice digital loopback: sidetoneLopez Cruz, Misael2009-05-051-2/+25
| | | | | | | | | | | | | | | | | | | | | | This patch add voice digital loopback (sidetone) to the twl4030 driver. It mixes voice uplink attenuated (by sidetone gain) with voice downlink when the codec is working in option2 (voice/audio mode). 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>
* | ASoC: TWL4030: Add VDL analog bypassLopez Cruz, Misael2009-05-051-6/+31
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds voice downlink analog bypass switch. It follows the same approach as in other analog bypass switches. DAC switch is moved from 'DAC Voice' to 'Analog Voice Playback Mixer', that will also allow voice DAC to be powered in digital voice loopback (sidetone). 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>
* | ASoC: Use a shared define for AC97 CODEC data formatsMark Brown2009-05-025-12/+12
| | | | | | | | | | | | | | | | | | The AC97 wire format is completely fixed so CODECs don't have any choice about the formats they accept but controllers accept a variety of data formats and render them down onto the bus. Have a shared define so all the CODEC drivers will interoperate with any of our controller drivers. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-2.6.30' into for-2.6.31Mark Brown2009-04-281-1/+7
|\ \ | |/
| * ASoC: TWL4030: Fix gain control for earpiece amplifierJoonyoung Shim2009-04-281-1/+7
| | | | | | | | | | | | | | | | | | The gain control for earpiece amplifier uses 0dB ~ 12dB according to the TRM, but the present code is implemented to -6dB ~ 6dB. 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>
* | ASoC: Staticise TLV values in WM8940Mark Brown2009-04-271-11/+11
| | | | | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | Merge branch 'for-2.6.30' into for-2.6.31Mark Brown2009-04-271-1/+1
|\ \ | |/
| * ASoC: Fix logic in WM8350 master clocking checkMark Brown2009-04-271-1/+1
| | | | | | | | | | | | | | We need to check only if the WM8350 is master and only when starting the stream so if either is not true then we can skip the check. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: cs4270: add Master Playback SwitchDaniel Mack2009-04-271-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new control named 'Master Playback Switch' for cs4270 codecs. It is implemented using the new SOC_DOUBLE_EXT macro to catch the put function and store the information about manually set mute controls from userspace. When a manual mute is set, we don't want the soc core to un-mute the outputs. Renamed cs4270_mute() to cs4270_dai_mute() to avoid confusion. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* | ASoC: cs4270: fix Master Capture Switch polarityDaniel Mack2009-04-271-1/+1
| | | | | | | | | | | | | | | | | | The control modifies the MUTE register, hence the polarity must be inverted. Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-By: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
OpenPOWER on IntegriCloud