From: Olivier Moysan <olivier.moysan@st.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com, alsa-devel@alsa-project.org,
robh@kernel.org, mark.rutland@arm.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-kernel@vger.kernel.org, olivier.moysan@st.com,
arnaud.pouliquen@st.com, benjamin.gaignard@st.com
Subject: [PATCH 0/4] ASoC: stm32: sai: add mclk clock provider
Date: Mon, 15 Oct 2018 16:03:32 +0200 [thread overview]
Message-ID: <1539612216-12602-1-git-send-email-olivier.moysan@st.com> (raw)
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
next reply other threads:[~2018-10-15 14:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-15 14:03 Olivier Moysan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1539612216-12602-1-git-send-email-olivier.moysan@st.com \
--to=olivier.moysan@st.com \
--cc=alexandre.torgue@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@st.com \
--cc=benjamin.gaignard@st.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).