summaryrefslogtreecommitdiff
path: root/sound/soc/rockchip/rockchip_pcm.c
AgeCommit message (Collapse)Author
2021-10-20ASoC: rockchip: Use generic dmaengine codeSugar Zhang
This reverts commit 75b31192fe6ad20b42276b20ee3bdf1493216d63. The original purpose of customized pcm was to config prealloc buffer size flexibly. but, we can do the same thing by soc-generic-dmaengine-pcm. And the generic one can generated the better config by querying DMA capabilities from dmaengine driver rather than the Hard-Coded one. e.g. the customized one: static const struct snd_pcm_hardware snd_rockchip_hardware = { .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME | SNDRV_PCM_INFO_INTERLEAVED, ... the generic one: ret = dma_get_slave_caps(chan, &dma_caps); if (ret == 0) { if (dma_caps.cmd_pause && dma_caps.cmd_resume) hw.info |= SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME; if (dma_caps.residue_granularity <= DMA_RESIDUE_GRANULARITY_SEGMENT) hw.info |= SNDRV_PCM_INFO_BATCH; ... So, let's revert back to use the generic dmaengine pcm. Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com> Reviewed-by: John Keeping <john@metanate.com> Link: https://lore.kernel.org/r/1632792957-80428-1-git-send-email-sugar.zhang@rock-chips.com Signed-off-by: Mark Brown <broonie@kernel.org>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500Thomas Gleixner
Based on 2 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 as published by the free software foundation # extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 4122 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Enrico Weigelt <info@metux.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-13ASoC: rockchip: add missing slave_config setting for I2SKatsuhiro Suzuki
This patch adds missing prepare_sleve_config that is needed for setup the DMA slave channel for I2S. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-09-11ASoC: rockchip: add missing INTERLEAVED PCM attributeKatsuhiro Suzuki
This patch adds SNDRV_PCM_INFO_INTERLEAVED into PCM hardware info. Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18ASoC: rockchip: add config for rockchip dmaengine pcm registerJianqun Xu
This patch makes the rockchip i2s pcm configurable by adding rockchip pcm config for devm_snd_dmaengine_pcm_register. Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com> Signed-off-by: Mark Brown <broonie@kernel.org>