summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2014-03-12Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', ↵Mark Brown
'asoc/topic/cirrus', 'asoc/topic/cs4271', 'asoc/topic/cs42l51', 'asoc/topic/cs42l52', 'asoc/topic/cs42l73' and 'asoc/topic/da7210' into asoc-next
2014-03-12Merge remote-tracking branches 'asoc/topic/88pm860x', 'asoc/topic/ad1836', ↵Mark Brown
'asoc/topic/ad193x', 'asoc/topic/adau1977', 'asoc/topic/ak4104', 'asoc/topic/ak4641', 'asoc/topic/ak4671' and 'asoc/topic/alc5623' into asoc-next
2014-03-12Merge remote-tracking branch 'asoc/topic/pcm512x' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/pcm1792a' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/enum' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown
2014-03-12Merge remote-tracking branch 'asoc/fix/spear' into asoc-linusMark Brown
2014-03-12ASoC: Fix use after freeLars-Peter Clausen
Freeing the current list element while iterating over the list will cause a use after free since the iterator function will still use the current element to look up the next. Use list_for_each_safe() and remove the element from the list before freeing it to avoid this. Fixes: 1438c2f60b ("ASoC: Add a per component dai list") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10ASoC: spear: spdif_out: Fix mute controlLars-Peter Clausen
For controls registers with snd_soc_add_dai_controls snd_kcontrol_chip() returns a pointer to the DAI, not to the CODEC. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10ASoC: dapm: Sprinkle lockdep asserts through the codeMark Brown
Try to spot locking issues by asserting that the DAPM mutex is held when it should be. There's a bit of fun due to us not requiring the lock to be held prior to the card being instantiated which mean we need to wrap the assert in some paths and this isn't methodical by any stretch of the imagination. Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10ASoC: dapm: Staticise dapm_mark_dirty()Mark Brown
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>
2014-03-10ASoC: Add a per component dai listLars-Peter Clausen
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>
2014-03-10ASoC: Pass CODEC to snd_soc_register_dais()Lars-Peter Clausen
snd_soc_register_dais() looks up the CODEC that is registering the DAIs by looping over all registered CODECs. This patch updates the code to simply pass the CODEC that registers the DAIs to snd_soc_register_dais() thus avoiding the lookup. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10ASoC: Consolidate snd_soc_register_dai() and snd_soc_register_dais()Lars-Peter Clausen
snd_soc_register_dais() has basically the same code as snd_soc_register_dai(), but running in a loop. The only difference is that snd_soc_register_dai() calls fmt_single_name() to generate the DAIs name and snd_soc_register_dais() calls fmt_multiple_name(). This patch pushes the check in __snd_soc_register_component() which decides whether to call snd_soc_register_dai() or snd_soc_register_dais() to snd_soc_register_dais() to decide which naming scheme to use. This allows us to remove snd_soc_register_dai(). The patch also updates snd_soc_register_dais() to unregister every DAI it finds for the component rather than trying to unregister one DAI for each DAI that was registered. Both have the same result since there won't be more DAIs than what have been registered, but the former is easier to implement. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-10Merge branch 'topic/pcm' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-core
2014-03-10Merge remote-tracking branches 'asoc/fix/88pm860', 'asoc/fix/omap' and ↵Mark Brown
'asoc/fix/si476x' into asoc-linus
2014-03-10Merge remote-tracking branch 'asoc/fix/pcm' into asoc-linusMark Brown
2014-03-10ASoC: 88pm860: Fix IO setupLars-Peter Clausen
The 88pm860 is a MFD device and the CODEC driver is using the regmap struct of the parent device, hence automatic IO setup will not work and we need to manually call snd_soc_codec_set_cache_io(). The issue was introduced in commit f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O"). Fixes: f9ded3b2e7 ("ASoC: 88pm860x: Use regmap for I/O"). Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-10ASoC: si476x: Fix IO setupLars-Peter Clausen
The si476x is a MFD device and the CODEC driver is using the regmap struct of the parent device, hence automatic IO setup will not work and we need to manually call snd_soc_codec_set_cache_io(). The issue was introduced commit d6173df35f ("ASoC: si476x: Remove custom register I/O implementation") Fixes: d6173df35f ("ASoC: si476x: Remove custom register I/O implementation") Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-10ASoC: sam9g20_wm8731: Convert to table based DAPM setupLars-Peter Clausen
Use table based setup to register the DAPM widgets and routes. This on one hand makes the code a bit shorter and cleaner and on the other hand the board level DAPM elements get registered in the card's DAPM context rather than in the CODEC's DAPM context. While we are at it also remove the snd_soc_dapm_enable_pin() in the init callback. Pins are enabled by default. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Tested-by: Bo Shen <voice.shen@atmel.com> Acked-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Support new fratio encoding on the wm5110 rev DCharles Keepax
The reference clock path on newer IP FLLs requires a different configuration, and should avoid integer mode operation. This patch adds support for both the new encoding and updates the calculation. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Calculate FLL gain lastCharles Keepax
No part of the FLL calculation depends on the value determined for the gain but the gain does depend on other values. In preparation for future updates this patch moves the gain to be the last thing calculated. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Calculate OUTDIV firstCharles Keepax
OUTDIV will remain unchanged whilst the rest of the FLL configuration is calculated so do this first. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Don't pass Fout into arizona_calc_fllCharles Keepax
As we now calculate the FLL configuration at a later stage in the process the fout member of the FLL structure will contain the desired Fout frequency so no need to pass this in seperately. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Move calculation of FLL configurationCharles Keepax
Currently the FLL configuration is calculated before it is known which FLL path the configuration will be applied to. Newer versions of the IP have differences in the configuration required for each FLL path, which makes it complicated to calculate the FLL configuration in advance. This patch simply checks the validity of a requested input and output frequency before we know which FLL path they will be applied to and saves the actual calculation of the configuration until we know where the settings will be applied. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Move set of OUTDIV in to arizona_apply_fllCharles Keepax
Since we know in arizona_apply_fll if we are setting the sync or ref path there is no need to set the outdiv seperately anymore. This patch moves this from arizona_enable_fll to arizona_apply_fll. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: Add defines for FLL configuration constantsCharles Keepax
Improve readability by adding defines for some of the constants associated with FLL configuration. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: arizona: An OUTDIV of 1 is not valid, avoid thisCharles Keepax
One is not a valid value for the OUTDIV start searching at 2 instead. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: pcm512x: Fix duplicate const warningMark Brown
Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-09ASoC: pcm512x: Split out bus driversMark Brown
Move to the new style of defining the bus interfaces in separate modules in order to simplify dependencies. Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-07ASoC: wm_adsp: Correct type specifier in printfCharles Keepax
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: core: use regmap's parse_val to do endian translationNenghua Cao
In snd_soc_bytes_put function, it forces cpu to do cpu_to_be translation, but for mmio bus which uses REGMAP_ENDIAN_NATIVE, it doesn't need to do endian translation. So it is better to use regmap's api which can decide if this translation is needed according to bus configuration. Signed-off-by: Nenghua Cao <nhcao@marvell.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06Merge tag 'parse-val' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap into asoc-core regmap: Add parse_val() API This is useful for generic code built on top of regmap dealing with blocks of data.
2014-03-06Merge branch 'topic/pcm' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-enum Conflicts: include/sound/soc.h
2014-03-06ASoC: Move ignore_pmdown_time from CODEC to componentLars-Peter Clausen
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>
2014-03-06ASoC: Move active count from CODEC to componentLars-Peter Clausen
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>
2014-03-06ASoC: Add component pointer to the DAI structLars-Peter Clausen
Keep track of which component registered a DAI. We'll need this as componentization progresses. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: Add helper function to check whether a CODEC is activeLars-Peter Clausen
Instead of directly checking the 'active' field of the CODEC struct add a new helper function that will return either true or false depending on whether the CODEC is active. This will make the migration to the component level easier. The patch also updates all CODEC drivers that check the active attribute to use the new helper function. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: Fix active count tracking for CODEC to CODEC linksLars-Peter Clausen
For CODEC to CODEC links we need to make sure to also manage the 'active' field of the cpu_dai CODEC. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: Add helper functions for PCM runtime 'active' managementLars-Peter Clausen
We have the same code that increments and decrements the active field of the various PCM runtime components (all with the same bugs). Factor this out into common helper functions. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: Handle ignore_pmdown_time for CODEC to CODEC linksLars-Peter Clausen
For CODEC to CODEC links we should only immediately power down if both CODECs are configured to ignore the power down delay. Factor the logic for this into a helper function that can be used for both compressed and normal PCMs. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: wm_adsp: Split firmware load into smaller chunksCharles Keepax
The firmware files can be quite large and allocating the whole firmware a single DMA safe buffer can be problematic if the system is under a high memory load. Ease the requirements slightly by writing the firmware out in page sized chunks. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-06ASoC: cs4271: Fix build error without CONFIG_SPI_MASTERTakashi Iwai
cs4271_common_probe() is called from cs4271_i2c_probe() but defined in CONFIG_SPI_MASTER block, thus it results in a build error when CONFIG_SPI_MASTER=n: sound/soc/codecs/cs4271.c:721:2: error: implicit declaration of function ‘cs4271_common_probe’ [-Werror=implicit-function-declaration] Move the function out of #if block. Fixes: d6cf89ee07cb ('ASoC: cs4271: claim reset GPIO in bus probe function') Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Daniel Mack <daniel@zonque.org> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2014-03-05ALSA: usb-audio: Add quirk for Logitech Webcam C500Takashi Iwai
Logitech C500 (046d:0807) needs the same workaround like other Logitech Webcams. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05ALSA: hda - Use analog beep for Thinkpads with AD1984 codecsTakashi Iwai
For making the driver behavior compatible with the earlier kernels, use the analog beep in the loopback path instead of the digital beep. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05ALSA: hda - Add missing loopback merge path for AD1884/1984 codecsTakashi Iwai
The mixer widget (NID 0x20) of AD1884 and AD1984 codecs isn't connected directly to the actual I/O paths but only via another mixer widget (NID 0x21). We need a similar fix as we did for AD1882. Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2014-03-05ASoC: pcm: free path list before exiting from error conditionsPatrick Lai
dpcm_path_get() allocates dynamic memory to hold path list. Corresponding dpcm_path_put() must be called to free the memory. dpcm_path_put() is not called under several error conditions. This leads to memory leak. Signed-off-by: Patrick Lai <plai@codeaurora.org> Signed-off-by: Mark Brown <broonie@linaro.org> Cc: stable@vger.kernel.org
2014-03-05ASoC: ak4104: Remove superfluous codec->control_data initializationLars-Peter Clausen
The driver uses automatic IO setup, which will also initialize the control_data field of the CODEC, no need to do it manually. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Daniel Mack <daniel@zonque.org> Signed-off-by: Mark Brown <broonie@linaro.org>