aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-07-10ALSA: Provide a CLOCK_MONOTONIC_RAW timestamp typeMark Brown1-2/+9
For applications which need to synchronise with external timebases such as broadcast TV applications the kernel monotonic time is not optimal as it includes adjustments from NTP and so may still include discontinuities due to that. A raw monotonic time which does not include any adjustments is available in the kernel from getrawmonotonic() so provide userspace with a new timestamp type SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW which provides timestamps based on this as an option. [dropped tstamp_type assignment code, as it's no longer needed -- tiwai] Reported-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-07-07ASoC: add SOC_VALUE_ENUM_EXTRichard Fitzgerald1-0/+2
Adds an equivalent of SOC_ENUM_EXT for value enums Strictly speaking SOC_ENUM_EXT can also be used to define a value enum since the only difference is the get and set functions. But this doesn't look good in code because it is inconsistent with the normal control definitions. Adding a specific SOC_VALUE_ENUM_EXT is better for code clarity. Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-04ASoC: add RT286 CODEC driverBard Liao1-0/+19
This patch adds Realtek ALC286 codec driver. ALC286 is a dual mode codec, which can run as HD-A or I2S mode. It is controlled by HD-A verb commands via I2C protocol. The following is the I/O difference between ALC286 and general I2S codecs. 1. A HD-A verb command contains three parts, NID, VID, and PID. And an I2S command contains only two parts: address and data. 2. Not only the register address is written, but the read command also includes the entire write command. 3. rt286 uses different registers for read and write the same bits. We map verb command to regmap structure. However, we read most registers from cache to prevent the asymmetry read/write issue in rt286. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Gustaw Lewandowski <gustaw.lewandowski@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-07-02ASoC: add RT5670 CODEC driverBard Liao1-0/+27
This patch adds a minimum support of Realtek ALC5670 codec. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-28ASoC: rsnd: SSI + DMA can select BUSIFKuninori Morimoto1-0/+1
Sound data needs to be sent to R-Car sound SSI when playback. But, there are 2 interfaces for it. 1st is SSITDR/SSIRDR which are mapped on SSI. 2nd is SSIn_BUSIF which are mapped on SSIU. 2nd SSIn_BUSIF is used when DMA transfer, and it is always used if sound data came from via SRC. But, we can use it when SSI+DMA case too. (Current driver is assuming 1st SSITDR/SSIRDR for it) 2nd SSIn_BUSIF can be used as FIFO. This is very helpful/useful for SSI+DMA. But DMA address / DMA ID are not same between 1st/2nd cases. This patch care about these settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: dapm: Remove platform field from widget and dapm context structLars-Peter Clausen1-2/+0
The platform field in the snd_soc_dapm_widget and snd_soc_dapm_context structs is now unused can be removed. New code that wants to get the platform for a widget or dapm context should use snd_soc_dapm_to_platform(w->dapm) or snd_soc_dapm_to_platform(dapm). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: dapm: Remove DAI DAPM contextLars-Peter Clausen1-1/+0
The DAI DAPM context was added in commit be09ad90 ("ASoC: core: Add platform DAI widget mapping") and the only user was removed again in commit ae10e7e8f ("ASoC: core: Only add platform DAI widgets once."). Now that we have a per component DAPM context it is unlikely that we'll need the DAI DAPM context again. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Add component level stream_event() and seq_notifier() supportLars-Peter Clausen1-6/+3
This patch adds stream_event() and seq_notifier() callbacks similar to those found in the snd_soc_codec_driver and snd_soc_platform driver struct to the snd_soc_component_driver struct. This is meant to unify the handling of these callbacks across different types of components and will eventually allow their removal from the CODEC and platfrom driver structs. The new callbacks are slightly different from the old ones in that they take a snd_soc_component as a parameter rather than a snd_soc_dapm_context. This was done since otherwise casting from the DAPM context to the component would typically be the first thing to do in the callback. And the interface becomes slightly cleaner by passing a snd_soc_component to all callbacks in the snd_soc_component_driver struct. The patch also already removes the stream_event() callback from the snd_soc_codec_driver and snd_soc_platform_driver structs as it is currently unused. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Use component DAPM context for platformsLars-Peter Clausen1-3/+1
The snd_soc_platform dapm field is not accessed outside of the ASoC core. Switch it over to using the snd_soc_component DAPM context. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Add DAPM support at the component levelLars-Peter Clausen2-0/+32
This patch adds full DAPM support at the component level. Previously there was only full DAPM support for CODECs and partial DAPM support (e.g. no Mixers nor MUXs) for platforms. Having DAPM support at the component level will allow all types of components to use DAPM and also help in consolidating the DAPM support between CODECs and platforms. Since the DAPM context is directly embedded into the snd_soc_codec and snd_soc_platform struct and the 'dapm' field is directly referenced in a lot of drivers moving the field just right now is not possible without causing code churn. The approach this patch takes is to add two new fields to the component struct. One field which is the pointer to the actual DAPM context used by the component and one DAPM context that will be used as the default if no other context was specified. For CODECs and platforms the pointer is initialized to point to the CODEC or platform DAPM context. All generic code when referencing a component's DAPM struct will go via the pointer. This will make it possible to eventually seamlessly move the DAPM context from snd_soc_codec and snd_soc_platform struct over once all direct references have been eliminated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Add a set_bias_level() callback to the DAPM context structLars-Peter Clausen1-0/+2
Currently the DAPM code directly looks at the CODEC driver struct to get a handle to the set_bias_level() callback. This patch adds a new set_bias_level() callback to the DAPM context struct. The DAPM code will use this new callback instead of the CODEC callback. For CODECs the new callback is set up to call the CODEC specific set_bias_level callback(). Not looking directly at the CODEC driver struct will allow non CODEC DAPM contexts to implement a set_bias_level() callback. This is also similar to how the seq_notifier() and stream_event() callbacks are currently handled. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Auto disconnect pins from all DAPM contextsLars-Peter Clausen1-1/+1
Currently only pins in CODEC DAPM contexts are automatically marked as non-connected if the card has the fully_routed flag set. This makes sense since widgets which qualify for auto-disconnection are only found in CODEC DAPM contexts. But with componentisation this is going to change, so consider all widgets for auto-disconnection. Also it is probably faster to walk the widgets list only once rather than once for each CODEC. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Move name and id from CODEC/platform to componentLars-Peter Clausen1-4/+0
The component struct already has a name and id field which are initialized to the same values as the same fields in the CODEC and platform structs. So remove them from the CODEC and platform structs and used the ones from the component struct instead. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-21ASoC: Move name_prefix from CODEC to componentLars-Peter Clausen1-1/+1
Move the name_prefix from the CODEC struct to the component struct. This will eventually allow to specify prefixes for all types of components. It is also necessary to make the DAPM code component type independent (i.e. a DAPM context does not need to know whether it belongs to a CODEC or a platform or something else). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-18ALSA: control: Protect user controls against concurrent accessLars-Peter Clausen1-0/+2
The user-control put and get handlers as well as the tlv do not protect against concurrent access from multiple threads. Since the state of the control is not updated atomically it is possible that either two write operations or a write and a read operation race against each other. Both can lead to arbitrary memory disclosure. This patch introduces a new lock that protects user-controls from concurrent access. Since applications typically access controls sequentially than in parallel a single lock per card should be fine. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-12ALSA: core: Use ktime_get_ts()Thomas Gleixner1-1/+1
do_posix_clock_monotonic_gettime() is a leftover from the initial posix timer implementation which maps to ktime_get_ts(). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-06-03Merge tag 'asoc-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai3-2/+98
ASoC: Final updates for v3.16 A few more updates from the last week of development, nothing too exciting. Highlights include: - GPIO descriptor support for jacks - More updates and fixes to the Freescale SSI, Intel and rsnd drivers. - New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and ADAU1781, and Realtek RT5677.
2014-06-03Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' into asoc-nextMark Brown1-0/+21
2014-06-03Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc-nextMark Brown1-0/+30
2014-06-03Merge remote-tracking branches 'asoc/topic/gpio' and 'asoc/topic/intel' into asoc-nextMark Brown1-2/+20
2014-06-03Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown1-0/+27
2014-06-01ASoC: add RT5677 CODEC driverOder Chiou1-0/+21
This patch adds the Realtek ALC5677 codec driver. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-06-01Merge branches 'topic/rt5640', 'topic/rt5645' and 'topic/rt5651' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-rl6231Mark Brown2-0/+46
2014-06-01ASoC: Add helper functions to cast from DAPM context to CODEC/platformLars-Peter Clausen1-0/+27
This is useful if we have a pointer to a DAPM context and know that it is a CODEC or platform DAPM context and want to get a pointer to the CODEC or platform. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27ASoC: jack: Fix multiple definition of `snd_soc_jack_add_gpiods'Jarkko Nikula1-3/+4
Commit f025d3b9c64e ("ASoC: jack: Add support for GPIO descriptor defined jack pins") caused build error when CONFIG_GPIOLIB is not set: sound/include/sound/soc.h:470: multiple definition of `snd_soc_jack_add_gpiods' sound/soc/soc-core.o:sound/include/sound/soc.h:470: first defined here make[2]: *** [sound/soc/snd-soc-core.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [sound/soc] Error 2 make: *** [sound] Error 2 Fix this by marking snd_soc_jack_add_gpiods() as static inline in soc.h. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-27ASoC: jack: Clarify GPIO descriptor lookup in struct snd_soc_jack_gpio docJarkko Nikula1-2/+4
Clarify struct snd_soc_jack_gpio documentation for the idx and name fields. Because name is passed as connection ID to gpiod_get_index() when using GPIO descriptor defined jack pins it is not only used as a label in debugfs but also as function name lookup in systems that support functions names for GPIOs. Clarify also idx since the index is within the function of the GPIO consumer device and not within the device itself only. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: omap-pcm: Move omap-pcm under include/soundJyri Sarha1-0/+30
Make including the omap-pcm.h outside sound/soc/omap more convenient. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: jack: Add support for GPIO descriptor defined jack pinsJarkko Nikula1-1/+15
Allow jack GPIO pins be defined also using GPIO descriptor-based interface in addition to legacy GPIO numbers. This is done by adding two new fields to struct snd_soc_jack_gpio: idx and gpiod_dev. Legacy GPIO numbers are used only when GPIO consumer device gpiod_dev is NULL and otherwise idx is the descriptor index within the GPIO consumer device. New function snd_soc_jack_add_gpiods() is added for typical cases where all GPIO descriptor jack pins belong to same GPIO consumer device. For other cases the caller must set the gpiod_dev in struct snd_soc_jack_gpio before calling snd_soc_jack_add_gpios(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-26ASoC: jack: Basic GPIO descriptor conversionJarkko Nikula1-0/+1
This patch does basic GPIO descriptor conversion to soc-jack. Even the GPIOs are still passed and requested using legacy GPIO numbers the driver internals are converted to use GPIO descriptor API. Motivation for this is to prepare soc-jack so that it will allow registering jack GPIO pins using both GPIO descriptors and legacy GPIO numbers. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-23ALSA: Remove deprecated snd_card_create()Takashi Iwai1-7/+0
Now all calls have been fixed, let's get rid of the old definition. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-05-22Merge tag 'asoc-v3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-nextTakashi Iwai9-72/+292
ASoC: Updates for v3.16 Lots of cleanup work going on in the core this release but very little visible to external users except for the new drivers that have been added. - Support for specifying aux CODECs in DT. - Removal of the deprecated mux and enum macros. - More moves towards full componentisation. - Removal of some unused I/O code. - Lots of cleanups, fixes and enhancements to the davinci, Freescale, Haswell and Realtek drivers. - Several drivers exposed directly in Kconfig for use with simple-card. - New drivers for Cirrus CS42L56, Realtek RT5639, RT5642 and RT5651 and ST STA350.
2014-05-22Merge remote-tracking branches 'asoc/topic/rt5651', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sta350' and 'asoc/topic/tlv320dac33' into asoc-nextMark Brown2-1/+8
2014-05-22Merge remote-tracking branches 'asoc/topic/nuc900', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/rt5640' and 'asoc/topic/rt5645' into asoc-nextMark Brown4-19/+63
2014-05-22Merge remote-tracking branches 'asoc/topic/cs42l56', 'asoc/topic/cs42xx8' and 'asoc/topic/davinci' into asoc-nextMark Brown2-0/+50
2014-05-22Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown2-14/+0
2014-05-22Merge remote-tracking branch 'asoc/topic/dt' into asoc-nextMark Brown1-1/+12
2014-05-22Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown1-5/+2
2014-05-13ASoC: rsnd: add DVC supportKuninori Morimoto1-0/+10
This patch adds DVC (Digital Volume Controller) support which is member of CMD unit. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: Remove runtime field from DAILars-Peter Clausen1-1/+0
This was initially removed in commit 6423c1875 ("ASoC: Remove runtime field from DAI"), but was, presumably by accident, brought back in commit f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support"). But has never been initialized to anything but NULL ever since. This commit removes it again. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-12ASoC: dapm: Handle SND_SOC_DAPM_REG() genericallyLars-Peter Clausen1-5/+2
Commit commit de9ba98b6d ("ASoC: dapm: Make widget power register settings more flexible") added generic support for on_val/off_val in the DAPM core. With this in place there is no need anymore for having a special event callback for SND_SOC_DAPM_REG() widgets. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-08ASoC: rsnd: remove compatibility codeKuninori Morimoto1-19/+3
Now, all platform is using new style rsnd_dai_platform_info. Keeping compatibility is no longer needed. We can cleanup code. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07ASoC: Remove unused num_dai field from CODECLars-Peter Clausen1-1/+0
Commit d191bd8de8 ("ASoC: snd_soc_codec includes snd_soc_component") removed the last user of the num_dai field. Also remove the field itself. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07ASoC: Remove unused 'list' field form cardLars-Peter Clausen1-1/+0
The global card list was removed in commit b19e6e7b7 ("ASoC: core: Use driver core probe deferral"). The 'list' field of the snd_soc_card struct has been unused since then. This patch removes the field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07ASoC: Remove card's DAI listLars-Peter Clausen2-3/+0
Commit f0fba2ad1 ("ASoC: multi-component - ASoC Multi-Component Support") added a per card list that keeps track of all the DAIs that have been registered with the card, but the list has never been used. This patch removes it again. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-07Merge branch 'topic/component' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-coreMark Brown3-10/+97
2014-05-05ASoC: Add support for CS42L56 CODECBrian Austin1-0/+48
This patch adds support for the Cirrus Logic Low Power Stereo I2C CODEC Signed-off-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-05ASoC: sta350: add support for bits in miscellaneous registersDaniel Mack1-0/+5
Add support for RPDNEN, NSHHPEN, BRIDGOFF, CPWMEN and PNDLSL, and add DT bindings to access them. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-03ASoC: rt5645: Add codec driverOder Chiou1-0/+25
This patch adds the Realtek ALC5645 codec driver. It is the base version that because the jack detect function is not implemented to it, the headphone and AMIC1 are not workable. We will fill up the further functions later. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-02ASoC: add SND_SOC_BYTES_EXTVinod Koul1-0/+13
we need _EXT version for SND_SOC_BYTES so that DSPs can use this to pass data for DSP modules Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-05-01Merge branch 'asoc-dt' into asoc-omapMark Brown1-1/+12