Been so long since I studied envy24 stuff that I was in danger of
messing up facts and wishing for something that might not be
possible. So I pulled my card out and looked at the ICs and their
datsheets, and looked at envy24control coding.
The ADC chip on my particular card is AK4524 from AKM.
Although the gain and attenuation stages are separate,
the control of them is not. Values from 0-127 control
the IATT stage, and values above 127 control the IPGA stage.
Looks like:
envy24control still has code to show both the IPGA and IATT controls.
I don't remember why they were separate in the first place.
Possibly some (AKM) chips allow *separate* control of gain and attenuation.
But it was ALSA where the two controls were combined into one ADC.
So I think envy24control just shows the one ADC control now.
This seems to open the door for other kinds of ADC chips, which
don't have separate gain and attenuation stages, and/or which
could have other value ranges. Say a range which doesn't go above 0dB.
So... I was going to say this means envy24control (or other mixer) has no
way of knowing what value corresponds to what dB, or where the 0dB point is.
But then I saw that amixer prints out the dB values.
Can't remember where amixer gets that from... Was it trickery or true values?
And do we have access to these values?
I think this was the difficulty I was remembering last post.
One moment... Checking...
Here we go! snd_mixer_selem_get_playback_dB( )
Problem solved? Accurate or not?
Cheers. Tim.
On July 16, 2010 03:13:17 am you wrote:
On Tue, Jul 13, 2010 at 3:46 PM, Tim E. Real
<termtech(a)rogers.com> wrote:
But nothing was ever done about the slider
markings.
Having them go from 0 to 164 is not really helpful.
It's not clear where the 0dB mark is.
At the very least a 0dB mark should be added.
Uh, do you feel like taking a stab at this?
IIRC it would be a bit tricky because you have to look up
the corresponding values in the IC data sheets, I think.
This makes sense... I was thinking of a simple ruler with a 0dB label
at 127 and a + dB label above and a - dB label below.
Some thoughts on further usability improvements to envy24control:
(1) In "alsamixer" the snd-ice1712-card's input levels are
represented by (versus envy24control's value):
100% (163) -> ADC [dB gain: 18.00]
78% (127) -> ADC [dB gain: 0.00]
1% (001) -> ADC [dB gain: -63.00]
0% (000) -> ADC [dB gain: mute]
Mixers like envy24control, kmix, alsamixergui, gst-mixer, etc, are a
lot less useful than they could be because they just present sliders.
At least envy24control gives numeric values, -- which is essential if
you want to know stereo channels are balenced, or what unity-gain
levels are for inputs.
In "alsamixer", the snd-ice1712-card's output levels are represented
by (versus envy24control value):
100% (127) -> DAC [dB gain: 0.00]
1% (001) -> DAC [dB gain: -63.00]
0% (000) -> DAC [dB gain: mute]
As this is a separate issue from the meters, it makes sense to do the
changes to the "Analog Volume" panel of envy24control as a separate
patch.
(2) The "0-96" sliders, feeding the digital mixer, need better
labeling and mappings too: The "96" actually being "-96dB" and only
valid for 16 bit depths. On the other hand, alsamixer is showing the
24 bit dB values, even when 16 bits are being used:
100% (0) -> H/W Multi [dB gain: 0.00, ...]
1% (95) -> H/W Multi [dB gain: -142.50,...]
0% (96) -> H/W Multi [dB gain: -144.00,...]
Worse than the labelling, but associated -- the scaling: Right now the
digital mixer's input sliders all have linear response -- which wastes
the lower half of the slider and makes setting levels difficult
because all the "action" is near the top. If you use an external MIDI
controller for the mixer, you can use this existing option:
-M, --midienhanced Use an enhanced mapping from midi controller to db
slider However this does not apply to the GUI controller, which stays
linear.
Clearly the GUIs digital mixer controls also need a logarithmic scale
(perhaps as default settings); matching that, each mixer input's
meters also need to have their scale expressed "logarithmically" so as
to provide, for example 50% of the display resolution for 0 to -20dB,
and remaining 50% for -20dB to -96dB/-144dB.
Alongside the numbers indicating the 0 to -96db L or R gain on each
mixer input channel, I would also add the current peak value held in
the meters in dB, which would be based on hardware metering level
"0xFF" representing 0db, and hardware meter level "0x01"
representing
all but the last of the 9 MSB's being 0 (per
http://alsa.cybermirror.org/manuals/icensemble/envy24.pdf: "Peak data
derived from the absolute value of 9 msb. 00h * min - FFh max volume.
Reading the register resets the meter to 00h."
Other missing features:
(3) Due to the hardware metering employed by envy24control, the peak
meters don't actually detect "clipping" ; rather, they just detect
"full scale" as 255. Is there a hardware clipped indicator on the
ice1712? It doesn't make sense to turn on a big red "clipped" light
for 0dB output, so the current peak-meters are "subtle," and just
indicate that a peak occurred at the given level... And color-code the
peak towards red as it reaches 255.
(4) The "IEC958 Input Status" isn't presented, even though it's
available and working, e.g from the command-line,. with SPDIF input
going to the Delta66 soundcard:
.....
gnulem-176-~> amixer -c M66 cget numid=50,iface=MIXER,name='Delta
IEC958 Input Status'
numid=50,iface=MIXER,name='Delta IEC958 Input Status'
; type=BOOLEAN,access=r-------,values=1
: values=on
.....
And without any SPDIF input:
.....
gnulem-177-~> amixer -c M66 cget numid=50,iface=MIXER,name='Delta
IEC958 Input Status'
numid=50,iface=MIXER,name='Delta IEC958 Input Status'
; type=BOOLEAN,access=r-------,values=1
: values=off
Perhaps this isn't available in envy24control because it has differing
levels of support across envy24-based cards? I only have a Delta66's
and a Terratec Dmx6Fire 24/96 for testing, and both support the SPDIF
input status.
-- Niels
http://nielsmayer.com
PS: ALSA tip of the day. To read ice1712's hardware level-meter values
from the command line:
"amixer -c M66 cget iface=PCM,name='Multi Track Peak',numid=45"
type=INTEGER,access=r-------,values=22,min=0,max=255,step=0
: values=0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,198,255,198