• Pierre-Louis Bossart's avatar
    ASoC: codecs: add SoundWire mockup device support · 81d3d3d0
    Pierre-Louis Bossart authored
    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: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
    Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://lore.kernel.org/r/20210714032209.11284-2-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    81d3d3d0
Kconfig 42 KB