summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)Author
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm179x' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1789' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm1681' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/pcm' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/intel' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/dapm' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/core' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branch 'asoc/topic/component-platform' into asoc-nextMark Brown
2018-03-28Merge remote-tracking branches 'asoc/fix/mtk', 'asoc/fix/rt5659', ↵Mark Brown
'asoc/fix/ssm2602' and 'asoc/fix/topology' into asoc-linus
2018-03-28Merge remote-tracking branch 'asoc/fix/component' into asoc-linusMark Brown
2018-03-28ASoC: tscs42xx: Remove owner assignment from i2c_driverFabio Estevam
Structure i2c_driver does not need to set the owner field, as this will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: cpcap: replace codec to componentKuninori Morimoto
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 0 -> .idle_bias_on = 1 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: Intel: bytcr_rt5651: don't use codec anymoreKuninori Morimoto
commit aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") is using codec->dev, but codec is replaced to component. Let's use component Fixes: aeec6cc08215 ("ASoC: Intel: bytcr_rt5651: Configure PLL1 before using it") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28ASoC: amd: don't use codec anymoreKuninori Morimoto
commit c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") is using rtd->codec, but codec is replaced to component. Let's use component Fixes: c88d31153356 ("ASoC: amd: Enable da7219 master clock using common clock framework") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-27ASoC: topology: Fix kcontrol name string handlingLiam Girdwood
Fix the topology kcontrol string handling so that string pointer references are strdup()ed instead of being copied. This fixes issues with kcontrol templates on the stack or ones that are freed. Remember and free the strings too when topology is unloaded. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2018-03-26treewide: Align function definition open/close bracesJoe Perches
Some functions definitions have either the initial open brace and/or the closing brace outside of column 1. Move those braces to column 1. This allows various function analyzers like gnu complexity to work properly for these modified functions. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Paul Moore <paul@paul-moore.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2018-03-22ASoC: nau8824: recover system clock when device changesJohn Hsu
User reports an issue in Ubuntu about the device switch upon playback. We find the FLL will disalbe when switching headphone to speaker. The pulseaudio will stop the headphone and close its power. Then, it just opens the speaker and turn on its power. Therefore, the supply of system clock does the OFF event and disables FLL. But the FLL doesn't enable again when the speaker powers on. The patch adds the recovery of system clock to enable FLL again for this case. And it covers the case that system clock from MCLK. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-21ASoC: rockchip: rk3288-hdmi-analog: Select needed codecsEzequiel Garcia
The driver does not select all the codec drivers that needs. Fix it by selecting the analog and HDMI codecs. Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Signed-off-by: Ezequiel Garcia <ezequiel@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-21ASoC: rockchip: Fix dai_name for HDMI codecEzequiel Garcia
Commit 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") changed the dai_name for the HDMI Codec, breaking the rk3288_hdmi_analog driver, which fails to register with a: rk3288-snd-hdmi-analog sound: ASoC: CODEC DAI hdmi-hifi.0 not registered This commit fixes the dai_name, fixing the issue. Fixes: 24069b589b02 ("ASoC: hdmi-codec: remove multi detection support") Signed-off-by: Ezequiel Garcia <ezequiel@collabora.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-21Merge branch 'topic/intel' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-amd
2018-03-21ASoC: mediatek: mt2701: Fix a typo in printkMasanari Iida
This patch fixes a spelling typo in printk Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-21ASoC: rsnd: set pm_ops in hibernate-compatible wayNikita Yushchenko
Use SET_SYSTEM_SLEEP_PM_OPS() macro instead of direct assignment to .suspend and .resume fields. This makes driver working after restore from hibernation. Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: amd: Enable da7219 master clock using common clock frameworkAkshu Agrawal
DA7219 is clock master for other codecs. DA7219 has exposed clock control by using common clock framework and same is used to enable and disable clock for all codecs in the system. TEST=aplay -D hw:0,0 -vv <file> arecord -D hw:0,0 -f dat -d 5 -vv <file> aplay -D hw:0,1 -vv <file> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: amd: Use single dai for da7219 playback and captureAkshu Agrawal
BT I2S is a bi-directional dai, we will use the same cpu dai for playback and capture. TEST=aplay -D hw:0,0 -vv <file> arecord -D hw:0,0 -f dat -d 5 -vv <file> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: twl6040: remove duplicated remove callbackKuninori Morimoto
We don't need 2 .remove callback Fixes: 7480389fb0d8 ("ASoC: twl6040: replace codec to component") Reported-by: Julia Lawall <julia.lawall@lip6.fr> Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: rt298: don't turn off HV and VREF if headset is detectedBard Liao
"HV" and "VREF" will be powered up when jack type detection process is started and will be powered off when jack type detection process is finished. It will generate an unexpected interrupt signal when they are powered up during the capture process. Codec driver will do the jack type detection process and we can't capture properly before the jack detection process is finished. This patch will not power off the "HV" and "VREF" widgets if headset is detected and it will solve the unexpected interrupt issue. As a result, it will also solve the silence data captured at the beginning in headset mic recording issue. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: rt286: don't turn off HV and VREF if headset is detectedBard Liao
"HV" and "VREF" will be powered up when jack type detection process is started and will be powered off when jack type detection process is finished. It will generate an unexpected interrupt signal when they are powered up during the capture process. Codec driver will do the jack type detection process and we can't capture properly before the jack detection process is finished. This patch will not power off the "HV" and "VREF" widgets if headset is detected and it will solve the unexpected interrupt issue. As a result, it will also solve the silence data captured at the beginning in headset mic recording issue. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-20ASoC: ssm2602: Replace reg_default_raw with reg_defaultJames Kelly
SSM2602 driver is broken on recent kernels (at least since 4.9). User space applications such as amixer or alsamixer get EIO when attempting to access codec controls via the relevant IOCTLs. Root cause of these failures is the regcache_hw_init function in drivers/base/regmap/regcache.c, which prevents regmap cache initalization from the reg_defaults_raw element of the regmap_config structure when registers are write only. It also disables the regmap cache entirely when all registers are write only or volatile as is the case for the SSM2602 driver. Using the reg_defaults element of the regmap_config structure rather than the reg_defaults_raw element to initalize the regmap cache avoids the logic in the regcache_hw_init function entirely. It also makes this driver consistent with other ASoC codec drivers, as this driver was the ONLY codec driver that used the reg_defaults_raw element to initalize the cache. Tested on Digilent Zybo Z7 development board which has a SSM2603 codec chip connected to a Xilinx Zynq SoC. Signed-off-by: James Kelly <jamespeterkelly@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
2018-03-19soc-core: don't call kfree() for componentKuninori Morimoto
When driver register its component to ALSA SoC, almost all drivers are using snd_soc_register_component(), but soc-generic-dmaengine-pcm is using snd_soc_add_component(). Existing component function had been assumed that registered component was allocated, and it calling kfree() for it. But, the user who used snd_soc_add_component() doesn't. This patch uses devm_kzalloc() instead of kzalloc() for component, and doesn't call kree() anymore. This patch fixes commit be7ee5f32a9a ("ASoC: soc-generic-dmaengine-pcm: replace platform to component"). Allwinner H3 SoC will crash without this patch. Thanks Jernej report. Reported-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Jernej Skrabec <jernej.skrabec@siol.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: topology: Check widget kcontrols before deref.Liam Girdwood
Validate the topology input before we dereference the pointer. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: pcm: improve debug output for DPCM BE searching.Liam Girdwood
Improve the DPCM BE search debug output to make it easier to debug issues in topologies. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: samsung: Use snd_soc_of_put_dai_link_codecs() in odroid.cSylwester Nawrocki
Now when a helper for unreferencing device nodes is available we can get rid of the local implementation. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: samsung: odroid: Drop sample rates that cannot be supported from ↵Sylwester Nawrocki
hw_params() The I2S controller can handle sample rates only up to 96000 and the CPU DAI has already related constraint set so drop the impossible 176400, 192000 switch cases. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: samsung: odroid: Fix 32000 sample rate handlingSylwester Nawrocki
In case of sample rates lower than 44100 currently there is too low MCLK frequency set for the CODEC. Playback fails with following errors: $ speaker-test -c2 -t sine -f 1500 -l2 -r 32000 Sine wave rate is 1500.0000Hz Rate set to 32000Hz (requested 32000Hz) Buffer size range from 128 to 131072 Period size range from 64 to 65536 Using max buffer size 131072 Periods = 4 Unable to set hw params for playback: Invalid argument Setting of hwparams failed: Invalid argument [ 497.883700] max98090 1-0010: Invalid master clock frequency To fix this the I2S root clock's frequency is increased, depending on sampling rate. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: add tda7419 audio processor driverMatt Porter
Component driver for the tda7419 audio processor. Signed-off-by: Matt Porter <mporter@konsulko.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: codecs: Add support for PCM1789Mylène Josserand
Add Texas Instruments's PCM1789 DAC support. It is a simple DAC and does not have many registers. One particularity about this DAC is that the clocks must be always enabled. Also, an entire software reset is necessary while starting to play a sound otherwise, the clocks are not synchronized (so the DAC is not able to send data). Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-18ASoC: da7210: Use devm_snd_soc_register_component()weiyongjun (A)
Since the remove callback is removed, the snd_soc_unregister_component() is missing when remove device. Using devm_snd_soc_register_component() instead of snd_soc_register_component(). Fixes: d06f33aed85c ("ASoC: da7210: replace codec to component") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-18ASoC: wm8400: Use devm_snd_soc_register_component()weiyongjun (A)
Since the remove callback is removed, the snd_soc_unregister_component() is missing when remove device. Using devm_snd_soc_register_component() instead of snd_soc_register_component(). Fixes: 10dc44c6462d ("ASoC: wm8400: replace codec to component") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-18ASoC: mediatek: mt2701: drop unnessary snd_soc_unregister_component()Wei Yongjun
It's not necessary to unregister a component registered with devm_snd_soc_register_component(). Fixes: f1b5bf07365d ("ASoC: mt2701/mt8173: replace platform to componen") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-18ASoC: uniphier: add syscon property for UniPhier sound systemKatsuhiro Suzuki
This patch adds syscon property for specifying soc-glue core. Currently, soc-glue core is used for changing the state of S/PDIF signal output pin to signal output state or Hi-Z state. After resetting of SoC Hi-Z state is selected. This driver set to signal output state when syscon property is available. Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-14ASoC: remove blackfin driversArnd Bergmann
The blackfin architecture is getting removed, so the ASoC drivers are all obsolete as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-14ASoC: da7219: make structure da7219_dai_clks_ops staticColin Ian King
structure da7219_dai_clks_ops is local to the source and does not need to be in global scope, so make it static. Cleans up sparse warning: sound/soc/codecs/da7219.c:1777:22: warning: symbol 'da7219_dai_clks_ops' was not declared. Should it be static? Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-14ASoC: uniphier: evea: add switch for changing source of line-inKatsuhiro Suzuki
This patch adds mixer switch for changing audio source of line-in. We can choose one of LIN1, 2, 3, default is LIN1. Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-13ASoC: dapm: add support to pinctrl dapmSrinivas Kandagatla
Purpose of having pinctrl dapm is to dynamically put the pins in low power state when they are not actively used by the audio and saving power. Without this each driver has to set the pinctrl states, either during probe or dynamically depending on the callbacks received from ASoC core. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-13ASoC: Intel: Skylake: Disable clock and power gating during FW/LIB downloadSanyog Kale
In order to achieve better DMA performance and reduce download time for firmware and library, it is recommended to disable dynamic clock and power gating. In some scenarios, DMA may wait to accumulate more data and last chunk of data never gets completed if dynamic clock and power gating is kept enabled. This patch adds support to disable/enable dynamic clock and power gating and use it during firmware and library download. Signed-off-by: Rakesh Ughreja <rakesh.a.ughreja@intel.com> Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com> Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-13ASoC: samsung: Add HDMI audio support for SnowSylwester Nawrocki
This patch updates the driver so, in addition to current DT bindings, it also can also use the new DT bindings with cpu, codec subnodes which allow to support sound on the HDMI interface. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-13ASoC: da7219: clkdev_drop usage depends on CONFIG_COMMON_CLKAdam Thomson
Fixes: ASoC: da7219: Add common clock usage for providing DAI clks clkdev_drop usage in the codec remove function should be dependent on if CONFIG_COMMON_CLK is defined for the platform, otherwise it can cause build failures for platforms that do not support this. The clkdev_* functions are still defined for those platforms, in headers and source but the functions are not linked in. This patch resolves this issue, so clkdev_drop is only used if CONFIG_COMMON_CLK is defined. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12ASoC: rt5651: move definitions of dt-binding constants to include/dt-bindingsHans de Goede
Move the definitions of constants used in the dt-bindings from include/sound/rt5651.h to include/dt-bindings/sound/rt5651.h. As dt-bindings headers may also be parsed by the dt-compiler, they cannot use enums, only defines, so this commit also changes the code declaring the constants to use defines. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12ASoC: topology: create TLV data for dapm widgetsRanjani Sridharan
This patch adds the change required to create the TLV data for dapm widget kcontrols from topology. This also fixes the following TLV read error shown in amixer while showing the card control contents. "amixer: Control hw:1 element TLV read error: No such device or address" Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-12ASoC: samsung: Drop uneeded RCLKSRC setting in the Snow driverSylwester Nawrocki
The RCLKSRC mux input 0 is a default configuration after reset, so there is no need for this explicit snd_soc_dai_set_sysclk() call. Also, this static mux clock configuration can be specified in DT. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>