Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Jaroslav Kysela <perex@perex.cz>, alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms
Date: Fri, 11 Jun 2021 09:32:15 -0500	[thread overview]
Message-ID: <eda25058-5a19-31e9-d012-627c2afe88f1@linux.intel.com> (raw)
In-Reply-To: <482fc9a8-3a27-2e5d-f280-c891832eb467@perex.cz>

Thanks Takashi and Jaroslav for your feedback

>> Hmm, in general it's not easy for distros to decide which kconfig to
>> take because most of distros ship both PulseAuadio and pipweire.
>> It's rather the runtime choice, even different for each user at
>> starting a different DE session, hence a kconfig or a module config
>> doesn't fit well.
>>
>> That said, it comes to the question about the severity of the change:
>> how badly would behave if we disable the rewind?  If the influence is
>> limited, distros can take it as a cost of the better power-saving
>> (which is often preferred).  If PA's behavior change is significant,
>> the option is way too dangerous, and it's hard to set as default.

I've personally tried mucking with PulseAudio and didn't see any side 
effects. We do know that by design the effects of rewinds become 
significant if the HDAudio ring buffer becomes large (e.g 0.5..2s), but 
most distros keep the default size.

> I would prefer to add a new API which will tell that the rewind support
> consumes more energy (is costly) and let apps to disable this feature when the
> user agreed. We should create an universal API without any sound server /
> application assumptions. We don't know beforehand, if users want the ultra low
> latencies for a purpose or they want to save the battery power.
> 
> The same objection is for the pcm mmap control suppression / pause trigger
> suppression.
> 
> The pulseaudio / pipewire code can be extended and it's better if both sides
> (driver / apps) agree on the protocol.

When I suggested an API extension (initial code in 2015) precisely to 
establish a 'contract' between userspace and driver, the answer from 
Takashi was this:

https://lore.kernel.org/alsa-devel/s5ha7uq7icw.wl-tiwai@suse.de/

"let's begin with the driver-specific implementation, and extend to API 
level once when we see what are the real demands in wide range of hardware."

What I am suggesting here is precisely the driver-specific implementation.

If both of you now prefer an API extension that's fine with me, that's 
what I preferred all along :-)

It's no big deal to bolt a userspace choice on top of those changes, but 
maybe we can do this as a second step?

I can remove the kconfig changes and only add kernel parameters in the 
mean time so that only early adopters make that selection. In a second 
step, these kernel parameters can be removed when applications make use 
of the new API extension.

Would this work for you?

I just want to stress that both of these changes result in significant 
power savings on Intel platforms. The world has changed since 2015 and 
the push to smaller batteries/longer battery life makes both of these 
changes very desirable. It's no longer an architecture-driven effort to 
enable new features, it's backed by real-world measurements on customer 
devices (which I can only disclose under NDA and not on a public mailing 
list obviously).

  reply	other threads:[~2021-06-11 14:33 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
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 [this message]
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=eda25058-5a19-31e9-d012-627c2afe88f1@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=perex@perex.cz \
    --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