From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Cc: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>,
alsa-devel@alsa-project.org, Keyon Jie <yang.jie@linux.intel.com>,
kernel-janitors@vger.kernel.org, Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Liam Girdwood <liam.r.girdwood@linux.intel.com>,
Slawomir Blauciak <slawomir.blauciak@linux.intel.com>,
Mark Brown <broonie@kernel.org>,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Subject: Re: [PATCH] ASoC: SOF: Fix snd_sof_ipc_stream_posn()
Date: Tue, 3 Mar 2020 09:36:29 -0600 [thread overview]
Message-ID: <993233ff-1492-5a87-1026-09af76f6fc7f@linux.intel.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2003031321410.2957@eliteleevi.tm.intel.com>
>> We're passing "&posn" instead of "posn" so it ends up corrupting
>> memory instead of doing something useful.
> [...]
>> /* send IPC to the DSP */
>> err = sof_ipc_tx_message(sdev->ipc,
>> - stream.hdr.cmd, &stream, sizeof(stream), &posn,
>> + stream.hdr.cmd, &stream, sizeof(stream), posn,
>> sizeof(*posn));
>
> ack, thanks, this is clearly wrong. This function is not used by current
> platforms, so the bug has gone unnnoticed. Most platforms either rely on
> direct MMIO queries of the DSP position, or the periodic position updates
> DSPs send after each ALSA period. This function for host to query DSP
> position via IPC is thus not used, although it's part of the generic audio
> DSP IPC interface.
>
> For the SOF folks in CC, I wonder should we keep this function at all?
>
> Anyways, that's probably a longer discussion, so while it's there,
> the code should be correct, so for the patch:
> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
I checked all the way to 5.2 and it was never used, so indeed wondering
what the purpose of this function was.
next prev parent reply other threads:[~2020-03-03 15:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 10:18 [PATCH] ASoC: SOF: Fix snd_sof_ipc_stream_posn() Dan Carpenter
2020-03-03 11:39 ` Kai Vehmanen
2020-03-03 15:36 ` Pierre-Louis Bossart [this message]
2020-03-04 7:07 ` Guennadi Liakhovetski
2020-03-04 7:46 ` Keyon Jie
2020-03-03 17:07 ` Applied "ASoC: SOF: Fix snd_sof_ipc_stream_posn()" to the asoc tree Mark Brown
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=993233ff-1492-5a87-1026-09af76f6fc7f@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=guennadi.liakhovetski@linux.intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=liam.r.girdwood@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=slawomir.blauciak@linux.intel.com \
--cc=tiwai@suse.com \
--cc=yang.jie@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