From: Samuel Holland <samuel@sholland.org>
To: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Jonathan Corbet <corbet@lwn.net>,
Jerome Brunet <jbrunet@baylibre.com>
Cc: Ondrej Jirman <megous@megous.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Samuel Holland <samuel@sholland.org>
Subject: [PATCH v3 0/3] simple-audio-card codec2codec support
Date: Sat, 22 Feb 2020 21:45:30 -0600 [thread overview]
Message-ID: <20200223034533.1035-1-samuel@sholland.org> (raw)
We are currently using simple-audio-card on the Allwinner A64 SoC.
The digital audio codec there (sun8i-codec) has 3 AIFs, one each for the
CPU, the modem, and Bluetooth. Adding support for the secondary AIFs
requires adding codec2codec DAI links.
Since the modem and bt-sco codec DAI drivers only have one set of
possible PCM parameters (namely, 8kHz mono S16LE), there's no real
need for a machine driver to specify the DAI link configuration. The
parameters for these "simple" DAI links can be chosen automatically.
This series adds codec2codec DAI link support to simple-audio-card.
Codec to codec links are automatically detected when all DAIs in the
link belong to codec components.
I tried to reuse as much code as possible, so the first two patches
refactor a couple of helper functions to be more generic.
The last patch adds the new feature and its documentation.
Changes in v3:
- Update use of for_each_rtd_components for v5.6
Changes in v2:
- Drop patch 1 as it was merged
- Automatically detect codec2codec links instead of using a DT property
Samuel Holland (3):
ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates
ASoC: pcm: Export parameter intersection logic
ASoC: simple-card: Add support for codec2codec DAI links
Documentation/sound/soc/codec-to-codec.rst | 9 +++-
include/sound/pcm.h | 9 +++-
include/sound/soc.h | 3 ++
sound/core/pcm_misc.c | 18 +++----
sound/soc/generic/simple-card-utils.c | 49 +++++++++++++++++++
sound/soc/soc-pcm.c | 55 +++++++++++++++-------
6 files changed, 115 insertions(+), 28 deletions(-)
--
2.24.1
next reply other threads:[~2020-02-23 3:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-23 3:45 Samuel Holland [this message]
2020-02-23 3:45 ` [PATCH v3 1/3] ALSA: pcm: Add a standalone version of snd_pcm_limit_hw_rates Samuel Holland
2020-03-03 13:21 ` Mark Brown
2020-02-23 3:45 ` [PATCH v3 2/3] ASoC: pcm: Export parameter intersection logic Samuel Holland
2020-02-23 3:45 ` [PATCH v3 3/3] ASoC: simple-card: Add support for codec2codec DAI links Samuel Holland
2020-03-03 13:49 ` Samuel Holland
2020-03-03 13:51 ` 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=20200223034533.1035-1-samuel@sholland.org \
--to=samuel@sholland.org \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=corbet@lwn.net \
--cc=jbrunet@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=megous@megous.com \
--cc=perex@perex.cz \
--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).