On Mon, Apr 14, 2008 at 5:07 PM, James Courtier-Dutton James@superbug.co.uk wrote:
Lennart Poettering wrote:
Yes, but what I am asking for is to define the dB values of the master control relative to the some ref level on this line-out. What happens after the line-out doesn't matter at all.
Lennart: while I definitely agree on what you try to achieve, I strongly disagree the way it's being solved.
Initial volume setup is an *installation* issue, not a *boot or daemon startup* issue. When you buy a notebook with linux pre-installed, it's the manufacturer who must make sure the notebook has the appropiate volume levels, factory default. When you install Fedora, it's the fedora install program who must make sure the appropiate volume levels. Both ways, when the user starts its new shiny linux, it just works.
Once the system is installed it has to remember its previous settings, which I think has been done on most distros (mine in /etc/init.d/alsa-utils).
That's all, end of story! If you put code that tries to guess what the appropiate volume should be for any case, it will become an infinite problem of what is right and what is wrong, not counting the annoying user experience this will bring. You can't guess what is right for every people, so a sane mute (in case of no other source of information) is clearly the only good choice.
So please, please: don't try to guess this in your daemon, it will make more harm than actually helping users. The manufacturer or installer *are the right places* to solve the issue. They both know the hardware or can ask the user to check if it's right for them.
Now, we have tried to get this right by looking at datasheets of sound cards, but it might not be right for all sound cards yet. It is at least a task we may be able to actually achieve. When the datasheets are wrong, the only available method to get it right is actually to measure the analog signals. Can anyone provide a simple reliable test for this? E.g. Using this sample .wav file and a cheapo digital volt meter, this is the output you should get. I am not even sure that a simple digital volt meter can do the task as a volt meter is only expecting 50-60Hz, and not all sound cards work at all well at that frequency.
Well, this kind of problem must be solved too. I think contacting the hardware manufacturers or asking users. But NOT guessing...