aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-08-03ASoC: samsung: i2s: Mark expected switch fall-throughGustavo A. R. Silva1-0/+1
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 1381093 ("Missing break in switch") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-28Merge remote-tracking branches 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm8996' and 'asoc/topic/wm9081' into asoc-nextMark Brown2-11/+9
2018-03-28Merge remote-tracking branches 'asoc/topic/wm8960', 'asoc/topic/wm8961', 'asoc/topic/wm8962', 'asoc/topic/wm8971' and 'asoc/topic/wm8974' into asoc-nextMark Brown1-3/+3
2018-03-28Merge remote-tracking branches 'asoc/topic/wm2200', 'asoc/topic/wm5100', 'asoc/topic/wm8350', 'asoc/topic/wm8400' and 'asoc/topic/wm8510' into asoc-nextMark Brown1-6/+6
2018-03-28Merge remote-tracking branches 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/bd28623', 'asoc/topic/blackfin' and 'asoc/topic/bt-sco' into asoc-nextMark Brown1-27/+27
2018-03-19ASoC: samsung: Use snd_soc_of_put_dai_link_codecs() in odroid.cSylwester Nawrocki1-14/+2
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 hw_params()Sylwester Nawrocki1-2/+0
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 Nawrocki1-4/+7
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-13ASoC: samsung: Add HDMI audio support for SnowSylwester Nawrocki1-47/+177
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-12ASoC: samsung: Drop uneeded RCLKSRC setting in the Snow driverSylwester Nawrocki1-5/+0
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>
2018-03-12ASoC: samsung: i2s: Fix rclk_srcrate handlingSylwester Nawrocki1-1/+1
As the RCLK clock may be updated through the common clk API before each snd_soc_dai_ops::trigger call, it is not enough to update i2s->rclk_srcrate only once after it has been initially set to 0. To avoid wrong PSR values we always get RCLK frequency from the CLK_I2S_RCLK_SRC clock, when that clock is available. Fixes: e1417fdf3011 "ASoC: samsung: i2s: Ensure the RCLK rate is properly determined" Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-08ASoC: Use proper DT compatible string for Hardkernel Odroid boardsSylwester Nawrocki1-1/+3
The Odroid boards are manufactured by Hardkernel, not Samsung. New compatible string entries are added, with "hardkernel," instead of "samsung," vendor prefix. Support for the old compatible strings is going to be removed after some time. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-14ASoC: samsung: Add support for HDMI audio on TM2 boardSylwester Nawrocki1-23/+129
This patch defines I2S1 - HDMI DAI link and implements related hw_params callback. The AUD PLL frequency is configured through the CLK_SCLK_I2S1 leaf clock, the exynos5433 clock tree definitions are updated in a separate patch. The device tree parsing part is changed is a way it supports older DTBs with just a single CPU DAI specified, without the HDMI link. 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-02-14ASoC: samsung: i2s: Define the parameters list for SAMSUNG_I2S_OPCLKSylwester Nawrocki3-9/+15
The SAMSUNG_I2S_OPCLK is not currently used by any card driver thus we can safely change semantics of 'dir' argument of the I2S set_sysclk() callback. Now an enumeration is exported instead of directly using register bit field values. 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-02-14ASoC: samsung: i2s: Prevent external abort on exynos5433 I2S1 accessSylwester Nawrocki1-2/+7
It seems both PCLK_I2S1 and SCLK_I2S1 clocks need to be enabled before I2S1 control registers can be accessed on exynos5433. If SCLK clock is disabled an exception is triggered. To fix this parent clock of the RCLK_SRC clock is assigned to pri_dai->op_clk so required gate clock is handled by the runtime PM ops. 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-02-14ASoC: samsung: i2s: Ensure names of supplied clocks are uniqueSylwester Nawrocki1-9/+19
In order to support multiple instances of the I2S IP block the platform device name is prepended to each clock registered by the driver. The clock-output-names property is now not used, this should not cause any issues as, for example, CDCLK clock is referenced through DT 'clocks' property, not by name. This change allows to have both I2S0 and I2S1 enabled simultaneously on exynos5433 and working properly when #clock-cells property is specified in respective DT nodes. 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-02-14Merge branch 'topic/component-platform' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-samsungMark Brown1-2/+3
2018-02-14ASoC: arizona: replace codec to componentKuninori Morimoto1-27/+27
Now we can replace Codec to Component. Let's do it. Because there are many drivers which are using arizona, we need to update these all related drivers in same time. Otherwise compile error/warning happen Note: cs47l24 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 wm5102 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 wm5110 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 wm8997 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .ignore_pmdown_time = 0 -> .use_pmdown_time = 1 - -> .endianness = 1 - -> .non_legacy_dai_naming = 1 wm8998 xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .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> Tested-by: Charles Keepax <ckeepax@opensource.cirrus.com> Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: samsung: clean makefile about inexistant filesCorentin Labbe1-3/+0
Clean makefile rules about inexistant files. Thoses files were removed in commit a076d418235f ("ASoC: samsung: Drop AC97 drivers") Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: samsung: idma: replace platform to componentKuninori Morimoto1-2/+3
Now platform can be replaced to component, let's do it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-02-12ASoC: wm8993/wm8994/wm8958: replace codec to componentKuninori Morimoto1-4/+4
Now we can replace Codec to Component. Let's do it. Becase wm8993/wm8994/wm8958 are using wm_hubs feature, we need to update these all related drivers in same time. Otherwise compile error/warning happen wm8993: 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 wm8994: 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-02-12ASoC: wm8996: replace codec to componentKuninori Morimoto1-7/+5
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .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-02-12ASoC: wm8962: replace codec to componentKuninori Morimoto1-3/+3
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .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-02-12ASoC: wm5100: replace codec to componentKuninori Morimoto1-6/+6
Now we can replace Codec to Component. Let's do it. Note: xxx_codec_xxx() -> xxx_component_xxx() .idle_bias_off = 1 -> .idle_bias_on = 0 .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-02-12ASoC: samsung: i2s: Ensure the RCLK rate is properly determinedSylwester Nawrocki1-2/+11
If the RCLK mux clock configuration is specified in DT and no set_sysclk() callback is used in the sound card driver the sclk_srcrate field will remain set to 0, leading to an incorrect PSR divider setting. To fix this the frequency value is retrieved from the CLK_I2S_RCLK_SRC clock, so the actual RCLK mux selection is taken into account. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-12-05ASoC: don't use rtd->codec on samsung/bellsKuninori Morimoto1-20/+20
rtd->codec will be removed soon. rtd->codec = rtd->codec_dai->codec, thus, we can use rtd->codec_dai->component instead of it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-11-10Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/stm32', 'asoc/topic/sunxi' and 'asoc/topic/tas571x' into asoc-nextMark Brown3-3/+11
2017-11-10Merge tag 'asoc-fix-v4.14-rc6' into asoc-linusMark Brown1-1/+5
ASoC: Fixes for v4.14 I've been quite lax in sending these due to conference season but here's a fairly large collection of ASoC updates. The one thing that's not device specific is Takashi's fix for races between delayed work and PCM destruction, otherwise everything is specific to an individual device. # gpg: Signature made Thu 26 Oct 2017 15:11:23 BST # gpg: using RSA key ADE668AA675718B59FE29FEA24D68B725D5487D0 # gpg: issuer "broonie@kernel.org" # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" [unknown] # gpg: aka "Mark Brown <broonie@debian.org>" [unknown] # gpg: aka "Mark Brown <broonie@kernel.org>" [unknown] # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" [unknown] # gpg: aka "Mark Brown <broonie@linaro.org>" [unknown] # gpg: aka "Mark Brown <Mark.Brown@linaro.org>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman1-0/+1
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-26Merge remote-tracking branches 'asoc/fix/rt5514', 'asoc/fix/rt5616', 'asoc/fix/rt5659', 'asoc/fix/rt5663', 'asoc/fix/samsung' and 'asoc/fix/stm32' into asoc-linusMark Brown1-1/+5
2017-10-18ASoC: samsung: i2s: disable secondary DAI until it gets fixedMarek Szyprowski1-0/+1
Secondary DAI in Exynos I2S driver is not used by any of the currently supported boards and it causes problems due to some limitations in the ASoC code. Disable it until it gets proper support both by board-specific and ASoC core code. Also disable IDMA support, which relies on secondary DAI presence. This patch fixes following kernel warning: samsung-i2s 3830000.i2s: ASoC: Failed to create component debugfs directory samsung-i2s 3830000.i2s: ASoC: Failed to create component debugfs directory ------------[ cut here ]------------ WARNING: CPU: 3 PID: 82 at fs/proc/generic.c:330 proc_register+0xec/0x10c proc_dir_entry 'sub0/prealloc' already registered Modules linked in: CPU: 3 PID: 82 Comm: kworker/3:1 Not tainted 4.14.0-rc5-next-20171017 #3089 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events deferred_probe_work_func [<c0110114>] (unwind_backtrace) from [<c010c900>] (show_stack+0x10/0x14) [<c010c900>] (show_stack) from [<c083e664>] (dump_stack+0x90/0xc8) [<c083e664>] (dump_stack) from [<c011d2b8>] (__warn+0xd4/0x100) [<c011d2b8>] (__warn) from [<c011d384>] (warn_slowpath_fmt+0x38/0x48) [<c011d384>] (warn_slowpath_fmt) from [<c0271268>] (proc_register+0xec/0x10c) [<c0271268>] (proc_register) from [<c027130c>] (proc_create_data+0x84/0xc8) [<c027130c>] (proc_create_data) from [<c061afbc>] (snd_info_register+0x64/0xcc) [<c061afbc>] (snd_info_register) from [<c062a6e0>] (snd_pcm_lib_preallocate_pages1+0x78/0x1a0) [<c062a6e0>] (snd_pcm_lib_preallocate_pages1) from [<c063eef4>] (dmaengine_pcm_new+0xa0/0x1ec) [<c063eef4>] (dmaengine_pcm_new) from [<c062b9f8>] (snd_soc_platform_drv_pcm_new+0x1c/0x28) [<c062b9f8>] (snd_soc_platform_drv_pcm_new) from [<c063d54c>] (soc_new_pcm+0x2f4/0x4f4) [<c063d54c>] (soc_new_pcm) from [<c063107c>] (snd_soc_register_card+0xc4c/0xdc4) [<c063107c>] (snd_soc_register_card) from [<c063db30>] (devm_snd_soc_register_card+0x34/0x70) [<c063db30>] (devm_snd_soc_register_card) from [<c064af60>] (asoc_simple_card_probe+0x230/0x47c) [<c064af60>] (asoc_simple_card_probe) from [<c047f8fc>] (platform_drv_probe+0x50/0xb0) [<c047f8fc>] (platform_drv_probe) from [<c047dee0>] (driver_probe_device+0x2a0/0x46c) [<c047dee0>] (driver_probe_device) from [<c047c0bc>] (bus_for_each_drv+0x44/0x8c) [<c047c0bc>] (bus_for_each_drv) from [<c047db50>] (__device_attach+0xa0/0x134) [<c047db50>] (__device_attach) from [<c047cf7c>] (bus_probe_device+0x88/0x90) [<c047cf7c>] (bus_probe_device) from [<c047d484>] (deferred_probe_work_func+0x3c/0x168) [<c047d484>] (deferred_probe_work_func) from [<c01371f8>] (process_one_work+0x188/0x41c) [<c01371f8>] (process_one_work) from [<c01374b4>] (process_scheduled_works+0x28/0x38) [<c01374b4>] (process_scheduled_works) from [<c01376d4>] (worker_thread+0x210/0x4dc) [<c01376d4>] (worker_thread) from [<c013d9cc>] (kthread+0x128/0x164) [<c013d9cc>] (kthread) from [<c0108848>] (ret_from_fork+0x14/0x2c) ---[ end trace bad8db6ee771d094 ]-- Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19ASoC: samsung: Fix invalid argument when devm_gpiod_get is calledJaechul Lee1-2/+1
devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as GPIOD_ASIS and gpio direction isn't set properly. Muted stream comes up when I try recording some sounds on TM2. mic-bias gpiod state can't be changed because the gpiod is created with the invalid parameter. The gpio should be set GPIOD_OUT_HIGH. Fixes: 1bfbc260a5b4 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board") Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19ASoC: samsung: Use 'samsung-i2s' cpu_dai for dai_linksJaechul Lee1-1/+3
Add specific cpu_dai_name to dai_link because samsung i2s driver registers two dais and components. Selecting one of them clearly is needed more information like cpu_dai_name, of_node. The reason why the dai_links have to use 'samsung-i2s' for cpu_dai is that 'samsung-i2s-sec' doesn't have a capture functionality. Without this code, cpu_dai will be selected the first one of the component_list. For example, if I describe nothing to cpu_dai_name, 'samsung-i2s-sec' might be selected to HiFi Primay. Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-19ASoC: samsung: i2s: Use specific name for i2s daisJaechul Lee2-0/+7
Add specific dais name when components are registered. Component and dai name will follow their parent dev name, if the name isn't described. In case of this driver, each dais will have same name like '11440000.i2s0' by fmt_single_name function. The problem having same name is that TM2 machine driver can't detect capture devices correctly. Machine driver doesn't know which one is proper to use for cpu dai. The driver just selects to use 'samsung-i2c-sec' that doesn't have capture functionality because the component of samsung-i2s-sec is located in the first of the component_list. I add dai name like 'samsung-i2s', 'samsung-i2s-sec' for each dais. The reason why adding dai id to 1 is that it doesn't allow to use particular dai name in case of when I use 0 for dai id. Signed-off-by: Jaechul Lee <jcsing.lee@samsung.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-04ASoC: samsung: i2s: Fix error handling path in i2s_set_sysclk()Christophe Jaillet1-1/+4
If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock. Othewise, there is a resource leak. Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of clk_prepare_enable.") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-09-01Merge remote-tracking branches 'asoc/topic/rt5665', 'asoc/topic/rt5670', 'asoc/topic/rt5677' and 'asoc/topic/samsung' into asoc-nextMark Brown14-52/+117
2017-09-01Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack' and 'asoc/topic/jz4740' into asoc-nextMark Brown3-28/+0
2017-08-22ASoC: samsung: Remove superfluous snd_soc_jack_free_gpios() callTakashi Iwai3-28/+0
Since jack gpios are managed via devres, we don't have to call snd_jack_free_gpios() at release any longer. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-21ASoC: s3c24xx_uda134x: Remove unnecessary function callDonglin Peng1-1/+0
First of all,the address of pdev->dev is assigned to card->dev,then the function platform_set_drvdata copies the value the variable card to pdev->dev.driver_data, but when calling snd_soc_register_card,the function dev_set_drvdata(card->dev, card) will also do the same copy operation,so i think that the former copy operation can be removed. Signed-off-by: Peng Donglin <dolinux.peng@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-17ASoC: samsung: make snd_soc_ops constBhumika Goyal4-4/+4
Make these const as they are only stored in the ops field of a snd_soc_dai_link structure, which is const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-15ASoC: samsung: i2s: Null pointer dereference on samsung_i2s_removeAnton Vasilyev1-5/+1
If (quirks & QUIRK_SEC_DAI == 0) then samsung_i2s_probe() doesn't allocate sec_dai and pri_dai->sec_dai remains Null, but samsung_i2s_remove() performs pri_dai->sec_dai dereference in any case. The patch removes useless reinitialization of sec_dai at samsung_i2s_remove(), because resources are under devm control. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14ASoC: samsung: make snd_soc_platform_driver constBhumika Goyal1-1/+1
Make this const as it is only passed as the 2nd argument to the function devm_snd_soc_register_platform, which is of type const. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14ASoC: samsung: constify snd_pcm_ops structuresArvind Yadav1-1/+1
snd_pcm_ops are not supposed to change at runtime. All functions working with snd_pcm_ops provided by <sound/soc.h> work with const snd_pcm_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-08-14ASoC: samsung: make tm2_dapm_widgets and tm2_pm_ops staticColin Ian King1-2/+2
tm2_dapm_widgets and tm2_pm_ops are local to the source and do not need to be in global scope, so make them static. Cleans up sparse warnings: symbol 'tm2_dapm_widgets' was not declared. Should it be static? symbol 'tm2_pm_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>
2017-08-08ASoC: samsung: odroid: Drop requirement of clocks in the sound nodeSylwester Nawrocki1-14/+30
As suggested in reviews the requirement of clocks in the 'sound' node is dropped and instead a leaf clock is used to configure frequency of the audio root clock PLL. This can work now after the clock tree definitions have been updated to allow clock rate setting propagation on the path from the I2S controller up to the EPLL. This patch also lowers the CODEC master clock frequency so as to not exceed the maximum allowed 60 MHz at maximum audio sampling rates. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Add proper error paths to s3c24xx I2S driverKrzysztof Kozlowski3-4/+25
s3c2412_i2s_probe() might fail so driver has to revert work done by s3c_i2sv2_probe() (clock enabling). Missing doing this would lead to clock enable in-balance. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Add missing prepare for iis clock of s3c24xxKrzysztof Kozlowski1-1/+1
The s3c_i2sv2_probe() only enabled iis clock. Missing prepare isn't probably fatal, because for SoC clocks this is usually no-op, but for correctness this clock should be prepared. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav<arvind.yadav.cs@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-28ASoC: samsung: Fix possible double iounmap on s3c24xx driver probe failureKrzysztof Kozlowski1-1/+0
Commit 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API") moved ioremap() call from s3c-i2s-v2.c:s3c_i2sv2_probe() to s3c2412-i2s.c:s3c2412_iis_dev_probe() and converted it to devm- resource managed interface. However the error path in first of them - s3c_i2sv2_probe() - was not updated. If getting a iis clock in s3c_i2sv2_probe() failed, the address space would be unmapped there. This could lead to: 1. double iounmap() later from devm-interface of s3c2412_iis_dev_probe()), 2. accessing the memory by other functions in s3c2412-i2s.c unit. Anyway, the owner of this mapped region should be s3c2412-i2s.c because it starts the mapping. Affected are drivers for S3C24xx family although issue was not reproduced. Fixes: 87b132bc0315 ("ASoC: samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API") Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-by: Arvind Yadav<arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-26ASoC: samsung: spdif: Handle return value of clk_prepare_enable.Arvind Yadav1-2/+6
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-07-26ASoC: samsung: i2s: Handle return value of clk_prepare_enable.Arvind Yadav1-4/+15
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org>