summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)Author
2019-02-18ASoC: fsl_spdif: fix sysclk_df typeViorel Suman
According to RM SPDIF STC SYSCLK_DF field is 9-bit wide, values being in 0..511 range. Use a proper type to handle sysclk_df. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: fsl_spdif: fix TXCLK_DF maskViorel Suman
According to RM SPDIF TXCLK_DF mask is 7-bit wide. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: codecs: ad193x: Add support to disable on-chip PLLCodrin Ciubotariu
The on-chip PLL can be disabled if on the MCLKI pin we have an external clock at 512 x fs. This clock can be used as direct internal clock for ADCs or DACs. To support this, we add an extra clock id that can be configured using the set_sysclk() callback. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: codecs: ad193x: Add runtime support for DSP_A and I2S modesCodrin Ciubotariu
The driver only supports DPS_A for DAC, which is configured at probe. This patch adds support for DSP_A and I2S modes by using the set_fmt() callback. A trivial break is also removed from a case's default branch. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: codecs: ad193x: Fix frame polarity for DSP_A formatCodrin Ciubotariu
By default, the codec starts to interpret the left (first) channel on the falling edge (low polarity) of LRCLK. However, for DSP_A, the left channel needs to start on the rising edge of LRCLK. This patch fixes this channel swap by toggling the bit which selects the LRCLK polarity. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: codecs: ad193x: Set constraint to always have 32 sample bitsCodrin Ciubotariu
DACs and ADCs on ad193x codecs require a 32 bit slot size. We should assure that no other size is used. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: codecs: ad193x: Remove capture support for codecs without ADCCodrin Ciubotariu
Some ad193x codecs don't have ADCs, so they have no capture capabilities. This way, we can use this driver in multicodec cards. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-18ASoC: fsi: fix spelling mistake "doens't" -> "doesn't"Colin Ian King
There is a spelling mistake in a dev_err message. Fix it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: samsung: i2s: Prevent potential NULL platform data dereferenceSylwester Nawrocki
When np is NULL i2s_pdata could also be NULL but i2s_pdata is now being dereferenced without proper check. Fix this and shorten the error message so we don't exceed 80 characters limit. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: dmaengine: Remove unused SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME flagSylwester Nawrocki
There is now no users of this flag so remove it together with related code. The chan_name field of snd_dmaengine_dai_dma_data data structure is not removed as it is still in use by the PXA platform. 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-14ASoC: da7219: Update TDM usage to be more flexibleAdam Thomson
The previous implementatation was restrictive with regards to BCLK rates for slave mode where the driver would not allow rates the codec couldn't provide itself as clock master. The codec is able to automatically determine and handle whatever rate is provided so this restriction isn't necessary for slave mode. The code was also flawed with regards to setting of the frame offset as using rx_mask to explicitly set the offset has the knock on effect of impacting the min and max channels for the codec, in soc_pcm_hw_params() through the call to soc_pcm_codec_params_fixup(). With this update, the driver now only limits frame size if codec is clock master, and dynamically determines the BCLK offset relating to WCLK using the tx_mask for slot offset along with the slot width provided. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: da7219: Add support for master mode BCLK rate adjustmentAdam Thomson
Previously the driver would default the BCLK periods per WCLK to 64, to cover all possible non-TDM scenarios when the codec was DAI clock master. However some devices require a lower BCLK rate to operate correctly so with this in mind, this commit updates the code to be more dynamic, with BCLK rate now based on SR and word length provided to hw_params(). Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: samsung: i2s: Convert to SPDX License IndentifierSylwester Nawrocki
Replace GPL v2.0 license statements with SPDX license identifier. 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-14ASoC: samsung: i2s: Comments clean upSylwester Nawrocki
Spelling error fixes, upper/lower case letter changes. 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-14ASoC: samsung: i2s: Change indentation in SAMSUNG_I2S_FMTS definitionSylwester Nawrocki
Change indentation so this macro definition spans 2 rows and looks more consistent with surrounding code. 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-14ASoC: samsung: i2s: Simplify pri_dai, sec_dai pointers usageSylwester Nawrocki
If the probe call is on the primary DAI we can use 'other' in place of i2s->sec_dai, if the probe call is on the secondary DAI we can use 'i2s' in place of other->sec_dai. While at it fix one whitespace issue. 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-14ASoC: stm32: sai: add missing put_device()Wen Yang
The of_find_device_by_node() takes a reference to the underlying device structure, we should release that reference. Fixes: 7dd0d835582f ("ASoC: stm32: sai: simplify sync modes management") Signed-off-by: Wen Yang <yellowriver2010@hotmail.com> Acked-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-14ASoC: samsung: Specify DMA channel names through custom DMA configSylwester Nawrocki
This is a part of conversion of Samsung platforms to use the custom DMA config for specifying DMA channel names, in addition to passing custom DMA device for the secondary CPU DAI's "PCM" component for some variants of the I2S controller. We also don't set the SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME any more as setting it wouldn't allow to specify DMA channels through the custom DMA config. 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-14ASoC: samsung: odroid: Add support for secondary CPU DAISylwester Nawrocki
This patch adds DPCM links in order to support the secondary I2S interface. For the secondary PCM interface to be actually available one more entry should be added to the sound-dai property in sound/cpu node in DT. The changes in driver are done in a way so we are backwards compatible with existing DTS/DTB, i.e. if the cpu sound-dai property contains only one entry only one PCM will be registered. 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-14ASoC: samsung: i2s: Get rid of a static spinlockSylwester Nawrocki
This patch makes the spinlock serializing access to the primary/secondary PCM a per I2S controller lock, rather than a global one. There is no need to have a global lock across multiple I2S controllers in the SoC. 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-14ASoC: samsung: i2s: Move quirks data to common driver data structureSylwester Nawrocki
The quirk flags are common for the primary and the secondary DAI so move respective field from struct i2s_dai to common driver 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-14ASoC: samsung: i2s: Move IP variant data to common driver data structureSylwester Nawrocki
The IP variant data is another thing common for both DAIs, move it to the driver's common 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-14ASoC: samsung: i2s: Drop spinlock pointer from i2s_dai data structureSylwester Nawrocki
As we now have the 'priv' pointer in most of the places we can use priv->lock directly, dropping extra indirection in the SFR region spinlock access. 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-14ASoC: samsung: i2s: Move SFR pointer to common driver data structureSylwester Nawrocki
The SFR region is common for both DAIs so move related data structure field from struct i2s_dai to the common driver 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: cros_ec_codec: Make symbol 'cros_ec_dai' staticWei Yongjun
Fixes the following sparse warning: sound/soc/codecs/cros_ec_codec.c:209:27: warning: symbol 'cros_ec_dai' was not declared. Should it be static? Fixes: b291f42a3718 ("ASoC: cros_ec_codec: Add codec driver for Cros EC") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13ASoC: mediatek: mt8183: make some functions staticWei Yongjun
Fixes the following sparse warnings: sound/soc/mediatek/mt8183/mt8183-dai-i2s.c:966:5: warning: symbol 'mt8183_dai_i2s_get_share' was not declared. Should it be static? sound/soc/mediatek/mt8183/mt8183-dai-i2s.c:986:5: warning: symbol 'mt8183_dai_i2s_set_priv' was not declared. Should it be static? Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13ASoC: cs35l36: Remove unused including <linux/version.h>YueHaibing
Remove including <linux/version.h> that don't need it. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-02-13ASoC: samsung: i2s: Move registers cache to common driver data structureSylwester Nawrocki
There is no need to keep the PM suspend/resume register cache separate for each DAI as those registers are common, move related i2s_dai data structure to the driver's common data structure. This will allow us to simplify the code a little eventually and to make it easier to follow. 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 opclk data to common driver data structureSylwester Nawrocki
The clock for generating I2S signals is also common for both CPU DAIs so move it to the driver's common 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: 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: 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>