mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
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>
This commit is contained in:
parent
fdf5596103
commit
393350c169
@ -333,4 +333,4 @@ FIFO sizes to avoid xruns.
|
|||||||
|
|
||||||
Alignment requirements are currently not enforced at the core level
|
Alignment requirements are currently not enforced at the core level
|
||||||
but at the platform-level, e.g. for Intel the data sizes must be
|
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.
|
||||||
|
@ -246,7 +246,7 @@ static void intel_ace2x_bpt_close_stream(struct sdw_intel *sdw, struct sdw_slave
|
|||||||
cdns->bus.bpt_stream = NULL;
|
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,
|
static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *slave,
|
||||||
struct sdw_bpt_msg *msg)
|
struct sdw_bpt_msg *msg)
|
||||||
@ -254,9 +254,9 @@ static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *s
|
|||||||
struct sdw_cdns *cdns = &sdw->cdns;
|
struct sdw_cdns *cdns = &sdw->cdns;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (msg->len % INTEL_BPT_MSG_BYTE_ALIGNMENT) {
|
if (msg->len < INTEL_BPT_MSG_BYTE_MIN) {
|
||||||
dev_err(cdns->dev, "BPT message length %d is not a multiple of %d bytes\n",
|
dev_err(cdns->dev, "BPT message length %d is less than the minimum bytes %d\n",
|
||||||
msg->len, INTEL_BPT_MSG_BYTE_ALIGNMENT);
|
msg->len, INTEL_BPT_MSG_BYTE_MIN);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user