linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [Bug 623] New: Volume not remembered.
  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 22:17         ` Pavel Machek
  0 siblings, 2 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-23 13:26 UTC (permalink / raw)
  To: Matthias Schniedermeyer; +Cc: Martin J. Bligh, Marc Giger, linux-kernel

Matthias Schniedermeyer wrote:
> I can only guess why. My buest guess is that not all
> sound-configurations are the same, on some systems the "defaults" could
> much to loud. (e.g. waking the neigbours when you restart you computer
> at night)

This is certainly the case. When I was packaging OSS for Xandros, our 
initial default was 50 percent. We eventualyl made it about 30, because 
even that was too loud on a laptop we were testing. There was little 
coherance between the various soundcards.

Waking the neighbors is the smallest problem. Blowing a speaker or 
makign the user deaf if quite another.

Yes, it's a distro problem. My Gentoo was build "-alsa" and so the 
alsa-sound init script does not 'go'. A simple rebuild will solve the 
problem.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* [Bug 623] New: Volume not remembered.
@ 2003-04-23 16:23 Martin J. Bligh
  2003-04-23 16:32 ` Marc Giger
  2003-04-23 16:45 ` Matthias Schniedermeyer
  0 siblings, 2 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 16:23 UTC (permalink / raw)
  To: linux-kernel

http://bugme.osdl.org/show_bug.cgi?id=623

           Summary: Volume not remembered.
    Kernel Version: 2.5.x
            Status: NEW
          Severity: normal
             Owner: bugme-janitors@lists.osdl.org
         Submitter: pat@suwalski.net


Distribution: Gentoo
Hardware Environment: ALSA, 82801AA AC'97 Audio
Software Environment: Gnome
Problem Description:
Not certain if this is kernel or ALSA specific. In 2.4.x OSS volume levels
were remembered for the various mixers. Now all of them always default to 0
at bootup. I never ran ALSA with the 2.4 series, but it would be nice to
remember volumes.
Should I be bugging the alsa-project people instead?

Steps to reproduce:
Set a volume level, reboot, level has been reset.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  1 sibling, 0 replies; 59+ messages in thread
From: Marc Giger @ 2003-04-23 16:32 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: linux-kernel

Hi Martin,

> Not certain if this is kernel or ALSA specific. In 2.4.x OSS volume levels
> were remembered for the various mixers. Now all of them always default to 0
> at bootup. I never ran ALSA with the 2.4 series, but it would be nice to
> remember volumes.
> Should I be bugging the alsa-project people instead?
> 
> Steps to reproduce:
> Set a volume level, reboot, level has been reset.

This is and was always so. The alsa-people provides the tool "alsactl"
to save and restore the soundcard settings..

greets

Marc

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  1 sibling, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-23 16:45 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: linux-kernel, pat

On Wed, Apr 23, 2003 at 09:23:18AM -0700, Martin J. Bligh wrote:
> http://bugme.osdl.org/show_bug.cgi?id=623
> 
>            Summary: Volume not remembered.
>     Kernel Version: 2.5.x
>             Status: NEW
>           Severity: normal
>              Owner: bugme-janitors@lists.osdl.org
>          Submitter: pat@suwalski.net
> 
> 
> Distribution: Gentoo
> Hardware Environment: ALSA, 82801AA AC'97 Audio
> Software Environment: Gnome
> Problem Description:
> Not certain if this is kernel or ALSA specific. In 2.4.x OSS volume levels
> were remembered for the various mixers. Now all of them always default to 0
> at bootup. I never ran ALSA with the 2.4 series, but it would be nice to
> remember volumes.
> Should I be bugging the alsa-project people instead?
> 
> Steps to reproduce:
> Set a volume level, reboot, level has been reset.

OSS didn't do that "itself". He must have had a (maybe init-)script that
saved the mixer-settings at shutdown (or whenever) and restored the
values at startup.

Definitly not a kernel issue. (Hint, time for a FAQ on "common" issues
that are not problem of the kernel. And maybe a "RESOLVE because it's a
FAQ"-Status :-)

e.g. Debian does install an init-script it when you install the
"aumix"-package.



Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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 21:34     ` Werner Almesberger
  0 siblings, 2 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 16:56 UTC (permalink / raw)
  To: Matthias Schniedermeyer, Marc Giger; +Cc: linux-kernel, pat

Actually, I agree with the submitter. Having the volume default to 0
is stupid - userspace tools are all very well, but no substitute for
sensible kernel defaults.

--On Wednesday, April 23, 2003 18:45:58 +0200 Matthias Schniedermeyer <ms@citd.de> wrote:

