Dirk Kalis <dirk.kalis@rs2.de>

In the patch is the adc volume rate only set to max if ipga volume is set.
This commit is contained in:
Jaroslav Kysela 2002-12-07 09:44:27 +00:00
parent 7882d219a2
commit 3343a6b188

View file

@ -144,7 +144,7 @@ void adc_volume_update(int idx)
void ipga_volume_update(int idx) void ipga_volume_update(int idx)
{ {
snd_ctl_elem_value_t *val; snd_ctl_elem_value_t *val;
int err; int err, ipga_vol;
snd_ctl_elem_value_alloca(&val); snd_ctl_elem_value_alloca(&val);
snd_ctl_elem_value_set_interface(val, SND_CTL_ELEM_IFACE_MIXER); snd_ctl_elem_value_set_interface(val, SND_CTL_ELEM_IFACE_MIXER);
snd_ctl_elem_value_set_name(val, IPGA_VOLUME_NAME); snd_ctl_elem_value_set_name(val, IPGA_VOLUME_NAME);
@ -154,15 +154,17 @@ void ipga_volume_update(int idx)
return; return;
} }
gtk_adjustment_set_value(GTK_ADJUSTMENT(av_ipga_volume_adj[idx]), gtk_adjustment_set_value(GTK_ADJUSTMENT(av_ipga_volume_adj[idx]),
-snd_ctl_elem_value_get_integer(val, 0)); -(ipga_vol = snd_ctl_elem_value_get_integer(val, 0)));
snd_ctl_elem_value_set_name(val, ADC_VOLUME_NAME); snd_ctl_elem_value_set_name(val, ADC_VOLUME_NAME);
snd_ctl_elem_value_set_index(val, idx); snd_ctl_elem_value_set_index(val, idx);
if ((err = snd_ctl_elem_read(ctl, val)) < 0) { if ((err = snd_ctl_elem_read(ctl, val)) < 0) {
g_print("Unable to read adc volume: %s\n", snd_strerror(err)); g_print("Unable to read adc volume: %s\n", snd_strerror(err));
return; return;
} }
gtk_adjustment_set_value(GTK_ADJUSTMENT(av_adc_volume_adj[idx]), // set ADC volume to max if IPGA volume greater 0
-127); if (ipga_vol)
gtk_adjustment_set_value(GTK_ADJUSTMENT(av_adc_volume_adj[idx]),
-127);
} }
void dac_sense_update(int idx) void dac_sense_update(int idx)