aboutsummaryrefslogtreecommitdiffstats
path: root/arch (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2010-12-09ASoC: EP93xx: sampling rate range extendedAlexander Sverdlin2-4/+4
Changes to both I2S and PCM code: - Rates list extended up to 96kHz, it's tested on EDB9302 and works for both capture and playback. Signed-off-by: Alexander Sverdlin <subaparts@yandex.ru> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-08ASoC: Add ADC high pass filter support to WM8994Uk Kim1-0/+22
Signed-off-by: Uk Kim <w0806.kim@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-08ASoC: Support WM8994 mono AIF configurationsMark Brown1-6/+15
The WM8994 supports mono signals - enable this in the driver. With DSP mode an automatic data channel selector is available, activate this when in mono mode. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-08ASoC: soc-core: Fix null pointer dereferenceDimitris Papastamos1-2/+2
In case the codec driver did not provide a read/write function, codec->driver->read|write will be NULL. Ensure that we use the one specified in codec->read|write to avoid oopsing when we access the debugfs entries. This is achieved by using snd_soc_read() and snd_soc_write(). Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07ASoC: Correct WM8962 interrupt mask register readMark Brown1-1/+1
Fix mismerge from the out of tree BSP where this support was developed. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07ASoC: WM8580: Debug BCLK and sample sizeJassi Brar1-4/+4
In case of SNDRV_PCM_FORMAT_S32_LE, we need to set WM8580_AIF_LENGTH_32, rather than WM8580_AIF_LENGTH_24. Also, the BCLK has to be 64fs, for sample size of 20, 24 and 32 bits. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07ASoC: Fix snd_soc_instantiate_card error pathAxel Lin1-6/+8
Properly free the resources in the case of snd_card_register failure and soc_register_ac97_dai_link failure. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-07ASoC: Fix resource leak if soc_register_ac97_dai_link failedAxel Lin1-5/+7
Properly free the resources in the case of soc_register_ac97_dai_link failure. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: soc-core: Remove useless inline function constructDimitris Papastamos1-1/+1
There is no need to mark this function as inline. Inline functions usually are small and concise functions that benefit from not needing to set up a stack frame and undergo a call/ret sequence upon each invocation. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: soc-core: Replace use of strncpy() with strlcpy()Dimitris Papastamos1-2/+2
By using strncpy() if the source string does not have a null byte in the first n bytes, then the destination string is not null-terminated. This can be fixed in a two-step process by manually null-terminating the array after the use of strncpy() or by using strlcpy(). Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: Merge common code in DAI link and auxiliary codec probing/removalJarkko Nikula1-152/+132
Commit 2eea392 "ASoC: Add support for optional auxiliary dailess codecs" added much of code that can be shared with DAI link codec probing/removal. Merge now this common code into new soc_probe_codec, soc_remove_codec and soc_post_component_init functions. Error prints in these functions are converted to use dev_err and to print the error code. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: soc-cache: Add optional cache name member to snd_soc_cache_opsDimitris Papastamos3-5/+17
Added an optional name member to snd_soc_cache_ops to enable more sensible diagnostic messages during cache init, exit and sync. Remove redundant newline in source code. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: SAMSUNG: Remove duplicated snd_card on smdk_spdifSeungwhan Youn1-2/+0
This patch remove duplicated snd_card defination on smdk_spdif. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: SAMSUNG: Fix initial return valueSeungwhan Youn1-1/+1
This patch fixed intial return value to be a '0' as asuccess on set_audio_clock_heirachy(). This avoids unintended error on initialize. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: Add trace events for jack detectionMark Brown3-0/+67
As jack detection can trigger DAPM and the latency in debouncing can create confusing windows in operation provide some trace events which will hopefully help in diagnostics. The soc-jack core traces all reports that it gets and the resulting notifications to upper layers. An event for jack IRQs is also provided for instrumentation of debounce, and used in the GPIO jack code. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-06ASoC: Hold client_mutex while calling snd_soc_instantiate_cards()Axel Lin1-0/+2
As the comments of snd_soc_instantiate_cards() said, snd_soc_instantiate_cards() must be called with client_mutex. Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-06ASoC: Fix swap of left and right channels for WM8993/4 speaker boost gainUk Kim1-1/+1
SPKOUTL_BOOST start from third bit, SPKOUTLR_BOOST start from 0 bit. Signed-off-by: Uk Kim <w0806.kim@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2010-12-06ASoC: Fix off by one error in WM8994 EQ register bank sizeUk Kim1-1/+1
Signed-off-by: Uk Kim <w0806.kim@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@kernel.org
2010-12-06ASoC: Add post-CODEC bias level callback for machine driverMark Brown2-0/+6
Currently the machine driver can only do bias level configuration before the CODEC bias level is brought up. This means that the machine cannot do any configuration which depends on the CODEC bias level being maintained. Provide a post-CODEC callback which allows the machine driver to do things like enable the FLL on a CODEC which is brought down to BIAS_OFF when idle. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03ASoC: When disabling WM8994 FLL force a source selectionMark Brown1-0/+1
When we disable the WM8994 FLL code path sharing means that we end up writing out a configuration. Currently this is the currently active input and output frequency (which causes snd_soc_update_bits() to suppress actual writes both immediately and in the common case where we reenable the same configuration later) but we allow machine drivers to pass through a source of zero. Since the register values written are one less than the source constants this causes corruption of other bitfields in the register. Fix this by using the most recently configured FLL source when none is provided. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Cc: stable@kernel.org
2010-12-03ASoC: WM8580: Debug interface indexJassi Brar1-4/+4
We want the index of DAI's driver here. Signed-off-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: Constify struct snd_soc_codec_driverMark Brown3-10/+11
Allow the CODEC driver structure to be marked const by making all the APIs that use it do so. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03ASoC: soc-core: Allow machine drivers to override compress_typeDimitris Papastamos2-11/+64
This patch allows machine drivers to override the compression type provided by the codec driver. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: soc-cache: Use reg_def_copy instead of reg_cache_defaultDimitris Papastamos3-12/+42
Make sure to use codec->reg_def_copy instead of codec_drv->reg_cache_default wherever necessary. This change is necessary because in the next patch we move the cache initialization code outside snd_soc_register_codec() and by that time any data marked as __devinitconst such as the original reg_cache_default array might have already been freed by the kernel. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: soc-core: Generalize snd_soc_prefix_map and rename to snd_soc_codec_confDimitris Papastamos2-10/+18
The snd_soc_codec_conf struct now holds codec specific configuration information. A new configuration option has been added to allow machine drivers to override the compression type set by the codec driver. In the absence of providing an snd_soc_codec_conf struct or when providing one but not setting the compress_type member to anything, the one supplied by the codec driver will be used instead. In all other cases the one set in the snd_soc_codec_conf struct takes effect. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.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-12-03ASoC: Change the base value of compress_typeDimitris Papastamos1-1/+1
Ensure that the base value of compress_type starts at 1 so that we know whether the machine driver has provided a compress_type for overriding the codec supplied one. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: Add compress_type as a member to snd_soc_codecDimitris Papastamos3-2/+8
We need to keep a copy of the compress_type supplied by the codec driver so that we can override it if necessary with whatever the machine driver has provided us with. The reason for not modifying the codec->driver struct directly is that ideally we'd like to keep it const. Adjust the code in soc-cache and soc-core to make use of the compress_type member in the snd_soc_codec struct. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: Don't oops in soc_probe_aux_dev in case of missing codecJarkko Nikula1-2/+6
Blind copy of codec finding algorithm from soc_bind_dai_link does not work in soc_probe_aux_dev if matching codec name is not found. In that case the code falls through and tries to start the probing procedure with invalid codec pointer. Fix this and add an error print showing the codec name that cannot be found. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: Fix inconsistent meaning of default case while checking alc5623->idAxel Lin1-3/+7
In alc5623_i2c_probe(), the default case for checking alc5623->id behaves the same as case 0x23. However, In alc5623_probe() the default case for checking alc5623->id becomes to be the same as case 0x21. This makes the meaning of default case inconsistent. Since we have checked codec id in alc5623_i2c_probe() by comparing vid2 with id->driver_data, it is not possible to run into the default case now. In case we may add more supported devices to alc5623_i2c_table in the future, this patch changes the default case return -EINVAL to let people know that they should not run into this case. They should also add a new case accordingly for the new id. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: sh: fsi: remove runtime register check from fsi_master_xxxKuninori Morimoto1-28/+20
Current FSI driver was checking register range on fsi_master_xxx function. This runtime check was added to avoid an illegal access from wrong/mistake implementation. But it is useless check under the correct implementation. This patch escape runtime check by using macro technique. If there is wrong implementation, it will be compile error. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: sh: fsi: remove runtime register check from fsi_reg_xxxKuninori Morimoto1-56/+45
Current FSI driver was checking register range on fsi_reg_xxx function. This runtime check was added to avoid an illegal access from wrong/mistake implementation. But it is useless check under the correct implementation. This patch escape runtime check by using macro technique. If there is wrong implementation, it will be compile error. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: sh: fsi: change fsi->mst_ctrl to master->a/b_mclkKuninori Morimoto1-9/+11
There was a strange part where fsi->xxx had been used for fsi_master_xxx function instead of master->xxx in current FSI. This patch modify it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: sh: fsi: remove fsi_master_writeKuninori Morimoto1-21/+2
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: sh: fsi: clean up SPDIF definesKuninori Morimoto1-3/+14
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-03ASoC: Move active copy of CODEC read and write into runtime structureMark Brown3-4/+8
We shouldn't be assigning to the driver structure (which really ought to be const, further patch to follow) though there's unlikely to be any actual problem except in the unlikely case that two devices with the same driver but different bus types appear in the same system. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03ASoC: Make the DAI ops constant in the DAI structureMark Brown1-1/+1
Neither drivers nor the core should be fiddling with the actual ops structure at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-03ASoC: Apostrophe patrol in soc-core.cMark Brown1-4/+4
Silly little grammar nit but it bugs the hell out of me. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02ASoC: Tune performance of WM8958 revision AMark Brown2-9/+36
Update some of the default configuration for the device to improve the performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02ASoC: Automatically manage WM8731 deemphasisMark Brown1-5/+71
The deemphasis filter should be selected based on sample rate for optimal performance. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02ASoC: Split WM8731 enumeration array into individual enumsMark Brown1-6/+9
This is much more maintainable than the array. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02ASoC: Provide WM8731 microphone boost TLV informationMark Brown1-1/+2
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-02ASoC: omap: N810: Don't select CONFIG_OMAP_MUX but make it as dependencyJarkko Nikula1-1/+1
Not all omap boards use kernel based pin multiplexing so CONFIG_SND_OMAP_SOC_N810 should not select it by default as it can make harm to other boards in multi-board kernels. Therefore put CONFIG_OMAP_MUX as a dependency to N810 ASoC machine driver. Thanks to Tony Lindgren <tony@atomide.com> for noticing. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-01ASoC: ak4535: Improve readability for setting muteAxel Lin1-5/+5
The mute/unmute is controled by SMUTE (Soft Mute Control bit): 0: Normal Operation (Default) 1: DAC outputs soft-muted I think this change improves readability. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01ASoC: sh: fsi-ak4642: midify card nameKuninori Morimoto1-1/+10
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01ASoC: sh: fsi-ak4642: tidyup unnecessary variablesKuninori Morimoto1-6/+0
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01ASoC: Allow user-specified WM8958 multiband compressor configurationsMark Brown3-2/+167
The paramters of the WM8958 multiband compressor can be tuned by the user for their system using a graphical configuration tool on the host. Allow the user to specify a set of such paramters in platform data and select between them at runtime. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-01ASoC: Correct event flags for WM8958 AIF DACsMark Brown1-4/+4
We need a post notification as we need to shut down the MBC after the data stops flowing rather than before. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-01ASoC: Fix build failure in soc-core.cJarkko Nikula1-1/+0
Commit 2eea392 "ASoC: Add support for optional auxiliary dailess codecs" causes a build failure in soc-core.c: soc_probe_aux_dev since code tries to access non-existing struct snd_soc_dapm_context and struct snd_soc_card members. Root cause for this was a double accident. Author sent the RFC patch from top of another patch set and the RFC got committed. Fix the build failure by removing the code line that depends on that another patch set. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-12-01ASoC: WM8731: Fix incorrect mask for bypass path disableDimitris Papastamos1-1/+1
According to the datasheet the bypass path enable/disable is bit 3 therefore we need 0x8 and not 0x4. Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2010-11-30ASoC: Add support for optional auxiliary dailess codecsJarkko Nikula2-6/+166
This makes possible to register auxiliary dailess codecs in a machine driver. Term dailess is used here for amplifiers and codecs without DAI or DAI being unused. Dailess auxiliary codecs are kept in struct snd_soc_aux_dev and those codecs are probed after initializing the DAI links. There are no major differences between DAI link codecs and dailess codecs in ASoC core point of view. DAPM handles them equally and sysfs and debugfs directories for dailess codecs are similar except the pmdown_time node is not created. Only suspend and resume functions are modified to traverse all probed codecs instead of DAI link codecs. Example below shows a dailess codec registration. struct snd_soc_aux_dev foo_aux_dev[] = { { .name = "Amp", .codec_name = "codec.2", .init = foo_init2, }, }; static struct snd_soc_card card = { ... .aux_dev = foo_aux_dev, .num_aux_devs = ARRAY_SIZE(foo_aux_dev), }; Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>