All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
	"Holalu Yogendra, Niranjan" <niranjan.hy@ti.com>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"yung-chuan.liao@linux.intel.com"
	<yung-chuan.liao@linux.intel.com>
Cc: "broonie@kernel.org" <broonie@kernel.org>,
	"ckeepax@opensource.cirrus.com" <ckeepax@opensource.cirrus.com>,
	"shumingf@realtek.com" <shumingf@realtek.com>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"ranjani.sridharan@linux.intel.com"
	<ranjani.sridharan@linux.intel.com>,
	"cezary.rojewski@intel.com" <cezary.rojewski@intel.com>,
	"peter.ujfalusi@linux.intel.com" <peter.ujfalusi@linux.intel.com>,
	"kai.vehmanen@linux.intel.com" <kai.vehmanen@linux.intel.com>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"Ding, Shenghao" <shenghao-ding@ti.com>,
	"Xu, Baojun" <baojun.xu@ti.com>,
	"Kasargod, Sandeep" <sandeepk@ti.com>
Subject: Re: [PATCH v1 RESEND] SoundWire: Allow Prepare command for Simplified_CP_SM
Date: Tue, 10 Feb 2026 21:28:15 +0100	[thread overview]
Message-ID: <5c8a4d68-0f43-40d1-971f-7d1f4f55eb5c@linux.dev> (raw)
In-Reply-To: <5066fa12-3ac1-4619-8fbe-62d61f9d446c@opensource.cirrus.com>

On 2/10/26 18:29, Richard Fitzgerald wrote:
> On 10/02/2026 5:04 pm, Pierre-Louis Bossart wrote:
>> On 2/10/26 12:08, Holalu Yogendra, Niranjan wrote:
>>>> On 2/9/26 20:13, Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> wrote:
>>>> Subject: Re: [PATCH v1 RESEND] SoundWire: Allow Prepare
>>>> command for Simplified_CP_SM
>>>>
>>>> On 2/9/26 08: 09, Niranjan H Y wrote:
>>>>> In TI device implementations, we've found that some devices with
>>>>> Simplified_CP_SM still benefit from receiving the Prepare command.
>>>> It would also be good to clarify when the device is actually prepared after the
>>>> bits are set, if the implementation cannot guarantee that the prepared status is
>>>> reached by the end of the frame where the write occurs, then it's definitively
>>>> NOT a Simplified_CP_SM.
>>>>
>>>> What happens is the simple_ch_prep_sm bit is not set for those devices, and
>>>> the regular state machine is used instead? Is anything broken?
>>>
>>> We need to use the same BIOS between Windows and Linux. The BIOS configures
>>> the device as Simplified_CP_SM. The device also expects the Prepare bits to be
>>> set. If the device is configured as generic CP_SM, the status "Port Ready"
>>> bits will not be updated and we end up with port prepare fail errors.
>>
>> Are you referring to the DPN_IntStat::PortReady bit? IOW do the errors during prepare happen because the interrupt is not generated?
>>
>> If that is the case, then you should be aware of the thread "soundwire: stream: Prepare ports in parallel to reduce stream start latency", where it was agreed that the use of the PortReady interrupt is broken. We do need to move to a different code where we have a polling loop on the DPN_PrepareStatus::NotFinished bits.
> 
> I made a patch to poll for DP prepare finished, instead of using the
> interrupt. I haven't sent that patch because this TI patch changes the
> same function. I was waiting for this one to be merged and then I would
> rebase onto that.
> 
> Draft review of polled DP prepare:
> https://github.com/thesofproject/linux/pull/5649

IMHO it makes more sense to fix first a conceptual issue, and then add whatever is needed for a specific vendor.
The second part could be a quirk to use the regular state machine, or this additional write if that's not enough.

  reply	other threads:[~2026-02-10 20:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09  7:09 [PATCH v1 RESEND] SoundWire: Allow Prepare command for Simplified_CP_SM Niranjan H Y
2026-02-09 14:43 ` Pierre-Louis Bossart
2026-02-10 11:08   ` Holalu Yogendra, Niranjan
2026-02-10 17:04     ` Pierre-Louis Bossart
2026-02-10 17:29       ` Richard Fitzgerald
2026-02-10 20:28         ` Pierre-Louis Bossart [this message]
2026-02-11 10:41           ` Richard Fitzgerald
2026-02-12 16:17             ` [EXTERNAL] " Holalu Yogendra, Niranjan
2026-02-12 16:28               ` Richard Fitzgerald
2026-02-13 14:56                 ` Pierre-Louis Bossart
2026-02-14 16:42                   ` Holalu Yogendra, Niranjan

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=5c8a4d68-0f43-40d1-971f-7d1f4f55eb5c@linux.dev \
    --to=pierre-louis.bossart@linux.dev \
    --cc=baojun.xu@ti.com \
    --cc=broonie@kernel.org \
    --cc=cezary.rojewski@intel.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=niranjan.hy@ti.com \
    --cc=peter.ujfalusi@linux.intel.com \
    --cc=ranjani.sridharan@linux.intel.com \
    --cc=rf@opensource.cirrus.com \
    --cc=sandeepk@ti.com \
    --cc=shenghao-ding@ti.com \
    --cc=shumingf@realtek.com \
    --cc=vkoul@kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.