Date: Thu, 13 Feb 2003 06:05:48 +0100 From: Orlando Bassotto <orlando.bassotto@ieo-research.it> To: freebsd-hackers@freebsd.org Subject: [PATCH] creative audigy 2 (emu10k2) support Message-ID: <20030213050548.GA79233@ieo-research.it>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hi,
I'm new here and don't know if this is the right list, I hope
it fits!
I wrote this patch due to a wrong buy, the patch adds support for
Audigy 2 cards and should also for Audigy.
Due the fact information about the EMU10K2 is almost none, I
looked around to see if someone wrote already support for it,
and given the nature of the EMU10K2 to be very similar to it's
old brother, it should have been done with a dozen of lines.
I found the code in the ALSA project EMU10K1 driver; well, I
don't know what most of the initialization code does but I
couldn't find any further information, so take it as is...
I tried this patch for a few weeks now, using it intensively for
recording and for playback. All analog inputs work, I tried them
all, and all outputs (analog) work as well.
I changed the patch scheme for Audigy cards (at least here works)
hence on EMU10K2, we have a center/lfe working as master left / 2 +
master right / 2, and two outputs (rear, front both digital/analog)
which are two outputs with the same signal (all these are controlled
through the AC97 mixer master volume for the EMU10K2).
On EMU10K1 I tried to give the same patch scheme, but as far I can
see, 1 output outlet (rear l/r) is not handled by the AC97 mixer,
so you can't control the volume of the port. This may be muted, but
I found useful to attach the speakers, I can always turn them off....
I provided as well some definitations of what those `???'
registers were, and took from ALSA emu10k1.h, the opcode
macros for writing microcode (which helped alot on understanding
how the toy works), this makes things a bit verbose.
I moved off the TOS link detection when Audigy card is found,
but I may be doing a wrong thing, change if needed.
Also there are a few new variables in struct emu_voice, used for
routing to the FX bus, may be useful if someone writes a patch
manager; struct sc_info has grown, two new bits describe if audigy
card is detected and if it is an audigy2, two new variables,
addrmask, because EMU10K2 has a bigger address space range, and
nchans, which is the number of channels available, EMU10K1 has 4,
K2 has 8, the definition EMU_CHANS is now EMU_MAX_CHANS and it's 8.
A new structure, audigy_adcspeed describes the speeds supported
by EMU10K2 (different just because it supports 12kHz).
The opcode encoding is different from EMU10K1, so functions for
handling initialization of the FX processor are splitted.
All symbols starting with audigy_ and A_ are code that regards
only and uniquely audigy cards. Initialization of the FX processor
on Audigy is later done after setting the AUD bit, I still wonder
if this is really needed, but at the moment it works, so I won't
break it.
Hopes this help who, like me, did a wrong buy. :)
Ciao!
Orlando
--
----------------------------------------------------------------
Orlando Bassotto European Institute of Oncology
orlando.bassotto@ieo-research.it Dept. Experimental Oncology
Via Ripamonti, 435 - 20141 Milano (Italy)
Phone# +39-02-57489-865/857 - Fax# +39-02-57489-851
----------------------------------------------------------------
[-- Attachment #2 --]
$K>emu10k2.diff \wڸٳ=P 闥9oH_v{8m߀ͳMBdvݛb[hFcǬ>gĩӹ/uf{'JY^//>;p/1J_5LfhZYZ-fV^yӚWЖ5UZ3ų*{>cV+DNÉ;{oEQ{KQЍ\+3Je]kꆠŇc
X/Ŀwv=: #ClcѪ2F/?x ?9];>_YptJB4C5#OcdiL23*B3tΏLm̨s2(ƣ΅( uX{
hN/'7uKXv%FRoA7tGx
WxES ^{U4s]'y01wj6=Rx^ F<n8&i-䞍Ysǻ#h0F*
ĺu=זBvvjmVݕF
2xbˈ/3Lh7h T]W]wF8!XLt9nȼ J0Thfa_^v&.V\suMBКr~]Y^xykMd̟O)GG#GcpsLGaf_@s24ɄHPs?nVI=ރlkQgް?L5fЅ*SpKFh˱i|Bx0CkEoƉf!=0qYBՍ_i6j}\@:wV3H
V5v4H32tⰜ/"F> ݫ3u& !FYùa
9#7̿(Y2He_)+9;G~o0 Zay*t֓1K١w$(5SN@n;9ԡL[UT?To߂[TMcL˕WB/Fat4ʩ:+$u{p6oet|ЮJVKk, Am AZ3A&)~MꂥoB7>]-O :τm:jqZ;6Un?dѻ@J|(e$?'5%ݷBBdMʉ+i*)`A>>Ow=VDONa<Ix:~%-^e9)2\"lamL{`;_Fvd/0%!
I3K+8l1qVmRt4BHDxnmwIPb8[KT ){<:c^GZ$ےRa y{ ӌ[Hn(hK#D308|HFWn|92M*%ϓО40{n@KK>4tm ('H >+Y5tѻko2f;sy.|5ZͯoyUF 1̋rcXN>&mL8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