aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-07-05Merge branch 'devel' of git://git.alsa-project.org/alsa-kernel into topic/miscTakashi Iwai1-1/+1
2010-06-28ALSA: pcm_lib: avoid timing jitter in snd_pcm_read/write()David Dillow1-1/+1
When using poll() to wait for the next period -- or avail_min samples -- one gets a consistent delay for each system call that is usually just a little short of the selected period time. However, When using snd_pcm_read/write(), one gets a jittery delay that alternates between less than a millisecond and approximately two period times. This is caused by snd_pcm_lib_{read,write}1() transferring any available samples to the user's buffer and adjusting the application pointer prior to sleeping to the end of the current period. When the next period interrupt occurs, there is then less than avail_min samples remaining to be transferred in the period, so we end up sleeping until a second period occurs. This is solved by using runtime->twake as the number of samples needed for a wakeup in addition to selecting the proper wait queue to wake in snd_pcm_update_state(). This requires twake to be non-zero when used by snd_pcm_lib_{read,write}1() even if avail_min is zero. Signed-off-by: Dave Dillow <dave@thedillows.org> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-25ASoC: uda134x: replace a macro with a value in platform struct.Vladimir Zapolskiy1-0/+12
This change wipes out a hardcoded macro, which enables codec bias level control. Now is_powered_on_standby value shall be used instead. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31ASoC: Add SND_SOC_DAPM_PRE_POST_PMD eventapatard@mandriva.com1-0/+2
Some systems codecs need to configure some registers before and after powering down some of their part. As a convenience add a macro for that. Signed-off-by: Arnaud Patard <apatard@mandriva.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-31Merge commit 'v2.6.35-rc1' into for-2.6.36Mark Brown6-30/+32
2010-05-31ALSA: pcm: Define G723 3-bit and 5-bit formatsBen Collins2-1/+9
This defines the 24bps and 40bps (8khz sample rate) G.723 codec formats. They are going to be used once I submit the driver for an mpeg4/g723 compression card. I've updated the signed value to -1 as per Takashi's comments since these are non-linear formats. Signed-off-by: Ben Collins <bcollins@bluecherry.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-20Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6Linus Torvalds15-49/+522
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (250 commits) ALSA: hda: Storage class should be before const qualifier ASoC: tpa6130a2: Remove CPVSS and HPVdd supplies ASoC: tpa6130a2: Define output pins with SND_SOC_DAPM_OUTPUT ASoC: sdp4430 - add sdp4430 pcm ops to DAI. ASoC: TWL6040: Enable earphone path in codec ASoC: SDP4430: Add support for Earphone speaker ASoC: SDP4430: Add sdp4430 machine driver ASoC: tlv320dac33: Avoid powering off while in BIAS_OFF ASoC: tlv320dac33: Use dev_dbg in dac33_hard_power function ALSA: sound/pci/asihpi: Use kzalloc ALSA: hdmi - dont fail on extra nodes ALSA: intelhdmi - add id for the CougarPoint chipset ALSA: intelhdmi - user friendly codec name ALSA: intelhdmi - add dependency on SND_DYNAMIC_MINORS ALSA: asihpi: incorrect range check ALSA: asihpi: testing the wrong variable ALSA: es1688: add pedantic range checks ARM: McBSP: Add support for omap4 in McBSP driver ARM: McBSP: Fix request for irq in OMAP4 OMAP: McBSP: Add 32-bit mode support ...
2010-05-20Merge branch 'topic/asoc' into for-linusTakashi Iwai10-21/+485
Conflicts: sound/soc/codecs/ad1938.c
2010-05-20Merge branch 'topic/jack' into for-linusTakashi Iwai1-0/+8
2010-05-20Merge branch 'topic/misc' into for-linusTakashi Iwai3-16/+17
2010-05-16ASoC: Add SOC_DOUBLE_R_SX_TLV controlapatard@mandriva.com1-0/+21
This patch is adding a new control which has the following capabilities: - tlv - variable data size (for instance, 7 ou 8 bit) - double mixer - data range centered around 0 Signed-off-by: Arnaud Patard <apatard@mandriva.com> Acked-by: Liam Girdwood <lrg@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-11ALSA: include/sound/asound.h whitespace fixupsDaniel Mack1-10/+10
This fixes some whitespace/indentation flaws I stumbled over. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-11ASoC: core: Fix for the volume limiting when invert is in usePeter Ujfalusi1-11/+12
If the register for the volume needs invert, than the inversion need to be done from the chip maximum, and not from the platform dependent limit. Introduce soc_mixer_control.platform_max value, which initially equals to chip maximum. The snd_soc_limit_volume function only modify the platform_max, all volsw_info call returns this as well. The .max value holds the chip default (maximum), and it is used for the inversion, if it is needed. Additional check in the volsw_info call has been added to check the validity of the platform_max in case, when custom macros used by codec drivers are not initializing it correctly. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10PM QOS updateMark Gross1-1/+2
This patch changes the string based list management to a handle base implementation to help with the hot path use of pm-qos, it also renames much of the API to use "request" as opposed to "requirement" that was used in the initial implementation. I did this because request more accurately represents what it actually does. Also, I added a string based ABI for users wanting to use a string interface. So if the user writes 0xDDDDDDDD formatted hex it will be accepted by the interface. (someone asked me for it and I don't think it hurts anything.) This patch updates some documentation input I got from Randy. Signed-off-by: markgross <mgross@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2010-05-10ASoC: Allow DAI links to be kept active over suspendMark Brown1-0/+3
As well as allowing DAPM pins to be marked as ignoring suspend allow DAI links to be similarly marked. This is primarily intended for digital links between CODECs and non-CPU devices such as basebands in mobile phones and will suppress all suspend calls for the DAI link. It is likely that this will need to be revisited if used with devices which are part of the SoC CPU. Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10ASoC: Support leaving paths enabled over system suspendMark Brown1-0/+2
Some devices can usefully run audio while the Linux system is suspended. One of the most common examples is smartphone systems, which are normally designed to allow audio to be run between the baseband and the CODEC without passing through the CPU and so can suspend the CPU when on a voice call for additional power savings. Support such systems by providing an API snd_soc_dapm_ignore_suspend(). This can be used to mark DAPM endpoints as not being sensitive to system suspend. When the system is being suspended paths between endpoints which are marked as ignoring suspend will be kept active. Both source and sink must be marked, and there must already be an active path between the two endpoints prior to suspend. When paths are active over suspend the bias management will hold the device bias in the ON state. This is used to avoid suspending the CODEC while it is still in use. Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10ASoC: Remove unused DAPM suspend flagMark Brown1-1/+0
We now manage suspend within the main power analysis rather than by flipping the state of widgets. Tested-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-10ALSA: Merge es1688 and es968 driversKrzysztof Helt1-0/+1
The ESS ES968 chip is nothing more then a PnP companion for a non-PnP audio chip. It was paired with non-PnP ESS' chips: ES688 and ES1688. The ESS' audio chips are handled by the es1688 driver in native mode. The PnP cards are handled by the ES968 driver in SB compatible mode. Move the ES968 chip handling to the es1688 driver so the driver can handle both PnP and non-PnP cards. The es968 is removed. Also, a new PnP id is added for the card I acquired (the change was tested on this card). Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-10ALSA: es1688: allocate snd_es1688 structure as a part of snd_card structureKrzysztof Helt1-5/+5
Allocate the snd_es1688 during the snd_card allocation. This allows to remove the card pointer from the snd_es1688 structure. Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-05-07Revert "ASoC: tpa6130a2: Support for limiting gain"Peter Ujfalusi1-1/+0
This reverts commit 6f3991152f20933b77eff30413e893bf1a15e578. Since core has now support for limiting the volume on controls this patch is not needed. Furthermore, this patch actually prevents the core to set new volume on the TPA. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-07ASoC: core: Support for limiting the volumePeter Ujfalusi1-0/+2
Add support for the core to limit the maximum volume on an existing control. The function will modify the soc_mixer_control.max value of the given control. The new value must be lower than the original one (chip maximum) If there is a need for limiting a gain on a given control, than machine drivers can do the following in their snd_soc_dai_link.init function: snd_soc_limit_volume(codec, "TPA6140A2 Headphone Playback Volume", 21); This will modify the original 31 (chip maximum) to 21, so user space will not be able to set the gain higher than this. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-05-06Merge branch 'for-2.6.35' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into topic/asocTakashi Iwai2-0/+18
2010-05-06ASoC: tpa6130a2: Support for limiting gainPeter Ujfalusi1-0/+1
Add support for platform dependent gain limiting on the tpa6130a2 (and tpa6140a2) Headset amplifier. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-05-06ASoC: tlv320aic3x: Add platform data and reset gpio handlingJarkko Nikula1-0/+17
Handle the reset GPIO within the codec driver in order to follow the startup protocol for the tlv320aic3x codecs. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-30ASoC: Add WM9090 amplifier driverMark Brown1-0/+28
The WM9090 is a high performance low power audio subsystem, including headphone and class D speaker drivers. Note that this driver is a standalone CODEC driver and so is only immediately suitable for use with the WM9090 as a standalone sound card taking line inputs, or with a DAC with no software control. The pending ASoC multi-CODEC support will expand the range of systems that can use the driver, or system-specific adaptations can be made. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-26ASoC: UDA134X: Add UDA1345 CODEC supportVladimir Zapolskiy1-0/+1
This patch adds support for Philips UDA1345 CODEC. The CODEC has only volume control, de-emphasis, mute, DC filtering and power control features. Signed-off-by: Vladimir Zapolskiy <vzapolskiy@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-17ASoC: Add indirection for CODEC private dataMark Brown1-1/+12
One of the features of the multi CODEC work is that it embeds a struct device in the CODEC to provide diagnostics via a sysfs class rather than via the device tree, at which point it's much better to use the struct device private data rather than having two places to store it. Provide an accessor function to allow this change to be made more easily, and update all the CODEC drivers are updated. To ensure use of the accessor the private data structure member is renamed, meaning that if code developed with older an older core that still uses private_data is merged it will fail to build. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-04-16ALSA: Release v1.0.23Jaroslav Kysela1-1/+1
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-04-13ALSA: info - Use standard types for info callbacksTakashi Iwai1-12/+12
Use loff_t, size_t and ssize_t for arguments of info callbacks to follow the standard procfs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-04-07Merge branch 'fix/asoc' into for-linusTakashi Iwai2-1/+18
2010-04-05Merge branch 'for-2.6.34' into for-2.6.35Mark Brown1-1/+1
Conflicts due to context changes next to the backported DMA data change: include/sound/soc.h
2010-04-05ALSA: ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_streamDaniel Mack2-1/+18
This fixes a memory corruption when ASoC devices are used in full-duplex mode. Specifically for pxa-ssp code, where this pointer is dynamically allocated for each direction and destroyed upon each stream start. All other platforms are fixed blindly, I couldn't even compile-test them. Sorry for any breakage I may have caused. [Note that this is a backported version for 2.6.34. Upstream commit is fd23b7dee] Signed-off-by: Daniel Mack <daniel@caiaq.de> Reported-by: Sven Neumann <s.neumann@raumfeld.com> Reported-by: Michael Hirsch <m.hirsch@raumfeld.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-04-04ALSA: i2c: cleanup: change parameter to pointerDan Carpenter1-1/+1
We actually pass an array of 7 chars not 5. This silences a smatch warning. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-03-22ASoC: Add a notifier for jack status changesMark Brown1-0/+6
Some systems provide both mechanical and electrical detection of jack status changes. On such systems power savings can be achieved by only enabling the electrical detection methods when physical insertion has been detected. Begin supporting such systems by providing a notifier for jack status changes which can be used to trigger any reconfiguration. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-19ASoC: move dma_data from snd_soc_dai to snd_soc_pcm_streamDaniel Mack2-1/+18
This fixes a memory corruption when ASoC devices are used in full-duplex mode. Specifically for pxa-ssp code, where this pointer is dynamically allocated for each direction and destroyed upon each stream start. All other platforms are fixed blindly, I couldn't even compile-test them. Sorry for any breakage I may have caused. Reported-by: Sven Neumann <s.neumann@raumfeld.com> Reported-by: Michael Hirsch <m.hirsch@raumfeld.com> Signed-off-by: Daniel Mack <daniel@caiaq.de> Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-19Merge branch 'topic/jack' into for-2.6.35Mark Brown1-0/+8
2010-03-17ALSA: Add support for key reporting via the jack interfaceMark Brown1-0/+8
Some devices provide support for detection of a small number of buttons on their jacks. One common implementation provides a single button, implemented by shorting the microphone to ground and detected along with microphone presence detection by detecting varying current draws on the microphone bias signal. Provide support for up to three buttons via the jack interface. These default to reporting BTN_n but an API is provided to allow these to be remapped to other keys by the machine driver where it knows what the keys are. More keys can be added with ease if required. This is only intended to support simple accessory button designs. If the interface is limiting then either creating a child device for the accessory or accessing the input device in the jack directly is recommended. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-16ASoC: Support GPIO based microphone detection for WM8904Mark Brown1-0/+36
The WM8904 allows microphone detection signals to be brought out as alternate functions of the GPIO signals which can be detected using interrupt inputs on the CPU. Allow this to be configured using platform data. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Allow configuration of WM8904 GPIO pin functionsMark Brown1-2/+72
Provide platform data allowing the configuration of the GPIO pins on the WM8904 to be selected, allowing alternate functions to be enabled. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Implement interrupt driven microphone detection for WM8903Mark Brown1-0/+2
Support use of the WM8903 IRQ for reporting of microphone presence and short detection. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Add WM8903 interrupt supportMark Brown1-0/+2
Currently used to detect completion of the write sequencer. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Initial WM8903 microphone bias and short detectionMark Brown1-0/+29
Provide support for WM8903 microphone presence and short detection using the GPIOs to route out a logic signal suitable for handling using snd_soc_jack_add_gpios() on the processor GPIOs. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Add GPIO configuration support for WM8903Mark Brown1-0/+216
Allow users to pass in a default configuration for the GPIOs of the WM8903 as platform data. This allows configuration of the pin muxing of the device. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Allow pins to be force enabledMark Brown1-0/+3
Allow pins to be forced on regardless of their power state. This is intended for use with microphone bias supplies which need to be enabled in order to support microphone detection - in systems without appropriate hardware leaving the microphone unbiased when not in use saves power. The force done at power check time in order to avoid disrupting other power detection logic. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-16ASoC: Remove unused 'muted' flag from DAPM widgetsMark Brown1-1/+0
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-12ASoC: tlv320dac33: Add option for keeping the BCLK runningPeter Ujfalusi1-0/+1
Platform data option for the codec to keep the BCLK clock continuously running in FIFO modes (codec master). OMAP3 McBSP when in slave mode needs continuous BCLK running on the serial bus in order to operate correctly. Since in FIFO mode the DAC33 can also shut down the BCLK clock and enable it only when it is needed, let the platforms decide if the CPU side needs the BCLK running or not. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-03-10Merge commit 'v2.6.34-rc1' into for-2.6.35Mark Brown7-6/+64
2010-03-08Merge branch 'topic/misc' into for-linusTakashi Iwai1-1/+1
2010-03-05ASoC: Remove unused pmdown_time flagMark Brown1-1/+0
The flag is no longer used in the code so it just wastes a bit. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-03-03ALSA: timer - pass real event in snd_timer_notify1() to instance callbackJaroslav Kysela1-1/+1
Do not use hardcoded SNDRV_TIMER_EVENT_START value. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>