* Audigy DSP questions.
@ 2005-09-18 15:41 James Courtier-Dutton
2005-09-18 17:28 ` James Courtier-Dutton
0 siblings, 1 reply; 5+ messages in thread
From: James Courtier-Dutton @ 2005-09-18 15:41 UTC (permalink / raw)
To: alsa-devel
In emufx.c there is the following table. Can anyone tell me how to
convert these values to floating point db gain values?
I need to know how to convert values in the DSP to values in the range
+2.0 to -2.0
static const u32 db_table[101] = {
0x00000000, 0x01571f82, 0x01674b41, 0x01783a1b, 0x0189f540,
0x019c8651, 0x01aff763, 0x01c45306, 0x01d9a446, 0x01eff6b8,
0x0207567a, 0x021fd03d, 0x0239714c, 0x02544792, 0x027061a1,
0x028dcebb, 0x02ac9edc, 0x02cce2bf, 0x02eeabe8, 0x03120cb0,
0x0337184e, 0x035de2df, 0x03868173, 0x03b10a18, 0x03dd93e9,
0x040c3713, 0x043d0cea, 0x04702ff3, 0x04a5bbf2, 0x04ddcdfb,
0x0518847f, 0x0555ff62, 0x05966005, 0x05d9c95d, 0x06206005,
0x066a4a52, 0x06b7b067, 0x0708bc4c, 0x075d9a01, 0x07b6779d,
0x08138561, 0x0874f5d5, 0x08dafde1, 0x0945d4ed, 0x09b5b4fd,
0x0a2adad1, 0x0aa58605, 0x0b25f936, 0x0bac7a24, 0x0c3951d8,
0x0ccccccc, 0x0d673b17, 0x0e08f093, 0x0eb24510, 0x0f639481,
0x101d3f2d, 0x10dfa9e6, 0x11ab3e3f, 0x12806ac3, 0x135fa333,
0x144960c5, 0x153e2266, 0x163e6cfe, 0x174acbb7, 0x1863d04d,
0x198a1357, 0x1abe349f, 0x1c00db77, 0x1d52b712, 0x1eb47ee6,
0x2026f30f, 0x21aadcb6, 0x23410e7e, 0x24ea64f9, 0x26a7c71d,
0x287a26c4, 0x2a62812c, 0x2c61df84, 0x2e795779, 0x30aa0bcf,
0x32f52cfe, 0x355bf9d8, 0x37dfc033, 0x3a81dda4, 0x3d43c038,
0x4026e73c, 0x432ce40f, 0x46575af8, 0x49a8040f, 0x4d20ac2a,
0x50c335d3, 0x54919a57, 0x588dead1, 0x5cba514a, 0x611911ea,
0x65ac8c2f, 0x6a773c39, 0x6f7bbc23, 0x74bcc56c, 0x7a3d3272,
0x7fffffff,
};
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Audigy DSP questions.
2005-09-18 15:41 Audigy DSP questions James Courtier-Dutton
@ 2005-09-18 17:28 ` James Courtier-Dutton
2005-09-18 18:00 ` James Courtier-Dutton
0 siblings, 1 reply; 5+ messages in thread
From: James Courtier-Dutton @ 2005-09-18 17:28 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
James Courtier-Dutton wrote:
> In emufx.c there is the following table. Can anyone tell me how to
> convert these values to floating point db gain values?
> I need to know how to convert values in the DSP to values in the range
> +2.0 to -2.0
>
> static const u32 db_table[101] = {
> 0x00000000, 0x01571f82, 0x01674b41, 0x01783a1b, 0x0189f540,
> 0x019c8651, 0x01aff763, 0x01c45306, 0x01d9a446, 0x01eff6b8,
> 0x0207567a, 0x021fd03d, 0x0239714c, 0x02544792, 0x027061a1,
> 0x028dcebb, 0x02ac9edc, 0x02cce2bf, 0x02eeabe8, 0x03120cb0,
> 0x0337184e, 0x035de2df, 0x03868173, 0x03b10a18, 0x03dd93e9,
> 0x040c3713, 0x043d0cea, 0x04702ff3, 0x04a5bbf2, 0x04ddcdfb,
> 0x0518847f, 0x0555ff62, 0x05966005, 0x05d9c95d, 0x06206005,
> 0x066a4a52, 0x06b7b067, 0x0708bc4c, 0x075d9a01, 0x07b6779d,
> 0x08138561, 0x0874f5d5, 0x08dafde1, 0x0945d4ed, 0x09b5b4fd,
> 0x0a2adad1, 0x0aa58605, 0x0b25f936, 0x0bac7a24, 0x0c3951d8,
> 0x0ccccccc, 0x0d673b17, 0x0e08f093, 0x0eb24510, 0x0f639481,
> 0x101d3f2d, 0x10dfa9e6, 0x11ab3e3f, 0x12806ac3, 0x135fa333,
> 0x144960c5, 0x153e2266, 0x163e6cfe, 0x174acbb7, 0x1863d04d,
> 0x198a1357, 0x1abe349f, 0x1c00db77, 0x1d52b712, 0x1eb47ee6,
> 0x2026f30f, 0x21aadcb6, 0x23410e7e, 0x24ea64f9, 0x26a7c71d,
> 0x287a26c4, 0x2a62812c, 0x2c61df84, 0x2e795779, 0x30aa0bcf,
> 0x32f52cfe, 0x355bf9d8, 0x37dfc033, 0x3a81dda4, 0x3d43c038,
> 0x4026e73c, 0x432ce40f, 0x46575af8, 0x49a8040f, 0x4d20ac2a,
> 0x50c335d3, 0x54919a57, 0x588dead1, 0x5cba514a, 0x611911ea,
> 0x65ac8c2f, 0x6a773c39, 0x6f7bbc23, 0x74bcc56c, 0x7a3d3272,
> 0x7fffffff,
> };
>
>
I think I have worked it out.
Take each value and divide by 0x80000000 to get a value between 0 and 1.
This is then converted into dB with
0 == Mute
0x01571f82 == -19.8 dB
0x7fffffff == 0 dB
With each value being a constant step of 0.2 dB.
James
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Audigy DSP questions.
2005-09-18 17:28 ` James Courtier-Dutton
@ 2005-09-18 18:00 ` James Courtier-Dutton
2005-09-19 21:05 ` Lee Revell
0 siblings, 1 reply; 5+ messages in thread
From: James Courtier-Dutton @ 2005-09-18 18:00 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
James Courtier-Dutton wrote:
> James Courtier-Dutton wrote:
>
>> In emufx.c there is the following table. Can anyone tell me how to
>> convert these values to floating point db gain values?
>> I need to know how to convert values in the DSP to values in the range
>> +2.0 to -2.0
>>
>> static const u32 db_table[101] = {
>> 0x00000000, 0x01571f82, 0x01674b41, 0x01783a1b, 0x0189f540,
>> 0x019c8651, 0x01aff763, 0x01c45306, 0x01d9a446, 0x01eff6b8,
>> 0x0207567a, 0x021fd03d, 0x0239714c, 0x02544792, 0x027061a1,
>> 0x028dcebb, 0x02ac9edc, 0x02cce2bf, 0x02eeabe8, 0x03120cb0,
>> 0x0337184e, 0x035de2df, 0x03868173, 0x03b10a18, 0x03dd93e9,
>> 0x040c3713, 0x043d0cea, 0x04702ff3, 0x04a5bbf2, 0x04ddcdfb,
>> 0x0518847f, 0x0555ff62, 0x05966005, 0x05d9c95d, 0x06206005,
>> 0x066a4a52, 0x06b7b067, 0x0708bc4c, 0x075d9a01, 0x07b6779d,
>> 0x08138561, 0x0874f5d5, 0x08dafde1, 0x0945d4ed, 0x09b5b4fd,
>> 0x0a2adad1, 0x0aa58605, 0x0b25f936, 0x0bac7a24, 0x0c3951d8,
>> 0x0ccccccc, 0x0d673b17, 0x0e08f093, 0x0eb24510, 0x0f639481,
>> 0x101d3f2d, 0x10dfa9e6, 0x11ab3e3f, 0x12806ac3, 0x135fa333,
>> 0x144960c5, 0x153e2266, 0x163e6cfe, 0x174acbb7, 0x1863d04d,
>> 0x198a1357, 0x1abe349f, 0x1c00db77, 0x1d52b712, 0x1eb47ee6,
>> 0x2026f30f, 0x21aadcb6, 0x23410e7e, 0x24ea64f9, 0x26a7c71d,
>> 0x287a26c4, 0x2a62812c, 0x2c61df84, 0x2e795779, 0x30aa0bcf,
>> 0x32f52cfe, 0x355bf9d8, 0x37dfc033, 0x3a81dda4, 0x3d43c038,
>> 0x4026e73c, 0x432ce40f, 0x46575af8, 0x49a8040f, 0x4d20ac2a,
>> 0x50c335d3, 0x54919a57, 0x588dead1, 0x5cba514a, 0x611911ea,
>> 0x65ac8c2f, 0x6a773c39, 0x6f7bbc23, 0x74bcc56c, 0x7a3d3272,
>> 0x7fffffff,
>> };
>>
>>
>
> I think I have worked it out.
> Take each value and divide by 0x80000000 to get a value between 0 and 1.
> This is then converted into dB with
> 0 == Mute
> 0x01571f82 == -19.8 dB
> 0x7fffffff == 0 dB
> With each value being a constant step of 0.2 dB.
>
> James
>
>
Did anyone spot the deliberate mistake?
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Audigy DSP questions.
2005-09-18 18:00 ` James Courtier-Dutton
@ 2005-09-19 21:05 ` Lee Revell
2005-09-20 7:53 ` James Courtier-Dutton
0 siblings, 1 reply; 5+ messages in thread
From: Lee Revell @ 2005-09-19 21:05 UTC (permalink / raw)
To: James Courtier-Dutton; +Cc: alsa-devel
On Sun, 2005-09-18 at 19:00 +0100, James Courtier-Dutton wrote:
> James Courtier-Dutton wrote:
> > I think I have worked it out.
> > Take each value and divide by 0x80000000 to get a value between 0 and 1.
> > This is then converted into dB with
> > 0 == Mute
> > 0x01571f82 == -19.8 dB
> > 0x7fffffff == 0 dB
> > With each value being a constant step of 0.2 dB.
> >
> > James
> >
> >
> Did anyone spot the deliberate mistake?
>
I give up, what is it and why do you think it's deliberate?
Lee
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Audigy DSP questions.
2005-09-19 21:05 ` Lee Revell
@ 2005-09-20 7:53 ` James Courtier-Dutton
0 siblings, 0 replies; 5+ messages in thread
From: James Courtier-Dutton @ 2005-09-20 7:53 UTC (permalink / raw)
To: Lee Revell; +Cc: alsa-devel
Lee Revell wrote:
> On Sun, 2005-09-18 at 19:00 +0100, James Courtier-Dutton wrote:
>
>>James Courtier-Dutton wrote:
>>
>>>I think I have worked it out.
>>>Take each value and divide by 0x80000000 to get a value between 0 and 1.
>>>This is then converted into dB with
>>>0 == Mute
>>>0x01571f82 == -19.8 dB
>>>0x7fffffff == 0 dB
>>>With each value being a constant step of 0.2 dB.
>>>
>>>James
>>>
>>>
>>
>>Did anyone spot the deliberate mistake?
>>
>
>
> I give up, what is it and why do you think it's deliberate?
>
> Lee
>
The dB values are all half what they should be. Mixed up power and volts.
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-09-20 7:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-18 15:41 Audigy DSP questions James Courtier-Dutton
2005-09-18 17:28 ` James Courtier-Dutton
2005-09-18 18:00 ` James Courtier-Dutton
2005-09-19 21:05 ` Lee Revell
2005-09-20 7:53 ` 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.