mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Bard Liao <yung-chuan.liao@linux.intel.com>
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
	pierre-louis.bossart@linux.dev, bard.liao@intel.com
Subject: Re: [PATCH] soundwire: update Intel BPT message length limitation
Date: Wed, 14 May 2025 12:40:51 +0100	[thread overview]
Message-ID: <aCSBQ3HbLsGSoela@vaman> (raw)
In-Reply-To: <20250429122337.142551-1-yung-chuan.liao@linux.intel.com>

On 29-04-25, 20:23, Bard Liao wrote:
> 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>
> ---
>  Documentation/driver-api/soundwire/bra.rst | 2 +-
>  drivers/soundwire/intel_ace2x.c            | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/Documentation/driver-api/soundwire/bra.rst b/Documentation/driver-api/soundwire/bra.rst
> index 8500253fa3e8..c08ab2591496 100644
> --- a/Documentation/driver-api/soundwire/bra.rst
> +++ b/Documentation/driver-api/soundwire/bra.rst
> @@ -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.
> diff --git a/drivers/soundwire/intel_ace2x.c b/drivers/soundwire/intel_ace2x.c
> index 5b31e1f69591..f899c966cfaf 100644
> --- a/drivers/soundwire/intel_ace2x.c
> +++ b/drivers/soundwire/intel_ace2x.c
> @@ -245,7 +245,7 @@ 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)
> @@ -253,9 +253,9 @@ static int intel_ace2x_bpt_send_async(struct sdw_intel *sdw, struct sdw_slave *s
>  	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) {

Reducing is fine, but we should still check it is aligned..?

> +		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;
>  	}
>  
> -- 
> 2.43.0

-- 
~Vinod

  reply	other threads:[~2025-05-14 11:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-29 12:23 Bard Liao
2025-05-14 11:40 ` Vinod Koul [this message]
2025-05-14 11:59   ` Liao, Bard
2025-06-09 16:17 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aCSBQ3HbLsGSoela@vaman \
    --to=vkoul@kernel.org \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=yung-chuan.liao@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®