All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 0/8] ASoC: SOF: power optimizations for HDaudio platforms
Date: Sun, 13 Jun 2021 09:25:43 +0200	[thread overview]
Message-ID: <s5h5yyi5iq0.wl-tiwai@suse.de> (raw)
In-Reply-To: <6f8c8799-2602-a5a2-cf38-cc6a11eac593@linux.intel.com>

On Fri, 11 Jun 2021 18:30:53 +0200,
Pierre-Louis Bossart wrote:
> 
> 
> > Perhaps, it may be acceptable to add a global control enum (to the control
> > API) for the ALSA card which may modify the driver behaviour / settings at
> > runtime (normal operation, battery saving operation etc.). This control can be
> > set in the UCM config. In this way, we don't need to touch the PCM API for the
> > user space at all.
> 
> If there was a mechanism based on ALSA controls for an application to
> query capabilities and set what it want to disable that would be
> fine. hwdep would be fine as well.
> 
> I don't get though how this could be 'set in the UCM config',
> different apps might have different needs. UCM files don't currently
> make assumptions on which application uses them, do they?

I also came to the idea of kcontrol instead of module parameter, and
hit to the differentiating via UCM, too.  Maybe we may provide two
different profiles and let apps choose.  But, this reaches to the
question: how to tell applications what is for.  It's also the
question if we extend the API.

Namely, the driver may inform user-space or the user-space may inform
the driver whether to allow (or to use) the rewind.  But, it doesn't
explain what cost it would need.  And that's a difficult task to
generalize it.  I can think of some API providing a preset per
scenario, e.g. power-saving, large buffer, etc.  But in this case, if
rewind is allowed, what would it mean practically?

Then, this also led me a question: what happens if you disable tsched
on PA?  It'll be essentially equivalent behavior like pipewire, and
this would be better?  Note that the latest kernel already dropped the
buffer pre-allocation for HD-audio, hence PA will take a large buffer
(for one second) per default.  I suppose that the influence of no
rewind becomes noticeable, or would it still be OK with tsched?

If tsched=0 mode works reasonably well in case of no rewind, it can be
done simply by setting SNDRV_PCM_INFO_BATCH together.  Even with this
change, we can keep the module parameter as a kill switch in case
significant regression is found.


thanks,

Takashi

      reply	other threads:[~2021-06-13  7:26 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
2021-06-11 15:37       ` Jaroslav Kysela
2021-06-11 16:30         ` Pierre-Louis Bossart
2021-06-13  7:25           ` Takashi Iwai [this message]

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=s5h5yyi5iq0.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=pierre-louis.bossart@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.