> On Wed, Apr 23, 2003 at 09:23:18AM -0700, Martin J. Bligh wrote:
>> http://bugme.osdl.org/show_bug.cgi?id=623
>> 
>>            Summary: Volume not remembered.
>>     Kernel Version: 2.5.x
>>             Status: NEW
>>           Severity: normal
>>              Owner: bugme-janitors@lists.osdl.org
>>          Submitter: pat@suwalski.net
>> 
>> 
>> Distribution: Gentoo
>> Hardware Environment: ALSA, 82801AA AC'97 Audio
>> Software Environment: Gnome
>> Problem Description:
>> Not certain if this is kernel or ALSA specific. In 2.4.x OSS volume levels
>> were remembered for the various mixers. Now all of them always default to 0
>> at bootup. I never ran ALSA with the 2.4 series, but it would be nice to
>> remember volumes.
>> Should I be bugging the alsa-project people instead?
>> 
>> Steps to reproduce:
>> Set a volume level, reboot, level has been reset.
> 
> OSS didn't do that "itself". He must have had a (maybe init-)script that
> saved the mixer-settings at shutdown (or whenever) and restored the
> values at startup.
> 
> Definitly not a kernel issue. (Hint, time for a FAQ on "common" issues
> that are not problem of the kernel. And maybe a "RESOLVE because it's a
> FAQ"-Status :-)
> 
> e.g. Debian does install an init-script it when you install the
> "aumix"-package.
> 
> 
> 
> Bis denn
> 
> -- 
> Real Programmers consider "what you see is what you get" to be just as 
> bad a concept in Text Editors as it is in women. No, the Real Programmer
> wants a "you asked for it, you got it" text editor -- complicated, 
> cryptic, powerful, unforgiving, dangerous.
> 
> 



^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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 21:34     ` Werner Almesberger
  1 sibling, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-23 17:21 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Marc Giger, linux-kernel, pat

On Wed, Apr 23, 2003 at 09:56:03AM -0700, Martin J. Bligh wrote:
> Actually, I agree with the submitter. Having the volume default to 0
> is stupid - userspace tools are all very well, but no substitute for
> sensible kernel defaults.

AFAIR ALSA always set the setting to zero.

I can only guess why. My buest guess is that not all
sound-configurations are the same, on some systems the "defaults" could
much to loud. (e.g. waking the neigbours when you restart you computer
at night)

I can perfectly understand the ALSA-guys. It's a bit annoying, but
nothing an init-script can't fix. -> Distro problem.
(And i guess the "OSS-gab" was filled by the Distro)

(Personally i use my own "S99misc" init-script which, apart from some other
things, loads the sound-driver and then sets the mixer-levels.)




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 13:26       ` Pat Suwalski
@ 2003-04-23 17:26         ` Martin J. Bligh
  2003-04-23 17:45           ` Disconnect
                             ` (3 more replies)
  2003-04-23 22:17         ` Pavel Machek
  1 sibling, 4 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 17:26 UTC (permalink / raw)
  To: Pat Suwalski, Matthias Schniedermeyer; +Cc: Marc Giger, linux-kernel

>> I can only guess why. My buest guess is that not all
>> sound-configurations are the same, on some systems the "defaults" could
>> much to loud. (e.g. waking the neigbours when you restart you computer
>> at night)
> 
> This is certainly the case. When I was packaging OSS for Xandros, our initial default was 50 percent. We eventualyl made it about 30, because even that was too loud on a laptop we were testing. There was little coherance between the various soundcards.
> 
> Waking the neighbors is the smallest problem. Blowing a speaker or makign the user deaf if quite another.
> 
> Yes, it's a distro problem. My Gentoo was build "-alsa" and so the alsa-sound init script does not 'go'. A simple rebuild will solve the problem.

I agree it's a disto problem to save and restore.

But I fail to understand how the distro can magically set a sensible 
default, and yet we're unable to do so inside the kernel ? Setting it
to something like 10 (or other very quiet setting) would seem reasonable.
Then at least the poor user would have a clue what the problem was.

As to "There was little coherance between the various soundcards", yes
this probably needs to be a per-soundcard setting for sensible defaults.
I presume this is what the distros do?

Defaulting to silence seems user-malevolent ... 

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 17:26         ` Martin J. Bligh
@ 2003-04-23 17:45           ` Disconnect
  2003-04-23 17:47           ` Matthias Schniedermeyer
                             ` (2 subsequent siblings)
  3 siblings, 0 replies; 59+ messages in thread
From: Disconnect @ 2003-04-23 17:45 UTC (permalink / raw)
  To: linux-kernel

On Wed, 2003-04-23 at 13:26, Martin J. Bligh wrote:
> I agree it's a disto problem to save and restore.
> 
> But I fail to understand how the distro can magically set a sensible 
> default, and yet we're unable to do so inside the kernel ? Setting it
> to something like 10 (or other very quiet setting) would seem reasonable.
> Then at least the poor user would have a clue what the problem was.
> 
> As to "There was little coherance between the various soundcards", yes
> this probably needs to be a per-soundcard setting for sensible defaults.
> I presume this is what the distros do?
> 
> Defaulting to silence seems user-malevolent ... 

The key there is -save- and restore.  The script defaults to "don't
touch" until it has a saved setting to use, which it can get either from
some user-triggered method or from a clean shutdown..

That, AFAIR, is also at least vaguely how that other desktop OS tends to
work - on shutdown save the settings, on boot restore them...

-- 
Disconnect <lkml@sigkill.net>


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  3 siblings, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-23 17:47 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Pat Suwalski, Marc Giger, linux-kernel

On Wed, Apr 23, 2003 at 10:26:38AM -0700, Martin J. Bligh wrote:
> >> I can only guess why. My buest guess is that not all
> >> sound-configurations are the same, on some systems the "defaults" could
> >> much to loud. (e.g. waking the neigbours when you restart you computer
> >> at night)
> > 
> > This is certainly the case. When I was packaging OSS for Xandros, our initial default was 50 percent. We eventualyl made it about 30, because even that was too loud on a laptop we were testing. There was little coherance between the various soundcards.
> > 
> > Waking the neighbors is the smallest problem. Blowing a speaker or makign the user deaf if quite another.
> > 
> > Yes, it's a distro problem. My Gentoo was build "-alsa" and so the alsa-sound init script does not 'go'. A simple rebuild will solve the problem.
> 
> I agree it's a disto problem to save and restore.
> 
> But I fail to understand how the distro can magically set a sensible 
> default, and yet we're unable to do so inside the kernel ? Setting it
> to something like 10 (or other very quiet setting) would seem reasonable.
> Then at least the poor user would have a clue what the problem was.
> 
> As to "There was little coherance between the various soundcards", yes
> this probably needs to be a per-soundcard setting for sensible defaults.
> I presume this is what the distros do?
> 
> Defaulting to silence seems user-malevolent ... 

The problem is (normaly) a "one time while installing"-problem. So don't
see the point. The "helper" that finds out the soundcard, should also do
a "find out the default volume to use"-round with the user.





Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 17:26         ` Martin J. Bligh
  2003-04-23 17:45           ` Disconnect
  2003-04-23 17:47           ` Matthias Schniedermeyer
@ 2003-04-23 17:49           ` Pat Suwalski
  2003-04-23 18:56           ` Jörn Engel
  3 siblings, 0 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-23 17:49 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel

Martin J. Bligh wrote:
> But I fail to understand how the distro can magically set a sensible 
> default, and yet we're unable to do so inside the kernel ? Setting it
> to something like 10 (or other very quiet setting) would seem reasonable.
> Then at least the poor user would have a clue what the problem was.

It does not. The entire point of the original problem was that the 
settings were not saved. It is not important that the initial is zero.

It is important that when I shutdown and then come back, the sound 
settings are as I left them. And this is a distribution issue. More 
specifically, my problem; my alsa-utils package.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 17:47           ` Matthias Schniedermeyer
@ 2003-04-23 18:44             ` Martin J. Bligh
  0 siblings, 0 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 18:44 UTC (permalink / raw)
  To: Matthias Schniedermeyer; +Cc: Pat Suwalski, Marc Giger, linux-kernel

>> As to "There was little coherance between the various soundcards", yes
>> this probably needs to be a per-soundcard setting for sensible defaults.
>> I presume this is what the distros do?
>> 
>> Defaulting to silence seems user-malevolent ... 
> 
> The problem is (normaly) a "one time while installing"-problem. So don't
> see the point. The "helper" that finds out the soundcard, should also do
> a "find out the default volume to use"-round with the user.

I'd rather not be drowned in Windows / Kudzu crap, personally.

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 17:26         ` Martin J. Bligh
                             ` (2 preceding siblings ...)
  2003-04-23 17:49           ` Pat Suwalski
@ 2003-04-23 18:56           ` Jörn Engel
  3 siblings, 0 replies; 59+ messages in thread
From: Jörn Engel @ 2003-04-23 18:56 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Pat Suwalski, Matthias Schniedermeyer, Marc Giger, linux-kernel

On Wed, 23 April 2003 10:26:38 -0700, Martin J. Bligh wrote:
> 
> But I fail to understand how the distro can magically set a sensible 
> default, and yet we're unable to do so inside the kernel ? Setting it
> to something like 10 (or other very quiet setting) would seem reasonable.
> Then at least the poor user would have a clue what the problem was.

Pick any number and it will be either too loud or below the fan noise
for some users, maybe both. The only number that has the same effect
for all users happens to be the number I personally would prefer as a
default and the alsa people have chosen.

What is wrong with 0? Even aunt tilly will figure out what the deal
it and it depends on the distribution if she can find the right
solution for this.

Jörn

-- 
Mundie uses a textbook tactic of manipulation: start with some
reasonable talk, and lead the audience to an unreasonable conclusion.
-- Bruce Perens

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 16:56   ` Martin J. Bligh
  2003-04-23 17:21     ` Matthias Schniedermeyer
@ 2003-04-23 21:34     ` Werner Almesberger
  2003-04-23 21:36       ` Martin J. Bligh
  2003-04-24 22:51       ` Pavel Machek
  1 sibling, 2 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-23 21:34 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Martin J. Bligh wrote:
> Actually, I agree with the submitter. Having the volume default to 0
> is stupid - userspace tools are all very well, but no substitute for
> sensible kernel defaults.

You've obviously never been to a meeting/conference and booted
a Linux notebook with a kernel that sets things to a non-zero
default :-)

If the default is to turn up also the microphone (and to enable
it in the first place), you might notice that even apparently
weak speakers are perfectly capable of producing a very LOUD
alarm-like sound. And you'll have to sit through this until
your user-mode utility loads and turns the mess off, while
everybody is turning to stare at you.

0 is the only safe default setting.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 21:34     ` Werner Almesberger
@ 2003-04-23 21:36       ` Martin J. Bligh
  2003-04-23 22:14         ` Werner Almesberger
  2003-04-24 22:51       ` Pavel Machek
  1 sibling, 1 reply; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 21:36 UTC (permalink / raw)
  To: Werner Almesberger; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

>> Actually, I agree with the submitter. Having the volume default to 0
>> is stupid - userspace tools are all very well, but no substitute for
>> sensible kernel defaults.
> 
> You've obviously never been to a meeting/conference and booted
> a Linux notebook with a kernel that sets things to a non-zero
> default :-)

Irrelevant really, since everyone's proposition is that the distro should
save and restore it from userspace. Which I actually agree with.

