summaryrefslogtreecommitdiffstats
path: root/include/sound
Commit message (Collapse)AuthorAgeFilesLines
* ALSA: cs8427: separate HW initializationOndrej Zary2014-04-031-0/+1
| | | | | | | | Separate HW initialization from device creation. This is needed for suspend/resume support. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* Merge tag 'asoc-v3.15-4' of ↵Takashi Iwai2014-03-311-1/+1
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Final updates for v3.15 merge window A few more updates from last week - use of the tdm_slot mapping from Xiubo plus a few smaller fixes and cleanups.
| * ASoC: core: remove the 'of_' prefix of of_xlate_tdm_slot_mask.Xiubo Li2014-03-251-1/+1
| | | | | | | | | | | | | | The 'of_' is not appropriate here for there hasn't any DT parsing. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* | Merge tag 'asoc-v3.15-3' of ↵Takashi Iwai2014-03-241-0/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 A few more updates for the merge window: - Fixes for the simple-card DAI format DT mess. - A new driver for Cirrus cs42xx8 devices. - DT support for a couple more devices. - A revert of a previous buggy fix for soc-pcm, plus a few more fixes and cleanups.
| * Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown2014-03-231-0/+13
| |\
| | * ASoC: Add helper function to cast component back to CODECLars-Peter Clausen2014-03-191-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a helper function to cast back from a component struct to the CODEC struct it is embedded in. This is useful in situations where we know that a certain component is a CODEC and want to get access to some CODEC specific properties. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* | | Merge tag 'asoc-v3.15-2' of ↵Takashi Iwai2014-03-131-10/+3
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 This is mostly a few additional fixes from Lars-Peter, a new driver and cleaning up a git failure with merging the Intel branch (combined with an xargs failure to pay attention to error codes). The history lists a bunch of additional commits for the branch but the content of those commits is actually present already but not recorded in history due to git failing. Unfortunately xargs is used in the merge script and it doesn't do a good job of noticing errors from the commands it invokes.
| * | Merge remote-tracking branch 'asoc/topic/jack' into asoc-nextMark Brown2014-03-131-1/+2
| |\ \
| | * | ASoC: add data field into snd_soc_jack_gpioxiangxiao2014-02-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | so callback could get the context data as needed Signed-off-by: xiangxiao <xiaoxiang@xiaomi.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | Merge remote-tracking branch 'asoc/topic/io' into asoc-nextMark Brown2014-03-131-9/+1
| |\ \ \
| | * | | ASoC: io: New signature for snd_soc_codec_set_cache_io()Xiubo Li2014-03-111-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all users have been converted to regmap and the config.reg_bits and config.val_bits can be setted by each user through regmap core API. So these two params are redundant here. Since the only control type that left is SND_SOC_REGMAP, so remove it. Drop the control params and add struct regmap *regmap to simplify the code. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | |
| | | \ \
| | *-. \ \ Merge branches 'topic/ad193x', 'topic/tlv320aic23', 'topic/tlv320aic32x4', ↵Mark Brown2014-03-111-0/+15
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | 'topic/wm8991', 'fix/si476x' and 'fix/88pm860' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-io
| | * | | | ASoC: io: Remove hw_read() operationMark Brown2014-03-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now no longer have any users of hw_read() in the kernel so remove the code in order to prevent any new users being added. Users should be using regmap. Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | ASoC: io: Remove SND_SOC_I2CMark Brown2014-02-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that all users have been converted to regmap we can eliminate the ASoC level wrapper for I2C I/O reducing the amount of duplicated functionality. Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | ASoC: io: Remove SPI supportMark Brown2014-02-161-1/+0
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All ASoC CODEC drivers that use SPI have now been converted to use regmap so we can delete SND_SOC_SPI, preventing any new users being added. Signed-off-by: Mark Brown <broonie@linaro.org>
* | | | | Merge tag 'asoc-v3.15' of ↵Takashi Iwai2014-03-135-70/+149
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next ASoC: Updates for v3.15 Quite a busy release for ASoC this time, more on janitorial work than exciting new features but welcome nontheless: - Lots of cleanups from Takashi for enumerations; the original API for these was error prone so he's refactored lots of code to use more modern APIs which avoid issues. - Elimination of the ASoC level wrappers for I2C and SPI moving us closer to converting to regmap completely and avoiding some randconfig hassle. - Provide both manually and transparently locked DAPM APIs rather than a mix of the two fixing some concurrency issues. - Start converting CODEC drivers to use separate bus interface drivers rather than having them all in one file helping avoid dependency issues. - DPCM support for Intel Haswell and Bay Trail platforms. - Lots of work on improvements for simple-card, DaVinci and the Renesas rcar drivers. - New drivers for Analog Devices ADAU1977, TI PCM512x and parts of the CSR SiRF SoC.
| | | | |
| | \ \ \
| *-. \ \ \ Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', ↵Mark Brown2014-03-121-4/+2
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | 'asoc/topic/sh', 'asoc/topic/simple', 'asoc/topic/sirf', 'asoc/topic/sn95031', 'asoc/topic/ssm2602' and 'asoc/topic/stac9766' into asoc-next
| | | * | | ASoC: simple-card: add slot information parsing supportsXiubo Li2014-02-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some CPU/CODEC DAI devices the slot information maybe needed. This patch adds the slot information parsing for simple-card driver. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | | Merge branch 'topic/of' of ↵Mark Brown2014-02-232-0/+5
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple
| | | * \ \ \ Merge branch 'topic/of' of ↵Mark Brown2014-02-101-0/+2
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-simple
| | | * | | | | ASoC: simple-card: simplify codeJean-Francois Moine2014-02-031-4/+0
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform data structure contains information which is used only by the driver, and the driver allocates platform information fields which are of no use. Move the driver specific data to a new private structure and cleanup the platform data structure. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | | | |
| | \ \ \ \ \
| | \ \ \ \ \
| | \ \ \ \ \
| *---. \ \ \ \ \ Merge remote-tracking branches 'asoc/topic/ml26124', 'asoc/topic/of', ↵Mark Brown2014-03-123-6/+37
| |\ \ \ \ \ \ \ \ | | | |_|/ / / / / | | |/| | | / / / | | | | |_|/ / / | | | |/| | | | 'asoc/topic/omap', 'asoc/topic/pxa' and 'asoc/topic/rcar' into asoc-next
| | | | * | | | ASoC: rsnd: rename scu to srcKuninori Morimoto2014-03-051-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R-Car sound has SCU unit which has SRC/CTU/MIX/DVC, and current rsnd driver has scu.c and scu module. Current scu.c has SRC support only. My first concept was control these feature on scu.c but, it become difficult and un-understandable now. This patch rename scu to src Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: rsnd: Get correct SCU IDKuninori Morimoto2014-03-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current rsnd driver is assuming that SCU/SRU ID is same as SSIU/SSI ID, because Gen1 can't select it. But, Gen2 can select it. The SCU/SRU/SSIU/SSI pair depends on the platform. This patch get correct SCU ID from platform info. To keep compatible, it still assuming SCU ID = SSI ID if platform doesn't have info Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: rsnd: add struct rsnd_dai_platform_infoKuninori Morimoto2014-03-051-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | R-Car sound DAI consists from SSI/SCU/SSIU/SRU... Current R-Car sound DAI is decided from these settings, but it is intuitively unclear, and is not good design for DT support. This patch adds new rsnd_dai_platform_info to solve this issue. But now, many platform is using this driver without rsnd_dai_platform_info. So, this patch still supports DAI settings via SSI to keep compatible. It will be removed in next Linux version. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: rsnd: tidyup RSND_SSI_xxx flagsKuninori Morimoto2014-03-031-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6f3ab6c1c022e7a4877d38940cd45ae7804a15e2 (ASoC: rsnd: remove pin sync option) added unused RSND_SSI_CLK_FROM_ADG flag. It should remove RSND_SSI_SYNC. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: rsnd: add Gen2 SRC and DMAEngine supportKuninori Morimoto2014-02-031-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renesas sound Gen2 has SRC (= Sampling Rate Converter) which needs 2 DMAC. The data path image when you use SRC on Gen2 is [mem] -> Audio-DMAC -> SRC -> Audio-DMAC-peri-peri -> SSIU -> SSI This patch support SRC and DMAEnine. It is tested on R-Car H2 Lager board Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: rsnd: remove pin sync optionKuninori Morimoto2014-02-031-0/+1
| | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Renesas Chip is supporting multi pin sound, but the HW setting is very difficult and confusable. But driver is supporting it halfway. Remove SYNC option at this point. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | | | ASoC: core: add TDM slot parsing from DT supportsXiubo Li2014-02-232-0/+5
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some CPU/CODEC DAI devices the TDM slot infomation maybe needed. This patch adds the slot parsing from DT supports. TDM slot properties: dai-tdm-slot-num : Number of slots in use. dai-tdm-slot-width : Width in bits for each slot. For instance: dai-tdm-slot-num = <2>; dai-tdm-slot-width = <8>; And for each spcified driver, there could be one .of_xlate_tdm_slot_mask() to specify a explicit mapping of the channels and the slots. If it's absent the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the tx and rx masks. For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit for an active slot as default, and the default active bits are at the LSB of the masks. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | * | | ASoC: add snd_soc_of_parse_audio_simple_widgets for DTXiubo Li2014-02-101-0/+2
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds snd_soc_of_parse_audio_simple_widgets() and supports below style of widgets name on DT: "template-wname", "user supplied wname" For instance: simple-audio-widgets = "Microphone", "Microphone Jack", "Line", "Line In Jack", "Line", "Line Out Jack", "Headphone", "Headphone Jack", "Speaker", "Speaker External"; The "template-wname" currently includes: "Microphone", "Line", "Headphone" and "Speaker". Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown2014-03-122-57/+67
| |\ \ \ \
| | * \ \ \ Merge branch 'topic/pcm' of ↵Mark Brown2014-03-062-2/+21
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum Conflicts: include/sound/soc.h
| | * | | | | ASoC: dapm: Consolidate MUXs and virtual MUXsLars-Peter Clausen2014-03-011-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUXs and virtual MUXs are almost identical, the only difference is that for virtual MUX there is no hardware backing register in which setting is stored. This patch adds code, which is similar to what we already do for DAPM mixer controls to support virtual mixer controls, to DAPM enum controls. The new code will check if the enum does a hardware backing register and skip over reading and writing to the register if it has not. This allows us to use the same code path for both MUXs and virtual MUXs and a lot of nearly identical code can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: Add macros for defining virtual enumsLars-Peter Clausen2014-03-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the upcoming consolidation of normal MUXs and virtual MUXs we need to be able to distinguish between enums with and without a backing register at the enum level. Use the same approach as used for virtual mixer controls by setting the reg field of the enum to SND_SOC_NOPM for enums without a backing register. This patch adds a set of helper macros that can be used to define such enums. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: dapm: Consolidate MUXs and value MUXsLars-Peter Clausen2014-03-011-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MUXs and value MUXs are almost identical, the only difference is that a value MUX uses a look-up table to map from the selected control item to a register value, while MUXs use a direct mapping. This patch uses snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item(), which where earlier introduced during the consolidation of enum and value enum controls, to hide this difference. This allows us to use the same code path for both MUXs and value MUXs and a lot of nearly duplicated code can be removed. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: Consolidate enum and value enum controlsLars-Peter Clausen2014-03-011-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementations for enum and value enum controls are almost identical. The only difference is that the value enum uses an additional look-up table to map the control value to the register value, while the enum control uses a direct mapping. Enums and value enums can easily be distinguished at runtime, for value enums the values field of the snd_soc_enum struct contains the look-up table, while for enums it is NULL. This patch adds two new small helper functions called snd_soc_enum_item_to_val() and snd_soc_enum_val_to_item() which map between register value and control item. If the items field of the snd_soc_enum struct is NULL the function will do a direct mapping otherwise they'll use the look-up table to do the mapping. Using these small helper functions it is possible to use the same kcontrol handlers for both enums and value enums. The functions are added a inline functions in soc.h so they can also be used by the DAPM code to accomplish similar consolidation. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: Remove unused 'reg2' field from soc_enum structLars-Peter Clausen2014-03-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | | | |
| | | \ \ \ \
| | | \ \ \ \
| | | \ \ \ \
| | *---. \ \ \ \ Merge branches 'topic/dapm', 'topic/sign', 'topic/adau1373', ↵Mark Brown2014-03-012-0/+35
| | |\ \ \ \ \ \ \ | | | | | | |/ / / | | | | | |/| / / | | | | | |_|/ / | | | | |/| | | 'topic/max98090', 'topic/mc13783', 'fix/wm8994' and 'topic/wm8995' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum
| | | | * | | | ASoC: core: Add SOC_DOUBLE_R_S_TLVMarkus Pargmann2014-02-031-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a macro for signed mixer with two registers and tlv array. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | | | * | | | ASoC: core: Add signed register volume control logicMarkus Pargmann2014-02-031-0/+1
| | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some codecs use signed volume control representation with non standard register sizes, e.g. 6 or 7 bit signed integers. This patch adds generic signed register volume control logic to soc-core. Instead of a fixed width signed register control, this implementation uses a 'min' value and the signed bit location to translate it to an absolute volume. Using the 'sign_bit' we can calculate a correct mask for the register values and translate it back into signed integers of standard size. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: Add const to SOC_ENUM_*_DECL() macrosTakashi Iwai2014-02-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since these macros are supposed to be used for decalring const objects, let's add the const modifier there. The doubled const appearing in usages will be cleaned by later patches. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | | ASoC: Rename soc_enum.max field with itemsTakashi Iwai2014-02-201-12/+12
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name "max" in struct soc_enum is rather confusing since it actually takes the number of items. With "max", one might try to assign (nitems - 1) value. Rename the field to a more appropriate one, "items", which is also used in struct snd_ctl_elem_info, too. This patch also rewrites some code like "if (x > e->nitems - 1)" with "if (x >= e->nitems)". Not only the latter improves the readability, it also fixes a potential bug when e->items is zero. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown2014-03-122-1/+12
| |\ \ \ \ \
| | * | | | | ASoC: dapm: Staticise dapm_mark_dirty()Mark Brown2014-03-101-1/+0
| | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function is not called outside soc-dapm.c so there is no need for it to be exported. Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | ASoC: dapm: Add unlocked version of snd_soc_dapm_syncCharles Keepax2014-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will often call sync after several functions that require the DAPM mutex to be held. Rather than release and immediately relock the mutex provide an unlocked function for this situation. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | | | ASoC: dapm: Add helpers to lock/unlock DAPM mutexCharles Keepax2014-02-201-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Acquiring the DAPM mutex is necessary before using several DAPM functions and dereference is quite ugly. This patch provides a helper function to simplify this. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
| * | | | | Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown2014-03-122-2/+23
| |\ \ \ \ \ | | |/ / / / | |/| | | / | | | |_|/ | | |/| |
| | * | | ASoC: Add a per component dai listLars-Peter Clausen2014-03-101-0/+2
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that every DAI has a component we can track the DAIs on a per component basis. This simplifies the DAI lookup when we are only interested in DAIs of a specific component and also makes it possible to have multiple components with the same parent device and also register DAIs. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | ASoC: Move ignore_pmdown_time from CODEC to componentLars-Peter Clausen2014-03-061-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for componentization move the ignore_pmdown_time field from the snd_soc_codec struct to the snd_soc_component struct. Set it to true for non CODEC components for now. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
| | * | ASoC: Move active count from CODEC to componentLars-Peter Clausen2014-03-061-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no reason why active count tracking should only be done for CODECs but not for other components. Moving the active count from the snd_soc_codec struct to the snd_soc_component struct reduces the differences between CODECs and other components and will eventually allow component to component DAI links (Which is a prerequisite for converting CODECs to components). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
OpenPOWER on IntegriCloud