mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	broonie@kernel.org, vkoul@kernel.org
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	robh+dt@kernel.org
Subject: Re: [alsa-devel] [RFC PATCH 6/6] soundwire: qcom: add support for SoundWire controller
Date: Mon, 10 Jun 2019 09:12:39 -0500	[thread overview]
Message-ID: <7269521a-ac89-3856-c18c-ffaaf64c0806@linux.intel.com> (raw)
In-Reply-To: <40ea774c-8aa8-295d-e91e-71423b03c88d@linaro.org>


>>> +#define SWRM_COMP_HW_VERSION                    0x00
>>
>> Can we please use SDW_ or QCOM_SDW_ as prefix?
>>
> 
> SWRM prefix is as per the data sheet register names, If it help am happy 
> to add QCOM_ prefix it.

That'd be fine. As long as there is no duplication and two 
terms/prefixes used for the same thing I am happy.

>>> +
>>> +    val = SWRM_REG_VAL_PACK(cmd_data, dev_addr, cmd_id, reg_addr);
>>> +    ret = ctrl->reg_write(ctrl, SWRM_CMD_FIFO_WR_CMD, val);
>>> +    if (ret < 0) {
>>> +        dev_err(ctrl->dev, "%s: reg 0x%x write failed, err:%d\n",
>>> +            __func__, val, ret);
>>> +        goto err;
>>> +    }
>>> +
>>> +    if (dev_addr == SDW_BROADCAST_DEV_NUM) {
>>> +        ctrl->fifo_status = 0;
>>> +        ret = wait_for_completion_timeout(&ctrl->sp_cmd_comp,
>>> +                          msecs_to_jiffies(TIMEOUT_MS));
>>
>> This is odd. The SoundWire spec does not handle writes to a single 
>> device or broadcast writes differently. I don't see a clear reason why 
>> you would only timeout for a broadcast write.
>>
> 
> There is danger of blocking here without timeout.

Right, and it's fine to add a timeout. The question is why add a timeout 
*only* for a broadcast operation? It should be added for every 
transaction IMO, unless you have a reason not to do so.

>>
>>> +
>>> +    /* Mask soundwire interrupts */
>>> +    ctrl->reg_write(ctrl, SWRM_INTERRUPT_MASK_ADDR,
>>> +                    SWRM_INTERRUPT_STATUS_RMSK);
>>> +
>>> +    /* Configure No pings */
>>> +    val = ctrl->reg_read(ctrl, SWRM_MCP_CFG_ADDR);
>>
>> If there is any sort of PREQ signaling for Slave-initiated interrupts, 
>> disabling PINGs is likely a non-conformant implementation since the 
>> master is required to issue a PING command within 32 frames. That's 
>> also the only way to know if a device is attached, so additional 
>> comments are likely required.
> This is the value of Maximum number of consiecutive read/write commands 
> without ping command in between. I will try to collect more details and 
> add some comments here.

Right, so it's probably the comment that's too strict. It's not no pings 
it's no pings during a sequence of up to N read/writes.


  reply	other threads:[~2019-06-10 14:12 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-07  8:56 [RFC PATCH 0/6] soundwire: Add support to Qualcomm SoundWire master Srinivas Kandagatla
2019-06-07  8:56 ` [RFC PATCH 1/6] ASoC: core: add support to snd_soc_dai_get_sdw_stream() Srinivas Kandagatla
2019-06-08 19:22   ` Cezary Rojewski
2019-06-09 12:16     ` Srinivas Kandagatla
2019-06-10  4:34   ` Vinod Koul
2019-06-10  7:58     ` Srinivas Kandagatla
2019-06-07  8:56 ` [RFC PATCH 2/6] soundwire: Add compute_params callback Srinivas Kandagatla
2019-06-07  8:56 ` [RFC PATCH 3/6] soundwire: core: define SDW_MAX_PORT Srinivas Kandagatla
2019-06-07 12:31   ` [alsa-devel] " Pierre-Louis Bossart
2019-06-08 20:04     ` Cezary Rojewski
2019-06-07  8:56 ` [RFC PATCH 4/6] soundwire: stream: make stream name a const pointer Srinivas Kandagatla
2019-06-07  8:56 ` [RFC PATCH 5/6] dt-bindings: soundwire: add bindings for Qcom controller Srinivas Kandagatla
2019-06-07 12:50   ` [alsa-devel] " Pierre-Louis Bossart
2019-06-09 12:16     ` Srinivas Kandagatla
2019-06-10  4:51   ` Vinod Koul
2019-06-10  8:14     ` Srinivas Kandagatla
2019-06-10 13:58     ` [alsa-devel] " Pierre-Louis Bossart
2019-06-07  8:56 ` [RFC PATCH 6/6] soundwire: qcom: add support for SoundWire controller Srinivas Kandagatla
2019-06-07 13:36   ` [alsa-devel] " Pierre-Louis Bossart
2019-06-09 12:15     ` Srinivas Kandagatla
2019-06-10 14:12       ` Pierre-Louis Bossart [this message]
2019-06-11 10:29         ` Srinivas Kandagatla
2019-06-11 12:21           ` Pierre-Louis Bossart
2019-06-15 13:24             ` Srinivas Kandagatla
2019-06-08 21:53   ` Cezary Rojewski
2019-06-09 12:15     ` Srinivas Kandagatla
2019-06-10  6:40   ` Vinod Koul
2019-06-10  8:27     ` Srinivas Kandagatla

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=7269521a-ac89-3856-c18c-ffaaf64c0806@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.org \
    /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

Powered by JetHome