summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/imx-spdif.c
AgeCommit message (Collapse)Author
2019-11-25MLK-19154-5: ASoC: fsl_spdif: refine PLL switch handlingViorel Suman
Allow PLL switch for playback stream only and remove PLL switch guard with regard to capture stream as the clock for capture stream is provided externally. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit c8213da5fbcd370acb4d764bef5df5981a517c11)
2019-11-25MLK-19154-4: ASoC: imx_spdif: set SPDIF ROOT clock freq as function of rateViorel Suman
Set SPDIF master clock frequency as function of rate. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 407430a03994e4acff508afe8c9772680558c1c5)
2019-11-25MLK-10903-2: ASoC: imx_spdif: add snd_soc_pm_opsShengjiu Wang
Add snd_soc_pm_ops in machine driver to make the trigger suspend/resume be called in suspend/resume. Remove platform_set_drvdata for redundance, When register card, it has been called. Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com> (cherry picked from commit fe21119eed18804b2bc7c47216b6f4478de0268d)
2019-06-28ASoC: fsl: imx-spdif: consider CPU-Platform possibilityKuninori Morimoto
commit 014f07ca1cb12 ("ASoC: fsl: imx-spdif: 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 014f07ca1cb12 ("ASoC: fsl: imx-spdif: 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-19ASoC: fsl: imx-spdif: don't select unnecessary PlatformKuninori Morimoto
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>
2019-06-06ASoC: fsl: imx-spdif: use modern dai_link styleKuninori Morimoto
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>
2019-04-08ASoC: imx-spdif: Switch to SPDX identifierAndra Danciu
Adopt the SPDX license identifier headers to ease license compliance management. Signed-off-by: Andra Danciu <andradanciu1997@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2019-01-18ASoC: imx-spdif: don't print EPROBE_DEFER as errorStefan Agner
Probe deferral is to be expected during normal operation, so avoid printing an error when it is encountered. Removing the goto would not be strictly necessary. However, if code gets added later, the cleanup in the EPROBE_DEFER case likely would get missed. Signed-off-by: Stefan Agner <stefan@agner.ch> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-01-27ASoC: imx-spdif: Fix crash on suspendLars-Peter Clausen
When registering a ASoC card the driver data of the parent device is set to point to the card. This driver data is used in the snd_soc_suspend()/resume() callbacks. The imx-spdif driver overwrites the driver data with custom data which causes snd_soc_suspend() to crash. Since the custom driver is not used anywhere simply deleting the line which sets the custom driver data fixes the issue. Fixes: 43ac946922b3 ("ASoC: imx-spdif: add snd_soc_pm_ops for spdif machine driver") Tested-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-10-05ASoC: imx-spdif: add snd_soc_pm_ops for spdif machine driverZidan Wang
Add snd_soc_pm_ops in machine driver to make the trigger suspend/resume be called in suspend/resume. Signed-off-by: Zidan Wang <zidan.wang@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2015-01-14ASoC: fsl: imx-spdif: Set the card owner fieldFabio Estevam
Set the card owner field to avoid getting a kernel crash when the imx-spdif is unloaded while the playback is active. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-12-14Merge tag 'driver-core-3.19-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core update from Greg KH: "Here's the set of driver core patches for 3.19-rc1. They are dominated by the removal of the .owner field in platform drivers. They touch a lot of files, but they are "simple" changes, just removing a line in a structure. Other than that, a few minor driver core and debugfs changes. There are some ath9k patches coming in through this tree that have been acked by the wireless maintainers as they relied on the debugfs changes. Everything has been in linux-next for a while" * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits) Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries" fs: debugfs: add forward declaration for struct device type firmware class: Deletion of an unnecessary check before the function call "vunmap" firmware loader: fix hung task warning dump devcoredump: provide a one-way disable function device: Add dev_<level>_once variants ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries ath: use seq_file api for ath9k debugfs files debugfs: add helper function to create device related seq_file drivers/base: cacheinfo: remove noisy error boot message Revert "core: platform: add warning if driver has no owner" drivers: base: support cpu cache information interface to userspace via sysfs drivers: base: add cpu_device_create to support per-cpu devices topology: replace custom attribute macros with standard DEVICE_ATTR* cpumask: factor out show_cpumap into separate helper function driver core: Fix unbalanced device reference in drivers_probe driver core: fix race with userland in device_add() sysfs/kernfs: make read requests on pre-alloc files use the buffer. sysfs/kernfs: allow attributes to request write buffer be pre-allocated. fs: sysfs: return EGBIG on write if offset is larger than file size ...
2014-10-20ASoC: fsl: drop owner assignment from platform_driversWolfram Sang
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>
2014-10-20ASoC: fsl: imx-spdif: Delete unneeded test before of_node_putFabio Estevam
of_node_put() supports NULL as its argument, so the initial test is not necessary. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2014-01-02Merge remote-tracking branches 'asoc/topic/ad1836', 'asoc/topic/ad193x', ↵Mark Brown
'asoc/topic/adav80x', 'asoc/topic/adsp', 'asoc/topic/ak4641', 'asoc/topic/ak4642', 'asoc/topic/arizona', 'asoc/topic/atmel', 'asoc/topic/au1x', 'asoc/topic/axi', 'asoc/topic/bcm2835', 'asoc/topic/blackfin', 'asoc/topic/cs4271', 'asoc/topic/cs42l52', 'asoc/topic/da7210', 'asoc/topic/davinci', 'asoc/topic/ep93xx', 'asoc/topic/fsl', 'asoc/topic/fsl-mxs', 'asoc/topic/generic', 'asoc/topic/hdmi', 'asoc/topic/jack', 'asoc/topic/jz4740', 'asoc/topic/max98090', 'asoc/topic/mxs', 'asoc/topic/omap', 'asoc/topic/pxa', 'asoc/topic/rcar', 'asoc/topic/s6000', 'asoc/topic/sai', 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/spear', 'asoc/topic/ssm2518', 'asoc/topic/ssm2602', 'asoc/topic/tegra', 'asoc/topic/tlv320aic3x', 'asoc/topic/twl6040', 'asoc/topic/txx9', 'asoc/topic/uda1380', 'asoc/topic/width', 'asoc/topic/wm8510', 'asoc/topic/wm8523', 'asoc/topic/wm8580', 'asoc/topic/wm8711', 'asoc/topic/wm8728', 'asoc/topic/wm8731', 'asoc/topic/wm8741', 'asoc/topic/wm8750', 'asoc/topic/wm8753', 'asoc/topic/wm8776', 'asoc/topic/wm8804', 'asoc/topic/wm8900', 'asoc/topic/wm8901', 'asoc/topic/wm8940', 'asoc/topic/wm8962', 'asoc/topic/wm8974', 'asoc/topic/wm8985', 'asoc/topic/wm8988', 'asoc/topic/wm8990', 'asoc/topic/wm8991', 'asoc/topic/wm8994', 'asoc/topic/wm8995', 'asoc/topic/wm9081' and 'asoc/topic/x86' into asoc-next
2013-12-31ASoC: imx-spdif: Use snd-soc-dummy CODEC driver to link cardNicolin Chen
This is a quick fix for the below two issues when building spdif as modules. 1) If modprobing modules in order: (Step 1) snd-soc-fsl-spdif -> (Step 2) snd-soc-imx-spdif -> (Step 3) snd-soc-spdif-tx/rx, we will fail to create imx-spdif card and dai link unless we rmmod snd-soc-imx-spdif and modprobe it again due to the execution platform_driver_unregister() in probe() when meeting -EPROBE_DEFER at Step 2. 2) After "imx-spdif sound-spdif.17: dit-hifi <-> 2004000.spdif mapping ok", 'rmmod snd-soc-imx-spdif' would cause kernel dump with warning: WARNING: CPU: 0 PID: 1301 at /home/rmk/git/linux-rmk/fs/sysfs/dir.c:915 sysfs_hash_and_remove+0x84/0x90() sysfs: can not remove 'dapm_widget', no directory This should be caused by disordered resourse releasing of the whole link. And trying to unregister the card and then CODEC dev can't fix this issue. Thus this patch just provides a simple fix to these two bugs by using the snd-soc-dummy in the core instead of seperate snd-soc-spdif-tx/rx so that there's no need to handle the registering and unregistering of CODEC or CODEC dai any more. Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-12-02ASoC: imx-spdif: Remove error message upon devm_kzalloc() failureFabio Estevam
No need to have a specific OOM message, since there is generic MM out of memory message in place. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-09-19ASoC: imx-spdif: Use devm_snd_soc_register_cardSachin Kamat
devm_snd_soc_register_card makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
2013-08-29ASoC: fsl: Add S/PDIF machine driverNicolin Chen
This patch implements a device-tree-only machine driver for Freescale i.MX series Soc. It works with spdif_transmitter/spdif_receiver and fsl_spdif.c drivers. Signed-off-by: Nicolin Chen <b42378@freescale.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>