All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Re: [Alsa-user] Audigy multichannel and line-in did not work in Linux 2.6.7
@ 2004-09-16  8:08 Peter Zubaj
  2004-09-16 10:37 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zubaj @ 2004-09-16  8:08 UTC (permalink / raw)
  To: alsa-devel; +Cc: rlrevell, tiwai

[-- Attachment #1: Type: TEXT/plain, Size: 580 bytes --]

Is this what you wanted ???

Summary: Support for capture of 16,32,64 channels on emu10k1 device 2

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: Peter Zubaj <pzad@pobox.sk>

====================== REKLAMA ========================
Spolocnost SUN Microsystems uviedla na trh novy server Sun Fire V20z
zalozeny procesoroch AMD Opteron.
Viac informacii najdete na : http://www.somi.sk/sun/v20z.php
=======================================================

[-- Attachment #2: efx_channels.diff --]
[-- Type: APPLICATION/octet-stream, Size: 905 bytes --]

diff -u -r alsa-driver-1.0.6a-old/alsa-kernel/pci/emu10k1/emupcm.c alsa-driver-1.0.6a/alsa-kernel/pci/emu10k1/emupcm.c
--- alsa-driver-1.0.6a-old/alsa-kernel/pci/emu10k1/emupcm.c	2004-07-14 16:14:54.000000000 +0000
+++ alsa-driver-1.0.6a/alsa-kernel/pci/emu10k1/emupcm.c	2004-09-06 19:55:19.000000000 +0000
@@ -1092,6 +1092,7 @@
 	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 @@
 			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]);

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Re: [Alsa-user] Audigy multichannel and line-in did not work in Linux 2.6.7
@ 2004-09-07  7:18 Peter Zubaj
  2004-09-15  3:13 ` Lee Revell
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Zubaj @ 2004-09-07  7:18 UTC (permalink / raw)
  To: rlrevell; +Cc: alsa-devel

[-- Attachment #1: Type: TEXT/plain, Size: 450 bytes --]

Hi,

There is check for channel count (1,2,4,8).
Attached patch will add suppor for 16,32,64.

Could you test this ??? I tryed 32 and 64 channels an looks like it
works. I can not test (no time to do this) if recorded data are good.
Maybe if you remove this check completly hardware will work with 10
channels too, who know.

Peter Zubaj

____________________________________
http://www.logofun.pobox.sk - urobte radost svojmu telefonu

[-- Attachment #2: efx_channels.diff --]
[-- Type: APPLICATION/octet-stream, Size: 905 bytes --]

diff -u -r alsa-driver-1.0.6a-old/alsa-kernel/pci/emu10k1/emupcm.c alsa-driver-1.0.6a/alsa-kernel/pci/emu10k1/emupcm.c
--- alsa-driver-1.0.6a-old/alsa-kernel/pci/emu10k1/emupcm.c	2004-07-14 16:14:54.000000000 +0000
+++ alsa-driver-1.0.6a/alsa-kernel/pci/emu10k1/emupcm.c	2004-09-06 19:55:19.000000000 +0000
@@ -1092,6 +1092,7 @@
 	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 @@
 			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]);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-16 10:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-16  8:08 Re: [Alsa-user] Audigy multichannel and line-in did not work in Linux 2.6.7 Peter Zubaj
2004-09-16 10:37 ` Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2004-09-07  7:18 Peter Zubaj
2004-09-15  3:13 ` Lee Revell
2004-09-15  9:42   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.