I'm more concerned with new installs, and the poor user having no idea
why his sound card "doesn't work". Been there myself. Pain in the ass.

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 21:36       ` Martin J. Bligh
@ 2003-04-23 22:14         ` Werner Almesberger
  2003-04-23 22:18           ` Martin J. Bligh
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-23 22:14 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Martin J. Bligh wrote:
> I'm more concerned with new installs, and the poor user having no idea
> why his sound card "doesn't work". Been there myself. Pain in the ass.

Yes, but that's a user space problem too. Nothing prevents your
distribution to crank up the volume to 100% also on a first-time
installation.

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.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 13:26       ` Pat Suwalski
  2003-04-23 17:26         ` Martin J. Bligh
@ 2003-04-23 22:17         ` Pavel Machek
  2003-04-23 22:35           ` Pat Suwalski
  1 sibling, 1 reply; 59+ messages in thread
From: Pavel Machek @ 2003-04-23 22:17 UTC (permalink / raw)
  To: Pat Suwalski
  Cc: Matthias Schniedermeyer, Martin J. Bligh, Marc Giger, linux-kernel

Hi!

> >I can only guess why. My buest guess is that not all
> >sound-configurations are the same, on some systems the "defaults" could
> >much to loud. (e.g. waking the neigbours when you restart you computer
> >at night)
> 
> This is certainly the case. When I was packaging OSS for Xandros, our 
> initial default was 50 percent. We eventualyl made it about 30, because 
> even that was too loud on a laptop we were testing. There was little 
> coherance between the various soundcards.
> 
> Waking the neighbors is the smallest problem. Blowing a speaker or 
> makign the user deaf if quite another.

Hardware that lets software kill it deserves so, and I believe you
can't make user deaf *that* easily.

I expect kernel to just work, and not need 1001 tools to set it
up. cat /bin/bash > /dev/dsp should produce some noise...
								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  0 siblings, 2 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 22:18 UTC (permalink / raw)
  To: Werner Almesberger; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

>> I'm more concerned with new installs, and the poor user having no idea
>> why his sound card "doesn't work". Been there myself. Pain in the ass.
> 
> Yes, but that's a user space problem too. Nothing prevents your
> distribution to crank up the volume to 100% also on a first-time
> installation.

100% would be stupid too. If the distro can pick a reasonable value,
the kernel can too. Thus the argument "push the problem into userspace"
doesn't do anything for me.
 
> 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. 

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:17         ` Pavel Machek
@ 2003-04-23 22:35           ` Pat Suwalski
  2003-04-23 22:55             ` Pavel Machek
  2003-04-23 23:15             ` Martin J. Bligh
  0 siblings, 2 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-23 22:35 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Matthias Schniedermeyer, Martin J. Bligh, Marc Giger, linux-kernel

Pavel Machek wrote:
> I expect kernel to just work, and not need 1001 tools to set it
> up. cat /bin/bash > /dev/dsp should produce some noise...

Without making a big point of it, I do believe that is the motivation 
behind ALSA.

I have used mixers for ALSA, OSS, esd, and artsd. If there is one set of 
tools for ALSA, that is a Good Thing.

Look at any other OS. There are not four individual mixers.


It should start at zero, then when you set the correct volume, it should 
remember it so that you can cat > /dev/dsp and have noise.

The alternative approach is to set the volume very low, but still 
perceptible by default, say 10% or 20%, so that the user is aware of his 
device working, then can set the mixer to a level that is good, which 
the system remembers.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:35           ` Pat Suwalski
@ 2003-04-23 22:55             ` Pavel Machek
  2003-04-24  2:19               ` Werner Almesberger
  2003-04-23 23:15             ` Martin J. Bligh
  1 sibling, 1 reply; 59+ messages in thread
From: Pavel Machek @ 2003-04-23 22:55 UTC (permalink / raw)
  To: Pat Suwalski
  Cc: Pavel Machek, Matthias Schniedermeyer, Martin J. Bligh,
	Marc Giger, linux-kernel

Hi!


> >up. cat /bin/bash > /dev/dsp should produce some noise...
> 
> Without making a big point of it, I do believe that is the motivation 
> behind ALSA.
> 
> I have used mixers for ALSA, OSS, esd, and artsd. If there is one set of 
> tools for ALSA, that is a Good Thing.
> 
> Look at any other OS. There are not four individual mixers.
> 
> 
> It should start at zero, then when you set the correct volume, it should 
> remember it so that you can cat > /dev/dsp and have noise.

That breaks in init=/bin/bash siuations, old distros, etc.

> The alternative approach is to set the volume very low, but still 
> perceptible by default, say 10% or 20%, so that the user is aware of his 
> device working, then can set the mixer to a level that is good, which 
> the system remembers.

20% default level works for me. AAt least I know what the problem is
(hey, need to set up mixer).

						Pavel

-- 
Horseback riding is like software...
...vgf orggre jura vgf serr.

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:18           ` Martin J. Bligh
@ 2003-04-23 22:55             ` Werner Almesberger
  2003-04-24  0:11             ` Jamie Lokier
  1 sibling, 0 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-23 22:55 UTC (permalink / raw)
  To: Martin J. Bligh; +Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Martin J. Bligh wrote:
> So if people want 0 volume for some reason, they can set *that*
> in userspace.

1) the kernel default is applied before, possibly long before user
   space can provide its own value
2) the kernel itself doesn't use audio for any intentional interaction
   with the user when booting
3) there can be unintentional audio output, e.g. from a source that
   also has a non-zero default setting, or that starts in a random
   state
4) you'll run a user space utility to adjust the volume, probably
   before the user even gets a chance to do anything that would
   cause intentional audio output

So, because of 4), your user space utility better gets it right, no
matter what the kernel does. If it screws up, your user loses.

3) may yield unexpected noise. Given that the expected behaviour
is silence (see 2), any sound at that point would be unexpected.

Because of 1), the kernel default should be such that a value
should be picked that has the least potential of causing unpleasant
surprises before user space takes over.

I don't quite see your point anyway. Because of 2), the only
situations in which a non-zero default would do anything useful
would be

 - if you add audio output when booting a regular kernel

 - if the user-space utility is absent, doesn't work properly, or
   fails completely (if it fails, there'll probably be larger
   obstacles than just adjusting the volume). Since for many
   users, installing a new kernel equals upgrading their
   distribution, fixes to any design errors in that user-space
   part shouldn't be harder to deploy than a kernel-side change.

So are you planning to make the kernel sing a little song for us,
while booting ? :-)

(Now, for some constructive criticism: a user-space utility that
checks if there is on-going audio output with the volume set very
low, and pops up a wizard in such a case, might actually be
helpful. Likewise, audio output without an application accessing
the mixer may warrant a wizard.)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:35           ` Pat Suwalski
  2003-04-23 22:55             ` Pavel Machek
@ 2003-04-23 23:15             ` Martin J. Bligh
  1 sibling, 0 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-23 23:15 UTC (permalink / raw)
  To: Pat Suwalski, Pavel Machek
  Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel

> The alternative approach is to set the volume very low, but still 
> perceptible by default, say 10% or 20%, so that the user is aware 
> of his device working, then can set the mixer to a level that is 
> good, which the system remembers.

I'd much prefer that ... seems much more user-friendly.

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:18           ` Martin J. Bligh
  2003-04-23 22:55             ` Werner Almesberger
@ 2003-04-24  0:11             ` Jamie Lokier
  2003-04-24  0:43               ` Werner Almesberger
  1 sibling, 1 reply; 59+ messages in thread
From: Jamie Lokier @ 2003-04-24  0:11 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Werner Almesberger, Matthias Schniedermeyer, Marc Giger,
	linux-kernel, pat

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

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  0:11             ` Jamie Lokier
@ 2003-04-24  0:43               ` Werner Almesberger
  2003-04-24  1:11                 ` Jamie Lokier
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24  0:43 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Jamie Lokier wrote:
> 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.

Good points.

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

I don't quite see how this would make user space any less
fancy:

# insmod audio_driver volume=`retrieve_volume`

versus

# insmod audio_driver
# aumix -L >/dev/null

only that the latter can do a lot more, so you may want it even
if the module lets you set the volume. And the module solution
doesn't help with monolithic kernels. (And I doubt you'd want
this to be a kernel command line parameter. Talk about fancy.)

> Then anything with a fancy enough userspace [...]

echo 'aumix -L >/dev/null' >>/etc/rc.d/rc.local

Wow, that was hard :-) (Okay, things get a tad more complex if
you have more than one mixer.)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  0:43               ` Werner Almesberger
@ 2003-04-24  1:11                 ` Jamie Lokier
  2003-04-24  1:18                   ` Martin J. Bligh
                                     ` (2 more replies)
  0 siblings, 3 replies; 59+ messages in thread
From: Jamie Lokier @ 2003-04-24  1:11 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Werner Almesberger wrote:
> >    A standard audio module option "volume=X" meaning "set volume X%
> >    when the module initialises".
> 
> I don't quite see how this would make user space any less
> fancy:
> 
> # insmod audio_driver volume=`retrieve_volume`
> 
> versus
> 
> # insmod audio_driver
> # aumix -L >/dev/null

