All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: David Henningsson <david.henningsson@canonical.com>,
	James Cameron <quozl@laptop.org>,
	alsa-devel@alsa-project.org
Subject: Re: Splitting out controls
Date: Tue, 13 Oct 2015 11:08:40 -0500	[thread overview]
Message-ID: <561D2C88.5050505@linux.intel.com> (raw)
In-Reply-To: <561D2997.1090401@canonical.com>

On 10/13/15 10:56 AM, David Henningsson wrote:
>
>
> On 2015-10-13 16:55, Pierre-Louis Bossart wrote:
>> On 10/13/15 2:07 AM, David Henningsson wrote:
>>>
>>>
>>> On 2015-10-12 22:59, James Cameron wrote:
>>>> On Mon, Oct 12, 2015 at 02:49:46PM +0100, Liam Girdwood wrote:
>>>>> I've written up the minutes here below
>>>>
>>>> Thanks!
>>>>
>>>>> Splitting out controls: Takashi
>>>>> ===============================
>>>>>
>>>>>   - Restricted access.  Consensus to restrict access to some controls
>
> Note: There is NOT consensus.
>
>>>>> due
>>>>> to possibility of breaking HW at kernel level. i.e. prevent feeding
>>>>> digital Mic into HP amp to prevent speaker over heating.
>>>>
>>>> I'd like that.  rt5631.  Avoiding at the moment by removing the
>>>> controls.
>>>
>>> IIRC, the debate was over "do not expose dangerous controls to userspace
>>> at all" vs "expose dangerous controls controls only to root".
>>>
>>> I'm strongly voting for "do not expose to userspace at all".
>>>
>>> I personally believe that if the physical hardware can be set to state
>>> where it's bricked, the hardware itself is buggy.
>>>
>>> If the hardware is buggy, this should be worked around in BIOS or
>>> whatever firmware is present on the machine. Otherwise there is a bug in
>>> BIOS.
>>>
>>> If BIOS is buggy and cannot protect the machine from being physically
>>> damaged, then we need to work around that in the kernel. Otherwise there
>>> is a bug in the kernel.
>>>
>>> And if the kernel is buggy, we should fix the kernel. Period. :-)
>>
>> There are just too many variables linked to acoustic, mechanical and
>> thermal design that just can't be handled with a simple rule at the
>> kernel level or even BIOS/firmware. There were quite a few people in the
>> room who voiced their opinion that handling 'dangerous' controls was an
>> exercise for the integrator, not something that can be handled with a
>> one-size-fits-all fix.
>
> If userspace can make complex decisions to avoid damage, then so can the
> kernel. The integrator can just write that logic into the kernel instead
> of writing it into userspace.

That seems to go against everything we've done over the last few years.
And it's not even feasible to put kernel-level safeguards with the new 
topology tool, since the kcontrols are instantiated at run time based on 
a firmware description.

>> 'userspace' is also a vague definition, most
>> audio servers will use profiles that will avoid using bad
>> configurations. It's not clear to me that we have to protect against a
>> user setting random values with alsamixer.
>
> Whether the devices are phones, laptops, or everything in between,
> people are replacing their original software with other software. Surely
> those people are messing around with mixer controls, and surely they
> don't want their devices damaged.
>
> These people might replace the kernel as well, of course, but are less
> likely to do so than to replace userspace; and if they do, they are less
> likely to mess around with a particular audio driver, especially if that
> driver has a big warning sign saying "changing this value might fry your
> speaker" (which, IMO, would be appropriate).

It's a valid case but I would argue that if you install new software you 
should use profiles that have been shared or used by others. If you want 
to protect against the limited knowledge of an individual user 'messing 
around mixer controls' then this is going too far.

  reply	other threads:[~2015-10-13 16:09 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 13:49 [Minutes] ELCE Audio mini conf Liam Girdwood
2015-10-12 15:30 ` Jaroslav Kysela
2015-10-12 20:59 ` Splitting out controls James Cameron
2015-10-13  7:07   ` David Henningsson
2015-10-13  8:27     ` Keyon
2015-10-13 14:55     ` Pierre-Louis Bossart
2015-10-13 15:56       ` David Henningsson
2015-10-13 16:08         ` Pierre-Louis Bossart [this message]
2015-10-16  6:41           ` David Henningsson
2015-10-16 14:49             ` Pierre-Louis Bossart
2015-10-16 15:24               ` Richard Fitzgerald
2015-10-30  2:48                 ` Mark Brown
2015-10-16 15:28               ` Takashi Iwai
2015-10-14 18:20         ` Liam Girdwood
2015-10-16 15:35     ` Richard Fitzgerald
2015-10-16 16:00       ` Takashi Iwai
2015-10-16 16:31         ` Richard Fitzgerald
2015-10-16 17:00           ` Takashi Iwai
2015-10-17 15:54         ` Pierre-Louis Bossart
2015-10-17 16:02           ` Takashi Iwai
2015-10-18  6:41             ` Ricard Wanderlof
2015-10-30  2:57               ` Mark Brown
2015-10-17 16:25           ` Alexander E. Patrakov
2015-10-30  2:50       ` Mark Brown
2015-10-30  2:36     ` Mark Brown
2015-10-30  8:36       ` David Henningsson
2015-10-30  8:53         ` James Cameron
2015-10-30  9:04           ` David Henningsson
2015-11-01  2:45             ` Mark Brown
2015-10-13 14:09 ` 'BATCH flag for USB' and 'ALSA Core Challenges' Takashi Sakamoto
2015-10-13 14:44   ` Alexander E. Patrakov
2015-10-18  3:22     ` Takashi Sakamoto
2015-10-13 16:01   ` Pierre-Louis Bossart
2015-10-14 12:27   ` Liam Girdwood
2015-10-22 17:10 ` [Minutes] ELCE Audio mini conf Mark Brown
2015-10-22 17:14 ` DP hotplug on USB C 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=561D2C88.5050505@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=david.henningsson@canonical.com \
    --cc=quozl@laptop.org \
    /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.