summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_xcvr.c
AgeCommit message (Collapse)Author
2020-11-05MLK-24965: ASoC: fsl_xcvr: bit and timestamp countersViorel Suman
Add support for bit and timestamp counters. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-11-02MLK-24957-1 ASoC: fsl_xcvr: sync with upstream versionViorel Suman
Sync fsl_xcvr driver with the upstream accepted version. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-07-28MLK-24413: ASoC: fsl_xcvr: fix SPDIF RX/TX sequence issueViorel Suman
In SPDIF full duplex mode in order to get both RX and TX working we need to start RX first, and TX second, fix this by porting SPDIF RX configuration code from XCVR FW into Kernel driver and avoid using M0+ core for SPDIF configuration. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-07-21MLK-24430: ASoC: fsl_xcvr: reverse the order of Channel Status bitsViorel Suman
The Channel Status bits must be reversed. Fixes: 86401d592b3c ("MLK-23725-1: ASoC: fsl_xcvr: reimplement CS read function") Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-07-17MLK-24412: ASoC: fsl_xcvr: remove support for S24_LE TXViorel Suman
There is no need for S24_LE support on TX since IEC958 ALSA plugin is now configured to cover this function. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-06-11MLK-24276: ASoC: fsl_xcvr: fix SPDIF TX suspend/resumeViorel Suman
SPDIF TX fails to play after resume because PHY is put in reset on suspend, and is not re-initialized on resume. Move SPDIF TX configuration in "prepare" callback since "prepare" is called after resume. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29MLK-24139-4 ASoC: fsl_xcvr: allow playback for SPDIF onlyViorel Suman
Allow playback for SPDIF only. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29MLK-24139-3 ASoC: fsl_xcvr: add SPDIF constraintsViorel Suman
Add missing SPDIF constraints. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-29MLK-24139-1 ASoC: fsl_xcvr: split resources for ram, regs and fifosViorel Suman
Split RAM, regs and FIFO resources in DTS. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-15MLK-24043-2: ASoC: fsl_xcvr: do not rise M0+ SPDIF TX interruptViorel Suman
At SPDIF TX interrupt the firmware running on M0+ core overwrites TX DPATH BYPASS FEM bit which turns the expected PHY DMAC TX PLL clock 2*bitclock instead of expected 10*bitclock if SAI PLL is used as PHY DMAC TX PLL. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-15MLK-24043-1: ASoC: fsl_xcvr: fix shutdown for full duplex modeViorel Suman
The existing "shutdown" callback does not consider full duplex mode, fix this. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-12MLK-23991: ASoC: fsl_xcvr: drop eARC -> ARC fallbackViorel Suman
The criteria used to drop eARC mode into ARC mode makes eARC function to fail. Drop it for now. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-05-10ASoC: fsl_xcvr: use SAI PLL for SPDIF playbackViorel Suman
Use SAI PLL for SPDIF playback in order to allow full duplex mode. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-05-01MLK-23887: ASoC: fsl_xcvr: set regcache_cache_only true in probeViorel Suman
Set regmap to use regcache only in probe in order to avoid issue on cat /sys/kernel/debug/regmap/30cc0000.xcvr/registers Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-27MLK-23567-3 ASoC: fsl_xcvr: release M0+ core prior raising interruptViorel Suman
M0+ core must be released prior raising any interrupt to M0+ core, otherwise interrupt will be lost. Fixes: b16426007842 ("MLK-23567-2 ASoC: fsl_xcvr: enable SPDIF TX") Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-24MLK-23840-1 ASoC: fsl_xcvr: remove fsl,xcvr-mode from DTSViorel Suman
XCVR driver working mode is set by "fsl,xcvr-mode" DTS property. Being static - it does not allow changing XCVR driver mode at runtime. Rework the driver by replacing static DTS property with amixer control. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-17MLK-23567-2 ASoC: fsl_xcvr: enable SPDIF TXViorel Suman
Enable XCVR SPDIF TX mode. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-17MLK-23567-1 ASoC: fsl_xcvr: add TX CS bytes controlViorel Suman
For IEC958 kcontrol type amixer tool returns just first 4 bytes, add a byte array control so that we'll be able to set all 24 bytes of TX CS by using amixer. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-16MLK-23799 fsl_xcvr: capabilities data structure supportViorel Suman
Add an amixer interface which allows to load capabilities data structure. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-02MLK-23732: fsl_xcvr: implement eARC RX fallback modeViorel Suman
There are 2 configurable options for eARC RX fallback to ARC mode: "ARC single ended" or "ARC common". Add amixer control in order to allow setting it from userspace. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-02MLK-23734: ASoC: fsl_xcvr: remove sample bits constraintViorel Suman
Sample bits constraint is meaningless given that the only supported format is SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-04-01MLK-23725-3: ASoC: fsl_xcvr: fix CS commentViorel Suman
Fix Channel Status comments. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-01MLK-23725-2: ASoC: fsl_xcvr: add RX CS bytes controlViorel Suman
For IEC958 kcontrol type amixer tool returns just first 4 bytes, add a byte array control so that we'll be able to see all 24 bytes by using amixer. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-04-01MLK-23725-1: ASoC: fsl_xcvr: reimplement CS read functionViorel Suman
CS_DATA registers are supposed to be used by M0+ core, according to block guide host core must read channel status structure from data memory. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25MLK-23603-6: ASoC: fsl_xcvr: move clks management into suspend/resumeViorel Suman
Move clocks prepare_enable and disable_unprepare calls into runtime_resume and runtime_suspend respectively. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25MLK-23603-5: ASoC: fsl_xcvr: move static IP config code into fw loadViorel Suman
Move static XCVR IP configuration code into firmware load method in order to avoid the need to have bus clock started in "startup" callback. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25MLK-23603-3: ASoC: fsl_xcvr: prepare for suspend/resumeViorel Suman
"startup" callback is not called in a subsequent "runtime_resume" sequence, so move IP init code into "prepare" callback. Aside of this move constraint check code from "prepare" to "startup" since constraint checking is required once at stream startup. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25MLK-23603-2: ASoC: fsl_xcvr: refactor constraint handlingViorel Suman
Refactor constraint handling in order to facilitate unimplemented cases, such as for ARC and SPDIF. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-25MLK-23603-1: ASoC: fsl_xcvr: fix compliation warningsViorel Suman
Fix two compilation warnings. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-10MLK-23567-3: ASoC: fsl_xcvr: add TX CS controlViorel Suman
TX CS control is needed for SPDIF/eARC TX function, so add it. Aside of this separate TX controls from RX controls so that controls can be added as function of RX/TX flags of "fsl,xcvr-mode" DTS variable. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-03-10MLK-23567-2: ASoC: fsl_xcvr: use same format for both RX and TXViorel Suman
The only supported XCVR format is IEC958_SUBFRAME_LE, so use it for both RX and TX. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
2020-02-24MLK-23313-11: ASoC: fsl_xcvr: use fsl,xcvr-mode to enable TX/RXViorel Suman
Enable playback and capture as function of fsl,xcvr-mode. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-02-24Revert "MLK-23313-11: ASoC: fsl_xcvr: playback not yet supported"Viorel Suman
This reverts commit 14460831d718c504edc9e10a44439e77666bfca6.
2020-02-24MLK-23313-11: ASoC: fsl_xcvr: playback not yet supportedViorel Suman
Disable playback as it is not supported yet. Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
2020-02-20MLK-23313-3: ASoC: fsl: Add Audio XCVR CPU DAI driver.Viorel Suman
The patch implements Audio XCVR CPU DAI driver for NXP iMX8 SOCs. Audio XCVR is a on-chip functional module and implements HDMI 2.1 spec eARC, ARC and SPDIF modes. Signed-off-by: Viorel Suman <viorel.suman@nxp.com> Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>