Eh?  I was suggesting that the _default_ just work as quite a few
people expect:

	$ insmod audio_driver

In fact, forget about "volume".  Just have a "silent" parameter that
defaults to 0, and determines whether the device starts silent or
loads preset defaults.  Make it a core audio thing rather than a
per-driver thing, too.  "silent=1" in /etc/modules.conf self-evidently
answers the FAQ, too :)

-- Jamie

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  2 siblings, 0 replies; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-24  1:18 UTC (permalink / raw)
  To: Jamie Lokier, Werner Almesberger
  Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

>> I don't quite see how this would make user space any less
>> fancy:
>> 
>> # insmod audio_driver volume=`retrieve_volume`
>> 
>> versus
>> 
>> # insmod audio_driver
>> # aumix -L >/dev/null
> 
> Eh?  I was suggesting that the _default_ just work as quite a few
> people expect:
> 
> 	$ insmod audio_driver
> 
> In fact, forget about "volume".  Just have a "silent" parameter that
> defaults to 0, and determines whether the device starts silent or
> loads preset defaults.  Make it a core audio thing rather than a
> per-driver thing, too.  "silent=1" in /etc/modules.conf self-evidently
> answers the FAQ, too :)

Me like. Assuming this means what I think it does ;-)

The kernel sets a default quiet volume level (at first setup) to make some 
sort of  noise when used I first set up the machine so users don't get 
confused ... save & restore volume levels on every boot from userspace. 
If people want silent by default, they can change that in the 
modules.conf / command line.

Is that what you meant?

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  2 siblings, 0 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-24  1:22 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Werner Almesberger, Martin J. Bligh, Matthias Schniedermeyer,
	Marc Giger, linux-kernel

Jamie Lokier wrote:
> In fact, forget about "volume".  Just have a "silent" parameter that
> defaults to 0, and determines whether the device starts silent or
> loads preset defaults.  Make it a core audio thing rather than a
> per-driver thing, too.  "silent=1" in /etc/modules.conf self-evidently
> answers the FAQ, too :)

That is veryt true. Self-answering FAQs are nice.

This thread... what a monstrosity I started...

--Pat



^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  2 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24  2:11 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Jamie Lokier wrote:
> In fact, forget about "volume".  Just have a "silent" parameter that
> defaults to 0,

Default to make useless or disturbing noise ...

> and determines whether the device starts silent or
> loads preset defaults.

So these defaults would be hard-coded values that take into account,
among other factors:

 - the actual audio hardware (e.g. variations in the analog part)
 - possibly the position of a "volume" knob somewhere
 - the environment of the machine (ambient noise, acceptable
   volume level)

And all that for what ? If you want to turn up the volume after
booting, all you need is one whole line in your rc scripts. So
far I haven't seen a single argument as to why this wouldn't be
sufficient.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 22:55             ` Pavel Machek
@ 2003-04-24  2:19               ` Werner Almesberger
  2003-04-24  2:29                 ` Pat Suwalski
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24  2:19 UTC (permalink / raw)
  To: Pavel Machek
  Cc: Pat Suwalski, Matthias Schniedermeyer, Martin J. Bligh,
	Marc Giger, linux-kernel

Pavel Machek wrote:
> That breaks in init=/bin/bash siuations,

True. This also breaks a zillion other things, like NFS, journal
recovery, and such. Shouldn't we have kernel options for them as
well ? :-)

> old distros, etc.

So you're claiming that users will find it more difficult to add
one line to rc.local than upgrading their kernel ?

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  2:19               ` Werner Almesberger
@ 2003-04-24  2:29                 ` Pat Suwalski
  2003-04-24  2:34                   ` Ben Collins
  2003-04-24  4:30                   ` Valdis.Kletnieks
  0 siblings, 2 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-24  2:29 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Pavel Machek, Matthias Schniedermeyer, Martin J. Bligh,
	Marc Giger, linux-kernel

Werner Almesberger wrote:
> So you're claiming that users will find it more difficult to add
> one line to rc.local than upgrading their kernel ?

No.

I believe he is saying that ever since 1984 and the Mac Plus, it has 
been expected that sound works right away without adding any lines anywhere.

I have not seen a computer in the last year and a half that has not had 
either onboard sound or a card. It is very standard hardware these days. 
Therefore, your soundcard should work just like your keyboard does. You 
do not have to add any lines to any rc script to get the keyboard 
working, do you? Sound should not have to be any different, in an ideal 
world.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  2:29                 ` Pat Suwalski
@ 2003-04-24  2:34                   ` Ben Collins
  2003-04-24  7:22                     ` Jamie Lokier
  2003-04-24  4:30                   ` Valdis.Kletnieks
  1 sibling, 1 reply; 59+ messages in thread
From: Ben Collins @ 2003-04-24  2:34 UTC (permalink / raw)
  To: Pat Suwalski
  Cc: Werner Almesberger, Pavel Machek, Matthias Schniedermeyer,
	Martin J. Bligh, Marc Giger, linux-kernel

On Wed, Apr 23, 2003 at 10:29:05PM -0400, Pat Suwalski wrote:
> Werner Almesberger wrote:
> >So you're claiming that users will find it more difficult to add
> >one line to rc.local than upgrading their kernel ?
> 
> No.
> 
> I believe he is saying that ever since 1984 and the Mac Plus, it has 
> been expected that sound works right away without adding any lines anywhere.
> 
> I have not seen a computer in the last year and a half that has not had 
> either onboard sound or a card. It is very standard hardware these days. 
> Therefore, your soundcard should work just like your keyboard does. You 
> do not have to add any lines to any rc script to get the keyboard 
> working, do you? Sound should not have to be any different, in an ideal 
> world.

Sound may be a standard feature, but it does not get driven by a
standard interface like PS2 or HID keyboards do. It's also not as
straight forward as "sound or no sound". There's many different levels
of sound hardware, from the 2-channel basic stereo, to the 6-way Dolby
Digital 5.1.

Whether or not a line is needed in an rc script is really a shortcoming
of userspace, IMO. It's the responsibility of userspace to setup the
user's environment in the most friendly way.

-- 
Debian     - http://www.debian.org/
Linux 1394 - http://www.linux1394.org/
Subversion - http://subversion.tigris.org/
Deqo       - http://www.deqo.com/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  2:11                   ` Werner Almesberger
@ 2003-04-24  2:40                     ` Martin J. Bligh
  2003-04-24  3:37                       ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-24  2:40 UTC (permalink / raw)
  To: Werner Almesberger, Jamie Lokier
  Cc: Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

>> In fact, forget about "volume".  Just have a "silent" parameter that
>> defaults to 0,
> 
> Default to make useless or disturbing noise ...

You turn it off once, and your distro keeps it that way. Doesn't seem
that onerous to me. 

The key difference is that that poor user who's setting the thing up 
for the first time has more of a clue what's going on. Making Linux
less hostile to new users is a Good Thing (tm).

> So these defaults would be hard-coded values that take into account,
> among other factors:
> 
>  - the actual audio hardware (e.g. variations in the analog part)
>  - possibly the position of a "volume" knob somewhere
>  - the environment of the machine (ambient noise, acceptable
>    volume level)
> 
> And all that for what ? 

And all for the fact that when the user sets up the system, it just
works. With sensible defaults. Instead of being an elitist piece of
crap that only l33t g33ks can use.

Even for people that are capable of debugging it, it's just not a
productive use of time. I have better things to do with my life that debug
non-inuitive user interfaces, thanks.

> If you want to turn up the volume after
> booting, all you need is one whole line in your rc scripts. So
> far I haven't seen a single argument as to why this wouldn't be
> sufficient.

It's about making it easy to use. The expert users can configure the
damned thing any way they please anyway. For novices, it should do
something intuitive out of the box. The same principle should apply
to reams of crappy software out there right now.

--On Wednesday, April 23, 2003 22:29:05 -0400 Pat Suwalski
<pat@suwalski.net> wrote:

> I believe he is saying that ever since 1984 and the Mac Plus, it has been
> expected that sound works right away without adding any lines anywhere.
> 
> I have not seen a computer in the last year and a half that has not had
> either onboard sound or a card. It is very standard hardware these days.
> Therefore, your soundcard should work just like your keyboard does. You
> do not have to add any lines to any rc script to get the keyboard
> working, do you? Sound should not have to be any different, in an ideal
> world.

Indeed. Initial impression of people upgrading a kernel from 2.4 to 2.5/6
is that "sound doesn't work in 2.5/6". Not good.

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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  7:14                         ` Jamie Lokier
  0 siblings, 2 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24  3:37 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Jamie Lokier, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Martin J. Bligh wrote:
