summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
Commit message (Collapse)AuthorAgeFilesLines
* treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner2019-05-211-0/+1
| | | | | | | | | | | | | | Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* ASoC: samsung: tobermory: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-10/+5Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: tm2_wm5110: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-11/+6Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: speyside: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-10/+5Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: spdif: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-17/+8Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: snow: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-12/+3Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: smdk_wm8994*: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-19/+6Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: smdk_wm8580: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-11/+4Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: smdk_spdif: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-11/+5Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: smartq_wm8987: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-14/+7Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: s3c24xx_uda134x: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-12/+8Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: s3c24xx_simtec*: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-194-31/+12Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: s3c2412-i2s: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-25/+14Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: rx1950_uda1380: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-18/+12Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: s3c24xx-i2s: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-193-25/+13Star
| | | | | | | Replace GPL v2.0(+) license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: s3c-i2s-v2: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-193-30/+17Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: pcm: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-19/+8Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-7/+3Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: neo1973_wm8753: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-15/+10Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: lowland: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-10/+5Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: littlemill: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-10/+5Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: jive_wm8750: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-12/+7Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: idma: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-21/+8Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-192-13/+3Star
| | | | | | | | Replace remaining GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: h1940_uda1380: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-14/+8Star
| | | | | | | Replace GPL v2.0+ license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: dmaengine: Convert to SPDX License IndentifierSylwester Nawrocki2019-04-192-22/+8Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: bells: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-10/+5Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: arndale: Convert to SPDX License IdentifierSylwester Nawrocki2019-04-191-12/+5Star
| | | | | | | Replace GPL v2.0 license statements with SPDX license identifier. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Don't use register read to determine slave/master modeSylwester Nawrocki2019-03-201-16/+11Star
| | | | | | | | We can simplify the code by caching the CPU DAI master/slave information rather than reading previously set register bit. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Fix clock configuration for 44100 sample rateSylwester Nawrocki2019-03-131-2/+2
| | | | | | | | | | | | | | | | | After commit fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling") the audio root clock frequency is configured improperly for 44100 sample rate. Due to clock rate rounding it's 20070401 Hz instead of 22579000 Hz. This results in a too low value of the PSR clock divider in the CPU DAI driver and too fast actual sample rate for fs=44100. E.g. 1 kHz tone has actual 1780 Hz frequency (1 kHz * 20070401/22579000 * 2). Fix this by increasing the correction passed to clk_set_rate() to take into account inaccuracy of the EPLL frequency properly. Fixes: fbeec965b8d1c ("ASoC: samsung: odroid: Fix 32000 sample rate handling") Reported-by: JaeChul Lee <jcsing.lee@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Fix DAPM routes for capture streamSylwester Nawrocki2019-03-111-4/+6
| | | | | | | | | | | | | | | This patch sets missing stream_name of capture part of the DAI driver so we can define DAPM routing properly also for the capture stream. While at it "Playback" suffix is added to the playback stream names to clearly identify playback/capture. Together with related dts patch this fixes NULL pointer dereference when opening ALSA device for recording on Odroid XU3. Fixes: 64aba9bca5bd ("ASoC: samsung: i2s: Add widgets and routes for DPCM support") Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Prevent uninitialized variable useSylwester Nawrocki2019-02-211-2/+6
| | | | | | | | | | | | | This addresses an issue pointed out by compiler warning: sound/soc/samsung/odroid.c: In function ‘odroid_audio_probe’: sound/soc/samsung/odroid.c:298:22: warning: ‘cpu_dai’ may be used uninitialized in this function [-Wmaybe-uninitialized] priv->clk_i2s_bus = of_clk_get_by_name(cpu_dai, "iis"); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Fix of_node refcount unbalanceSylwester Nawrocki2019-02-201-7/+12
| | | | | | | | | | In odroid_audio_probe() some OF nodes are left without reference count decrease after use. Fix it by ensuring required of_node_calls() are done before exiting probe. Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Fix multiple "IIS multi" devices initializationSylwester Nawrocki2019-02-192-18/+34
| | | | | | | | | | | | | | | | | | | On some SoCs (e.g. Exynos5433) there are multiple "IIS multi audio interfaces" and the driver will try to register there multiple times same platform device for the secondary FIFO, which of course fails miserably. To fix this we derive the secondary platform device name from the primary device name. The secondary device name will now be <primary_dev_name>-sec instead of fixed "samsung-i2s-sec". The fixed platform_device_id table entry is removed as the secondary device name is now dynamic and device/driver matching is done through driver_override. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Fix secondary platform device unregistrationSylwester Nawrocki2019-02-191-9/+10
| | | | | | | | | | | This fixes unregistration of the secondary platform device so all resources are properly released. Additionally the removal sequence is corrected so it is in reverse order comparing to probe sequence. The test against NULL priv->pdev_sec is removed as it is not necessary. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Add missing DAPM routesSylwester Nawrocki2019-02-191-1/+11
| | | | | | | | | With old DTS there will be missing DAPM routes linking BE with CODECs. Add those routes in the card driver so sound works properly on Odroid XU3/4 also without DTS updates enabling the secondary PCM. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: odroid: Ensure proper sample rate on pri/sec PCMSylwester Nawrocki2019-02-181-0/+56
| | | | | | | | | | | | | | Currently when playing sound with different sample rates actual sample rate will be determined by audio stream which starts first on either primary or secondary PCM. The audio root clock will be configured appropriately only for the first stream. As the hardware is limited to same sample rate on both interfaces we need to disallow streams with different sample rates. It is done by this patch by returning error in FE hw_params if there is already active stream running with different sample rate. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: samsung: i2s: Prevent potential NULL platform data dereferenceSylwester Nawrocki2019-02-141-12/+15
| | | | | | | | | | 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>
* ASoC: samsung: i2s: Convert to SPDX License IndentifierSylwester Nawrocki2019-02-141-10/+6Star
| | | | | | | | 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>
* ASoC: samsung: i2s: Comments clean upSylwester Nawrocki2019-02-141-14/+15
| | | | | | | | 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>
* ASoC: samsung: i2s: Change indentation in SAMSUNG_I2S_FMTS definitionSylwester Nawrocki2019-02-141-3/+2Star
| | | | | | | | | 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>
* ASoC: samsung: i2s: Simplify pri_dai, sec_dai pointers usageSylwester Nawrocki2019-02-141-4/+3Star
| | | | | | | | | | | | 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>
* ASoC: samsung: Specify DMA channel names through custom DMA configSylwester Nawrocki2019-02-144-11/+7Star
| | | | | | | | | | | | | | | 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>
* ASoC: samsung: odroid: Add support for secondary CPU DAISylwester Nawrocki2019-02-141-36/+95
| | | | | | | | | | | | | 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>
* ASoC: samsung: i2s: Get rid of a static spinlockSylwester Nawrocki2019-02-141-7/+9
| | | | | | | | | | 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>
* ASoC: samsung: i2s: Move quirks data to common driver data structureSylwester Nawrocki2019-02-141-21/+12Star
| | | | | | | | | | 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>
* ASoC: samsung: i2s: Move IP variant data to common driver data structureSylwester Nawrocki2019-02-141-21/+21
| | | | | | | | | 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>
* ASoC: samsung: i2s: Drop spinlock pointer from i2s_dai data structureSylwester Nawrocki2019-02-141-27/+24Star
| | | | | | | | | | 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>
* ASoC: samsung: i2s: Move SFR pointer to common driver data structureSylwester Nawrocki2019-02-141-47/+59
| | | | | | | | | 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>
* ASoC: samsung: i2s: Move registers cache to common driver data structureSylwester Nawrocki2019-02-131-9/+11
| | | | | | | | | | | 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>