[pulseaudio-discuss] [PATCH] ALSA: hda/hdmi: Add Intel silent stream support

Tanu Kaskinen tanuk at iki.fi
Thu Jun 25 12:04:07 CEST 2020


On Thu, 2020-06-25 at 09:03 +0200, Takashi Iwai wrote:
> On Thu, 25 Jun 2020 02:18:58 +0200,
> Arun Raghavan wrote:
> > +pulseaudio-discuss for information
> > 
> > On Wed, 24 Jun 2020, at 1:33 PM, Takashi Iwai wrote:
> > > On Wed, 24 Jun 2020 19:05:14 +0200,
> > > Pierre-Louis Bossart wrote:
> > > > 
> > > > 
> > > > On 6/24/20 11:43 AM, Takashi Iwai wrote:
> > > > > On Wed, 24 Jun 2020 17:33:45 +0200,
> > > > > Pierre-Louis Bossart wrote:
> > > > > > It also doesn't have a UCM representation
> > > > > > so would force the use of amixer and manual configs, or the UCM file
> > > > > > would always set the mode.
> > > > > 
> > > > > But people usually use the distro kernels, so the situation is more or
> > > > > less equivalent; you'd have to adjust a module option manually if you
> > > > > want a different one from the default, and you'd have to be root to
> > > > > change it.
> > > > > 
> > > > > So, rather the question is how we should provide the setup of such
> > > > > parameter.  It's supposed to be a part of power management stuff that
> > > > > should be touched by either a smart PM tool or a manual override such
> > > > > as runtime PM setup?  Or can it be seen as a more casual tuning?
> > > > 
> > > > I am not aware of such tools. The only thing I know is that some of
> > > > the HDaudio power settings are already controlled by kernel
> > > > parameters, e.g.
> > > > 
> > > > /etc/modprobe.d/audio_powersave.conf
> > > > options snd_hda_intel power_save=1
> > > 
> > > Yes, it's been the primary knob for years to turn on/off the runtime
> > > PM for HD-audio and other legacy drivers.  This was used by powertop
> > > or some other power-aware daemons and tools, to be toggled dynamically
> > > per the power cable state or such.
> > > 
> > > And, how the silent stream feature should be seen?
> > > Should it be a system-wide root-only setup or adjustable per user?
> > > Would it be changed often?  Such questions and answers will lead us to
> > > the right direction, I hope.
> > 
> > For audio, would UCM not be the appropriate point for a system
> > integrator to decide how the audio device should be set up?
> > 
> > This would allow for a choice based on the situation in which the
> > device is actually being deployed without users having to muck
> > around with module parameters -- maybe someone wants want this
> > enabled for an HTPC setup, but not on a desktop connected to a
> > monitor.

Is UCM really an appropriate place for deciding the setting? The
default should be to disable the feature, and if that is done in UCM,
how is the user expected to enable it when needed? I'm not aware of an
easy way to tweak the UCM configuration (modifying distro-provided
files is not good).

I don't really get the talk about system integrators. This seems like
an end-user setting to me.

> Right, that's my concern.  Many users with HDMI monitor that is
> capable of audio don't use HDMI audio because they don't need it
> and/or the output sucks.  For them, this feature is superfluous and
> harmful from the runtime PM POV.
> 
> If it were provided via UCM, would it be yet another UCM profile like
> HDMI+silentstream?  This can be confusing, too, I'm afraid.
> 
>  From the interface POV, as Kai suggested in another mail, the
> analogy to power_save option makes sense.  OTOH, power_save is the
> knob that is better to be enabled (as long as it works), silent stream
> is the feature that is needed only when required.  So it comes to the
> question which interface is easier to manage.

Having a separate UCM "profile" (do you mean a verb or a device?) seems
overkill. I think there could be a device-specific variable, like
SilentStreamControl, which would indicate that the device supports the
silent stream feature. The variable would also point to the mixer
control for enabling it.

That said, I don't see much need for involving UCM at all. UCM becomes
more relevant if we want PulseAudio to provide an API for controlling
this feature, but until that happens, just having a mixer control that
users can toggle seems sufficient to me. (I'm assuming that ALSA
remembers mixer settings between boots. I'm not sure if that's the
case, but I have the impression that the alsa-state thingy is
universally enabled and implements this.)

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk



More information about the Alsa-devel mailing list