> You turn it off once, and your distro keeps it that way. Doesn't seem
> that onerous to me. 

Okay, so now your distribution is aware of this configuration
issue.

> Indeed. Initial impression of people upgrading a kernel from 2.4 to 2.5/6
> is that "sound doesn't work in 2.5/6". Not good.

... but now it isn't. What gives ?

(Besides, you've just added the "silent" flag as another config item
besides the volume setting, using different interfaces, different
permissions, etc.)

> And all for the fact that when the user sets up the system, it just
> works. With sensible defaults. Instead of being an elitist piece of
> crap that only l33t g33ks can use.

Fine. But this discussion isn't about the end-user experience,
but about where a certain parameter should be set, and what its
transient default value should be.

Unexperienced users will just install a set of packages to upgrade
to a new kernel. So this change can just be included in one of
these upgrades. No superhuman effort needed.

As far as those are concerned who painstakingly build their own
kernel, update the things listed in Documentation/Changes, avoid
suble traps like CONFIG_SERIO_I8042, don't get confused by needing
new module utilities, etc., I'm fairly confident that they'll
consider setting the volume a rather minor challenge.

And you could even take the sting out of this one by adding an
appropriate warning to Documentation/Changes. That's a about all
the kernel-side support this issue deserves.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  2:29                 ` Pat Suwalski
  2003-04-24  2:34                   ` Ben Collins
@ 2003-04-24  4:30                   ` Valdis.Kletnieks
  1 sibling, 0 replies; 59+ messages in thread
From: Valdis.Kletnieks @ 2003-04-24  4:30 UTC (permalink / raw)
  To: Pat Suwalski; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

On Wed, 23 Apr 2003 22:29:05 EDT, Pat Suwalski said:
> I have not seen a computer in the last year and a half that has not had 
> either onboard sound or a card. It is very standard hardware these days. 
> Therefore, your soundcard should work just like your keyboard does. You 
> do not have to add any lines to any rc script to get the keyboard 
> working, do you? Sound should not have to be any different, in an ideal 
> world.

Users come in two basic flavors - distro based users and people who roll
their own kernels.  For the distro users, it really doesn't matter WHAT
we do, as the distro can patch the kernel and userspace how they want.

If you're a roll-your-own, you don't have to add lines to an rc script
to get the keyboard working - but you DO have to do the CONFIG_INPUT thing. ;)

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  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
  1 sibling, 1 reply; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-24  4:47 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Jamie Lokier, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

>> You turn it off once, and your distro keeps it that way. Doesn't seem
>> that onerous to me. 
> 
> Okay, so now your distribution is aware of this configuration
> issue.

Can be. But does something sensible without it.
 
>> Indeed. Initial impression of people upgrading a kernel from 2.4 to 2.5/6
>> is that "sound doesn't work in 2.5/6". Not good.
> 
> ... but now it isn't. What gives ?

Not sure what you mean. Load kernel, load xmms. hit play. Sound comes out.
Goodness.
 
> (Besides, you've just added the "silent" flag as another config item
> besides the volume setting, using different interfaces, different
> permissions, etc.)

Yeah. But the default options now do something non-confusing.
 
>> And all for the fact that when the user sets up the system, it just
>> works. With sensible defaults. Instead of being an elitist piece of
>> crap that only l33t g33ks can use.
> 
> Fine. But this discussion isn't about the end-user experience,
> but about where a certain parameter should be set, and what its
> transient default value should be.

Umm. This discussion is exactly about the end-user experience.
And it's not a transient default ... it's the initial default.

> Unexperienced users will just install a set of packages to upgrade
> to a new kernel. So this change can just be included in one of
> these upgrades. No superhuman effort needed.

So we can fix it in userspace, and decided a sensible non-zero default
there, but are somehow incapable of doing that *inside* the kernel? Sorry,
I don't buy that. 

There is a middle ground between "clueless newbie" and "geek who spends
their whole life configuring Linux, and is happy to change 2000 settings on
every install" ... something like "person who just wants to get on with it,
and not fiddle endlessly with things that should just work".
 
> As far as those are concerned who painstakingly build their own
> kernel, update the things listed in Documentation/Changes, avoid
> suble traps like CONFIG_SERIO_I8042, don't get confused by needing
> new module utilities, etc., I'm fairly confident that they'll
> consider setting the volume a rather minor challenge.
> 
> And you could even take the sting out of this one by adding an
> appropriate warning to Documentation/Changes. That's a about all
> the kernel-side support this issue deserves.

The old "document the bugs" arguement. I've been there before - Dynix/PTX.
We ended up with 1000 pages of utter crap for users to wade through as
"release notes". I got into the habit of taking a printed out copy to
meetings and whenever anyone uttered the phrase "but it's documented in the
release notes" I could thump the monster down on the table and say "find
it". They never could by the end of the meeting.

Bugs should be fixed, not documented.

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  3:37                       ` Werner Almesberger
  2003-04-24  4:47                         ` Martin J. Bligh
@ 2003-04-24  7:14                         ` Jamie Lokier
  2003-04-24 13:38                           ` Werner Almesberger
  1 sibling, 1 reply; 59+ messages in thread
From: Jamie Lokier @ 2003-04-24  7:14 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Werner Almesberger wrote:
> (Besides, you've just added the "silent" flag as another config item
> besides the volume setting, using different interfaces, different
> permissions, etc.)

Eh?  Another?

> As far as those are concerned who painstakingly build their own
> kernel, update the things listed in Documentation/Changes, avoid
> suble traps like CONFIG_SERIO_I8042, don't get confused by needing
> new module utilities, etc., I'm fairly confident that they'll
> consider setting the volume a rather minor challenge.

Heh, you got it right there with 8042 et al. :)

> And you could even take the sting out of this one by adding an
> appropriate warning to Documentation/Changes. That's a about all
> the kernel-side support this issue deserves.

Yes, do make sure it is in there.

-- Jamie

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  2:34                   ` Ben Collins
@ 2003-04-24  7:22                     ` Jamie Lokier
  2003-04-24 13:31                       ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Jamie Lokier @ 2003-04-24  7:22 UTC (permalink / raw)
  To: Ben Collins
  Cc: Pat Suwalski, Werner Almesberger, Pavel Machek,
	Matthias Schniedermeyer, Martin J. Bligh, Marc Giger,
	linux-kernel

Ben Collins wrote:
> Sound may be a standard feature, but it does not get driven by a
> standard interface like PS2 or HID keyboards do. It's also not as
> straight forward as "sound or no sound". There's many different levels
> of sound hardware, from the 2-channel basic stereo, to the 6-way Dolby
> Digital 5.1.

There was a time when you had to spend a day fiddling with X
configurations to get X to work on your card and monitor.

And then do it again when XFree86 4 came out :(
Or if you changed monitor :(

Thankfully those times are gone, and usually X just works with no
configuration at all.  It's a *huge* improvment.

The same should be possible with sound hardware, however (just as in
the old days of video), sound hardware is mostly not able to
self-configure yet.

> Whether or not a line is needed in an rc script is really a shortcoming
> of userspace, IMO. It's the responsibility of userspace to setup the
> user's environment in the most friendly way.

So why do we enable the PC-speaker beep automatically?
Shouldn't that be silent initially too?

I can tell you that beep can also be quite embarrassing at
conferences.  On my laptop it uses the same speakers as the sound
card, but unfortunately the beep is much louder than I'd even set the
sound to be.

-- Jamie

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  4:47                         ` Martin J. Bligh
@ 2003-04-24 13:16                           ` Werner Almesberger
  0 siblings, 0 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 13:16 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Jamie Lokier, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Martin J. Bligh wrote:
> Not sure what you mean. Load kernel, load xmms. hit play. Sound comes out.
> Goodness.

Well, replace "load kernel" with "boot system", and we're in violent
agreement :-)

> So we can fix it in userspace, and decided a sensible non-zero default
> there, but are somehow incapable of doing that *inside* the kernel? Sorry,
> I don't buy that. 

No, you still have to make a guess, but you don't need to involve
the kernel. (I think Redmond owns most of the intellectual property
on "if you don't know where to put it, put it in the kernel, for it
will be faster and more secure that way", so we shouldn't use this
paradigm too often :-)

Since choosing this default is something between the distribution
maker and the user, they can

 - choose to leave it silent ("expert mode")
 - perhaps use other information they've gathered at install time
 - reuse old stored settings (e.g. look for an aumixrc)
 - pop up a dialog
 - print a warning
etc.

> The old "document the bugs" arguement.

;-) True, but in this case, you're very likely to run into problems
if you don't religiously follow Documentation/Changes anyway. And
there are people I fully expect to read this line by line - namely
the distribution makers. And they're exactly the ones who need to
be aware of this issue.

> Bugs should be fixed, not documented.

It's a feature :-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  7:22                     ` Jamie Lokier
@ 2003-04-24 13:31                       ` Werner Almesberger
  0 siblings, 0 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 13:31 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Ben Collins, Pat Suwalski, Pavel Machek, Matthias Schniedermeyer,
	Martin J. Bligh, Marc Giger, linux-kernel

Jamie Lokier wrote:
> So why do we enable the PC-speaker beep automatically?
> Shouldn't that be silent initially too?

The difference to "sound" is that it won't make noise unless asked
to. So it starts with a safe default, and the rest is user policy.

On notebooks, I usually switch it off in my rc scripts after it's
been bothering me for the first time. Interesting ... I just
checked, and it seems that all my machines turn it off by default,
even without me knowingly doing something :-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24  7:14                         ` Jamie Lokier
@ 2003-04-24 13:38                           ` Werner Almesberger
  2003-04-24 13:49                             ` Matthias Schniedermeyer
  2003-04-24 21:36                             ` Jamie Lokier
  0 siblings, 2 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 13:38 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Jamie Lokier wrote:
> Yes, do make sure it is in there.

What's actually the exact statement ? Does anything change if you
don't switch from OSS to ALSA ?

Would something like this be correct ?


Sound
=====

ALSA
----

ALSA (Advanced Linux Sound Architecture) is now the preferred
architecture for sound support, instead of the older OSS (Open
Sound System). Note that all volume settings default to zero
in ALSA, so user space needs to explicitly increase the volume
before any sound can be heard.


- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 13:38                           ` Werner Almesberger
@ 2003-04-24 13:49                             ` Matthias Schniedermeyer
  2003-04-24 14:08                               ` Pat Suwalski
  2003-04-24 21:36                             ` Jamie Lokier
  1 sibling, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-24 13:49 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Jamie Lokier, Martin J. Bligh, Marc Giger, linux-kernel, pat

On Thu, Apr 24, 2003 at 10:38:58AM -0300, Werner Almesberger wrote:
> Jamie Lokier wrote:
> > Yes, do make sure it is in there.
> 
> What's actually the exact statement ? Does anything change if you
> don't switch from OSS to ALSA ?
> 
> Would something like this be correct ?
> 
> 
> Sound
> =====
> 
> ALSA
> ----
> 
> ALSA (Advanced Linux Sound Architecture) is now the preferred
> architecture for sound support, instead of the older OSS (Open
> Sound System). Note that all volume settings default to zero
> in ALSA, so user space needs to explicitly increase the volume
> before any sound can be heard.

To be exact. ALSA mutes all channels, if you don't unset the mute-flags
on the channels you can increase the volume to 100% without a change.
:-)




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 13:49                             ` Matthias Schniedermeyer
@ 2003-04-24 14:08                               ` Pat Suwalski
  2003-04-24 14:34                                 ` Matthias Schniedermeyer
  0 siblings, 1 reply; 59+ messages in thread
