1
0
Fork 0
Commit Graph

717 Commits (d652d5f1eeeb06046009f4fcb9b4542249526916)

Author SHA1 Message Date
Krzysztof Kozlowski 0670c9a723
ASoC: samsung: smdk_wm8994: remove redundant of_match_ptr()
of_match_device() already handles properly !CONFIG_OF case, so passing
the argument via of_match_ptr() is not needed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <snawrocki@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-40-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:33 +00:00
Krzysztof Kozlowski da773b2b45
ASoC: samsung: i2s: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/samsung/i2s.c:1646:42: warning: ‘i2sv5_dai_type_i2s1’ defined but not used [-Wunused-const-variable=]
  sound/soc/samsung/i2s.c:1639:42: warning: ‘i2sv7_dai_type’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <snawrocki@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-36-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:29 +00:00
Krzysztof Kozlowski 3285b66236
ASoC: samsung: smdk_wm8994: mark OF related data as maybe unused
The driver can be compile tested with !CONFIG_OF making certain data
unused:

  sound/soc/samsung/smdk_wm8994.c:139:34: warning: ‘samsung_wm8994_of_match’ defined but not used [-Wunused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20201125164452.89239-11-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-26 13:07:06 +00:00
Zou Wei 45f366ec79
ASoC: samsung: fix platform_no_drv_owner.cocci warnings
./sound/soc/samsung/midas_wm1811.c:534:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Signed-off-by: Zou Wei <zou_wei@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/1605529740-68757-1-git-send-email-zou_wei@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-18 18:00:24 +00:00
Xu Wang ec4177c834
ASoC: samsung: i2s: Remove redundant null check before clk_disable_unprepare
Because clk_disable_unprepare() already checked NULL clock parameter,
so the additional check is unnecessary, just remove it.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
Link: https://lore.kernel.org/r/20201029084137.28771-1-vulab@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-11-05 14:52:35 +00:00
Julia Lawall 40faaca03b
ASoC: samsung: snow: use semicolons rather than commas to separate statements
Replace commas with semicolons.  What is done is essentially described by
the following Coccinelle semantic patch (http://coccinelle.lip6.fr/):

// <smpl>
@@ expression e1,e2; @@
e1
-,
+;
e2
... when any
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/1602407979-29038-7-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-10-26 15:28:08 +00:00
Olof Johansson 465c335bb5 Samsung S3C24xx and S3C64xx machine code cleanup for v5.10
Big cleanup for the Samsung S3C24xx and S3C64xx platforms, although it
 also touches files shared with S5Pv210 and Exynos.  This is mostly Arnd
 Bergmann work which Krzysztof Kozlowski took over, rebased and polished.
 
 The goal is to cleanup, merge and finally make the Samsung S3C24xx and
 S3C64xx architectures multiplatform.  The multiplatform did not happen
 yet here - just cleaning up and merging into one arch/arm/mach-s3c
 directory.  However this is step forward for multiplatform or at least
 to keep this code still maintainable.
 
 This pulls also branch with changes for Samsung SoC sound drivers from
 broonie/sound because the cleanups there were part of this series and
 all further patches depend on them.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAl9NGucQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD1zzWD/0T5JdPls++8JUK04hxkunMJO3Ye2ir/a2C
 YAI2M6fbOludcPeGCRnPBZ3uTbeSOXFrV6UuSVi8EVKoAb0EV3G50XGQecmy/TVx
 nq/c90gtnsODL0Kxjm0767WZl9clKaIE3+VNSyQXAhqJqXK8A1L8ovsUpQEj6fr4
 vaNQi6lW7o0r98OEB14M0z59lSWjanUZ33/R22L3AsRihlJTH0Sye2+zVG85LfMD
 5okekSHndt2/NCUxgLTZIkp/cD/pzmhMRZTl1zWvZPPFsbzpuB9wZt46b7vkEzuN
 NgPElEB9AJgyh/28D064lER6TFhz3TcATZjmEIXX+3tYIaoA2lj60QiSejM2FyBk
 U5a0DYAyzwNs4R1GSQxrKnQS1AXQ+yoDniPcyNaSmuZbxaodAs9Hjxg9KfJ2bfs5
 DFfSUJhf1Uam8UYolMbXqSkhd2KQjXpkF0eLK7sGk3wanO+YEqVs777fHpwIPLmd
 767PD0YN+EfDUwmXAJ5Jgv2kvOJIGul7BTgpWtbRHEaDvLHRQl5OhjsWsj9kWCFX
 fx0Jz1sAUqi+gNq3XUFM88/VPEkTgejmVRULnBxqVsar5b/0BeRJEgA6Ljycv0Jv
 2ux5zdMuX/+Xc4zdaJOWaL8NqRuT8nSynKXbWHTzJk4cF3p12/g3q3LOHBBLcLL6
 AzTEA6iZ0w==
 =bjMI
 -----END PGP SIGNATURE-----

Merge tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into arm/soc

Samsung S3C24xx and S3C64xx machine code cleanup for v5.10

Big cleanup for the Samsung S3C24xx and S3C64xx platforms, although it
also touches files shared with S5Pv210 and Exynos.  This is mostly Arnd
Bergmann work which Krzysztof Kozlowski took over, rebased and polished.

The goal is to cleanup, merge and finally make the Samsung S3C24xx and
S3C64xx architectures multiplatform.  The multiplatform did not happen
yet here - just cleaning up and merging into one arch/arm/mach-s3c
directory.  However this is step forward for multiplatform or at least
to keep this code still maintainable.

This pulls also branch with changes for Samsung SoC sound drivers from
broonie/sound because the cleanups there were part of this series and
all further patches depend on them.

* tag 'samsung-soc-s3c-5.10' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: (62 commits)
  ARM: s3c: Avoid naming clash of S3C24xx and S3C64xx timer setup
  ARM: s3c: Cleanup from old plat-samsung include
  ARM: s3c: make headers local if possible
  ARM: s3c: move into a common directory
  ARM: s3c24xx: stop including mach/hardware.h from mach/io.h
  cpufreq: s3c24xx: move low-level clk reg access into platform code
  cpufreq: s3c2412: use global s3c2412_cpufreq_setrefresh
  ARM: s3c: remove cpufreq header dependencies
  cpufreq: s3c24xx: split out registers
  fbdev: s3c2410fb: remove mach header dependency
  ARM: s3c24xx: bast: avoid irq_desc array usage
  ARM: s3c24xx: spi: avoid hardcoding fiq number in driver
  ARM: s3c24xx: include mach/irqs.h where needed
  ARM: s3c24xx: move s3cmci pinctrl handling into board files
  ARM: s3c24xx: move iis pinctrl config into boards
  ARM: s3c24xx: move spi fiq handler into platform
  ARM: s3c: adc: move header to linux/soc/samsung
  ARM: s3c24xx: move irqchip driver back into platform
  ARM: s3c24xx: move regs-spi.h into spi driver
  ARM: s3c64xx: remove mach/hardware.h
  ...

Link: https://lore.kernel.org/r/20200831154751.7551-1-krzk@kernel.org
Signed-off-by: Olof Johansson <olof@lixom.net>
2020-09-13 11:15:01 -07:00
Gustavo A. R. Silva df561f6688 treewide: Use fallthrough pseudo-keyword
Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/v5.7/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
2020-08-23 17:36:59 -05:00
Arnd Bergmann 673085f450 ARM: s3c24xx: move iis pinctrl config into boards
The s3c_gpio_cfgall_range() function is an internal interface of the
samsung gpio driver and should not be called directly by drivers, so
move the iis pin initialization into the boards.

This means the pin configuration is only run once at early boot, rather
than each time the driver binds, but the effect should be the same.

Note that the s3c2412-i2s driver has no boards using it in mainline linux,
the driver gets selected for the jive machine but is never instantiated.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-28-krzk@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-08-20 17:40:57 +02:00
Krzysztof Kozlowski 35ee36c793 ASoC: Convert Samsung drivers to platform drivers
-----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl89eogTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0Ko0B/9icB170ZABvmA6+P+QPM+zpKI3+Kfu
 zrrkt+ZLA3B0ldWCv245v8QStIxnKI5Zlo/Letxgu72R4JJLl0KzIYQek3ywjUS7
 +0n3q8mcz+RbQ0hegGNe0W6FHlIZk55aw6aCyCBymmkXM0xnyMDMvvqSpDr2hB5S
 rf+yjzxZSRpiu43esY4nyBQ2AovlNdzzH8KywjeUABJ9PF6mLeJr8QHlkgJQLCi5
 AhcDFs+iQNoT9hf2IdSY36KU+5IXqnYC6vFOWuaOhSoN4erwbjw7AsefsVE16HTo
 LzQEW5Kl1We4dnpKbV49cBU7ahvCLh4k3VWHo551BQrGR1oqDIVE0/pi
 =+eMQ
 -----END PGP SIGNATURE-----

Merge tag 'samsung-platdrv-boards' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/soc-s3c-cleanup

Pull Samsung S3C ASoC cleanup patches from Mark Brown.  These patches
are part of the entire cleanup series so all further work depends on
them.
2020-08-20 17:36:39 +02:00
Arnd Bergmann db8230d29c ARM: s5pv210: don't imply CONFIG_PLAT_SAMSUNG
The plat-samsung directory and mach-s5pv210 can be build
completely independently, so split the two Kconfig symbols
CONFIG_PLAT_SAMSUNG and CONFIG_ARCH_S5PV210.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Thierry Reding <thierry.reding@gmail.com>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-18-krzk@kernel.org
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
2020-08-19 21:34:26 +02:00
Arnd Bergmann dcacbc0f9b
ASoC: samsung: s3c2412-i2s: avoid hardcoded S3C2410_PA_IIS
The constant requires indirectly including a machine header file,
but it's not actually used any more since commit 87b132bc03 ("ASoC:
samsung: s3c24{xx,12}-i2s: port to use generic dmaengine API"), so
remove it completely.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-27-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-19 20:15:45 +01:00
Arnd Bergmann 83d74e3542
ASoC: samsung: rx1950: turn into platform driver
Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-26-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-19 20:15:44 +01:00
Arnd Bergmann e26a2abcc2
ASoC: samsung: neo1973: turn into platform driver
Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-25-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-19 20:15:43 +01:00
Arnd Bergmann 9666e27f90
ASoC: samsung: h1940: turn into platform driver
Avoid machine specific headers by using a gpio lookup table
combined with a platform_driver for this board.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200806182059.2431-24-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-08-19 20:15:42 +01:00
Simon Shields fd0ea9cd96
ASoC: samsung: Add sound support for Midas boards
This patch adds support for voice and BT calls, along with standard
audio output via the speaker, earpiece, headphone jack, HDMI, and
any accessories compatible with Midas boards. This patch also supports
headphone/headset detection and headsets with inline buttons.

[m.szyprowski: adaptation to v5.1+ kernels (DAI links initialization)]
[s.nawrocki: removal of the clk API calls for CODEC MCLK, the jack data
 structure moved to struct midas_priv, coding style and typo fixes,
 conversion to new cpu/codec/dai-node binding]

Signed-off-by: Simon Shields <simon@lineageos.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200728131111.14334-2-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-30 21:00:29 +01:00
Kuninori Morimoto c101ce8883
ASoC: samsung: use asoc_substream_to_rtd()
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/87lfjf0yuf.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23 19:07:26 +01:00
Pierre-Louis Bossart b023cc4c4e
ASoC: samsung: pcm: fix kernel-doc
Fix W=1 warnings - missing fields in structure

Credits to Sylwester Nawrocki for the pclk and cclk descriptions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200707190612.97799-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-09 21:56:41 +01:00
Pierre-Louis Bossart 53c512d89f
ASoC: samsung: spdif: fix kernel-doc
Fix W=1 warnings - typos with structure fields

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20200707190612.97799-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-09 21:56:40 +01:00
Masanari Iida f6de798eca
ASoC: samsung: Fix a typo in Kconfig
This patch fixes a spelling typo in samsung/Kconfig.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Link: https://lore.kernel.org/r/20200626142958.253614-1-standby24x7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-26 16:10:58 +01:00
Jonathan Bakker 7a3a7671fa
ASoC: samsung: Add driver for Aries boards
Samsung Aries boards have a WM8994 codec connected to the Samsung
I2S controller, the BT codec, and the cellular modem.  Jack detection
is done by a combination of an ADC, GPIOs, and an extcon device for
the USB dock.  There is also a GPIO for selection between the Mic
path and the TV out path on the headphone jack.

There are two main variants, one with an FM radio and where the modem
is the master and one without a radio and the modem is the slave.

Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
Link: https://lore.kernel.org/r/BN6PR04MB06608CBF03EF27B70B175978A39F0@BN6PR04MB0660.namprd04.prod.outlook.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-15 20:58:30 +01:00
Masahiro Yamada a7f7f6248d treewide: replace '---help---' in Kconfig files with 'help'
Since commit 84af7a6194 ("checkpatch: kconfig: prefer 'help' over
'---help---'"), the number of '---help---' has been gradually
decreasing, but there are still more than 2400 instances.

This commit finishes the conversion. While I touched the lines,
I also fixed the indentation.

There are a variety of indentation styles found.

  a) 4 spaces + '---help---'
  b) 7 spaces + '---help---'
  c) 8 spaces + '---help---'
  d) 1 space + 1 tab + '---help---'
  e) 1 tab + '---help---'    (correct indentation)
  f) 1 tab + 1 space + '---help---'
  g) 1 tab + 2 spaces + '---help---'

