* Re: Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
[not found] <200210110751.g9B7pcKa017014@mailgate2.uni-kl.de>
@ 2002-10-11 8:34 ` Martin Soto
2002-10-11 12:10 ` Jaroslav Kysela
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Martin Soto @ 2002-10-11 8:34 UTC (permalink / raw)
To: torben hohn; +Cc: alsa-dev
[-- Attachment #1: Type: text/plain, Size: 2680 bytes --]
Hi all:
On Fri, 2002-10-11 at 11:53, torben hohn wrote:
> >
> > > Does emu10k1 work at a user settable sample rate? 44100 Hz? 32000Hz?
I answer to the original poster first. The Emu10k1 is *locked* at a
48Khz rate. All sources and outputs will be converted to and from this
rate for processing. This was a very discussed and criticized design
decision, but the EMU/Creative people argue it makes thinks easier (and
certainly cheaper as well).
> > > MS Windows driver has a good sounding reverb. Could this reverb dsp
> > > code be extracted from the MS Windows driver and used "as is" in Alsa?
> >
> > It's not so easy and I'm sure that we'll violate some patent doing things
> > in this way.
A doubt it'd violate a patent, but it will violate the copyright of the
code, for sure.
> There is a reverb in the oss driver from http://opensource.creative.com
> it comes as source (i gues it is the same as the windows reverb)
It could be the same microcode. Is it GPL'd?
> so if we provide a method for the user to load patches into the dsp we
> are fine.
> i will query Martin Soto on his status.
Now, regarding my status: I have a little example C program, that
installs a new microcode (not really a patch but the whole microcode
program) to the card. It is not able to load standard patches, so you
have to put the microcode directly inside the program. I shamelessly
stole some of the macros in emufx.c to be able to do that, but it works
well ;-)
The program deletes all of the mixer controls associated to the standard
Alsa microcode, and puts in new controls if that's necessary.
It'd be really nice to have a decent interactive front end to this
feature, because it would allow to reconfigure the mixer to offer just
those controls that the user needs. That would make SBLive! cards much
more usable under Linux.
> (hi martin can you send me your patchloader code ?)
Unfortunately, I have the code at home, so I'll only be able to post to
the list today evening (GMT+2). I wanted to improve it a bit, but have
been really busy at work lately, and haven't found any time to do it.
I'll post what I already have, and keep working on it as time permits.
I'm however attaching a small patch to emufx.c that fixes a bug in the
implementation of the CODE_PEEK ioctl. It must be applied to alsa in
order for my userland program to work.
Cheers,
M. S.
-----------------------------------------------------------------
Martin Soto
AG Software Engineering
Universitaet Kaiserslautern Tel: +49 (631) 205-3449
Kaiserslautern, Germany E-mail: soto@informatik.uni-kl.de
-----------------------------------------------------------------
[-- Attachment #2: Type: text/plain, Size: 670 bytes --]
Index: emufx.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.20
diff -u -r1.20 emufx.c
--- emufx.c 17 Sep 2002 13:44:38 -0000 1.20
+++ emufx.c 17 Sep 2002 23:43:26 -0000
@@ -2174,6 +2174,10 @@
icode = (emu10k1_fx8010_code_t *)snd_kcalloc(sizeof(*icode), GFP_KERNEL);
if (icode == NULL)
return -ENOMEM;
+ if (copy_from_user(icode, (void *)arg, sizeof(*icode))) {
+ kfree(icode);
+ return -EFAULT;
+ }
res = snd_emu10k1_icode_peek(emu, icode);
if (res == 0 && copy_to_user((void *)arg, icode, sizeof(*icode))) {
kfree(icode);
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
2002-10-11 8:34 ` Re: [Alsa-user] Re: Broken emu10k/SB Live driver? Martin Soto
@ 2002-10-11 12:10 ` Jaroslav Kysela
2002-10-11 12:18 ` Takashi Iwai
2002-10-11 19:01 ` torben hohn
2 siblings, 0 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2002-10-11 12:10 UTC (permalink / raw)
To: Martin Soto; +Cc: torben hohn, alsa-dev
On 11 Oct 2002, Martin Soto wrote:
> I'm however attaching a small patch to emufx.c that fixes a bug in the
> implementation of the CODE_PEEK ioctl. It must be applied to alsa in
> order for my userland program to work.
It's already in CVS.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
2002-10-11 8:34 ` Re: [Alsa-user] Re: Broken emu10k/SB Live driver? Martin Soto
2002-10-11 12:10 ` Jaroslav Kysela
@ 2002-10-11 12:18 ` Takashi Iwai
2002-10-11 19:01 ` torben hohn
2 siblings, 0 replies; 5+ messages in thread
From: Takashi Iwai @ 2002-10-11 12:18 UTC (permalink / raw)
To: Martin Soto; +Cc: torben hohn, alsa-dev
At 11 Oct 2002 10:34:23 +0200,
Martin Soto wrote:
>
> I'm however attaching a small patch to emufx.c that fixes a bug in the
> implementation of the CODE_PEEK ioctl. It must be applied to alsa in
> order for my userland program to work.
thanks, now applied on cvs with some modification (missing zero-clear
and more strict page-fault checks).
ciao,
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
2002-10-11 8:34 ` Re: [Alsa-user] Re: Broken emu10k/SB Live driver? Martin Soto
2002-10-11 12:10 ` Jaroslav Kysela
2002-10-11 12:18 ` Takashi Iwai
@ 2002-10-11 19:01 ` torben hohn
2 siblings, 0 replies; 5+ messages in thread
From: torben hohn @ 2002-10-11 19:01 UTC (permalink / raw)
To: Martin Soto; +Cc: alsa-dev
On 11 Oct 2002 10:34:23 +0200, Martin Soto wrote:
> Hi all:
>
> On Fri, 2002-10-11 at 11:53, torben hohn wrote:
> > >
> > > > Does emu10k1 work at a user settable sample rate? 44100 Hz? 32000Hz?
>
> I answer to the original poster first. The Emu10k1 is *locked* at a
> 48Khz rate. All sources and outputs will be converted to and from this
> rate for processing. This was a very discussed and criticized design
> decision, but the EMU/Creative people argue it makes thinks easier (and
> certainly cheaper as well).
at least you dont have to deal with different samplerates (filter
coefficients)
when writing patches. 8-)
>
> > > > MS Windows driver has a good sounding reverb. Could this reverb dsp
> > > > code be extracted from the MS Windows driver and used "as is" in Alsa?
> > >
> > > It's not so easy and I'm sure that we'll violate some patent doing things
> > > in this way.
>
> A doubt it'd violate a patent, but it will violate the copyright of the
> code, for sure.
>
> > There is a reverb in the oss driver from http://opensource.creative.com
> > it comes as source (i gues it is the same as the windows reverb)
>
> It could be the same microcode. Is it GPL'd?
no its not its a port of freeverb. and yes Freeverb is GPL.
i dont know if that url is still working:
-------------------------------snip
FV10K1 release 0.2.1
July 17, 2001
Oleg Smirnov <smirnov@astron.nl>
http://www.astron.nl/~smirnov/fv10k1
FV10K1 is a set of "surround sound" patches for the EMU10K1 processor,
found in the SoundBlaster Live! series of sound cards. You need the
emu10k1 Linux driver (http://opensource.creative.com) to run this code.
FV10K1 contains a port of Jezar Wakefield's Freeverb reverbration engine
(http://home.onet.co.uk/~jzracc/freeverb.htm). I have also developed my
own
patches for adding [directional] early room reflections, and some simple
programs to generate these patches given a room geometry.
This is very much alpha code, so don't expect a slick user interface or
any bells & whistles. In fact, unless you're a somewhat advanced
emu10k1 hacker, this code won't be of much use to you. I only developed
this because I use an SB Live! to play MP3s in my car, and I wanted to
take full advantage of the 4-speaker output to create surround effects.
I'm releasing this code because I'm hoping that (a) it might be useful
to you, and (b) maybe you can contribute to resolving some of the
issues (see the BUGS section at the end of this file).
This code is released under the terms of the GNU General Public License
version 2. Please see file COPYING for details.
---------------------------------------------------snap
as10k1 is GPL also and contains some example dsp patches.
>
> > so if we provide a method for the user to load patches into the dsp we
> > are fine.
> > i will query Martin Soto on his status.
>
> Now, regarding my status: I have a little example C program, that
> installs a new microcode (not really a patch but the whole microcode
> program) to the card. It is not able to load standard patches, so you
> have to put the microcode directly inside the program. I shamelessly
> stole some of the macros in emufx.c to be able to do that, but it works
> well ;-)
this is a nice method...
this would support compiling graphs into code quite good.
i think i will stop fighting threads a bit and add that into galan 0.2.
> The program deletes all of the mixer controls associated to the standard
> Alsa microcode, and puts in new controls if that's necessary.
> It'd be really nice to have a decent interactive front end to this
> feature, because it would allow to reconfigure the mixer to offer just
> those controls that the user needs. That would make SBLive! cards much
> more usable under Linux.
>
> > (hi martin can you send me your patchloader code ?)
>
> Unfortunately, I have the code at home, so I'll only be able to post to
> the list today evening (GMT+2). I wanted to improve it a bit, but have
> been really busy at work lately, and haven't found any time to do it.
> I'll post what I already have, and keep working on it as time permits.
>
> I'm however attaching a small patch to emufx.c that fixes a bug in the
> implementation of the CODE_PEEK ioctl. It must be applied to alsa in
> order for my userland program to work.
Torben Hohn
http://galan.sourceforge.net
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
@ 2002-10-10 20:17 Jaroslav Kysela
2002-10-11 9:53 ` torben hohn
0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Kysela @ 2002-10-10 20:17 UTC (permalink / raw)
To: Juhana Sadeharju
Cc: alsa-devel@lists.sourceforge.net, alsa-user@lists.sourceforge.net
On Thu, 10 Oct 2002, Juhana Sadeharju wrote:
> On the SB Live problems: recorded signal levels differs from MS Windows
> driver, and the capture faders of alsamixer seems to do nothing.
> I posted this to alsa-user as well if there are people who has
> the SB Live card. Please join us for testing.
>
> If I start to understand how the SB Live driver works, then I will
> fix the driver myself. But I would like to have reports from other
> SB Live users if their driver works the same way.
>
> -*-
>
> Below are the settings which works for Drive/line-in2 (Line LiveDrive)
> recording. All other faders are 0, mute switches are on, and capture
> switches are off.
>
> name | capture switch | mute switch | level
> -------------------------------------------------------------
> PCM | <none> | off | 100
> Line LiveDrive | off | <none> | 100
> Line LiveDrive Capture | <none> | <none> | 0
> Capture | on | <none> | 0
> Mix | on | <none> | 0
> AC97 Capture | <none> | <none> | 100
>
> <none> means that there is no such a switch.
>
> Line LiveDrive's capture switch has no effect. Strange!
> Line LiveDrive's level must be 100 because it controls both the monitor
> signal and the capture signal gains.
> Line LiveDrive Capture's level has no effect. Strange!
> Capture level 0 seems to mean unity gain.
> Mix level is fixed to 0.
It seems that you're routing your signal over AC97 ;-)
Have you tried a combination in this table?
name | capture switch | mute switch | level
-------------------------------------------------------------
PCM | <none> | off | 100
Line LiveDrive | on | <none> | 0
Line LiveDrive Capture | <none> | <none> | 100
Capture | off | <none> | 0
Mix | on | <none> | 0
AC97 Capture | <none> | <none> | 0
> Where all those controls are physically located? A flow diagram could
> also help in understanding all the relations.
>
> By seeing the whole signal path diagram of Alsa, I could check if there
> is a direct signal path from Line LiveDrive to disk with all gains
> inbetween set to unity. Is there such a path?
>
> -*-
>
> MS Windows driver allows one to set the quality of the resamplers
> (48000 Hz to/from 44100 Hz). Are those resamplers in firmware or
> in dsp code of emu10k1? Does Alsa use those resamplers or has
> equivalents? Could Alsa be programmed to allow an application
> software to use those resamplers? Or are the resamplers tied up
> to A/D and D/A conversion?
It's a software thing. Sure, this software might be in DSP or in driver.
ALSA uses only synthesizer voices for PCM where the resampling is done
inside wavetable synthesizer.
> Does emu10k1 work at a user settable sample rate? 44100 Hz? 32000Hz?
>
> MS Windows driver has a good sounding reverb. Could this reverb dsp
> code be extracted from the MS Windows driver and used "as is" in Alsa?
It's not so easy and I'm sure that we'll violate some patent doing things
in this way.
> -*-
>
> Alsamixer shows the following additional controls only if alsamixer
> is executed at the play time. What they are? The controls are not
> available at record time.
>
> name | value (left right)
> -------------------------------------------------------
> EMU10K1 PCM | 100 100
> EMU10K1 PCM | 100 100
Volume applied to playback samples.
> EMU10K1 PCM Send | 100 100
> EMU10K1 PCM Send | 0 100
> EMU10K1 PCM Send | 0 0
> EMU10K1 PCM Send | 0 0
Send volumes to FX BUS destinations.
> EMU10K1 PCM Send Routing | 0 7
> EMU10K1 PCM Send Routing | 20 0
> EMU10K1 PCM Send Routing | 13 13
> EMU10K1 PCM Send Routing | 7 7
FX BUS destination.
EMU10K1 hardware is complex. There is a synthesizer (wavetable engine), FX
BUS accumulators to route signals from this syntesizer to DSP and finally
DSP, managing inputs and outputs (inputs from syntesizer, external inputs,
inputs from PCI bus, outputs to PCI bus, external outputs).
So it very depends how the firmware behaves. You can build completely
different mixing system with another firmware.
Jaroslav
-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project http://www.alsa-project.org
SuSE Linux http://www.suse.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [Alsa-user] Re: Broken emu10k/SB Live driver?
2002-10-10 20:17 Jaroslav Kysela
@ 2002-10-11 9:53 ` torben hohn
0 siblings, 0 replies; 5+ messages in thread
From: torben hohn @ 2002-10-11 9:53 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: Martin Soto, alsa-dev
>
> > Does emu10k1 work at a user settable sample rate? 44100 Hz? 32000Hz?
> >
> > MS Windows driver has a good sounding reverb. Could this reverb dsp
> > code be extracted from the MS Windows driver and used "as is" in Alsa?
>
> It's not so easy and I'm sure that we'll violate some patent doing things
> in this way.
There is a reverb in the oss driver from http://opensource.creative.com
it comes as source (i gues it is the same as the windows reverb)
so if we provide a method for the user to load patches into the dsp we
are fine.
i will query Martin Soto on his status.
(hi martin can you send me your patchloader code ?)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-10-11 19:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200210110751.g9B7pcKa017014@mailgate2.uni-kl.de>
2002-10-11 8:34 ` Re: [Alsa-user] Re: Broken emu10k/SB Live driver? Martin Soto
2002-10-11 12:10 ` Jaroslav Kysela
2002-10-11 12:18 ` Takashi Iwai
2002-10-11 19:01 ` torben hohn
2002-10-10 20:17 Jaroslav Kysela
2002-10-11 9:53 ` torben hohn
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.