soundwire: cadence: add debugfs interface for PDI loopbacks
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Wed, 14 Jul 2021 03:22:08 +0000 (11:22 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 2 Aug 2021 05:38:22 +0000 (11:08 +0530)
commit8fba8acd399b70aeb262983d32baa9cbbf7dc981
tree3f667b3add0c78e26510f59acac3cb2f337bacca
parent24f08b3aa5a5e42977c5a1d711d5cb7d9adbd94d
soundwire: cadence: add debugfs interface for PDI loopbacks

For debug, it's interesting to create a loopback stream for each link
and use debugfs to set a source and target PDI. The target PDI would
need to be an RX port and use the same register configurations as the
source PDI. This capability allows e.g. for the headphone playback
stream to be snooped on the headset capture stream, or alternatively
for the addition of a dedicated loopback stream, in addition of
regular capture for that link.

This patch only adds the debugfs part, the port/PDI handling will be
handled in the next patches.

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-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c
drivers/soundwire/cadence_master.h