In order to convert all of them to 1 tab + 'help', I ran the
following commend:

  $ find . -name 'Kconfig*' | xargs sed -i 's/^[[:space:]]*---help---/\thelp/'

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-14 01:57:21 +09:00
Krzysztof Kozlowski ec21bdc6dd
ASoC: samsung: s3c24xx-i2s: Fix build after removal of DAI suspend/resume
Commit 450312b640 ("ASoC: soc-core: remove DAI suspend/resume")
removed the DAI side suspend/resume hooks and switched entirely to
component suspend/resume.  However the Samsung SoC s3c-i2s-v2 driver was
not updated.

Move the suspend/resume hooks from s3c-i2s-v2.c to s3c2412-i2s.c while
changing dai to component which allows to keep the struct
snd_soc_component_driver const.

This fixes build errors:

    sound/soc/samsung/s3c-i2s-v2.c: In function ‘s3c_i2sv2_register_component’:
    sound/soc/samsung/s3c-i2s-v2.c:730:9: error: ‘struct snd_soc_dai_driver’ has no member named ‘suspend’
      dai_drv->suspend = s3c2412_i2s_suspend;

Reported-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 450312b640 ("ASoC: soc-core: remove DAI suspend/resume")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Link: https://lore.kernel.org/r/20200413124548.28197-1-krzk@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-04-14 12:16:22 +01:00
Kuninori Morimoto 7de6b6bc1a
ASoC: samsung: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointer
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/87ftdzir57.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-27 14:44:45 +00:00
Marek Szyprowski 1a1b374348
ASoC: samsung: Silence warnings during deferred probe
Don't confuse user with meaningless warning about the failure in getting
resources and registering card in case of deferred probe.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20200228101120.28819-1-m.szyprowski@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-28 17:28:29 +00:00
Charles Keepax dc7f090d9a
ASoC: samsung: Update dependencies for Arizona machine drivers
Currently it is possible to get the following bad config:

