* Mixer volume dB settings.
@ 2005-07-31 12:13 James Courtier-Dutton
2005-07-31 14:44 ` Jaroslav Kysela
0 siblings, 1 reply; 4+ messages in thread
From: James Courtier-Dutton @ 2005-07-31 12:13 UTC (permalink / raw)
To: alsa-devel
Hi,
I am thinking of a method to provide dB volume setting with alsamixer.
My suggestion is to add another variable to the mixer control structure.
This variable will be an integer identifying the conversion function.
If set to 0, no conversion function has been defined. If set to 1 or
above, use a lookup table in alsa-lib to select the conversion function.
The user land api would then be:
snd_mixer_convert_hardware_to_db( hardware_value, conversion_function,
&db_value);
snd_mixer_convert_db_to_hardware( db_value, conversion_function,
hardware_value )
The reason for this, is that it seems to me that only the hardware
driver will have full knowledge of what the conversion function should
be, and setting a simple integer for conversion_function_type would seem
the simplest solution.
The global conversion functions could then be defined in an alsa-lib
config file.
This would also allow the application to increase/decrease the hardware
value, but display to the user the dB value.
Any comments?
If this seems ok, I will start implementing it.
James
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mixer volume dB settings.
2005-07-31 12:13 Mixer volume dB settings James Courtier-Dutton
@ 2005-07-31 14:44 ` Jaroslav Kysela
2005-07-31 15:07 ` James Courtier-Dutton
2005-09-10 17:33 ` James Courtier-Dutton
0 siblings, 2 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2005-07-31 14:44 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
On Sun, 31 Jul 2005, James Courtier-Dutton wrote:
> Hi,
>
> I am thinking of a method to provide dB volume setting with alsamixer.
> My suggestion is to add another variable to the mixer control structure.
> This variable will be an integer identifying the conversion function. If
> set to 0, no conversion function has been defined. If set to 1 or above,
> use a lookup table in alsa-lib to select the conversion function. The
> user land api would then be: snd_mixer_convert_hardware_to_db(
> hardware_value, conversion_function, &db_value);
> snd_mixer_convert_db_to_hardware( db_value, conversion_function,
> hardware_value )
>
> The reason for this, is that it seems to me that only the hardware
> driver will have full knowledge of what the conversion function should
> be, and setting a simple integer for conversion_function_type would seem
> the simplest solution.
>
> The global conversion functions could then be defined in an alsa-lib
> config file.
>
> This would also allow the application to increase/decrease the hardware
> value, but display to the user the dB value.
>
> Any comments?
I already defined the interface in alsa-lib/include/mixer.h. Look for dB
functions there.
Also, the skeleton of the new mixer with abstraction layer is quite
finished. I need only implement a first real code for one driver as
example and we can start adding the abstraction code for all cards.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mixer volume dB settings.
2005-07-31 14:44 ` Jaroslav Kysela
@ 2005-07-31 15:07 ` James Courtier-Dutton
2005-09-10 17:33 ` James Courtier-Dutton
1 sibling, 0 replies; 4+ messages in thread
From: James Courtier-Dutton @ 2005-07-31 15:07 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
Jaroslav Kysela wrote:
> On Sun, 31 Jul 2005, James Courtier-Dutton wrote:
>
>
>>Hi,
>>
>>I am thinking of a method to provide dB volume setting with alsamixer.
>>My suggestion is to add another variable to the mixer control structure.
>>This variable will be an integer identifying the conversion function. If
>>set to 0, no conversion function has been defined. If set to 1 or above,
>>use a lookup table in alsa-lib to select the conversion function. The
>>user land api would then be: snd_mixer_convert_hardware_to_db(
>>hardware_value, conversion_function, &db_value);
>>snd_mixer_convert_db_to_hardware( db_value, conversion_function,
>>hardware_value )
>>
>>The reason for this, is that it seems to me that only the hardware
>>driver will have full knowledge of what the conversion function should
>>be, and setting a simple integer for conversion_function_type would seem
>>the simplest solution.
>>
>>The global conversion functions could then be defined in an alsa-lib
>>config file.
>>
>>This would also allow the application to increase/decrease the hardware
>>value, but display to the user the dB value.
>>
>>Any comments?
>
>
> I already defined the interface in alsa-lib/include/mixer.h. Look for dB
> functions there.
>
> Also, the skeleton of the new mixer with abstraction layer is quite
> finished. I need only implement a first real code for one driver as
> example and we can start adding the abstraction code for all cards.
>
> Jaroslav
>
Shall we pick a card we both have. I have a intel8x0 motherboard, and
most creative cards. Do you have either of those?
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Mixer volume dB settings.
2005-07-31 14:44 ` Jaroslav Kysela
2005-07-31 15:07 ` James Courtier-Dutton
@ 2005-09-10 17:33 ` James Courtier-Dutton
1 sibling, 0 replies; 4+ messages in thread
From: James Courtier-Dutton @ 2005-09-10 17:33 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
Jaroslav Kysela wrote:
> On Sun, 31 Jul 2005, James Courtier-Dutton wrote:
>
>
>>Hi,
>>
>>I am thinking of a method to provide dB volume setting with alsamixer.
>>My suggestion is to add another variable to the mixer control structure.
>>This variable will be an integer identifying the conversion function. If
>>set to 0, no conversion function has been defined. If set to 1 or above,
>>use a lookup table in alsa-lib to select the conversion function. The
>>user land api would then be: snd_mixer_convert_hardware_to_db(
>>hardware_value, conversion_function, &db_value);
>>snd_mixer_convert_db_to_hardware( db_value, conversion_function,
>>hardware_value )
>>
>>The reason for this, is that it seems to me that only the hardware
>>driver will have full knowledge of what the conversion function should
>>be, and setting a simple integer for conversion_function_type would seem
>>the simplest solution.
>>
>>The global conversion functions could then be defined in an alsa-lib
>>config file.
>>
>>This would also allow the application to increase/decrease the hardware
>>value, but display to the user the dB value.
>>
>>Any comments?
>
>
> I already defined the interface in alsa-lib/include/mixer.h. Look for dB
> functions there.
>
> Also, the skeleton of the new mixer with abstraction layer is quite
> finished. I need only implement a first real code for one driver as
> example and we can start adding the abstraction code for all cards.
>
> Jaroslav
>
Can you point me in the direction of the new mixer abstraction layer.
It is unclear to me which alsa-lib files are associated with the
abstraction layer.
I am thinking that the alsa-driver module for the sound card will have
to attach an index value identifying the vol % -> dB conversion routine
to use with the mixer element. Then alsa-lib could then simply do a
lookup for the index and then process the associated conversion routine.
The reason for this is that I think that the same sound card controller
chip might have different other sound chips associated with it, but the
mixer elem name might be the same for both. I suppose we could then give
a different name in the driver, and then rename it at the abstraction layer.
Any pointers you can give would be helpful.
James
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-09-10 17:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-31 12:13 Mixer volume dB settings James Courtier-Dutton
2005-07-31 14:44 ` Jaroslav Kysela
2005-07-31 15:07 ` James Courtier-Dutton
2005-09-10 17:33 ` James Courtier-Dutton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.