From: Pat Suwalski @ 2003-04-24 14:08 UTC (permalink / raw)
  To: Matthias Schniedermeyer
  Cc: Werner Almesberger, Jamie Lokier, Martin J. Bligh, Marc Giger,
	linux-kernel

Matthias Schniedermeyer wrote:
> To be exact. ALSA mutes all channels, if you don't unset the mute-flags
> on the channels you can increase the volume to 100% without a change.
> :-)

Does it vary from hardware to hardware, distro to distro? On my machine, 
the channels are most certainly not muted, only at 0.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 14:08                               ` Pat Suwalski
@ 2003-04-24 14:34                                 ` Matthias Schniedermeyer
  2003-04-24 15:04                                   ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-24 14:34 UTC (permalink / raw)
  To: Pat Suwalski
  Cc: Werner Almesberger, Jamie Lokier, Martin J. Bligh, Marc Giger,
	linux-kernel

On Thu, Apr 24, 2003 at 10:08:53AM -0400, Pat Suwalski wrote:
> Matthias Schniedermeyer wrote:
> >To be exact. ALSA mutes all channels, if you don't unset the mute-flags
> >on the channels you can increase the volume to 100% without a change.
> >:-)
> 
> Does it vary from hardware to hardware, distro to distro? On my machine, 
> the channels are most certainly not muted, only at 0.

Maybe it depends on hardware, or your mixer "transparently" unmutes the
channel when you increase volume.

At least with my sblive i can "mute" channels without changing the
volume level. And last time i tried ALSA the channels where muted.




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 14:34                                 ` Matthias Schniedermeyer
@ 2003-04-24 15:04                                   ` Werner Almesberger
  2003-04-24 15:23                                     ` Matthias Schniedermeyer
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 15:04 UTC (permalink / raw)
  To: Matthias Schniedermeyer
  Cc: Pat Suwalski, Jamie Lokier, Martin J. Bligh, Marc Giger, linux-kernel

Matthias Schniedermeyer wrote:
> Maybe it depends on hardware, or your mixer "transparently" unmutes the
> channel when you increase volume.

Hmm, KMix doesn't do either, but if I mute the main volume and
restart KMix, it will come up unmuted, but the volume set to
zero.

Other mixers (XMixer, aumix) don't seem know of the concept of
muting at all. (And switching input sources doesn't seem to
have much effect on what gets sent to the speakers.)

Also, a quick grep through linux-*/sound/ doesn't find the
word "mute". Are you sure this isn't a feature of the mixer
instead of the sound API ?

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 15:04                                   ` Werner Almesberger
@ 2003-04-24 15:23                                     ` Matthias Schniedermeyer
  2003-04-24 16:01                                       ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Matthias Schniedermeyer @ 2003-04-24 15:23 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Pat Suwalski, Jamie Lokier, Martin J. Bligh, Marc Giger, linux-kernel

On Thu, Apr 24, 2003 at 12:04:03PM -0300, Werner Almesberger wrote:
> Matthias Schniedermeyer wrote:
> > Maybe it depends on hardware, or your mixer "transparently" unmutes the
> > channel when you increase volume.
> 
> Hmm, KMix doesn't do either, but if I mute the main volume and
> restart KMix, it will come up unmuted, but the volume set to
> zero.
> 
> Other mixers (XMixer, aumix) don't seem know of the concept of
> muting at all. (And switching input sources doesn't seem to
> have much effect on what gets sent to the speakers.)
> 
> Also, a quick grep through linux-*/sound/ doesn't find the
> word "mute". Are you sure this isn't a feature of the mixer
> instead of the sound API ?

man amixer
(the native ALSA-Mixer)

-- set --
       set or sset <SCONTROL> <PARAMETER> ...
              Sets the simple mixer control contents. The parameter can be the volume either as a percentage from 0% to 100% or an exact hardware  value.
              The  parameters cap, nocap, mute, unmute, toggle are used to change capture (recording) and muting for the group specified.  The parameters
              front, rear, center, woofer are used to specify channels to be changed. When plus(+) or minus(-) letter is appended after volume value, the
              volume is incremented or decremented from the current value, respectively.

              A simple mixer control must be specified. Only one device can be controlled at a time.
-- end --

-- example 1 --
              amixer -c 1 sset Line,0 80%,40% unmute cap
-- end --




Bis denn

-- 
Real Programmers consider "what you see is what you get" to be just as 
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated, 
cryptic, powerful, unforgiving, dangerous.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 15:23                                     ` Matthias Schniedermeyer
@ 2003-04-24 16:01                                       ` Werner Almesberger
  2003-04-24 16:26                                         ` Jaroslav Kysela
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 16:01 UTC (permalink / raw)
  To: Matthias Schniedermeyer
  Cc: Pat Suwalski, Jamie Lokier, Martin J. Bligh, Marc Giger, linux-kernel

Matthias Schniedermeyer wrote:
> man amixer

Thanks. Yes, this indeed seems to map to some functionality that's
understood by the kernel.

