aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs/uda1380.c
AgeCommit message (Collapse)Author
2010-03-06bitops: rename for_each_bit() to for_each_set_bit()Akinobu Mita
Rename for_each_bit to for_each_set_bit in the kernel source tree. To permit for_each_clear_bit(), should that ever be added. The patch includes a macro to map the old for_each_bit() onto the new for_each_set_bit(). This is a (very) temporary thing to ease the migration. [akpm@linux-foundation.org: add temporary for_each_bit()] Suggested-by: Alexey Dobriyan <adobriyan@gmail.com> Suggested-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Artem Bityutskiy <dedekind@infradead.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-11-12ASoC: Remove redundant snd_soc_dapm_new_widgets() callsMark Brown
The DAPM widgets are now insntantiated by the core when creating the card so there is no need for the individual CODEC drivers to do so. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-11-03ASoC: Factor out snd_soc_init_card()Mark Brown
snd_soc_init_card() is always called as the last part of the CODEC probe function so we can factor it out into the core card setup rather than have each CODEC replicate the code to do the initialiastation. This will be required to support multiple CODECs per card. 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-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-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-03-03ASoC: UDA1380: DATAI is slave onlyPhilipp Zabel
Only allow SND_SOC_DAIFMT_CBS_CFS for the playback DAI. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-03ASoC: UDA1380: change decimator/interpolator register handlingPhilipp Zabel
If the UDA1380's interpolator or decimator are set to be clocked from the WSPLL (which syncs to the WSI signal), the DAI link must be running to change the interpolator/decimator registers (which include volume controls and digital mute setting). * Queue work in the alsa PCM_START .trigger to flush registers as soon as the link is running. This replaces the .prepare and .digital_mute callbacks. * Use the SILENCE override instead of MTM for muting and remove its alsa control to avoid confusion. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-03-03ASoC: Remove version display from the UDA1380 driverPhilipp Zabel
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-04ASoC: uda1380: split set_dai_fmt into _both, _playback and _capture variantsPhilipp Zabel
This patch splits set_dai_fmt into three variants (single interface, dual interface playback only, dual interface capture only) so that data input and output formats can be configured separately for dual interface setups. Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Tested-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2009-02-03ASoC: Don't unconditionally use the PLL in UDA1380Vasily Khoruzhick
Without this fix driver switches to WSPLL in uda1380_pcm_prepare even if SYSCLK was chosen (uda1380_pcm_prepare modifies UDA1380_CLK register to disable R00_DAC_CLK before flushing reg cache) Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> 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-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: 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-09-04ALSA: ASoC: Don't suggest compile time selection of codec accessMark Brown
Currently the boiler plate code used by most ASoC codecs to provide a placeholder for SPI access suggests making the selection of SPI a compile time option which is suboptimal when trying to build kernels supporting multiple systems. Change this template to suggest allowing runtime selection instead. Leave the drivers not yet converted to new style I2C access for now to avoid collisions. 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-09-04ALSA: ASoC: Convert uda1380 to a new-style i2c driverJean Delvare
Convert the uda1380 codec driver to the new (standard) device driver binding model. 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> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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-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-13ALSA: ASoC: Fix register cache size for UDA1380Mark 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> Cc: Philipp Zabel <philipp.zabel@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-05-29[ALSA] ASoC: Add UDA1380 driverPhilipp Zabel
The UDA1380 codec is used by the HTC Magician and a number of Samsung reference boards. This driver has had a long out of tree history, having originally been written by Giorgio Padrin and converted to ASoC by Richard Purdie. Since conversion to ASoC most of the work on the driver has been done by Philipp Zabel with some review and updates for new APIs by Liam Girdwood and Mark Brown. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> 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>