Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soundwire: update Intel BPT message length limitation

The limitation of "must be multiples of 32 bytes" does not fit the
requirement of current Intel platforms. Update it to meet the
requirement.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20250429122337.142551-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Bard Liao and committed by
Vinod Koul
393350c1 fdf55961

+5 -5
+1 -1
Documentation/driver-api/soundwire/bra.rst
··· 333 333 334 334 Alignment requirements are currently not enforced at the core level 335 335 but at the platform-level, e.g. for Intel the data sizes must be 336 - multiples of 32 bytes. 336 + equal to or larger than 16 bytes.
+4 -4
drivers/soundwire/intel_ace2x.c
··· 246 246 cdns->bus.bpt_stream = NULL; 247 247 } 248 248 249 - #define INTEL_BPT_MSG_BYTE_ALIGNMENT 32 249 + #define INTEL_BPT_MSG_BYTE_MIN 16 250 250 251 251 static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *slave, 252 252 struct sdw_bpt_msg *msg) ··· 254 254 struct sdw_cdns *cdns = &sdw->cdns; 255 255 int ret; 256 256 257 - if (msg->len % INTEL_BPT_MSG_BYTE_ALIGNMENT) { 258 - dev_err(cdns->dev, "BPT message length %d is not a multiple of %d bytes\n", 259 - msg->len, INTEL_BPT_MSG_BYTE_ALIGNMENT); 257 + if (msg->len < INTEL_BPT_MSG_BYTE_MIN) { 258 + dev_err(cdns->dev, "BPT message length %d is less than the minimum bytes %d\n", 259 + msg->len, INTEL_BPT_MSG_BYTE_MIN); 260 260 return -EINVAL; 261 261 } 262 262