Strange. So does this mean that non-ALSA mixers should not work when
using ALSA ? Why do they seem to anyway ? Is the driver or hardware
side of this mute flag just rarely implemented ? Or is the kernel
default not always "mute" ?

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 16:01                                       ` Werner Almesberger
@ 2003-04-24 16:26                                         ` Jaroslav Kysela
  2003-04-24 21:22                                           ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Jaroslav Kysela @ 2003-04-24 16:26 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Matthias Schniedermeyer, Pat Suwalski, Jamie Lokier,
	Martin J. Bligh, Marc Giger, linux-kernel

On Thu, 24 Apr 2003, Werner Almesberger wrote:

> Matthias Schniedermeyer wrote:
> > man amixer
> 
> Thanks. Yes, this indeed seems to map to some functionality that's
> understood by the kernel.
> 
> Strange. So does this mean that non-ALSA mixers should not work when
> using ALSA ?

We have emulation layer for non-ALSA mixers. This layer turns mute off 
automagically when volume is greater than zero. This layer doesn't work 
100%, because ALSA API is more extended and there is no way to map the 
extended features to limited API.

> Why do they seem to anyway ?

> Is the driver or hardware side of this mute flag just rarely implemented?

Most of PCI cards which are based on AC97 supports muting for analog i/o.

> Or is the kernel default not always "mute" ?

We mute almost everything. Today, we preset only some of digital controls
and we preserve volume settings for USB devices (might be changed, of 
course).

Our policy is: Don't allow to users to jump from skin when default volumes 
are invalid. Because we cannot determine the settings of an user amplifier
(analog path), the most safe is mute everything.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 16:26                                         ` Jaroslav Kysela
@ 2003-04-24 21:22                                           ` Werner Almesberger
  2003-04-25 10:03                                             ` Jaroslav Kysela
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 21:22 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Matthias Schniedermeyer, Pat Suwalski, Jamie Lokier,
	Martin J. Bligh, Marc Giger, linux-kernel

Jaroslav Kysela wrote:
> We have emulation layer for non-ALSA mixers. This layer turns mute off 
> automagically when volume is greater than zero.

Thanks for clarifying this ! So, would you agree with the following
addition to Documentation/Changes ?

  ALSA (Advanced Linux Sound Architecture) is now the preferred
  architecture for sound support, instead of the older OSS (Open
  Sound System). Note that, in ALSA, all volume settings default
  to zero, and all channels default to being "muted".

  User space therefore needs to explicitly increase the volume,
  and "unmute" the respective audio channels before any sound
  can be heard. 

  Mixers not explicitly supporting the "mute" functionality will
  usually "unmute" sources when setting the volume to a value
  above zero.

  More information about ALSA, including configuration and OSS
  compatibility, can be found in Documentation/sound/alsa/

> Our policy is: Don't allow to users to jump from skin when default volumes 
> are invalid. Because we cannot determine the settings of an user amplifier
> (analog path), the most safe is mute everything.

I couldn't agree more.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 13:38                           ` Werner Almesberger
  2003-04-24 13:49                             ` Matthias Schniedermeyer
@ 2003-04-24 21:36                             ` Jamie Lokier
  2003-04-24 23:55                               ` Werner Almesberger
  1 sibling, 1 reply; 59+ messages in thread
From: Jamie Lokier @ 2003-04-24 21:36 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Werner Almesberger wrote:
> ALSA (Advanced Linux Sound Architecture) is now the preferred
> architecture for sound support, instead of the older OSS (Open
> Sound System). Note that all volume settings default to zero
> in ALSA, so user space needs to explicitly increase the volume
> before any sound can be heard.

I'm not sure whether that's actually correct, but as long as there's a
mixture of ALSA and non-ALSA drivers in 2.6, they really ought to
have the same behaviour in this regard.

I.e. if silence is the load-time setting, the OSS drivers and other
non-ALSA sound drivers should be changed to do that as well.

-- Jamie

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-23 21:34     ` Werner Almesberger
  2003-04-23 21:36       ` Martin J. Bligh
@ 2003-04-24 22:51       ` Pavel Machek
  1 sibling, 0 replies; 59+ messages in thread
From: Pavel Machek @ 2003-04-24 22:51 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Hi!

> > Actually, I agree with the submitter. Having the volume default to 0
> > is stupid - userspace tools are all very well, but no substitute for
> > sensible kernel defaults.
> 
> You've obviously never been to a meeting/conference and booted
> a Linux notebook with a kernel that sets things to a non-zero
> default :-)
> 
> If the default is to turn up also the microphone (and to enable
> it in the first place), you might notice that even apparently

So don't enable the microphone unless /dev/dsp is open for reading...

								Pavel
-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 21:36                             ` Jamie Lokier
@ 2003-04-24 23:55                               ` Werner Almesberger
  2003-04-25  0:05                                 ` Pat Suwalski
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-24 23:55 UTC (permalink / raw)
  To: Jamie Lokier
  Cc: Martin J. Bligh, Matthias Schniedermeyer, Marc Giger, linux-kernel, pat

Jamie Lokier wrote:
> I.e. if silence is the load-time setting, the OSS drivers and other
> non-ALSA sound drivers should be changed to do that as well.

Yes, unless we really consider everything but ALSA to be obsolete
to the point of irrelevance.

Or, to phrase this as a question, how likely is it that somebody
will prefer OSS over ALSA ? (E.g. because there is no ALSA driver,
the ALSA driver doesn't work, some application doesn't work with
ALSA, etc.)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 23:55                               ` Werner Almesberger
@ 2003-04-25  0:05                                 ` Pat Suwalski
  2003-04-25 10:41                                   ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Pat Suwalski @ 2003-04-25  0:05 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Jamie Lokier, Martin J. Bligh, Matthias Schniedermeyer,
	Marc Giger, linux-kernel

Werner Almesberger wrote:
> Or, to phrase this as a question, how likely is it that somebody
> will prefer OSS over ALSA ? (E.g. because there is no ALSA driver,
> the ALSA driver doesn't work, some application doesn't work with
> ALSA, etc.)

For that, refer to my other bug: 
http://bugzilla.kernel.org/show_bug.cgi?id=622

During window-switching activities in X, ALSA sound is interrupted. It 
is quite annoying. For this reason, I have actually gone back to using a 
2.4 kernel with OSS, though I hear my problem would not exist if I use 
deprecated OSS in 2.5.x.

This is on a fairly popular AC97 i810 chipset.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-24 21:22                                           ` Werner Almesberger
@ 2003-04-25 10:03                                             ` Jaroslav Kysela
  2003-04-25 10:30                                               ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Jaroslav Kysela @ 2003-04-25 10:03 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Matthias Schniedermeyer, Pat Suwalski, Jamie Lokier,
	Martin J. Bligh, Marc Giger, linux-kernel

On Thu, 24 Apr 2003, Werner Almesberger wrote:

> Jaroslav Kysela wrote:
> > We have emulation layer for non-ALSA mixers. This layer turns mute off 
> > automagically when volume is greater than zero.
> 
> Thanks for clarifying this ! So, would you agree with the following
> addition to Documentation/Changes ?
> 
>   ALSA (Advanced Linux Sound Architecture) is now the preferred
>   architecture for sound support, instead of the older OSS (Open
>   Sound System). Note that, in ALSA, all volume settings default
>   to zero, and all channels default to being "muted".
> 
>   User space therefore needs to explicitly increase the volume,
>   and "unmute" the respective audio channels before any sound
>   can be heard. 
> 
>   Mixers not explicitly supporting the "mute" functionality will
    ^^^^^^

I would change this to 'OSS mixers' because all ALSA mixers handle the 
mute feature.

>   usually "unmute" sources when setting the volume to a value
>   above zero.
> 
>   More information about ALSA, including configuration and OSS
>   compatibility, can be found in Documentation/sound/alsa/

It sounds good.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25 10:41                                   ` Werner Almesberger
@ 2003-04-25 10:04                                     ` Alan Cox
  2003-04-25 17:44                                       ` Werner Almesberger
  0 siblings, 1 reply; 59+ messages in thread
From: Alan Cox @ 2003-04-25 10:04 UTC (permalink / raw)
  To: Werner Almesberger
  Cc: Pat Suwalski, Jamie Lokier, Martin J. Bligh,
	Matthias Schniedermeyer, Marc Giger, Linux Kernel Mailing List

