[alsa-devel] HCTL element callback
Camilo Polymeris
cpolymeris at gmail.com
Fri Sep 3 09:15:18 CEST 2010
On Fri, 2010-09-03 at 08:35 +0200, Jaroslav Kysela wrote:
> 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.
>
Hello.
I think it doesn't help. I applied the patch, built the sources,
installed them (with 'make install') and reloaded alsa (with 'alsa
reload'). That should have installed the new module, right?
If so, the patch didn't help. I am not very experienced with kernel
stuff, so if I did something wrong, please tell me and I'll try again.
Camilo
More information about the Alsa-devel
mailing list