Commit Graph

15 Commits

Author SHA1 Message Date
Baoyou Xie 66ead502af ASoC: zx-i2s: introduce pclk for zx2967 family
The pclk is necessary for zx2967 I2S controller. the driver
currently doesn't handle it. This is something we need to fix.

In turn, the driver supports zx296718's I2S controller.

By the way, this patch also change the clock name from tx to wclk
to make it clear.

Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org>
Reviewed-by: Shawn Guo <shawnguo@kernel.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-09 17:26:21 +00:00
Vinod Koul 6c2494f385 ASoC: zx296702-i2s: remove unused ‘format’
In zx_i2s_hw_params(), 'format' is initialized and assigned bits based on
params_format, but never used. So remove it.

sound/soc/zte/zx296702-i2s.c: In function ‘zx_i2s_hw_params’:
sound/soc/zte/zx296702-i2s.c:228:21: warning: variable ‘format’ set but not used [-Wunused-but-set-variable]
  unsigned long val, format;

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Acked-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-15 11:35:20 +00:00
Shawn Guo 44b1c9a6e7 ASoC: zte: spdif: correct ZX_SPDIF_CLK_RAT define
The macro ZX_SPDIF_CLK_RAT should be 2 instead of 4.  With this
fix, we can get correct audio output on HDMI through SPDIF interface.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-08 16:09:44 +00:00
Shawn Guo de7975c2a4 ASoC: zte: spdif and i2s drivers are not zx296702 specific
ZTE ZX SPDIF and I2S drivers can work on not only ZX296702 but also
other ZTE ZX family SoCs like ZX296718, which is an arm64 platform.
Let's make a few renaming and tweak the Kconfig a bit to get the drivers
available for other ZTE ZX platforms.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-08 16:08:37 +00:00
Mark Brown 91931320cf Merge remote-tracking branches 'asoc/topic/wm8996', 'asoc/topic/xtensa' and 'asoc/topic/zx296702' into asoc-next 2015-08-30 15:59:18 +01:00
Axel Lin 534dcd7ea6 ASoC: zx296702-i2s: Fix resource leak when unload module
Use devm_* API to fix leaks in current code.
1. Use devm_kzalloc to fix memory leak for zx_i2s when unload the module.
2. Use devm_snd_soc_register_component to ensure component is unregistered
   when unload the module.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-08-30 15:47:54 +01:00
Krzysztof Kozlowski 2dfbe9afcd ASoC: zx: spdif: Fix devm_ioremap_resource return value check
Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 12:16:33 +01:00
Krzysztof Kozlowski a18da49ff3 ASoC: zx: i2s: Fix devm_ioremap_resource return value check
Value returned by devm_ioremap_resource() was checked for non-NULL but
devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
error this could lead to dereference of ERR_PTR.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-07-13 12:16:29 +01:00
kbuild test robot 67f72776b6 ASoC: zx: fix platform_no_drv_owner.cocci warnings
sound/soc/zte/zx296702-i2s.c:428: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: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 18:16:40 +01:00
Mark Brown 69ccc50231 ASoC: zte: Fix missing dev in devm operation
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:11:18 +01:00
kbuild test robot c8d8ff0a9d ASoC: zx: fix simple_return.cocci warnings
sound/soc/zte/zx296702-spdif.c:191:1-4: WARNING: end returns can be simpified

 Simplify a trivial if-return sequence.  Possibly combine with a
 preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:07:59 +01:00
kbuild test robot 3898182b50 ASoC: zx: fix platform_no_drv_owner.cocci warnings
sound/soc/zte/zx296702-spdif.c:361: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: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 17:07:56 +01:00
kbuild test robot 3c10c280a0 ASoC: zx: zx_i2s_dai can be static
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 15:39:33 +01:00
Jun Nie e5d4cd8780 ASoC: zx: Add ZTE zx296702 I2S DAI driver
Add ZTE zx296702 I2S interface DAI driver

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 13:05:07 +01:00
Jun Nie 6fc3d24d42 ASoC: zx: Add zx296702 SPDIF support
Add driver for zx296702 SPDIF controller

Signed-off-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2015-06-04 13:05:07 +01:00