summaryrefslogtreecommitdiffstats
path: root/sound/soc
AgeCommit message (Collapse)AuthorFilesLines
2015-08-25ASoC: cs4349: fix platform_no_drv_owner.cocci warningskbuild test robot1-1/+0
sound/soc/codecs/cs4349.c:389:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci CC: Tim Howe <tim.howe@cirrus.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-21ASoC: topology: Add support for TLV bytes controlsMengdong Lin1-3/+39
Allow vendor drivers to define bespoke bytes ext handlers and IDs for TLV bytes controls. And the topology core will bind these handlers by matching IDs defined by the vendor driver and user space topology data file. And TLV callback binding is moved to soc_tplg_kcontrol_bind_io(). This function process all handler binding now. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-21ASoC: topology: Reduce arguments of soc_tplg_kcontrol_bind_io()Mengdong Lin1-24/+21
Add the pointer of struct soc_tplg as one argument, so no need to pass standard/vendor specific kcontrol handlers and their count. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-21ASoC: topology: Bind vendor specific kcontrol handlers before standard onesMengdong Lin1-18/+18
Vendor specific handlers should override standard handlers. So we can handle things in the order from specific to generic. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-21Merge tag 'v4.2-rc6' into asoc-topologyMark Brown20-67/+134
Linux 4.2-rc6
2015-08-21ASoC: Set missing card owner fieldAxel Lin13-0/+14
Set the card owner field to prevent the module from being removed from underneath its users. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-20ASoC: wm8994: fix add dynamic path errorZidan Wang1-8/+10
If there don't exist dynamic sink or source widget, it will failed to add dynamic path. "AIF3ADCDAT" is snd_soc_dapm_aif_out, can't be dynamic sink widget. So change the audio route to fix this issue. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-20ASoC: samsung: Remove redundant arndale_audio_removeVaishali Thakkar1-10/+0
There is no use of snd_soc_unregister_card in remove function as devm_snd_soc_register_card in probe function automatically handles it. So, remove use of snd_soc_unregister_card and with this change remove arndale_audio_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-19Merge tag 'asoc-v4.2-disable-topology' of ↵Takashi Iwai2-0/+6
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Disable topology support for v4.2 The topology code merged in the v4.2 merge window introduced a new ABI which was believed to be suitable for use but subsequently additional work by the developers of this feature have revealed some problems that need to be addressed. In order to allow this to be done without having to support the initial ABI add Kconfig to disable the build and also add some #error statements to the UAPI header so users can't use them.
2015-08-19ASoC: arizona: Fix gain settings of FLL in free-run modeNikesh Oswal1-1/+1
The wrong register was used to set the gain of ref loop, when changing the FLL output on an active FLL. This patch corrects the offset of the gain register. Signed-off-by: Nikesh Oswal <Nikesh.Oswal@wolfsonmicro.com> Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-19ASoC: rockchip: i2s: Adjust devm usageVaishali Thakkar1-6/+2
Remove use of snd_soc_unregister_component in remove function as devm_snd_soc_register_component in probe function automatically handles it. Also, convert call of snd_dmaengine_pcm_register to managed resource function devm_snd_dmaengine_pcm_register and remove usage of snd_dmaengine_pcm_unregister in probe and remove functions. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-18ASoC: tegra: Revert part of "ASoC: tegra: Convert to managed resources"Vaishali Thakkar1-4/+6
Revert the problematic part of commit 470805eb9f31 ("ASoC: tegra: Convert to managed resources"). Before this commit, PM cleanup was performed after the component was unregistered. But returning directly will skip PM cleanup. So, to be on safe side it is better to use snd_soc_register_component instead of devm_snd_soc_register_component. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-18ASoC: wm8741: Drop misleading readable_reg callback implementationAxel Lin1-21/+0
regmap_readable() returns false if map->format.format_write is set. For .reg_bits = 7, .val_bits = 9, setting, map->format.format_write = regmap_format_7_9_write; Even current code has implemented map->readable_reg, regmap_readable() still returns false anyway. Thus drop the misleading readable_reg callback implementation. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-17ASoC: topology: Add Kconfig option for topologyMark Brown2-0/+6
Allow the topology code to be compiled out so that users who don't need topology don't need to havve the code compiled in, saving them some memory. Some more configuration could be added to remove some of the hooks into the core data structures but that is probably best done with some refactoring to use functions to do the updates of the data structures rather than ifdefing in the code as we'd need to do at the minute. Suggested-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-17ASoC: davinci-vcif: Use devm_snd_soc_register_componentVaishali Thakkar1-11/+3
Use resource managed function devm_snd_soc_register_component for component registration instead of snd_soc_register_component. Also, remove davinci_vcif_remove as it is now redundant. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-17ASoC: mediatek: Remove AIF widgets for backend DAIsKoro Chen1-11/+0
DAPM core already creates widgets for DAIs. It is not necessary to declare them by SND_SOC_DAPM_AIF_IN/SND_SOC_DAPM_AIF_OUT. Furthermore, original codes use backend DAI's stream name to be the AIF widget name. It causes the same widget to be created twice, and after commit 92fa12426741 ("ASoC: dapm: Add new widgets to the end of the widget list") the first created widget (by snd_soc_dapm_new_controls) is used, not the 2nd created one (by snd_soc_dapm_new_dai_widgets), so audio path is broken. Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-15ASoC: fsl-asoc-card: add wm8960 supportZidan Wang1-0/+8
add wm8960 support for fsl-asoc-card Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: ssm2518: Add explicit device tree supportRicard Wanderlof1-0/+9
Add OF match table to SSM2518 to allow direct matching without going through I2C subsystem. Signed-off-by: Ricard Wanderlof <ricardw@axis.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: topology: Change pass number of DAI smaller than graphMengdong Lin1-4/+4
The PCM DAIs need to be loaded and added to ASoC core ealier than the graph (route). Otherwise, adding routes will fail for missing DAIs. Signed-off-by: Mengdong Lin <mengdong.lin@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: adjust set DAI format in AC'97 modeMaciej S. Szmigiero1-3/+5
Adjust set DAI format function in fsl_ssi driver so it doesn't fail and clears RXDIR in AC'97 mode. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: instantiate AC'97 CODECMaciej S. Szmigiero1-0/+21
Instantiate AC'97 CODEC in fsl_ssi driver AC'97 mode. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: add AC'97 ops setting check and cleanupMaciej S. Szmigiero1-1/+8
Check whether setting AC'97 ops succeeded and clean them on removal so the fsl_ssi driver can be reloaded. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: enable AC'97 asymmetric ratesMaciej S. Szmigiero1-1/+3
AC'97 bus can support asymmetric playback/capture rates so enable them in this case in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: AC'97 DAI driver needs probe method tooMaciej S. Szmigiero1-0/+1
AC'97 DAI driver struct need the same probe method as I2S one to setup DMA params in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: fsl_ssi: enable IPG clock during AC'97 reg accessMaciej S. Szmigiero1-0/+19
IPG clock have to be enabled during AC'97 CODEC register access in fsl_ssi driver. Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: Intel: fix runtime pm imbalance on errorJunjie Mao1-2/+7
pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Junjie Mao <junjie.mao@enight.me> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: cs42l73: Use case range at appropriate placeAxel Lin1-94/+2
The readable registers are in continuous ranges: 0x01 ~ 0x03, 0x05 ~ 0x5f. Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. No functional change with this patch. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: cs42l56: Use case range at appropriate placeAxel Lin1-46/+1
The readable registers are in continuous range: 0x01 ~ 0x2e. Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. No functional change with this patch. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: cs42l52: Use case range at appropriate placeAxel Lin1-52/+1
The readable registers are in continuous range: 0x01 ~ 0x34. Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. No functional change with this patch. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: cs35l32: Use case range at appropriate placesAxel Lin1-40/+5
Use case range syntax makes the code shorter with better readability when we have a large number of continuous switch cases. Below are the summary of readable/volatile/precious registers. The readable registers: 0x01 ~ 0x0D, 0x0F ~ 0x1C The volatile registers: 0x01 ~ 0x05, 0x15 ~ 0x18 The precious registers: 0x15 ~ 0x18 No functional change with this patch. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: tegra: Convert to managed resourcesVaishali Thakkar1-24/+13
Use managed resource functions devm_clk_put and devm_snd_soc_register_component to simplify error handling. To be compatible with the change various gotos are replaced with direct returns, and unneeded labels are dropped. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: ssm4567: Add sense supportLars-Peter Clausen1-0/+21
The ssm4567 has sensing circuitry that can be used to monitor the current and voltage on the speaker amplifier output has well as the VBAT input. This data can be output over the I2S interface so it can be processed by a DSP or similar. This patch adds the sense capture output stream to the CODEC DAI as well as DAPM widgets that ensure that the sensing circuitry is powered up when the capture stream is active. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-14ASoC: adav80x: Remove .read_flag_mask setting from adav80x_regmap_configAxel Lin1-1/+0
Don't set .read_flag_mask for adav803, it's for adav801 only. Fixes: 0c2d69645628 ("ASoC: adav80x: Split SPI and I2C code into different modules") Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-13ASoC: fsl-asoc-card: Specify codec_dai_name for DAI linksNicolin Chen1-2/+6
The dev->name of CODEC might not be identical to its codec_dai_name, so using dev->name to probe the CODEC dai is not a correct approach. This patch specifies each supporting codec_dai_name instead of using dev->name any more. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-13ASoC: dapm: Consolidate path trace eventsLars-Peter Clausen1-9/+0
The snd_soc_dapm_input_path and snd_soc_dapm_output_path trace events are identical except for the direction. Instead of having two events have a single one that has a field that contains the direction. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-13ASoC: dapm: Consolidate input and output path handlingLars-Peter Clausen1-178/+172
After the recent cleanups and generalizations of the DAPM algorithm the handling of input and output paths is now fully symmetric. This means by making some slight changes to the data structure and using arrays with one entry for each direction, rather than separate fields, it is possible to create a generic implementation that is capable of handling both input and output paths. Unfortunately this generalization significantly increases the code size on the hot path of is_connected_{input,output}_ep() and dapm_widget_invalidate_{input,output}_paths(), which has a negative impact on the overall performance. The inner loops of those functions are quite small and the generic implementation adds extra pointer arithmetic in a few places. Testing on ARM shows that the combined code size of the specialized functions is about 50% larger than the generalized function in relative numbers. But in absolute numbers its less than 200 bytes, which is still quite small. On the other hand the generalized function increases the execution time of dapm_power_one_widget() by 30%. Given that this function is one of the most often called functions of the DAPM framework the trade-off of getting better performance at expense of generating slightly larger code at seems to be worth it. To avoid this still keep two versions of these functions around, one for input and one for output. But have a generic implementation of the algorithm which gets inlined by those two versions. And then let the compiler take care of optimizing it and removing he extra instructions. This still reduces the source code size as well as the makes making changes to the implementation more straight forward since the same change does no longer need to be done in two separate places. Also on the slow paths we can use a generic implementations that handle both input and output paths. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-13ASoC: dapm: dapm_dai_get_connected_widgets: Fix missing mutex unlockLars-Peter Clausen1-1/+1
Make sure to unlock the DAPM mutex when dapm_widget_list_create() fails. This means the function will now generate a trace_snd_soc_dapm_connected event, even if the creation of the list fails. But that was the behavior before the patch that introduced the unlock issue, so that should be fine. Fixes: 1ce43acff0c0 ("ASoC: dapm: Simplify list creation in dapm_dai_get_connected_widgets()") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-12ASoC: fsl: fix typos for sound/soc/fsl/*Xiubo Li4-12/+12
There are too much noise about the typos for fsl's drivers. So I fix all the typos here in this patch in almost every file I touched. Signed-off-by: Xiubo Li <lixiubo@cmss.chinamobile.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-11ASoC: fsl-sai: add 32 bit word length supportZidan Wang1-1/+2
Add 32 bit word length support. There are no code changes required in the SAI driver since it has already wirten the word width to the corresponding register. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-11ASoC: rt5640: fix line out no sound issueJohn Lin1-3/+37
The power for line out was not turned on when line out is enabled. So we add "LOUT amp" widget to turn on the power for line out. Signed-off-by: John Lin <john.lin@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2015-08-11ASoC: rsnd: Silence DMA slave ID compile warning on 64-bitGeert Uytterhoeven1-1/+1
On arm64: sound/soc/sh/rcar/dma.c: In function 'rsnd_dmaen_init': sound/soc/sh/rcar/dma.c:180:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)id); ^ include/linux/dmaengine.h:1185:75: note: in definition of macro 'dma_request_channel' #define dma_request_channel(mask, x, y) __dma_request_channel(&(mask), x, y) ^ Add an intermediate cast to "uintptr_t" to kill the compile warning. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-11ASoC: wm8960: update pll and clock setting functionZidan Wang2-41/+180
Add sysclk auto mode. When it's sysclk auto mode, if the MCLK is available for clock configure, using MCLK to provide sysclk directly, otherwise, search a available pll out frequcncy and set pll. Configure clock in hw_params may cause problems when using bypass style paths without hw_params in machine driver getting called. So add configure clock to set_bias_level. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-10ASoC: max98090: Fix sequencing when starting additional routesFang, Yang A2-6/+41
Enforce correct device sequencing when configuring a new audio route when there is an existing active audio route(s). This patch fixed recording noise issue while playback is active. We have some registers which require the device to be in full shutdown or to enter full shutdown before the register settings will take effect. Currently the driver is not shutting down the device when a new audio route is created. If a new audio route is made active while there is already an active audio route, then the required register sequencing is violated. A hardware shutdown toggle when creating a new audio route corrects the sequencing error. The device must remain in hardware shutdown for 40ms to allow the internal hardware core to fully shutdown. Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Acked-by: Anish Kumar <anish.kumar@maximintegrated.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: sti: Add IEC controlArnaud Pouliquen1-4/+73
Add control to configure IEC60958 settings. Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Add pipe management helpersJeeja KP2-0/+136
To manage DSP we need to create processing pipeline and on cleanup destroy them. So we add create and destroy routines for pipelines The pipelines need to to be executed so we add pipeline run and stop routines All these send required IPCs to DSP using IPC routines added earlier Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Add DSP module init and binding routinesJeeja KP2-0/+192
A module needs to be instantiated and then connected with other modules. On cleanup we need to disconnect the module. This is achieved by helpers module init, bind and unbind which are added here Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Add helpers for SRC and converter modulesHardik T Shah2-4/+76
SRC and converter modules are required to do frequency and channel conversion in DSP. Both take base module configuration and additional SRC and converter parameters. The helpers here are added to calculate the values for these modules Signed-off-by: Hardik T Shah <hardik.t.shah@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Add helpers for DSP module configurationJeeja KP3-0/+725
This adds helper functions to calculate parameters required for base module format and copier module. A generic module is modelled by base module. Copier module is responsible for getting/sending data to FE (host DMAs) and BE (link HDA DMA, SSP, PDM) This also ads module pin management helpers which help in finding pins to use or freeing them up Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Use acpi header for NHLT headerJeeja KP2-13/+2
Instead of defining own acpi header, use the available acpi header defined in acpi framework. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-07ASoC: Intel: Skylake: Fix the NHLT rate sizeJeeja KP1-1/+1
Sampling rate type needs to be u32 instead of u8, nhlt wav format description expected u32 for rate, passing u8 will fetch NULL config in skl_get_ep_blob(). Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>