Skip to content

Commit 393350c

Browse files
bardliaovinodkoul
authored andcommitted
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 <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Reviewed-by: Péter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent fdf5596 commit 393350c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Documentation/driver-api/soundwire/bra.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,4 +333,4 @@ FIFO sizes to avoid xruns.
333333

334334
Alignment requirements are currently not enforced at the core level
335335
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.

drivers/soundwire/intel_ace2x.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,17 +246,17 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
246246
cdns->bus.bpt_stream = NULL;
247247
}
248248

249-
#define INTEL_BPT_MSG_BYTE_ALIGNMENT 32
249+
#define INTEL_BPT_MSG_BYTE_MIN 16
250250

251251
static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *slave,
252252
struct sdw_bpt_msg *msg)
253253
{
254254
struct sdw_cdns *cdns = &sdw->cdns;
255255
int ret;
256256

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);
260260
return -EINVAL;
261261
}
262262

0 commit comments

Comments
 (0)