Re: [LAD] FIxed alsa-tools' envy24control missing peak level meters and "Reset Peaks"

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tim E. Real <termtech@...>
Cc: <linux-audio-dev@...>
Date: Tuesday, July 27, 2010 - 5:00 am

On Mon, Jul 26, 2010 at 5:15 PM, Tim E. Real wrote:

[...]

So does this mean 'alsamixer' has a bug for those card models with
combined IPGA? Which would that be?

Note the code in 'alsamixer' which prints out dB-values -- is this
correct or not?

alsa-utils-1.0.23/alsamixer/mixer_display.c :
... if (control->flags & (TYPE_PVOLUME | TYPE_CVOLUME)) {
int (*get_vol_func)(snd_mixer_elem_t *, snd_mixer_selem_channel_id_t, long *);

if (control->flags & TYPE_PVOLUME)
get_vol_func = snd_mixer_selem_get_playback_dB;
else
get_vol_func = snd_mixer_selem_get_capture_dB;
if (!(control->flags & HAS_VOLUME_1)) {
err = get_vol_func(control->elem, control->volume_channels[0], &db);
if (err >= 0) {
dbs = format_gain(db);
value_info = casprintf(" [%s %s]", _("dB gain:"), dbs);
free(dbs);
}
} else {
err = get_vol_func(control->elem, control->volume_channels[0], &db);
if (err >= 0)
err = get_vol_func(control->elem, control->volume_channels[1], &db2);
if (err >= 0) {
dbs = format_gain(db);
dbs2 = format_gain(db2);
value_info = casprintf(_(" [%s %s, %s]"), _("dB gain:"), dbs, dbs2);
free(dbs);
free(dbs2);
}
}
}

> ----------------

Either that or make the scales optional and document them as being
potentially inaccurate in the manual page :-). Or just get rid of them
as more trouble than they're worth -- which might be the reason it
didn't have scales prior to my modification :-).

The fundamental "scale" that we most need to be concerned about is
"127" representing unity gain on the ADC. Is that at least constant
across devices in the ice1712 family? I initially thought I'd do that,
but then got carried away once I realized how much space it was
wasting just to mark 0dB and (off).

Any examples of this inaccuracy in action? As in the new 'envycontrol'
returned value, versus 'alsamixer', versus what it is supposed to be?
I thought that we could at least identify any that might be wildly out
of range by comparing against 'alsamixer' or 'amixer' values. But now
I'm wondering if those
are reliable given what you mentioned.

Given the fininte # of ADC/DACs and finite# of device models affected
by this, one could also decide to not get overly theoretical about
this and code-in any special values for specific card models that
aren't behaving properly. I'll look into your ALSA API findings as
well.

Comments?

-- Niels
http://nielsmayer.com
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [LAD] FIxed alsa-tools' envy24control missing peak level..., Niels Mayer, (Tue Jul 27, 5:00 am)