WARNING: unmet direct dependencies detected for SND_SOC_WM5110
  Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y] && MFD_WM5110 [=n]

commit ea00d95200 ("ASoC: Use imply for SND_SOC_ALL_CODECS")
commit d8dd3f92a6 ("ASoC: Fix SND_SOC_ALL_CODECS imply misc fallout")

After these two patches the machine drivers still selects the
SND_SOC_WM5110 symbol which doesn't take account of the dependency
added on the MFD_WM5110 symbol, fix this by also adding a dependency on
MFD_WM5110 itself.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20200220125654.7064-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-20 13:53:46 +00:00
Kuninori Morimoto 21385a4faa
ASoC: samsung: i2s: move .suspend/.resume to component
There is no big difference at implementation for .suspend/.resume
between DAI driver and Component driver.
But because some driver is using DAI version, thus ALSA SoC needs
to keep supporting it, hence, framework becoming verbose.
If we can switch all DAI driver .suspend/.resume to Component driver,
we can remove verbose code from ALSA SoC.

Driver is getting its private data via dai->dev.
But dai->dev and component->dev are same dev, thus, we can convert
these. For same reason, we can convert dai->active to
component->active if necessary.

This patch moves DAI driver .suspend/.resume to Component driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87wo9nx7it.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-21 17:05:54 +00:00
Kuninori Morimoto 79a5cf90f8
ASoC: samsung: spdif: move .suspend/.resume to component
There is no big difference at implementation for .suspend/.resume
between DAI driver and Component driver.
But because some driver is using DAI version, thus ALSA SoC needs
to keep supporting it, hence, framework becoming verbose.
If we can switch all DAI driver .suspend/.resume to Component driver,
we can remove verbose code from ALSA SoC.

Driver is getting its private data via dai->dev.
But dai->dev and component->dev are same dev, thus, we can convert
these. For same reason, we can convert dai->active to
component->active if necessary.

This patch moves DAI driver .suspend/.resume to Component driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874kwrym42.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-21 17:04:11 +00:00
Kuninori Morimoto 45cfa792f6
ASoC: samsung: s3c24xx-i2s: move .suspend/.resume to component
There is no big difference at implementation for .suspend/.resume
between DAI driver and Component driver.
But because some driver is using DAI version, thus ALSA SoC needs
to keep supporting it, hence, framework becoming verbose.
If we can switch all DAI driver .suspend/.resume to Component driver,
we can remove verbose code from ALSA SoC.

Driver is getting its private data via dai->dev.
But dai->dev and component->dev are same dev, thus, we can convert
these. For same reason, we can convert dai->active to
component->active if necessary.

This patch moves DAI driver .suspend/.resume to Component driver

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zh7ym48.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-21 17:04:03 +00:00
Kuninori Morimoto b9fc10027c
ASoC: samsung: speyside: use snd_soc_dai_link_component for codec_conf
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874ky559in.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16 12:02:48 +00:00
Kuninori Morimoto 1762d3a5fd
ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for codec_conf
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875zil59is.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16 12:02:44 +00:00
Kuninori Morimoto bfc5b22c71
ASoC: samsung: lowland: use snd_soc_dai_link_component for codec_conf
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877e3159ix.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16 12:02:39 +00:00
Kuninori Morimoto 3874b2154b
ASoC: samsung: bells: use snd_soc_dai_link_component for codec_conf
We can use snd_soc_dai_link_component to specify codec_conf.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878snh59j1.wl-kuninori.morimoto.gx@renesas.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-16 12:02:36 +00:00
Takashi Iwai c4d1404665
ASoC: samsung: Drop superfluous ioctl PCM ops
ASoC PCM core deals the empty ioctl field now as default.
Let's kill the redundant lines.

Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20191210145406.21419-14-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-11 15:58:41 +00:00
Kuninori Morimoto 4468189ff3
ASoC: soc-core: find rtd via dai_link pointer at snd_soc_get_pcm_runtime()
Current snd_soc_get_pcm_runtime() is finding rtd by checking dai_link
name. But, it is strange and waste of CPU power, because its user want
to get from rtd from dai_link, not from dai_link name.
This patch find rtd via dai_link pointer instead of its name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/87a781yq67.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-10 13:15:21 +00:00
Linus Torvalds 3f1b210a7f sound updates for 5.5-rc1
There have been some significant changes in the core side, both for
 ALSA and ASoC, while lots of development have been seen in SOF, as
 well as many small fixes/improvements for ASoC codecs and platforms.
 Below is a highlight in this cycle:
 
 Core:
 - The unification of PCM vmalloc buffer allocation helpers into the
   standard API
 - Clean up of the default PCM mmap handling for vmalloc & SG-buffer
 - Fix potential races at ALSA timer open
 - A few new PCM API extensions; just preliminary core changes, the
   actual changes in drivers will be merged in 5.6
 - Continued ASoC componentization works; now almost everything is a
   common ASoC component object.  A lot of refactoring and
   simplification have been done along with it.
 
 ASoC:
 - Many fixes to the Sound Open Firmware (SOF) code
 - Wake on voice support for Chromebooks
 - SPI support and trigger word detection for RT5677
 - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems
   with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770
 
 HD-audio:
 - Improved Intel DSP configuration / probe code for SOF
 - Plumbing the legacy HD-audio driver with Intel SOF HDMI
 - DP-MST support for Nvidia HDMI codecs
 - Realtek quirks cleanups and new additions as usual
 
 Others:
 - Lots of refactoring and cleanups for FireWire; period-size sharing,
   h/w IRQ interval configuration, clock recovery improvements, etc
 - USB-audio: Scarlett mixer quirks
 - Cleanups of PCM calls in various drivers (including media and USB)
   to adapt the core API changes
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl3cAmcOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9UXxAAnybNeJRjvq5jCXIdASNjT7L1GdvEpjsYaqis
 LGibFi8ekJmbs6PH8ALn5aRaaZgM9EONIU/BJ3ItlsX96OZ/o+PT5QBy67osF39K
 zgS0z37puptznj4wy5+istfn7aYuCCSobN9K/3xSS/yX5ibvneBr2d88gKa/u7mn
 ubKKR8r+asBXLyKEHYhtif8IXN7lttYQgIiVGSTGe8a8V0C1VU2VQOFbCVAv2guv
 tg7PYzaQYa/37XLKgdRIovvJGC6r498/aI3aA7dSttUuAlZge6HT9iD/TDhChvmA
 OGyfnH7SViRtp8zlDfCyiwi2vlXSFHrkFYRQaf7Ov4uhAUPlQhehyEAs5SCl3zOB
 Z9BSGYyiyzUCwoy6nnxzsjA+6CSaVx7ceW33Zc64wie4CsvmaWT+QssJ3IQkB+WF
 VQTM0gnzaEKF1yR7jeTFc9ndWFnnHbCRR2WWWsn/U4lxsHczdpt/RoLi+TxTm3YP
 Qb4atYtydgnwFcMvIlWGh68/MzaP3yK9lh0Ckr0GsRgRgMs/nqK/gZMlvCosDMRP
 Hc8j7cSACXF1EZ+dGlVa+q/qiYD9rAFQa8f8h4WB4En6yqkZ+qilk/z/A7sdb8bt
 VaaoOWTK4xEiVeV23RMO74+kPZazkkju636EWTvc2zBTJ6upkaT+geUV/e4g1aSc
 r/gylz8=
 =xGUt
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound updates from Takashi Iwai:
 "There have been some significant changes in the core side, both for
  ALSA and ASoC, while lots of development have been seen in SOF, as
  well as many small fixes/improvements for ASoC codecs and platforms.
  Below is a highlight in this cycle:

  Core:
   - The unification of PCM vmalloc buffer allocation helpers into the
     standard API
   - Clean up of the default PCM mmap handling for vmalloc & SG-buffer
   - Fix potential races at ALSA timer open
   - A few new PCM API extensions; just preliminary core changes, the
     actual changes in drivers will be merged in 5.6
   - Continued ASoC componentization works; now almost everything is a
     common ASoC component object. A lot of refactoring and
     simplification have been done along with it.

  ASoC:
   - Many fixes to the Sound Open Firmware (SOF) code
   - Wake on voice support for Chromebooks
   - SPI support and trigger word detection for RT5677
   - New drivers for Analog Devices ADAU7118, Intel Cannonlake systems
     with RT1011 and RT5682, Texas Instruments TAS2562 and TAS2770

  HD-audio:
   - Improved Intel DSP configuration / probe code for SOF
   - Plumbing the legacy HD-audio driver with Intel SOF HDMI
   - DP-MST support for Nvidia HDMI codecs
   - Realtek quirks cleanups and new additions as usual

  Others:
   - Lots of refactoring and cleanups for FireWire; period-size sharing,
     h/w IRQ interval configuration, clock recovery improvements, etc
   - USB-audio: Scarlett mixer quirks
   - Cleanups of PCM calls in various drivers (including media and USB)
     to adapt the core API changes"

