linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Werner Almesberger <wa@almesberger.net>,
	Matthias Schniedermeyer <ms@citd.de>,
	Marc Giger <gigerstyle@gmx.ch>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	pat@suwalski.net
Subject: Re: [Bug 623] New: Volume not remembered.
Date: Thu, 24 Apr 2003 01:11:34 +0100	[thread overview]
Message-ID: <20030424001134.GD26806@mail.jlokier.co.uk> (raw)
In-Reply-To: <1570840000.1051136330@flay>

Well, I agree with both of you and propose a solution.

Martin J. Bligh wrote:
> > The kernel should pick a value that's safe in all cases. And
> > this is zero. Don't forget that there can be several seconds
> > between the driver's initialization and the moment when the
> > user-space utility gets to change the settings.
> 
> So if people want 0 volume for some reason, they can set *that*
> in userspace. Windows can manage to do this without cocking it up. 
> I don't see why we can't achieve it. 

The problem is that 1 second between loading the module and userspace
running a utility to restore the previous setting.  It can be <1
second, or quite long depending on how busy the machine is, swapping
etc.  Even a fraction of a second is unacceptable, though.

That loud feeback whistle sound in conference/at night is really
awful, and there was no way to avoid it with OSS on certain sound cards.

Even when the microphone is disabled, you still get (a) the sound of
nearby mobile phone radio signals (my laptop is very bad for this),
(b) a scary load "pop" as the sound system pulses the speaker.  This
is particularly bad with powered external speakers, as you wonder
whether it is good for them.

None of these sound effects when loading the module is necessary, so
ALSA is right to prevent them to the best of its ability.

However, Martin is right too - once the sound system is fully
initialised (including userspace), there should be a sensible default
volume.  And it would be nice, but is not necessary, if the sensible
default worked when you don't have a fancy userspace.

What is a sensible default?  On my laptop, again, even a low volume is
problemetic if there is nothing playing sounds, because it picks up
RFI from the laptop itself and from mobile phones.  (For this reason I
tend to leave the physical volume knob set low, which is confusing
when I do try to play something :)

Thus the nicest thing the drivers could do would be to keep the volume
at 0 when nothing is playing any sound, ramp it up to the desired
volume when a sound plays, and ramp it down after.  However that may be
asking a bit much of the sound driver authors.

So how about this:

   A standard audio module option "volume=X" meaning "set volume X%
   when the module initialises".

If unspecified, the default would be some quite but not silent value.
Err on the side of quiet because hardware varies so much.  Pick
whatever default Windows uses if possible :)

Then anything with a fancy enough userspace can set this to either (a)
zero, or (b) forget about user-space post-initialisation, just set the
correct value by passing it to the module at load time.

-- Jamie

  parent reply	other threads:[~2003-04-23 23:59 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-23 16:23 [Bug 623] New: Volume not remembered Martin J. Bligh
2003-04-23 16:32 ` Marc Giger
2003-04-23 16:45 ` Matthias Schniedermeyer
2003-04-23 16:56   ` Martin J. Bligh
2003-04-23 17:21     ` Matthias Schniedermeyer
2003-04-23 13:26       ` Pat Suwalski
2003-04-23 17:26         ` Martin J. Bligh
2003-04-23 17:45           ` Disconnect
2003-04-23 17:47           ` Matthias Schniedermeyer
2003-04-23 18:44             ` Martin J. Bligh
2003-04-23 17:49           ` Pat Suwalski
2003-04-23 18:56           ` Jörn Engel
2003-04-23 22:17         ` Pavel Machek
2003-04-23 22:35           ` Pat Suwalski
2003-04-23 22:55             ` Pavel Machek
2003-04-24  2:19               ` Werner Almesberger
2003-04-24  2:29                 ` Pat Suwalski
2003-04-24  2:34                   ` Ben Collins
2003-04-24  7:22                     ` Jamie Lokier
2003-04-24 13:31                       ` Werner Almesberger
2003-04-24  4:30                   ` Valdis.Kletnieks
2003-04-23 23:15             ` Martin J. Bligh
2003-04-23 21:34     ` Werner Almesberger
2003-04-23 21:36       ` Martin J. Bligh
2003-04-23 22:14         ` Werner Almesberger
2003-04-23 22:18           ` Martin J. Bligh
2003-04-23 22:55             ` Werner Almesberger
2003-04-24  0:11             ` Jamie Lokier [this message]
2003-04-24  0:43               ` Werner Almesberger
2003-04-24  1:11                 ` Jamie Lokier
2003-04-24  1:18                   ` Martin J. Bligh
2003-04-24  1:22                   ` Pat Suwalski
2003-04-24  2:11                   ` Werner Almesberger
2003-04-24  2:40                     ` Martin J. Bligh
2003-04-24  3:37                       ` Werner Almesberger
2003-04-24  4:47                         ` Martin J. Bligh
2003-04-24 13:16                           ` Werner Almesberger
2003-04-24  7:14                         ` Jamie Lokier
2003-04-24 13:38                           ` Werner Almesberger
2003-04-24 13:49                             ` Matthias Schniedermeyer
2003-04-24 14:08                               ` Pat Suwalski
2003-04-24 14:34                                 ` Matthias Schniedermeyer
2003-04-24 15:04                                   ` Werner Almesberger
2003-04-24 15:23                                     ` Matthias Schniedermeyer
2003-04-24 16:01                                       ` Werner Almesberger
2003-04-24 16:26                                         ` Jaroslav Kysela
2003-04-24 21:22                                           ` Werner Almesberger
2003-04-25 10:03                                             ` Jaroslav Kysela
2003-04-25 10:30                                               ` Werner Almesberger
2003-04-24 21:36                             ` Jamie Lokier
2003-04-24 23:55                               ` Werner Almesberger
2003-04-25  0:05                                 ` Pat Suwalski
2003-04-25 10:41                                   ` Werner Almesberger
2003-04-25 10:04                                     ` Alan Cox
2003-04-25 17:44                                       ` Werner Almesberger
2003-04-25 17:59                                         ` Martin J. Bligh
2003-04-26  0:31                                           ` Pat Suwalski
2003-04-24 22:51       ` Pavel Machek
2003-04-24  0:31 Ian Kumlien

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=20030424001134.GD26806@mail.jlokier.co.uk \
    --to=jamie@shareable.org \
    --cc=gigerstyle@gmx.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=ms@citd.de \
    --cc=pat@suwalski.net \
    --cc=wa@almesberger.net \
    /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;
as well as URLs for NNTP newsgroup(s).