Skip to content

Commit ed8d187

Browse files
committed
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>
1 parent f7978ee commit ed8d187

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
@@ -245,17 +245,17 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
245245
cdns->bus.bpt_stream = NULL;
246246
}
247247

248-
#define INTEL_BPT_MSG_BYTE_ALIGNMENT 32
248+
#define INTEL_BPT_MSG_BYTE_MIN 16
249249

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

256-
if (msg->len % INTEL_BPT_MSG_BYTE_ALIGNMENT) {
257-
dev_err(cdns->dev, "BPT message length %d is not a multiple of %d bytes\n",
258-
msg->len, INTEL_BPT_MSG_BYTE_ALIGNMENT);
256+
if (msg->len < INTEL_BPT_MSG_BYTE_MIN) {
257+
dev_err(cdns->dev, "BPT message length %d is less than the minimum bytes %d\n",
258+
msg->len, INTEL_BPT_MSG_BYTE_MIN);
259259
return -EINVAL;
260260
}
261261

0 commit comments

Comments
 (0)