* tag 'sound-5.5-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (497 commits)
  ALSA: usb-audio: Fix Focusrite Scarlett 6i6 gen1 - input handling
  ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
  ALSA: aloop: Fix dependency on timer API
  ASoC: DMI long name - avoid to add board name if matches with product name
  ASoC: improve the DMI long card code in asoc-core
  ASoC: rsnd: fix DALIGN register for SSIU
  ALSA: aloop: Avoid unexpected timer event callback tasklets
  ALSA: aloop: Remove redundant locking in timer open function
  ASoC: component: Add sync_stop PCM ops
  ASoC: pcm: Make ioctl ops optional
  ALSA: hda/hdmi - Clear codec->relaxed_resume flag at unbinding
  ALSA: hda - Disable audio component for legacy Nvidia HDMI codecs
  ALSA: cs4236: fix error return comparison of an unsigned integer
  ALSA: usb-audio: Fix NULL dereference at parsing BADD
  ALSA: usb-audio: Fix Scarlett 6i6 Gen 2 port data
  ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
  ALSA: hda/realtek - Move some alc236 pintbls to fallback table
  ALSA: hda/realtek - Move some alc256 pintbls to fallback table
  ALSA: docs: Update about the new PCM sync_stop ops
  ALSA: pcm: Add card sync_irq field
  ...
2019-11-26 20:04:35 -08:00
Linus Torvalds 436b2a8039 Printk changes for 5.5
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEESH4wyp42V4tXvYsjUqAMR0iAlPIFAl3bpjoACgkQUqAMR0iA
 lPJJDA/+IJT4YCRp2TwV2jvIs0QzvXZrzEsxgCLibLE85mYTJgoQBD3W1bH2eyjp
 T/9U0Zh5PGr/84cHd4qiMxzo+5Olz930weG59NcO4RJBSr671aRYs5tJqwaQAZDR
 wlwaob5S28vUmjPxKulvxv6V3FdI79ZE9xrCOCSTQvz4iCLsGOu+Dn/qtF64pImX
 M/EXzPMBrByiQ8RTM4Ege8JoBqiCZPDG9GR3KPXIXQwEeQgIoeYxwRYakxSmSzz8
 W8NduFCbWavg/yHhghHikMiyOZeQzAt+V9k9WjOBTle3TGJegRhvjgI7508q3tXe
 jQTMGATBOPkIgFaZz7eEn/iBa3jZUIIOzDY93RYBmd26aBvwKLOma/Vkg5oGYl0u
 ZK+CMe+/xXl7brQxQ6JNsQhbSTjT+746LvLJlCvPbbPK9R0HeKNhsdKpGY3ugnmz
 VAnOFIAvWUHO7qx+J+EnOo5iiPpcwXZj4AjrwVrs/x5zVhzwQ+4DSU6rbNn0O1Ak
 ELrBqCQkQzh5kqK93jgMHeWQ9EOUp1Lj6PJhTeVnOx2x8tCOi6iTQFFrfdUPlZ6K
 2DajgrFhti4LvwVsohZlzZuKRm5EuwReLRSOn7PU5qoSm5rcouqMkdlYG/viwyhf
 mTVzEfrfemrIQOqWmzPrWEXlMj2mq8oJm4JkC+jJ/+HsfK4UU8I=
 =QCEy
 -----END PGP SIGNATURE-----

