[PATCH v2 0/3] simple-audio-card codec2codec support
From: Samuel Holland
Date: Sun Feb 16 2020 - 18:21:46 EST
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 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.
Samuel Holland (3):
ALSA: pcm: Add a non-runtime version of snd_pcm_limit_hw_rates
ASoC: pcm: Export parameter intersection logic
ASoC: simple-card: Add support for codec to codec 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 | 50 ++++++++++++++++++++
sound/soc/soc-pcm.c | 55 +++++++++++++++-------
6 files changed, 116 insertions(+), 28 deletions(-)