diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2021-07-14 11:22:00 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-07-14 18:02:05 +0100 |
commit | 81d3d3d0bf09e606dbc1e3daad1c7cef3976fca2 (patch) | |
tree | dfddac372d7f6ec25039f005be6924fe04e8838c /sound/soc/sunxi/sun4i-spdif.c | |
parent | e73f0f0ee7541171d89f2e2491130c7771ba58d3 (diff) |
ASoC: codecs: add SoundWire mockup device support
To test the host controller and bus management code, it is currently
required to have a physical SoundWire peripheral attached to the
bus. To help with pre-silicon or early hardware enablement, it would
be very useful to have a SoundWire 'mockup' device that is exposed in
platform firmware but does not drive any signal on the bus.
This is different to the existing ASoC 'dummy' codec uses for I2S/TDM,
the SoundWire spec makes it clear that a device that is not attached
to the bus is not permitted to interact with the bus, be it for
command/control or data.
This patch exposes a 'mockup' device, with a minimalist driver, with 4
partID values reserved by Intel for such test configurations. The
mockup device exposes one full-duplex DAI based on 2 ports (DP1 for
playback and DP8 for capture). The capture data port is just virtual,
such a mockup device is prevented by the SoundWire specification from
presenting any data generated by a Source port without being Attached.
All the callbacks exposed by the SoundWire Slave interface are
populated, even if they just return immediately. This is intentional
to describe what a minimal codec driver should do and implement and
help new codec vendors provide support for their devices.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210714032209.11284-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sunxi/sun4i-spdif.c')
0 files changed, 0 insertions, 0 deletions