summaryrefslogtreecommitdiffstats
path: root/sound/soc/tegra/tegra_wm8753.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: tegra: Unify ASoC machine driversDmitry Osipenko2021-06-151-186/+0
| | | | | | | | | | | | | | | Squash all machine drivers into a single-universal one. This reduces code duplication, eases addition of a new drivers and upgrades older code to a modern Linux kernel APIs. Suggested-by: Jonathan Hunter <jonathanh@nvidia.com> Co-developed-by: Ion Agorria <ion@agorria.com> Signed-off-by: Ion Agorria <ion@agorria.com> Co-developed-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210529154649.25936-3-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: Set driver_name=tegra for all machine driversDmitry Osipenko2021-06-151-0/+1
| | | | | | | | | | | | | | | | | | | | | The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise Tegra UCMs don't match by the path/name. All Tegra machine drivers are specifying the card's name, but it has no effect if model name is specified in the device-tree since it overrides the card's name. We need to set the driver_name to "tegra" in order to get a usable lookup path for the updated ALSA UCMs. The new UCM lookup path has a form of driver_name/card_name. The old lookup paths that are based on driver module name continue to work as before. Note that UCM matching never worked for Tegra ASoC drivers if they were compiled as built-in, this is fixed by supporting the new naming scheme. Cc: stable@vger.kernel.org Signed-off-by: Dmitry Osipenko <digetx@gmail.com> Link: https://lore.kernel.org/r/20210529154649.25936-2-digetx@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: Don't warn on probe deferralJon Hunter2020-11-111-5/+3
| | | | | | | | | | Deferred probe is an expected return value for snd_soc_register_card(). Given that the driver deals with it properly, there's no need to output a warning that may potentially confuse users. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20201111103245.152189-1-jonathanh@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: tegra_wm8753: use devm_snd_soc_register_card()Qinglang Miao2020-10-011-11/+1
| | | | | | | | | Using devm_snd_soc_register_card() can make the code shorter and cleaner. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Link: https://lore.kernel.org/r/20200929112938.47599-1-miaoqinglang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-231-1/+1
| | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87sgdn0yv1.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: Use device managed resource APIs to get the clockSowjanya Komatineni2020-04-211-16/+6
| | | | | | | | | | | | | | | tegra_asoc_utils uses clk_get() to get the clock and clk_put() to free them explicitly. This patch updates it to use device managed resource API devm_clk_get() so the clock will be automatically released and freed when the device is unbound and removes tegra_asoc_utils_fini() as its no longer needed. Tested-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Reviewed-by: Sameer Pujar <spujar@nvidia.com> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
* ASoC: tegra: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto2020-03-271-1/+1
| | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/877dzbir3w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: tegra_wm8753: consider CPU-Platform possibilityKuninori Morimoto2019-06-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | commit 404b229b84af ("ASoC: tegra: tegra_wm8753: don't select unnecessary Platform") Current ALSA SoC avoid to add duplicate component to rtd, and this driver was selecting CPU component as Platform component. Thus, above patch removed Platform settings from this driver, because it assumed these are same component. But, some CPU driver is using generic DMAEngine, in such case, both CPU component and Platform component will have same of_node/name. In other words, there are some components which are different but have same of_node/name. In such case, Card driver definitely need to select Platform even though it is same as CPU. It is depends on CPU driver, but is difficult to know it from Card driver. This patch reverts above patch. Fixes: commit 404b229b84af ("ASoC: tegra: tegra_wm8753: don't select unnecessary Platform") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* Merge tag 'v5.2-rc6' into asoc-5.3Mark Brown2019-06-261-15/+1
|\ | | | | | | Linux 5.2-rc6
| * treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 336Thomas Gleixner2019-06-051-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details you should have received a copy of the gnu general public license along with this program if not write to the free software foundation inc 51 franklin st fifth floor boston ma 02110 1301 usa extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 246 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190530000436.674189849@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | ASoC: tegra: tegra_wm8753: don't select unnecessary PlatformKuninori Morimoto2019-06-191-4/+1
| | | | | | | | | | | | | | | | | | | | ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* | ASoC: tegra: tegra_wm8753: use modern dai_link styleKuninori Morimoto2019-06-061-6/+11
|/ | | | | | | | | ASoC is now supporting modern style dai_link (= snd_soc_dai_link_component) for CPU/Codec/Platform. This patch switches to use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: Remove unnecessary function callDonglin Peng2017-08-211-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>
* ASoC: tegra: Remove unnecessary 'out of memory' messageCodrut Grosu2017-03-071-3/+1
| | | | | | | | This was reported by checkpatch.pl Signed-off-by: Codrut GROSU <codrut.cristian.grosu@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: constify snd_soc_ops structuresJulia Lawall2016-10-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for snd_soc_ops structures that are only stored in the ops field of a snd_soc_dai_link structure. This field is declared const, so snd_soc_ops structures that have this property can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct snd_soc_ops i@p = { ... }; @ok1@ identifier r.i; struct snd_soc_dai_link e; position p; @@ e.ops = &i@p; @ok2@ identifier r.i, e; position p; @@ struct snd_soc_dai_link e[] = { ..., { .ops = &i@p, }, ..., }; @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; struct snd_soc_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct snd_soc_ops i = { ... }; // </smpl> The effect on the layout of the .o files is shown by the following output of the size command, first before then after the transformation: text data bss dec hex filename 3143 1888 384 5415 1527 sound/soc/tegra/tegra_alc5632.o 3191 1840 384 5415 1527 sound/soc/tegra/tegra_alc5632.o text data bss dec hex filename 3672 2176 768 6616 19d8 sound/soc/tegra/tegra_max98090.o 3720 2128 768 6616 19d8 sound/soc/tegra/tegra_max98090.o text data bss dec hex filename 2770 1856 384 5010 1392 sound/soc/tegra/tegra_rt5640.o 2818 1808 384 5010 1392 sound/soc/tegra/tegra_rt5640.o text data bss dec hex filename 4412 2176 768 7356 1cbc sound/soc/tegra/tegra_rt5677.o 4460 2128 768 7356 1cbc sound/soc/tegra/tegra_rt5677.o text data bss dec hex filename 2442 1536 0 3978 f8a sound/soc/tegra/tegra_sgtl5000.o 2490 1480 0 3970 f82 sound/soc/tegra/tegra_sgtl5000.o text data bss dec hex filename 2105 1536 0 3641 e39 sound/soc/tegra/tegra_wm8753.o 2153 1480 0 3633 e31 sound/soc/tegra/tegra_wm8753.o text data bss dec hex filename 3755 1888 768 6411 190b sound/soc/tegra/tegra_wm8903.o 3803 1840 768 6411 190b sound/soc/tegra/tegra_wm8903.o text data bss dec hex filename 2121 1536 0 3657 e49 sound/soc/tegra/trimslice.o 2169 1480 0 3649 e41 sound/soc/tegra/trimslice.o Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: tegra: drop owner assignment from platform_driversWolfram Sang2014-10-201-1/+0
| | | | | | | A platform_driver does not need to set an owner, it will be populated by the driver core. Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
* ASoC: tegra: Replace instances of rtd->codec->card with rtd->cardLars-Peter Clausen2014-07-221-2/+1
| | | | | | | | No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: tegra: Remove unneeded mach-type.h inclduesMark Brown2013-07-171-2/+0
| | | | | | Signed-off-by: Mark Brown <broonie@linaro.org> Acked-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
* ASoC: tegra_wm8753: minor cleanupStephen Warren2013-03-041-8/+7
| | | | | | | | Various minor cleanups so that the probe() body more closely resembles other drivers, for easier comparison. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: remove __dev* attributesBill Pemberton2012-12-101-3/+3
| | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: remove use of __devinitconstBill Pemberton2012-11-201-1/+1
| | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinitconst is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: remove usage of rtd->codecStephen Warren2012-06-081-1/+1
| | | | | | | | | | rtd->codec_dai->codec can be used instead. This is a slight step along the way to not needing the rtd->codec field any more. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: make snd_soc_dai_link more symmetricalStephen Warren2012-06-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this patch, the CPU side of a DAI link was specified using a single name. Often, this was the result of calling dev_name() on the device providing the DAI, but in the case of a CPU DAI driver that provided multiple DAIs, it needed to mix together both the device name and some device-relative name, in order to form a single globally unique name. However, the CODEC side of the DAI link was specified using separate fields for device (name or OF node) and device-relative DAI name. This patch allows the CPU side of a DAI link to be specified in the same way as the CODEC side, separating concepts of device and device-relative DAI name. I believe this will be important in multi-codec and/or dynamic PCM scenarios, where a single CPU driver provides multiple DAIs, while also booting using device tree, with accompanying desire not to hard-code the CPU side device's name into the original .cpu_dai_name field. Ideally, both the CPU DAI and CODEC DAI loops in soc_bind_dai_link() would now be identical. However, two things prevent that at present: 1) The need to save rtd->codec for the CODEC side, which means we have to search for the CODEC explicitly, and not just the CODEC side DAI. 2) Since we know the CODEC side DAI is part of a codec, and not just a standalone DAI, it's slightly more efficient to convert .codec_name/ .codec_of_node into a codec first, and then compare each DAI's .codec field, since this avoids strcmp() on each DAI's CODEC's name within the loop. However, the two loops are essentially semantically equivalent. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: tegra: Add machine driver for WM8753 codecStephen Warren2012-05-191-0/+224
One such machine is Whistler. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>