Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/driver-api/soundwire/bra.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,4 +333,4 @@ FIFO sizes to avoid xruns.

Alignment requirements are currently not enforced at the core level
but at the platform-level, e.g. for Intel the data sizes must be
multiples of 32 bytes.
equal to or larger than 16 bytes.
8 changes: 4 additions & 4 deletions drivers/soundwire/intel_ace2x.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,17 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
cdns->bus.bpt_stream = NULL;
}

#define INTEL_BPT_MSG_BYTE_ALIGNMENT 32
#define INTEL_BPT_MSG_BYTE_MIN 16

static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *slave,
struct sdw_bpt_msg *msg)
{
struct sdw_cdns *cdns = &sdw->cdns;
int ret;

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

Expand Down
Loading