[alsa-devel] HCTL element callback
Jaroslav Kysela
perex at perex.cz
Fri Sep 3 08:35:45 CEST 2010
On Thu, 2 Sep 2010, Camilo Polymeris wrote:
> Hello.
> I am writing this mixer app:
> http://emutrix.googlecode.com
>
> I have trouble with callbacks. So far I have implemented callbacks for
> the master volume fader and clock rate selection (integer and enum,
> resp.)
> But "pad" callbacks (boolean) won't work. In fact, I have noticed that
> alsamixer 1.0.22 also doesn't react to pad changes from the application.
> But the driver reacts to both as expected, so we're dealing with the
> same element.
It seems like a bug in the emu driver. The elem put callbacks does not
check for changes (they should return 1).
Does this patch help?
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c
index 05afe06..7bd1c1a 100644
--- a/sound/pci/emu10k1/emumixer.c
+++ b/sound/pci/emu10k1/emumixer.c
@@ -622,6 +622,7 @@ static int snd_emu1010_adc_pads_put(struct snd_kcontrol *kcontrol, struct snd_ct
if (cache != emu->emu1010.adc_pads) {
snd_emu1010_fpga_write(emu, EMU_HANA_ADC_PADS, cache );
emu->emu1010.adc_pads = cache;
+ return 1;
}
return 0;
@@ -670,6 +671,7 @@ static int snd_emu1010_dac_pads_put(struct snd_kcontrol *kcontrol, struct snd_ct
if (cache != emu->emu1010.dac_pads) {
snd_emu1010_fpga_write(emu, EMU_HANA_DAC_PADS, cache );
emu->emu1010.dac_pads = cache;
+ return 1;
}
return 0;
Jaroslav
-----
Jaroslav Kysela <perex at perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
More information about the Alsa-devel
mailing list