linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ASoC: stm32: sai: add mclk clock provider
@ 2018-10-15 14:03 Olivier Moysan
  2018-10-15 14:03 ` [PATCH 1/4] ASoC: dt-bindings: add mclk provider support to stm32 sai Olivier Moysan
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Olivier Moysan @ 2018-10-15 14:03 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, mcoquelin.stm32,
	alexandre.torgue, alsa-devel, robh, mark.rutland, devicetree,
	linux-arm-kernel, linux-stm32, linux-kernel, olivier.moysan,
	arnaud.pouliquen, benjamin.gaignard

This patch set allows to use STM32 SAI interface as a master clock provider.
The Cirrus cs42l51 codec patch gives the example of the source code required on codec side,
to use SAI mclk provider.

These patches allow to cover the following use cases:
	- SAI is master or slave and is master clock provider
	- SAI is master or slave and is not master clock provider (another sai provides the mclk clock)

Implementation overview:
- mclk configuration
	SAI is registered in clock framework:
		- either as a mclk provider (optional in DT). SAI generates mclk when requested by DAPM
		- or as a mclk consumer (optional in DT).
	cs42l51 codec is configured as a mclk consumer (optional in DT)

- mclk power
	A DAPM is registered in codec to handle mclk enable/disable (DAPM route is set in soundcard node)

- mclk rate:
	mclk rate is computed at runtime from stream rate and mclk-fs ratio provided in DT
	mclk rate is propagated through sysclk callback to the SAI which is mclk consumer.
	The mclk rate is set exclusively to avoid concurrent rate requests on SAI master.

Regards
Olivier

Olivier Moysan (4):
  ASoC: dt-bindings: add mclk provider support to stm32 sai
  ASoC: dt-bindings: add mclk support to cs42l51
  ASoC: stm32: sai: set sai as mclk clock provider
  ASoC: cs42l51: add mclk support

 .../devicetree/bindings/sound/cs42l51.txt          |  17 ++
 .../devicetree/bindings/sound/st,stm32-sai.txt     |   7 +
 .../devicetree/bindings/trivial-devices.txt        |   1 -
 sound/soc/codecs/cs42l51.c                         |   8 +
 sound/soc/stm/stm32_sai.h                          |   3 +
 sound/soc/stm/stm32_sai_sub.c                      | 275 ++++++++++++++++++---
 6 files changed, 274 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/cs42l51.txt

-- 
2.7.4


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2018-10-19 12:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-15 14:03 [PATCH 0/4] ASoC: stm32: sai: add mclk clock provider Olivier Moysan
2018-10-15 14:03 ` [PATCH 1/4] ASoC: dt-bindings: add mclk provider support to stm32 sai Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: dt-bindings: add mclk provider support to stm32 sai" to the asoc tree Mark Brown
2018-10-19 12:34   ` Mark Brown
2018-10-15 14:03 ` [PATCH 2/4] ASoC: dt-bindings: add mclk support to cs42l51 Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: dt-bindings: add mclk support to cs42l51" to the asoc tree Mark Brown
2018-10-19 12:34   ` Mark Brown
2018-10-15 14:03 ` [PATCH 3/4] ASoC: stm32: sai: set sai as mclk clock provider Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: stm32: sai: set sai as mclk clock provider" to the asoc tree Mark Brown
2018-10-19 12:33   ` Mark Brown
2018-10-15 14:03 ` [PATCH 4/4] ASoC: cs42l51: add mclk support Olivier Moysan
2018-10-19 12:26   ` Applied "ASoC: cs42l51: add mclk support" to the asoc tree Mark Brown
2018-10-19 12:33   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).