summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/wm8753.c
AgeCommit message (Collapse)Author
2010-03-17ccwmx51: Support for the WM8753 audio chipAlejandro Gonzalez
Adding audio support for the WM8753 chip. Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
2009-07-03ASoC: Fix wm8753 register cache size and initializationLars-Peter Clausen
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>
2009-07-03ASoC: Fix register cache initialisation for WM8753Mark Brown
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
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-12sound: remove driver_data direct access of struct deviceGreg Kroah-Hartman
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-03-11ASoC: Merge dai_ops factor outMark Brown
Merge Eric Maio's patch to merge snd_soc_dai_ops out of line. Fixed merge issues and updated drivers, plus an issue with the ops for the two s3c2443 AC97 DAIs having been merged. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-08ASoC: Remove unneeded forward reference to WM8753 SPI implementationMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-04ASoC: make ops a pointer in 'struct snd_soc_dai'Eric Miao
Considering the fact that most cpu_dai or codec_dai are using a same 'snd_soc_dai_ops' for several similar interfaces, 'ops' would be better made a pointer instead, to make sharing easier and code a bit cleaner. The patch below is rather preliminary since the asoc tree is being actively developed, and this touches almost every piece of code, (and possibly many others in development need to be changed as well). Building of all codecs are OK, yet to every SoC, I didn't test that. Signed-off-by: Eric Miao <eric.miao@marvell.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-26ASoC: wm8753 - Fix build errorTakashi Iwai
sound/soc/codecs/wm8753.c: In function 'wm8753_probe': sound/soc/codecs/wm8753.c:1577: error: implicit declaration of function 'wm8753_add_controls' Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-02-24ASoC: Only write back non-default registers when resuming WM8753Mark Brown
This will reduce the number of writes done on resume, allowing that to complete faster (especially on systems with very slow I2C like the current Samsung driver). Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24ASoC: Convert WM8753 to register via normal device probeMark Brown
The base support for the only in-tree user, the GTA01, is out of tree and will be updated separately. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-24ASoC: Shuffle WM8753 device registration codeMark Brown
This patch should be pure code motion, separating that out from the functional changes to move to new style device registration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-22ASoC: Only unregister drivers we registered for WM8753Mark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-22ASoC: Report I/O errors from WM8753 resetMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-18ASoC: Remove version display from the WM8753 driverMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-17ASoC: Fix WM8753 DAIs unregisteringPaul Fertser
WM8753 uses a tricky way to switch DAIs "on the fly", for that it registers 2 dummy DAIs and substitutes them depending on mixer control. List element of registered dummy DAIs should be preserved to allow unregistering of DAIs on module unload. Signed-off-by: Paul Fertser <fercerpav@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-29Merge branch 'for-2.6.29' into for-2.6.30Mark Brown
2009-01-29ASoC: Fix null string usage with WM8753 DAIsMark Brown
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>
2009-01-27ASoC: Push the codec runtime storage into the card structureMark Brown
This is a further stage on the road to refactoring away the ASoC platform device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-19ASoC: fixes to caching implementationsIan Molton
This patch takes fixes a number of bugs in the caching code used by several ASoC codec drivers. Mostly off-by-one fixes. Signed-off-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-01-09ASoC: cleanup duplicated code.Ian Molton
Many codec drivers were implementing cookie-cutter copies of the function that adds kcontrols to the codec. This patch moves this code to a common function snd_soc_add_controls() in soc-core.c and updates all drivers using copies of this function to use the new common version. [Edited to raise priority of error log message and document parameters. -- broonie] Signed-off-by: Ian Molton <ian@mnementh.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2008-12-10ALSA: ASoC - Fix wrong section typesTakashi Iwai
The module init entries should be __init instead of __devinit. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-12-09ASoC: Register non-AC97 codec DAIsMark Brown
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>
2008-12-01ASoC: Rename snd_soc_register_card() to snd_soc_init_card()Mark Brown
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>
2008-11-21ASoC: Merge snd_soc_ops into snd_soc_dai_opsMark Brown
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>
2008-10-13ALSA: ASoC: update email address for Liam GirdwoodLiam Girdwood
Update the contact information for Liam Girdwood in ASoC core and drivers as my old email address is no longer valid. Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: ASoC: Remove unused AUDIO_NAME define from codec driversJarkko Nikula
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-10-13ALSA: ASoC: Add WM8753 SPI supportMark Brown
Implement SPI support for WM8753, cut'n'pasting from the support for WM8731 contributed by Cliff Cai and Alan Horstmann since the wire format is the same for both codecs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-09-09sound: ASoC: Convert wm8753 to a new-style i2c driverJean Delvare
Convert the wm8753 codec driver to the new (standard) i2c device driver binding model. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Frank Mandarino <fmandarino@endrelia.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-10-02ASoC: Set correct name for WM8753 rec mixer outputRob Sims
Rob Sims wrote: "I can't seem to turn on register 0x17, bit 3 in the sound chip, except by codec_reg_write; the mixer lacks direct or indirect control. It seems there are two names for the output of the rec mixer: Capture ST Mixer Playback Mixer Would the following do the trick?" I confirm that this solves the audio problems I was having. Signed-off-by: Jonas Bonn <jonas.bonn@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: ASoC: Fix double free and memory leak in many codec drivers ALSA: CA0106 on MSI K8N Diamond PLUS Motherboard
2008-08-25ALSA: ASoC: Fix double free and memory leak in many codec driversJean Delvare
Many SoC audio codec drivers have improper freeing of memory in error paths. * codec is allocated in the platform device probe function, but is not freed there in case of error. Instead it is freed in the i2c device probe function's error path. However the success or failure of both functions is not linked, so this could result in a double free (if the platform device is successfully probed, the i2c device probing fails and then the platform driver is unregistered.) * codec->private_data is allocated in many platform device probe functions but not freed in their error paths. This patch hopefully solves all these problems. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-10ALSA: asoc: codecs - merge structs snd_soc_codec_dai and snd_soc_cpu_dai.Liam Girdwood
This patch merges struct snd_soc_codec_dai and struct snd_soc_cpu_dai into struct snd_soc_dai for the codec drivers. Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-26ALSA: ASoC: Replace custom debug macros with pr_ equivalentsMark Brown
Several ASoC codec drivers use custom macros equivalent to the standard pr_ macros, most of which are not actually used. Replace these custom macros with the standard ones. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13ALSA: ASoC: Add TLV information to remaining WM8753 controlsMike Montour
Signed-off-by: Mike Montour <mail@mmontour.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-06-13ALSA: ASoC: Fix register cache sizes for Wolfson codecsMark Brown
The register cache size is used by the codec_reg sysfs file which works in terms of the register cache access functions rather than in terms of raw access to the cache so the size specified needs to be in terms of the number of elements. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19[ALSA] soc - Convert Wolfson codec drivers to use bulk DAPM registrationMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-19[ALSA] ASoC: Clarify API for bias configurationMark Brown
Currently the ASoC core configures the bias levels in the system using a callback on codecs and machines called 'dapm_event', passing it PCI style power levels as SNDRV_CTL_POWER_ constants. This is more obscure than it needs to be and has caused confusion to driver authors, especially given that DAPM is also performing power management. Address this by renaming the callback function to 'set_bias_level' and using constants explicitly representing the off, standby, pre-on and on states which DAPM transitions through. Also unexport the API for setting bias level: there are currently no in-tree users of this API other than the core itself and it is likely that the core would need to be extended to cater for any users. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Jarkko Nikula <jarkko.nikula@nokia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-04-30[ALSA] soc - wm8753 - Clean up checkpatch warningsMark Brown
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] soc - Add Invert Switch for ROUT2Graeme Gregory
GTA02 device has a speaker between LOUT2 & ROUT2 and in this mode ROUT2 needs to be inverted. This patch adds a mixer control for this. Signed-off-by: Graeme Gregory <graeme@openmoko.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24[ALSA] soc - Mono voice playback volume for WM8753Mike Montour
Voice playback volume is in register bits 0:2, not 4:6. From: Mike Montour <mail@mmontour.net> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Werner Almesberger <werner@openmoko.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-01-31[ALSA] soc - Initial WM8753 TLV support for capture mixerLiam Girdwood
Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-01-31[ALSA] Remove sound/driver.hTakashi Iwai
This header file exists only for some hacks to adapt alsa-driver tree. It's useless for building in the kernel. Let's move a few lines in it to sound/core.h and remove it. With this patch, sound/driver.h isn't removed but has just a single compile warning to include it. This should be really killed in future. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2007-05-11[ALSA] SoC WM8753 codec supportLiam Girdwood
This patch series adds support for the WM8753 codec as found on the OpenMoko Neo 1973 (other Neo 1973 and Samsung S3C24xx patches to follow today) as well other new devices. Features:- o HiFi and Voice DAI supported (inc runtime switching of DAI mode) o DAPM o All mixers o PLL calculator o 16,20 and 24bit samples. o WM8753 I2C ID added to include/linux/i2c-id.h From: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Harald Welte <laforge@openmoko.org> Signed-off-by: Graeme Gregory <gg@opensource.wolfsonmicro.com> Signed-off-by: Seth Forshee <seth.forshee@gmail.com> Signed-off-by: Liam Girdwood <lg@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>