On Gwe, 2003-04-25 at 11:41, Werner Almesberger wrote:
> Okay, so there is a case for OSS. Not sure who is maintaining it,
> and if they care about making it act like ALSA. It would certainly
> be nice to be consistent, and I'm sure that OSS users won't mind
> getting rid of the occasional rude wakeup call.

The OSS audio drivers ac97 code now starts up with record muted. 


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25 10:03                                             ` Jaroslav Kysela
@ 2003-04-25 10:30                                               ` Werner Almesberger
  0 siblings, 0 replies; 59+ messages in thread
From: Werner Almesberger @ 2003-04-25 10:30 UTC (permalink / raw)
  To: Jaroslav Kysela
  Cc: Matthias Schniedermeyer, Pat Suwalski, Jamie Lokier,
	Martin J. Bligh, Marc Giger, linux-kernel

Jaroslav Kysela wrote:
> I would change this to 'OSS mixers' because all ALSA mixers handle the 
> mute feature.

I didn't qualify this for two reasons:

 - also an ALSA mixer may choose not to show a "mute" button (or
   equivalent) to the user
 - how am I to tell if my mixer is an ALSA or an OSS mixer ?

That's why I think a "if there's a mute button, set it to unmute,
if there's none, don't worry" rule is easier to understand.

I'd also expect that "mute" will sometimes be confused with input
selection (at least that happened to me, because I'm used to
XMixer and didn't realize there was another set of controls, e.g.
in KMix), but the rule will still work.

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25  0:05                                 ` Pat Suwalski
@ 2003-04-25 10:41                                   ` Werner Almesberger
  2003-04-25 10:04                                     ` Alan Cox
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-25 10:41 UTC (permalink / raw)
  To: Pat Suwalski
  Cc: Jamie Lokier, Martin J. Bligh, Matthias Schniedermeyer,
	Marc Giger, linux-kernel

Pat Suwalski wrote:
> For that, refer to my other bug: 
> http://bugzilla.kernel.org/show_bug.cgi?id=622

Okay, so there is a case for OSS. Not sure who is maintaining it,
and if they care about making it act like ALSA. It would certainly
be nice to be consistent, and I'm sure that OSS users won't mind
getting rid of the occasional rude wakeup call.

(Oh, another nice scenario: if they ask you to turn on your
notebook at airport security. Great setting for demonstrating that
loud alarm-like feedback loop :-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25 10:04                                     ` Alan Cox
@ 2003-04-25 17:44                                       ` Werner Almesberger
  2003-04-25 17:59                                         ` Martin J. Bligh
  0 siblings, 1 reply; 59+ messages in thread
From: Werner Almesberger @ 2003-04-25 17:44 UTC (permalink / raw)
  To: Alan Cox
  Cc: Pat Suwalski, Jamie Lokier, Martin J. Bligh,
	Matthias Schniedermeyer, Marc Giger, Linux Kernel Mailing List

Alan Cox wrote:
> The OSS audio drivers ac97 code now starts up with record muted. 

Okay, so I guess this will then cover all cases ? (Changebar
marks OSS addition.)

  ALSA (Advanced Linux Sound Architecture) is now the preferred
  architecture for sound support, instead of the older OSS (Open
  Sound System). Note that, in ALSA, all volume settings default
| to zero, and all channels default to being "muted". Also some
| OSS drivers in 2.5 initialize certain mixer settings to zero.
  
  User space therefore needs to explicitly increase the volume,
  and "unmute" the respective audio channels before any sound
  can be heard.
  
  Mixers not explicitly supporting the "mute" functionality will
  usually "unmute" sources when setting the volume to a value
  above zero.
  
  More information about ALSA, including configuration and OSS
  compatibility, can be found in Documentation/sound/alsa/

(I guess a simpler rule would be "if there's no sound, check the
mixer - and you don't want to know why you have to do this" :-)

- Werner

-- 
  _________________________________________________________________________
 / Werner Almesberger, Buenos Aires, Argentina         wa@almesberger.net /
/_http://www.almesberger.net/____________________________________________/

^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25 17:44                                       ` Werner Almesberger
@ 2003-04-25 17:59                                         ` Martin J. Bligh
  2003-04-26  0:31                                           ` Pat Suwalski
  0 siblings, 1 reply; 59+ messages in thread
From: Martin J. Bligh @ 2003-04-25 17:59 UTC (permalink / raw)
  To: Werner Almesberger, Alan Cox
  Cc: Pat Suwalski, Jamie Lokier, Matthias Schniedermeyer, Marc Giger,
	Linux Kernel Mailing List

>> The OSS audio drivers ac97 code now starts up with record muted. 
> 
> Okay, so I guess this will then cover all cases ? (Changebar
> marks OSS addition.)
> 
>   ALSA (Advanced Linux Sound Architecture) is now the preferred
>   architecture for sound support, instead of the older OSS (Open
>   Sound System). Note that, in ALSA, all volume settings default
>| to zero, and all channels default to being "muted". Also some
>| OSS drivers in 2.5 initialize certain mixer settings to zero.
>   
>   User space therefore needs to explicitly increase the volume,
>   and "unmute" the respective audio channels before any sound
>   can be heard.
>   
>   Mixers not explicitly supporting the "mute" functionality will
>   usually "unmute" sources when setting the volume to a value
>   above zero.
>   
>   More information about ALSA, including configuration and OSS
>   compatibility, can be found in Documentation/sound/alsa/
> 
> (I guess a simpler rule would be "if there's no sound, check the
> mixer - and you don't want to know why you have to do this" :-)

BTW, I realised there's a much simpler solution to the "but there's no
sound coming out" problem .... xmms and friends should just give the user a
warning on startup (or on play) if the main volume or pcm channel is at 0
(or muted).

M.


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
  2003-04-25 17:59                                         ` Martin J. Bligh
@ 2003-04-26  0:31                                           ` Pat Suwalski
  0 siblings, 0 replies; 59+ messages in thread
From: Pat Suwalski @ 2003-04-26  0:31 UTC (permalink / raw)
  To: Martin J. Bligh
  Cc: Werner Almesberger, Alan Cox, Jamie Lokier,
	Matthias Schniedermeyer, Marc Giger, Linux Kernel Mailing List

Martin J. Bligh wrote:
> BTW, I realised there's a much simpler solution to the "but there's no
> sound coming out" problem .... xmms and friends should just give the user a
> warning on startup (or on play) if the main volume or pcm channel is at 0
> (or muted).

No. This never happens.

It only complains if it its OSS output plugin cannot communicate with 
the kernel.

At least on all the cards I have ever used.

--Pat


^ permalink raw reply	[flat|nested] 59+ messages in thread

* Re: [Bug 623] New: Volume not remembered.
@ 2003-04-24  0:31 Ian Kumlien
  0 siblings, 0 replies; 59+ messages in thread
From: Ian Kumlien @ 2003-04-24  0:31 UTC (permalink / raw)
  To: linux-kernel; +Cc: Martin J. Bligh

[-- Attachment #1: Type: text/plain, Size: 1848 bytes --]

On Thu, 24 Apr 2003 00:30:16 +0200, Martin J. Bligh wrote:
>> Yes, but that's a user space problem too. Nothing prevents your
>> distribution to crank up the volume to 100% also on a first-time
>> installation.
> 
> 100% would be stupid too. If the distro can pick a reasonable value, the
> kernel can too. Thus the argument "push the problem into userspace"
> doesn't do anything for me.

100% isn't good. F.ex. emu10k1 cards would lead to more bugreports since
you get clipping with that volume.

>> 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.

Which is stupid, since you need it zero before it can get to userspace.
(see the examples) And i know windows users who hates windows
soundcontrol since it plays a lame sound at boot up and you can't lower
the volume there (yes, easy workaround, but the same thing).

But, imho:
	PCM should not be 0, Setting main volume to 0 is good, but 	seeing the
common user getting there might be a problem.

Imagine:
Joe User installs Joe-Distro and starts xmms, now, with the default
config you change the 'master' volume but pcm is still 0. This is
something that will/could/might/etc cause reports like that.

Problem is, emu10k1 is good somewhere on the lines of 90% when it comes
to pcm... I dunno if other cards has simular issues.

Change PCM (and simular) if anything, changing master will only cause
problems, as seen.

CC, since I'm not on this ml.

-- 
Ian Kumlien <pomac@vapor.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 59+ messages in thread

end of thread, other threads:[~2003-04-26  0:17 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).