Merge tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk

Pull printk updates from Petr Mladek:

 - Allow to print symbolic error names via new %pe modifier.

 - Use pr_warn() instead of the remaining pr_warning() calls. Fix
   formatting of the related lines.

 - Add VSPRINTF entry to MAINTAINERS.

* tag 'printk-for-5.5' of git://git.kernel.org/pub/scm/linux/kernel/git/pmladek/printk: (32 commits)
  checkpatch: don't warn about new vsprintf pointer extension '%pe'
  MAINTAINERS: Add VSPRINTF
  tools lib api: Renaming pr_warning to pr_warn
  ASoC: samsung: Use pr_warn instead of pr_warning
  lib: cpu_rmap: Use pr_warn instead of pr_warning
  trace: Use pr_warn instead of pr_warning
  dma-debug: Use pr_warn instead of pr_warning
  vgacon: Use pr_warn instead of pr_warning
  fs: afs: Use pr_warn instead of pr_warning
  sh/intc: Use pr_warn instead of pr_warning
  scsi: Use pr_warn instead of pr_warning
  platform/x86: intel_oaktrail: Use pr_warn instead of pr_warning
  platform/x86: asus-laptop: Use pr_warn instead of pr_warning
  platform/x86: eeepc-laptop: Use pr_warn instead of pr_warning
  oprofile: Use pr_warn instead of pr_warning
  of: Use pr_warn instead of pr_warning
  macintosh: Use pr_warn instead of pr_warning
  idsn: Use pr_warn instead of pr_warning
  ide: Use pr_warn instead of pr_warning
  crypto: n2: Use pr_warn instead of pr_warning
  ...
