Commit 11153b7f authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Support for capture of 16,32,64 channels on emu10k1 device 2

EMU10K1/EMU10K2 driver
This patch changes default constraint on 'EFX voices mask' control and
allow capture of 1, 2, 4, 8, 16, 32, 64 channels instead of 1, 2, 4, 8.
Signed-off-by: default avatarPeter Zubaj <pzad@pobox.sk>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 8b9e36ee
......@@ -1092,6 +1092,7 @@ static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ct
emu10k1_t *emu = snd_kcontrol_chip(kcontrol);
unsigned int nval[2], bits;
int nefx = emu->audigy ? 64 : 32;
int nefxb = emu->audigy ? 7 : 6;
int change, idx;
nval[0] = nval[1] = 0;
......@@ -1100,8 +1101,14 @@ static int snd_emu10k1_pcm_efx_voices_mask_put(snd_kcontrol_t * kcontrol, snd_ct
nval[idx / 32] |= 1 << (idx % 32);
bits++;
}
if (bits != 1 && bits != 2 && bits != 4 && bits != 8)
for (idx = 0; idx < nefxb; idx++)
if (1 << idx == bits)
break;
if (idx >= nefxb)
return -EINVAL;
spin_lock_irq(&emu->reg_lock);
change = (nval[0] != emu->efx_voices_mask[0]) ||
(nval[1] != emu->efx_voices_mask[1]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment