From d9c5e2f0c6f07979d7cf201029a833f97e888601 Mon Sep 17 00:00:00 2001 From: Shengjiu Wang <shengjiu.wang@nxp.com> Date: Mon, 11 Jun 2018 15:54:03 +0800 Subject: [PATCH] MLK-18574: ASoC: fsl_spdif: support 192kHz for rx in imx8 The ipg clock is higher enough to support 192kHz in imx8 Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Reviewed-by: Viorel Suman <viorel.suman@nxp.com> (cherry picked from commit 8b43702a18134ce837e36650d6b6e4ddffd12cea) --- sound/soc/fsl/fsl_spdif.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c index 386c459aaa5e59..25dea5a9e3c228 100644 --- a/sound/soc/fsl/fsl_spdif.c +++ b/sound/soc/fsl/fsl_spdif.c @@ -58,6 +58,7 @@ struct fsl_spdif_soc_data { u32 rx_burst; u32 interrupts; u64 tx_formats; + u64 rx_rates; }; /* @@ -139,6 +140,7 @@ static struct fsl_spdif_soc_data fsl_spdif_vf610 = { .rx_burst = FSL_SPDIF_RXFIFO_WML, .interrupts = 1, .tx_formats = FSL_SPDIF_FORMATS_PLAYBACK, + .rx_rates = FSL_SPDIF_RATES_CAPTURE, .constrain_period_size = false, }; @@ -149,6 +151,7 @@ static struct fsl_spdif_soc_data fsl_spdif_imx35 = { .rx_burst = FSL_SPDIF_RXFIFO_WML, .interrupts = 1, .tx_formats = FSL_SPDIF_FORMATS_PLAYBACK, + .rx_rates = FSL_SPDIF_RATES_CAPTURE, .constrain_period_size = false, }; @@ -164,6 +167,7 @@ static struct fsl_spdif_soc_data fsl_spdif_imx8qxp_v1 = { .rx_burst = 2, .interrupts = 2, .tx_formats = SNDRV_PCM_FMTBIT_S24_LE, + .rx_rates = FSL_SPDIF_RATES_CAPTURE, .constrain_period_size = true, }; @@ -174,6 +178,7 @@ static struct fsl_spdif_soc_data fsl_spdif_imx8qm = { .rx_burst = 2, .interrupts = 2, .tx_formats = SNDRV_PCM_FMTBIT_S24_LE, + .rx_rates = (FSL_SPDIF_RATES_CAPTURE | SNDRV_PCM_RATE_192000), .constrain_period_size = true, }; @@ -1423,6 +1428,8 @@ static int fsl_spdif_probe(struct platform_device *pdev) spdif_priv->cpu_dai_drv.name = dev_name(&pdev->dev); spdif_priv->cpu_dai_drv.playback.formats = spdif_priv->soc->tx_formats; + spdif_priv->cpu_dai_drv.capture.rates = + spdif_priv->soc->rx_rates; /* Get the addresses and IRQ */ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); -- GitLab