summaryrefslogtreecommitdiff
path: root/sound/soc/amd/raven/acp3x-i2s.c
AgeCommit message (Collapse)AuthorFilesLines
2023-09-25ASoC: amd: convert not to use asoc_xxx()Kuninori Morimoto1-1/+1
ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/878r9cs25b.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-12-26ASoC: amd: Drop empty platform remove functionUwe Kleine-König1-8/+0
A remove callback just returning 0 is equivalent to no remove callback at all. So drop the useless function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20221212205406.3771071-3-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-06-27ASoC: amd: Migrate to new style legacy DAI naming flagCharles Keepax1-1/+2
Change the legacy DAI naming flag from opting in to the new scheme (non_legacy_dai_naming), to opting out of it (legacy_dai_naming). These drivers appear to be on the CPU side of the DAI link and currently uses the legacy naming, so add the new flag. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://lore.kernel.org/r/20220623125250.2355471-19-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-23Merge remote-tracking branch 'asoc/for-5.13' into asoc-nextMark Brown1-1/+1
2021-04-21ASoC: amd: drop S24_LE format supportVijendar Mukunda1-4/+2
AMD I2S Controller doesn't support S24_LE format. Remove S24_LE format support from ACP DMA driver and CPU DAI Driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/1618993402-10354-1-git-send-email-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-04-09ASoC: amd: raven: acp3x-i2s: Constify static struct snd_soc_dai_opsYe Bin1-1/+1
The snd_soc_dai_ops structures is only stored in the ops field of a snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure const to allow the compiler to put it in read-only memory. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ye Bin <yebin10@huawei.com> Link: https://lore.kernel.org/r/20210408062651.803413-1-yebin10@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: amd: use asoc_substream_to_rtd()Kuninori Morimoto1-1/+1
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/87ft9n0ytv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-07ASoC: amd: raven: acp3x-i2s: remove unused-but-set variablePierre-Louis Bossart1-2/+0
Fix W=1 warning. The variable prtd is set but not used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702164433.162815-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-07ASoC: amd: raven: acp3x-i2s: fix 'set but not used' warningPierre-Louis Bossart1-2/+0
Fix W=1 warning. the card variable is useless here Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200702164433.162815-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-06-18ASoC: amd: Removing unnecessary instance initializationRavulapati Vishnu vardhan rao1-8/+0
In trigger we already get the selected instance details from runtime->private_data.So, removing the local initialization which may corrupt the instance selected details and this leads to corrupt data. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200618072624.27047-1-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-05-18ASoC: amd: raven: Make the driver name consistent across filesAkshu Agrawal1-3/+3
This fixes the issue of driver not getting auto loaded with MODULE_ALIAS. With this patch: $find /sys/devices -name modalias -print0 | xargs -0 grep -i acp3x /sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.2/ modalias:platform:acp3x_i2s_playcap /sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.0/ modalias:platform:acp3x_i2s_playcap /sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_rv_i2s_dma.0/ modalias:platform:acp3x_rv_i2s_dma /sys/devices/pci0000:00/0000:00:08.1/0000:03:00.5/acp3x_i2s_playcap.1/ modalias:platform:acp3x_i2s_playcap Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Link: https://lore.kernel.org/r/20200518043913.40646-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-30ASoC: AMD: Clear format bits before setting themAkshu Agrawal1-0/+1
This avoids residual bit form previous format when the format is changed. Hence, the resultant format is not an invalid one. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/20200328093921.32211-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-03-09ASoC: amd: Adding TDM support in hw_params.Ravulapati Vishnu vardhan rao1-31/+13
TDM related settings for ACP registers in hw_params. When TDM mode is enabled, Hw_params needs to read and write from/to respective TX/RX (ACP_(I2S/BT)TDM_(TX/RX)FRMT) registers. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1583751029-2850-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-02-12ASoC: amd: Buffer Size instead of MAX BufferRavulapati Vishnu vardhan rao1-0/+8
Because of MAX BUFFER size in register,when user/app give small buffer size produces noise of old data in buffer. This patch rectifies this noise when using different buffer sizes less than MAX BUFFER. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1581426768-8937-1-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-29ASoC: amd: Fix simultaneous playback and captureAkshu Agrawal1-5/+7
Stopping of one stream is killing the other stream when they are running simultaneously. This is because, IER register is cleared which disables I2S and overrides any other block enables. Clearing IER register only when all streams on a channel are disabled, fixes the issue. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Link: https://lore.kernel.org/r/20200128103029.128841-1-akshu.agrawal@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-01-09ASoC: amd: acp3x: Fix return value check in acp3x_dai_probe()Wei Yongjun1-2/+2
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: c9fe7db6e884 ("ASoC: amd: Refactoring of DAI from DMA driver") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20200108035954.51317-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-31ASoC: amd: add ACP3x TDM mode supportRavulapati Vishnu vardhan rao1-6/+22
ACP3x I2S (CPU DAI) can act in normal I2S and TDM modes. Added support for TDM mode. Desired mode can be selected from ASoC machine driver. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1577540460-21438-4-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-31ASoC: amd: Enabling I2S instance in DMA and DAIRavulapati Vishnu vardhan rao1-21/+102
This patch adds I2S SP support in ACP PCM DMA and DAI. Added I2S support in DMA and DAI probe,its hw_params handling its open and close functionalities. This enables to open and close on the SP instance for playback and capture. Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1577540460-21438-3-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-12-31ASoC: amd: Refactoring of DAI from DMA driverRavulapati Vishnu vardhan rao1-0/+261
ASoC: PCM DMA driver should only have dma ops. So Removed all DAI related functionality.Refactoring the PCM DMA diver code.Added new file containing only DAI ops Signed-off-by: Ravulapati Vishnu vardhan rao <Vishnuvardhanrao.Ravulapati@amd.com> Link: https://lore.kernel.org/r/1577540460-21438-2-git-send-email-Vishnuvardhanrao.Ravulapati@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>