summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-13ASoC: samsung: i2s: Move core clk to the driver common data structureSylwester Nawrocki
The core clock is also common for both CPU DAIs so move it to the driver's private data structure. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13ASoC: samsung: i2s: Add widgets and routes for DPCM supportSylwester Nawrocki
This patch adds DAPM widgets required to model the internal mixer of the I2S controller merging audio streams from the primary and from the secondary PCM 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>
2019-02-13ASoC: samsung: i2s: Move clk supplier data to common driver data structureSylwester Nawrocki
Having the clocks provider data in struct samsung_i2s_priv, i.e. per the I2S controller instance, rather than per CPU DAI better models the hardware and simplifies the code a little. The clock provider is common for both DAIs. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13Merge branch 'for-5.0' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.1
2019-02-13ASoC: samsung: i2s: Restore support for the secondary PCMSylwester Nawrocki
This patch introduces again registration of additional platform device as we still need it for registering the secondary dmaengine PCM component. This patch in most part is a revert of changes done in commit be2c92eb64023e ("ASoC: samsung: i2s: Remove virtual device for secondary DAI") Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: soc-acpi: remove new_mach_data fieldPierre-Louis Bossart
We never used this field (or in older SOF implementations), let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: soc-acpi: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: cnl-match.c: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: icl-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: hsw-bdw-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: glk-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: cht-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: byt-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: soc-acpi: bxt-match: remove asoc_plat_name fieldPierre-Louis Bossart
This field was never used, let's remove it Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: icl-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: hsw-bdw-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: hda-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: glk-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: cnl-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: cht-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: byt-match.c: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Intel: bxt-match: remove prefix for SOF filesPierre-Louis Bossart
Prefix is now handled in the code. This allows for default and alternate paths, and more flexibility for OEMs and distros Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: samsung: i2s: Convert to single component with multiple DAIsSylwester Nawrocki
This patch includes minimal changes as a prerequisite for adding support for the Exynos secondary I2S interface as second DAI of the I2S component. Doing it that way allows to avoid problems as indicated in commmit 6b01e0365b1689 ("ASoC: samsung: i2s: disable secondary DAI until it gets fixed") The samsung_i2s_get_pri_dai() helper added in this patch is temporary and will be removed in one of subsequent patches. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: samsung: dmaengine: Allow to specify custom DMA deviceSylwester Nawrocki
The additional function argument will allow to select proper DMA device for requesting DMA channel for the secondary CPU DAI. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: dmaengine: Extend use of chan_names provided in custom DMA configSylwester Nawrocki
There are currently two ways to specify custom DMA channel names: - through the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flag and snd_dmaengine_dai_dma_data data structure, - through chan_names field of struct snd_dmaengine_pcm_config. In order to replace the DAI DMA data method with the custom DMA config one on non-DT platforms the dmaengine_pcm_new() function is extended to also consider channel names specified in the custom DMA config. If both config->chan_names and dma_data->chan_name are provided the former will be used. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: dmaengine: Improve of_node test in dmaengine_pcm_request_chan_of()Sylwester Nawrocki
Currently when of_node of the "PCM" device is null dmaengine_pcm_request_chan_of() function will bail out, including cases when custom DMA device is intended to be used. To have the channels properly requested when custom DMA device is provided extend the of_node test to also consider dma_dev->of_node. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: samsung: i2s: Fix prescaler setting for the secondary DAISylwester Nawrocki
Make sure i2s->rclk_srcrate is properly initialized also during playback through the secondary DAI. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: Use __printf markup to silence compilerMathieu Malaterre
Silence warnings (triggered at W=1) by adding relevant __printf attributes. sound/soc/soc-dapm.c:149:2: warning: function 'pop_dbg' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format] Signed-off-by: Mathieu Malaterre <malat@debian.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12tlv320aic32x4: delay i2c access by 1 ms after hardware resetPeter Seiderer
As stated in 'TLV320AIC3254 Application Reference Guide' ([1]): 3.2 Device Startup Lockout Times After the TLV320AIC3254 initializes through hardware reset at power-up or software reset, the internal registers initialize to default values. This initialization takes place within 1ms after pulling the RESET signal high. During this initialization phase, no register-read or register-write operation should be performed on ADC or DAC coefficient buffers. Also, no block within the codec should be powered up during the initialization phase. [1] http://www.ti.com/lit/an/slaa408a/slaa408a.pdf Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-12ASoC: mediatek: btcvsd fix rx stream assignKaiChieh Chuang
fix tx/rx stream assign wrong direction Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: wm8741: Set OSR mode in hw_params()Sergej Sawazki
For correct operation of the digital filtering and other processing on the WM8741, the user must ensure the correct value of OSR[1:0] is set at all times.[1] Hence, depending the selected sampling rate, set the OSR (over- sampling rate) mode in hw_params(). References: [1] "WM8741 Data Sheet" Signed-off-by: Sergej Sawazki <sergej@taudac.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: wm8741: Add digital mute callbackSergej Sawazki
Signed-off-by: Sergej Sawazki <sergej@taudac.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: hdac_hdmi: use devm_kzalloc for all structuresPierre-Louis Bossart
Loading/unloading modules exposes issues with memory allocation, which is a mix of devm_kzalloc and manual kzalloc. Move to devm_k routines everywhere to simplify all this. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: mediatek: use %pOFn instead of device_node.nameKaiChieh Chuang
In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: KaiChieh Chuang <kaichieh.chuang@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: pcm3060: Add clock selectKirill Marinushkin
ADC and DAC can be clocked from separate or same sources CLK1 and CLK2. By default, ADC is clocked from CLK1, and DAC - from CLK2. This commits allows sound cards to selest a proper clock source during `hw_params()` via `snd_soc_dai_set_sysclk()`. It makes possible to have a single clock source for both ADC and DAC. Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-11ASoC: pcm3060: Add soft reset on probeKirill Marinushkin
Softly reset registers values on module probe Signed-off-by: Kirill Marinushkin <kmarinushkin@birdec.tech> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: Intel: Skylake: set .ignore_module_refcount field in componentPierre-Louis Bossart
There is no risk of the module being removed while the platform components are in use. This solves the problem of the snd_soc_skl module not being removable with rmmod Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: core: don't increase component module refcount unconditionallyPierre-Louis Bossart
The ASoC core has for the longest time increased the module reference counts, even before the transition to the component model. This is probably fine on most platforms, but it introduces a deadlock case on Intel devices with the Skylake and SOF drivers which cannot be removed due to their reference counts being modified by the core. In these 2 cases, the PCI or ACPI driver .probe creates a platform device to let the machine driver .probe register the audio card. Conversely the PCI or ACPI driver .remove will unregister the platform device which results in the card being removed by the machine driver .remove. With ascii art, this can be represented as modprobe snd_soc_skl/ soc-pci-dev/sof-acpci-dev ----------> pci/acpi probe ^ | | ---------------| | | | | V V increase register register machine refcount component platform_device ^ | | | | V component <---- register card <---- probe probe The issue is that by playing with the component's module reference counts during the card registration, it's no longer possible to remove the module which controls the component. This can be shown, e.g. with the following error: root@plb-XPS-13-9350:~# lsmod | grep snd_soc_skl snd_soc_skl 110592 1 root@plb-XPS-13-9350:~# rmmod snd_soc_skl rmmod: ERROR: Module snd_soc_skl is in use Increasing the reference count during the component probe is not useful. If the PCI/ACPI module is removed, the card will be removed anyway. To avoid breaking existing platforms and allowing Intel platforms to safely deal with module load/unload cases, this patch introduces a flag which needs to be set during the component initialization. This is a strictly opt-in capability that should only be used when the handling of the component module does not require a reference count increase to prevent removal during use. Note that this solution is not directly applicable to the legacy Atom/SST driver, which uses a different device hierarchy. There are however additional refcount issues which prevent the ACPI driver from being removed. This is a different issue which would need a different patch. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08gpiolib: acpi: Introduce ACPI_GPIO_QUIRK_ONLY_GPIOIOAndy Shevchenko
New quirk enforces search for GPIO based on its type, i.e. iterate over GpioIo resources only. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: msm8916-wcd-digital: convert license header to SPDXJohan Hovold
Convert the GPLv2-only license header to SPDX. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: msm8916-wcd-analog: add missing license informationJohan Hovold
Add the missing license and copyright information which never made it into the analog driver when the original driver was split in two as part of the review process. Link: https://lkml.kernel.org/r/1465582725-30183-3-git-send-email-srinivas.kandagatla@linaro.org Fixes: 585e881e5b9e ("ASoC: codecs: Add msm8916-wcd analog codec") Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: regulator notifier registration should be managedGuennadi Liakhovetski
Regulator notifiers, that were registered during codec driver probing, must be unregistered during driver release, or device managed versions have to be used. This patch fixes codec drivers, that weren't explicitly unregistering notifiers and simplifies those, that did that manually. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08dt-bindings: sound: msm8916-wcd-analog: fix example regulator namesJohan Hovold
Fix upper-case regulator names in the binding example which do not match the corresponding required properties. While at it, add a blank line after the required-properties section to improve readability. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08SoC: stm32: i2s: manage clock powerOlivier Moysan
Kernel clock management: Enable/disable I2S kernel clock on audio stream startup/shutdown. Peripheral clock management: Manage I2S peripheral clock power through regmap services. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: stm32: i2s: add power managementOlivier Moysan
Add suspend and resume sleep callbacks, to support system low power modes. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: codecs: jz4725b: Remove unnecessary const qualifierNathan Chancellor
Clang warns: sound/soc/codecs/jz4725b.c:177:14: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier] static const SOC_VALUE_ENUM_SINGLE_DECL(jz4725b_codec_adc_src_enum, ^ include/sound/soc.h:356:2: note: expanded from macro 'SOC_VALUE_ENUM_SINGLE_DECL' SOC_VALUE_ENUM_DOUBLE_DECL(name, xreg, xshift, xshift, xmask, xtexts, xvalues) ^ include/sound/soc.h:353:2: note: expanded from macro 'SOC_VALUE_ENUM_DOUBLE_DECL' const struct soc_enum name = SOC_VALUE_ENUM_DOUBLE(xreg, xshift_l, xshift_r, xmask, \ ^ As it points out, SOC_VALUE_ENUM_DOUBLE_DECL has the const attribute in its definition so remove it here. Fixes: e9d97b05a80f ("ASoC: codecs: Add jz4725b-codec driver") Link: https://github.com/ClangBuiltLinux/linux/issues/354 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: cs35l36: Add device tree documentation for CS35L36James Schulman
Add device tree documentation for Cirrus Logic CS35L36 speaker amplifier Signed-off-by: James Schulman <james.schulman@cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: cs35l36: Add support for Cirrus CS35L36 AmplifierJames Schulman
Add driver support for Cirrus Logic CS35L36 boosted speaker amplifier Signed-off-by: James Schulman <james.schulman@cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-08ASoC: doc: Fix typos in dpcm.rstSylwester Nawrocki
This patch fixes a few typos in the DPCM documentation. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-07ASoC: codecs: jz4725b: Use C++ style comments in headerPaul Cercueil
Change the header comment to use C++ style, so that it looks more consistent with the rest of ASoC. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Mark Brown <broonie@kernel.org>