]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: samsung: pass filter function as pointer
authorArnd Bergmann <arnd@arndb.de>
Wed, 18 Nov 2015 21:31:11 +0000 (22:31 +0100)
committerMark Brown <broonie@kernel.org>
Sat, 21 Nov 2015 13:27:22 +0000 (13:27 +0000)
commit06530b1992f49fdf484f4ecafab8b4a3bdb9c3a1
tree86e387bb60f551945f0a59c8ed2da28fc81fcc5d
parent56b331f3f4024217bf8c26afd82c36e0014a6b87
ASoC: samsung: pass filter function as pointer

As we are now passing the filter data as pointers to the drivers,
we can take the final step and also pass the filter function the
same way. I'm keeping this change separate, as there it's less
obvious that this is a net win.

Upsides of this are:

- The ASoC drivers are completely independent from the DMA engine
  implementation, which simplifies the Kconfig logic and in theory
  allows the same sound drivers to be built in a kernel that supports
  different kinds of dmaengine drivers.

- Consistency with other subsystems and drivers

On the other hand, we have a few downsides:

- The s3c24xx-dma driver now needs to be built-in for the ac97 platform
  device to be instantiated on s3c2440.

- samsung_dmaengine_pcm_config cannot be marked 'const' any more
  because the filter function pointer needs to be set at runtime.
  This is safe as long we don't have multiple different DMA engines
  in thet same system at runtime, but is nonetheless ugly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
13 files changed:
arch/arm/mach-s3c64xx/dev-audio.c
arch/arm/plat-samsung/devs.c
drivers/dma/Kconfig
include/linux/platform_data/asoc-s3c.h
sound/soc/samsung/Kconfig
sound/soc/samsung/ac97.c
sound/soc/samsung/dma.h
sound/soc/samsung/dmaengine.c
sound/soc/samsung/i2s.c
sound/soc/samsung/pcm.c
sound/soc/samsung/s3c2412-i2s.c
sound/soc/samsung/s3c24xx-i2s.c
sound/soc/samsung/spdif.c