From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org,
Ranjani Sridharan <ranjani.sridharan@linux.intel.com>,
Kai Vehmanen <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH 6/8] ALSA: pcm: conditionally avoid mmap of control data
Date: Tue, 13 Jul 2021 07:39:24 -0500 [thread overview]
Message-ID: <d7a3b3fd-eddf-000b-f9ed-711d3e3156f4@linux.intel.com> (raw)
In-Reply-To: <s5h8s2a3fgh.wl-tiwai@suse.de>
On 7/13/21 1:17 AM, Takashi Iwai wrote:
> On Mon, 12 Jul 2021 22:56:07 +0200,
> Pierre-Louis Bossart wrote:
>>
>>
>>
>> On 6/13/21 2:28 AM, Takashi Iwai wrote:
>>> On Thu, 10 Jun 2021 22:53:24 +0200,
>>> Pierre-Louis Bossart wrote:
>>>>
>>>> In case of mmap, by default alsa-lib mmaps both control and status data.
>>>>
>>>> If driver subscribes for application pointer update, driver needs to get
>>>> notification whenever appl ptr changes. With the above case driver won't
>>>> get appl ptr notifications.
>>>>
>>>> This patch check on a hw info flag and returns error when user land asks
>>>> for mmaping control & status data, thus forcing user to issue
>>>> IOCTL_SYNC_PTR.
>>>>
>>>> This patch was originally submitted in 2017, c.f.
>>>> https://lore.kernel.org/alsa-devel/1494896518-23399-4-git-send-email-subhransu.s.prusty@intel.com/
>>>>
>>>> Suggested-by: Takashi Iwai <tiwai@suse.de>
>>>> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
>>>> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
>>>> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
>>>
>>> This kind of flag itself was what I also introduced for another
>>> purpose, too. There is a WIP patch that allows the use of
>>> non-coherent non-contiguous buffer pages, and this flag would fit for
>>> that. FWIW, the patch is found at
>>> https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/log/?h=topic/memalloc
>>
>> Sorry Takashi, I missed your feedback on this patch.
>>
>> Are you saying I should use the definition in that patch?
>>
>> +#define SNDRV_DMA_TYPE_NONCONTIG 8 /* non-coherent SG buffer */
>>
>> I am not quite sure if how this is related to the application using mmap or not?
>
> Not about that, but rather meant that some flag for disabling the mmap
> of PCM control record would be needed for other purposes like the
> above, too. That is, this patch could be out of series and applied
> beforehand in my side.
Thanks Takashi, I will resubmit this separately. I may also break the series in two, the two parts (pause/L1EN support and rewinds) are not really connected, they help reduce power but at different levels.
next prev parent reply other threads:[~2021-07-13 12:40 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 20:53 [PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 1/8] ASoC: SOF: Intel: Kconfig: clarify DMI L1 option description Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 2/8] ASoC: SOF: Intel: simplify logic for DMI_L1 handling Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 3/8] ASoC: SOF: pcm: add mechanisms to disable ALSA pause_push/release Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 4/8] ASoC: SOF: Intel: add kernel parameter to set DMI L1 configuration Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 5/8] ASoC: SOF: Intel: enable DMI L1 when pause is not supported Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 6/8] ALSA: pcm: conditionally avoid mmap of control data Pierre-Louis Bossart
2021-06-13 7:28 ` Takashi Iwai
2021-07-12 20:56 ` Pierre-Louis Bossart
2021-07-13 6:17 ` Takashi Iwai
2021-07-13 12:39 ` Pierre-Louis Bossart [this message]
2021-06-10 20:53 ` [PATCH 7/8] ASOC: SOF: pcm: add .ack callback support Pierre-Louis Bossart
2021-06-10 20:53 ` [PATCH 8/8] ASoC: SOF: Intel: add .ack support for HDaudio platforms Pierre-Louis Bossart
2021-06-13 7:29 ` Takashi Iwai
2021-07-12 21:30 ` Pierre-Louis Bossart
2021-06-11 7:58 ` [PATCH 0/8] ASoC: SOF: power optimizations " Takashi Iwai
2021-06-11 9:02 ` Jaroslav Kysela
2021-06-11 14:32 ` Pierre-Louis Bossart
2021-06-11 15:37 ` Jaroslav Kysela
2021-06-11 16:30 ` Pierre-Louis Bossart
2021-06-13 7:25 ` Takashi Iwai
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=d7a3b3fd-eddf-000b-f9ed-711d3e3156f4@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kai.vehmanen@linux.intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=tiwai@suse.de \
/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