summaryrefslogtreecommitdiff
path: root/include/sound
AgeCommit message (Collapse)AuthorFilesLines
2013-11-07ALSA: compress: fix drain calls blocking other compress functions (v6)Vinod Koul1-7/+4
The drain and drain_notify callback were blocked by low level driver until the draining was complete. Due to this being invoked with big fat mutex held, others ops like reading timestamp, calling pause, drop were blocked. So to fix this we add a new snd_compr_drain_notify() API. This would be required to be invoked by low level driver when drain or partial drain has been completed by the DSP. Thus we make the drain and partial_drain callback as non blocking and driver returns immediately after notifying DSP. The waiting is done while releasing the lock so that other ops can go ahead. [ The commit 917f4b5cba78 was wrongly applied from the preliminary patch. This commit corrects to the final version. Sorry for inconvenience! -- tiwai ] Signed-off-by: Vinod Koul <vinod.koul@intel.com> CC: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-11-04Merge tag 'asoc-v3.13-2' of ↵Takashi Iwai1-0/+2
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Final updates for v3.13 A few final updates for v3.13, all driver updates apart from some DPCM and Coverity fixes which should have minor impact on practical systems.
2013-11-04Merge remote-tracking branch 'asoc/topic/cs42l52' into asoc-nextMark Brown1-0/+2
2013-10-29ALSA: ak4114: Fix wrong register array sizeTakashi Iwai1-2/+2
The size of the register cache array is actually 6 instead of 7, as it caches up to AK4114_REG_INT1_MASK. This resulted in unexpected access out of array range, although most of them aren't so serious (just reading one more byte on the stack at snd_ak4114_create()). Also, the check of cache size was wrongly done by checking with sizeof() instead of ARRAY_SIZE(). Fixed this together. (And yes, hardcoded numbers are bad, but I keep the coding style as is for making it clear what this patch actually does.) Spotted by coverity among several CIDs, e.g. 711621. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-25ASoC: cs42l52: Add platform data for reset gpioBrian Austin1-0/+2
This patch adds platform data support for a reset GPIO. Also uses reset_gpio to toggle reset of the CODEC Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-25Merge tag 'asoc-v3.13' of ↵Takashi Iwai6-69/+84
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.13 - Further work on the dmaengine helpers, including support for configuring the parameters for DMA by reading the capabilities of the DMA controller which removes some guesswork and magic numbers fromm drivers. - A refresh of the documentation. - Conversions of many drivers to direct regmap API usage in order to allow the ASoC level register I/O code to be removed, this will hopefully be completed by v3.14. - Support for using async register I/O in DAPM, reducing the time taken to implement power transitions on systems that support it.
2013-10-24ALSA: compress: fix drain calls blocking other compress functionsVinod Koul1-0/+12
The drain and drain_notify callback were blocked by low level driver untill the draining was complete. Due to this being invoked with big fat mutex held, others ops like reading timestamp, calling pause, drop were blocked. So to fix this we add a new snd_compr_drain_notify() API. This would be required to be invoked by low level driver when drain or partial drain has been completed by the DSP. Thus we make the drain and partial_drain callback as non blocking and driver returns immediately after notifying DSP. The waiting is done while relasing the lock so that other ops can go ahead. Signed-off-by: Vinod Koul <vinod.koul@intel.com> CC: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-24ALSA: Add ifdef CONFIG_GENERIC_ALLOCATOR for SNDRV_DMA_TYPE_IRAM codeTakashi Iwai1-0/+4
It turned out that we can't use gen_pool_*() functions on archs without CONFIG_GENERIC_ALLOCATOR (resulting in missing symbols), since linux/genalloc.h doesn't provide dummy functions for all. We'd be able to fix linux/genalloc.h size, but I take an easier path for now... Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-24Merge remote-tracking branch 'asoc/topic/rcar' into asoc-nextMark Brown1-1/+0
2013-10-24Merge remote-tracking branch 'asoc/topic/mxs' into asoc-nextMark Brown1-0/+7
2013-10-24Merge remote-tracking branch 'asoc/topic/dma' into asoc-nextMark Brown2-0/+15
2013-10-24Merge remote-tracking branch 'asoc/topic/devm' into asoc-nextMark Brown1-0/+4
2013-10-24Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown2-1/+6
2013-10-24Merge remote-tracking branch 'asoc/topic/cs42l73' into asoc-nextMark Brown1-0/+22
2013-10-24Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-57/+3
2013-10-24Merge remote-tracking branch 'asoc/topic/component' into asoc-nextMark Brown1-14/+27
2013-10-24Merge remote-tracking branch 'asoc/topic/bclk' into asoc-nextMark Brown1-0/+3
2013-10-24ASoC: dmaengine: Support custom channel namesMark Brown1-0/+6
Some devices have more than just simple TX and RX DMA channels, for example modern Samsung I2S IPs support a secondary transmit DMA stream which is mixed into the primary stream during playback. Allow such devices to specify the names of the channels to be requested in their dma_data. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de>
2013-10-24ALSA: Add SoC on-chip internal ram support for DMA buffer allocationNicolin Chen1-0/+1
Now it's quite common that an SoC contains its on-chip internal RAM. By using this RAM space for DMA buffer during audio playback/record, we can shutdown the voltage for external RAM to save power. So add new DEV type with iram malloc()/free() and accordingly modify current default mmap() for the iram circumstance. Signed-off-by: Nicolin Chen <b42378@freescale.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2013-10-20ASoC: rcar: add rsnd_scu_hpbif_is_enable()Kuninori Morimoto1-1/+0
Current SSI needs RSND_SSI_DEPENDENT flag to decide dependent/independent mode. And SCU needs RSND_SCU_USE_HPBIF flag to decide HPBIF is enable/disable. But these 2 means same things. This patch adds new rsnd_scu_hpbif_is_enable() function, and merges above methods. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20ASoC: dai: Provide interface for setting DMA data at probe timeMark Brown1-0/+7
Allow DMA data to be set at probe time for devices that can do that, avoiding the need to do it every time we start a stream and supporting non-DT dmaengine users using the helpers. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-20ASoC: dmaengine-pcm: Add support for querying DMA capabilitiesLars-Peter Clausen1-0/+2
Currently each platform making use the the generic dmaengine PCM driver still needs to provide a custom snd_pcm_hardware struct which specifies the capabilities of the DMA controller, e.g. the maximum period size that can be supported. This patch adds code which uses the newly introduced dma_get_slave_caps() API to query this information from the dmaengine driver. The new code path will only be taken if the 'pcm_hardware' field of the snd_dmaengine_pcm_config struct is NULL. The patch also introduces a new 'fifo_size' field to the snd_dmaengine_dai_dma_data struct which is used to initialize the snd_pcm_hardware 'fifo_size' field and needs to be set by the DAI driver. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18ASoC: add snd_soc_of_get_dai_name() default of_xlateKuninori Morimoto1-1/+3
Current snd_soc_of_get_dai_name() needs .of_xlate_dai_name() callback on each component drivers. But required behavior on almost all these drivers is just returns its indexed driver's name. This patch adds this feature as default behavior. .of_xlate_dai_name() can overwrite it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-18ASoC: cs42l73: Add platform data support for cs42l73 codecBrian Austin1-0/+22
Add support for RST GPIO and Charge Pump Freq in platform data Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-14ASoC: snd_soc_dai_ops trigger function descriptionMarkus Pargmann1-0/+7
Add a comment to the trigger function in snd_soc_dai_ops struct about possible command sequences. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-11ASoC: rcar: fixup generation checkerKuninori Morimoto1-0/+1
Current rcar is using rsnd_is_gen1/gen2() to checking its IP generation, but it needs data mask. This patch fixes it up. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-10-07ASoC: dapm: Add support for virtual mixer controlsLars-Peter Clausen2-1/+6
This patch adds support for virtual DAPM mixer controls. They are similar to virtual DAPM enums. There is no hardware register backing the control, so changing the control's value wont have any direct effect on the hardware. But it still influences the DAPM graph by causing the path it sits on to be connected or disconnected. This in turn can cause power changes for some of the widgets on the DAPM graph, which will then modify the hardware state. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17Merge remote-tracking branch 'asoc/topic/component' into asoc-coreMark Brown1-14/+27
Conflicts: include/sound/soc.h
2013-09-17ASoC: add .of_xlate_dai_name on snd_soc_component_driverKuninori Morimoto1-0/+8
ASoC sound driver requires CPU/CODEC drivers for probing, and each CPU/CODEC has some DAI on it. Then, "dai name matching" have been used to identify CPU-CODEC DAI pair on ASoC. But, the "dai port number matching" is now required from DeviceTree. The solution of this issue is to replace the dai port number into dai name. Now, CPU/CODEC are based on struct snd_soc_component, and it can care above as common issue. This patch adds .of_xlate_dai_name callback interface on struct snd_soc_component_driver, and snd_soc_of_get_dai_name() which is using .of_xlate_dai_name. Then, #sound-dai-cells which enables DAI specifier is required on CPU/CODEC device tree properties. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: snd_soc_codec includes snd_soc_componentKuninori Morimoto1-14/+19
Codec includes component by this patch, and component moved to upside of codec to avoid extra declaration. Codec dai will be registered via component by this patch. Current component register function is used for cpu, and it is using dai/dais functions properly to keep existing cpu dai name. And now, it will be used from codec also. But codec driver had been used dais function only even though it was single dai. This patch adds new flag which can selects dai/dais function on component register function to keep existing codec dai name. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: core: Add API for configuration of DAI BCLK ratioLiam Girdwood1-0/+3
Some codec drivers when running in slave mode require that BCLK to sample rate ratio is explicitly set by the machine driver as it may not be exactly rate * frame size. Extend the DAI API by adding :- int snd_soc_dai_set_bclk_ratio(struct snd_soc_dai *dai, unsigned int ratio); Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: core: Add devm_snd_soc_register_card()Mark Brown1-0/+1
Simplify error handling and remove repetitive (and rarely executed) code for unregistration by providing a devm_snd_soc_register() card. Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2013-09-17ASoC: core: Implement devm_snd_soc_register_component()Mark Brown1-0/+3
Since with the wider use of devres many drivers are now only calling snd_soc_unregister_component() in their remove functions providing a managed version will save a reasonable amount of code. Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: Remove infrastructure for supporting multiple cache typesLars-Peter Clausen1-27/+0
The only cache type left is the flat cache and new other cache types won't be added since new drivers are supposed to use regmap directly for IO and caching. This patch removes the snd_soc_cache_ops indirection that was added to support multiple cache types and modifies the code to always use the flat cache directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: Remove 'reg_size' field from snd_soc_codec structLars-Peter Clausen1-1/+0
The reg_size field is calculated in snd_soc_register_codec() and then used exactly once in snd_soc_flat_cache_init(). Since it is calculated based on other fields from the codec struct just move the calculation to snd_soc_flat_cache_init() and remove the 'reg_size' field from the codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: Remove reg_def_copyLars-Peter Clausen1-1/+0
reg_def_copy was introduced in commit 3335ddca ("ASoC: soc-cache: Use reg_def_copy instead of reg_cache_default") to keep a copy of the register defaults around in case the register defaults where placed in the __devinitdata section. With the __devinitdata section gone we effectivly keep the same data around twice. This patch removes reg_def_copy and uses reg_cache_default directly instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: Remove snd_soc_bulk_write_raw()Lars-Peter Clausen1-3/+0
No users of snd_soc_bulk_write_raw() are left and new drivers are going to use regmap directly for this, so the function can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-17ASoC: Remove support for reg_access_defaultsLars-Peter Clausen1-24/+0
No users of reg_access_defaults are left and new drivers are going to use regmap for this, so support for it can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-12Merge tag 'sound-3.12' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "A few last-minute fixes for 3.12-rc1. All patches are driver specific. - HD-audio fixes: MacBook 6,1/6,2 speaker fix, ASUS TX300 dock speaker fix, Toshiba Satellite irq fix, Haswell HDMI audio cleanups) - ASoC fixes: atmel irq fix, fsl DT fix, mc13783 spi fix, kirkwood compatible string change, etc" * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ASoC: mc13783: add spi errata fix ASoC: rsnd: fixup flag name of rsnd_scu_platform_info ALSA: hda - Add CS4208 codec support for MacBook 6,1 and 6,2 ALSA: hda - Add Toshiba Satellite C870 to MSI blacklist ASoC: fsl_spdif: Select regmap-mmio ALSA: hda - unmute pin amplifier in infoframe setup for Haswell ALSA: hda - define is_haswell() to check if a display audio codec is Haswell ALSA: hda - Add dock speaker support for ASUS TX300 ASoC: kirkwood: change the compatible string of the kirkwood-i2s driver ASoC: atmel: disable error interrupt ASoC: fsl: imx-audmux: Do not call imx_audmux_parse_dt_defaults() on non-dt kernel
2013-09-09ASoC: rsnd: fixup flag name of rsnd_scu_platform_infoKuninori Morimoto1-1/+1
it should be *USE*, not *USB* Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-05Merge branch 'v4l_for_linus' of ↵Linus Torvalds1-78/+0
git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: "This series contains: - Exynos s5p-mfc driver got support for VP8 encoder - Some SoC drivers gained support for asynchronous registration (needed for DT) - The RC subsystem gained support for RC activity LED; - New drivers added: a video decoder(adv7842), a video encoder (adv7511), a new GSPCA driver (stk1135) and support for Renesas R-Car (vsp1) - the first SDR kernel driver: mirics msi3101. Due to some troubles with the driver, and because the API is still under discussion, it will be merged at staging for 3.12. Need to rework on it - usual new boards additions, fixes, cleanups and driver improvements" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (242 commits) [media] cx88: Fix regression: CX88_AUDIO_WM8775 can't be 0 [media] exynos4-is: Fix entity unregistration on error path [media] exynos-gsc: Register v4l2 device [media] exynos4-is: Fix fimc-lite bayer formats [media] em28xx: fix assignment of the eeprom data [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe() [media] usbtv: Throw corrupted frames away [media] usbtv: Fix deinterlacing [media] v4l2: added missing mutex.h include to v4l2-ctrls.h [media] DocBook: upgrade media_api DocBook version to 4.2 [media] ml86v7667: fix compile warning: 'ret' set but not used [media] s5p-g2d: Fix registration failure [media] media: coda: Fix DT driver data pointer for i.MX27 [media] s5p-mfc: Fix input/output format reporting [media] v4l: vsp1: Fix mutex double lock at streamon time [media] v4l: vsp1: Add support for RT clock [media] v4l: vsp1: Initialize media device bus_info field [media] davinci: vpif_capture: fix error return code in vpif_probe() [media] davinci: vpif_display: fix error return code in vpif_probe() [media] MAINTAINERS: add entries for adv7511 and adv7842 ...
2013-09-02Merge remote-tracking branch 'asoc/topic/fsl' into tmpMark Brown1-0/+4
2013-09-02Merge remote-tracking branch 'asoc/topic/core' into tmpMark Brown1-4/+0
2013-09-01ASoC: soc-pcm: Allow to specify unidirectional dai_linkFabio Estevam1-0/+4
Add 'playback_only' and 'capture_only' fields that can be used for specifying that a dai_link has a unidirectional capability. The motivation for this is for the cases of systems, such as Freescale MX28, that has two unidirectional DAIs. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-31ASoC: Remove unused sysfs_registered field from snd_soc_codec structLars-Peter Clausen1-1/+0
The sysfs_registered field was added to the snd_soc_codec struct in commit f0fba2ad ("ASoC: multi-component - ASoC Multi-Component Support"), but has never been used. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-31ASoC: Remove unused debugfs_dapm field from snd_soc_{platform,codec} structLars-Peter Clausen1-2/+0
The DAPM context struct has its own field where it stores the pointer to the DAPM debugfs entry. The debugfs_dapm field in the snd_soc_platform and snd_soc_codec structs are completely unused and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-31ASoC: Remove unused control_type field from snd_soc_codec structLars-Peter Clausen1-1/+0
The control_type field was used by the core to track which raw IO methods to use, but when switching to regmap this was no longer necessary and so the last user of the field was removed in commit be3ea3b9 ("ASoC: Use new register map API for ASoC generic physical I/O"). The field is now completely unused and can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-30Merge remote-tracking branch 'asoc/topic/core' into tmpMark Brown1-1/+1
2013-08-27ASoC: Pass card instead of dapm context to snd_soc_dapm_new_widgets()Lars-Peter Clausen1-1/+1
snd_soc_dapm_new_widgets() works on the ASoC card as a whole not on a specific DAPM context. The DAPM context that is passed as the parameter is only used to look up the pointer to the card. This patch updates the signature of snd_soc_dapm_new_widgets() to take the card directly. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-27Merge remote-tracking branch 'asoc/topic/dapm' into asoc-coreMark Brown3-95/+135