2019-11-25 19:40:40 -08:00
Kefeng Wang 2304d447f9 ASoC: samsung: Use pr_warn instead of pr_warning
As said in commit f2c2cbcc35 ("powerpc: Use pr_warn instead of
pr_warning"), removing pr_warning so all logging messages use a
consistent <prefix>_warn style. Let's do it.

Link: http://lkml.kernel.org/r/20191018031850.48498-28-wangkefeng.wang@huawei.com
To: linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
2019-10-18 15:02:39 +02:00
Kuninori Morimoto ba40ab6275
ASoC: samsung: idma: remove snd_pcm_ops
snd_pcm_ops is no longer needed.
Let's use component driver callback.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v9t790f2.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-08 13:46:14 +01:00
Sylwester Nawrocki dca6408d6f
ASoC: samsung: Rename Arndale card driver
Rename arndale_rt5631.c to just arnddale.c as we support other CODECs
than RT5631.  While at it replace spaces in Kconfig with tabs.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20191002105652.24821-3-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-02 12:52:04 +01:00
Sylwester Nawrocki 03081cc370
ASoC: samsung: arndale: Add support for WM1811 CODEC
The Arndale boards come with different types of the audio daughter
board.  In order to support the WM1811 one we add new definition of
an ASoC card which will be registered when the driver matches on
"samsung,arndale-wm1811" compatible.  There is no runtime detection of
the audio daughter board type at the moment, compatible string of the
audio card needs to be adjusted in DT, e.g. by the bootloader,
depending on actual audio board (CODEC) used.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20191002105652.24821-2-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-02 12:51:42 +01:00
Sylwester Nawrocki aaa68472ed
ASoC: samsung: arndale: Simplify DAI link initialization
There is only one DAI link so we can drop an unnecessary loop statement.
Use card->dai_link in place of direct static arndale_rt5631_dai[] array
dereference as a prerequisite for adding support for other CODECs.
Unnecessary assignment of dai_link->codecs->name to NULL is removed.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Link: https://lore.kernel.org/r/20191002105652.24821-1-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-10-02 12:51:24 +01:00
Sylwester Nawrocki fb629fa258
ASoC: samsung: arndale: Add missing OF node dereferencing
Ensure there is no OF node references kept when the driver
is removed/unbound.

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20190920130218.32690-3-s.nawrocki@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-09-23 14:14:35 -07:00
Kuninori Morimoto 124749194a
ASoC: samsung: tm2_wm5110: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87lfw46w9g.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09 18:12:35 +01:00
Kuninori Morimoto 2d946aaa80
ASoC: samsung: speyside: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87mugk6w9l.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09 18:12:34 +01:00
Kuninori Morimoto d20bb789d7
ASoC: samsung: neo1973_wm8753: use snd_soc_dai_link_component for aux_dev
We can use snd_soc_dai_link_component to specify aux_dev.
Let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/87o9106w9p.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-08-09 18:12:33 +01:00
Wen Yang 2abee12c0a
ASoC: samsung: odroid: fix a double-free issue for cpu_dai
The cpu_dai variable is still being used after the of_node_put() call,
which may result in double-free:

        of_node_put(cpu_dai);            ---> released here

        ret = devm_snd_soc_register_card(dev, card);
        if (ret < 0) {
...
                goto err_put_clk_i2s;    --> jump to err_put_clk_i2s
...

err_put_clk_i2s:
        clk_put(priv->clk_i2s_bus);
err_put_sclk:
        clk_put(priv->sclk_i2s);
err_put_cpu_dai:
        of_node_put(cpu_dai);            --> double-free here

Fixes: d832d2b246 ("ASoC: samsung: odroid: Fix of_node refcount unbalance")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1562989575-33785-3-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-16 19:17:15 +01:00
Wen Yang 9b6d104a6b
ASoC: samsung: odroid: fix an use-after-free issue for codec
The codec variable is still being used after the of_node_put() call,
which may result in use-after-free.

Fixes: bc3cf17b57 ("ASoC: samsung: odroid: Add support for secondary CPU DAI")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Sangbeom Kim <sbkim73@samsung.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1562989575-33785-2-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-16 19:17:14 +01:00
Kuninori Morimoto 74a25f36ba
ASoC: samsung: tm2_wm5110: consider CPU-Platform possibility
commit ae7cbcc43b ("ASoC: samsung: tm2_wm5110: 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 ae7cbcc43b ("ASoC: samsung: tm2_wm5110: don't select unnecessary Platform")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-28 15:16:22 +01:00
Kuninori Morimoto 3dfc3e9c24
ASoC: samsung: snow: consider CPU-Platform possibility
commit a555b6a959 ("ASoC: samsung: snow: 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 a555b6a959 ("ASoC: samsung: snow: don't select unnecessary Platform")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-28 15:16:03 +01:00