Skip to contentSkip to conversation

ESI Maya44 initial patch

PATCH Rainer Zimmermann 4 participants 5 messages Feb 5, 2008 – Feb 6, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

this is the first testing version of the driver for the ESI Maya44 card, which I developed on the initiative of Piotr Makowski.

The driver is actually an addition to the existing ice1724 code.

More information can be found in doc/README.maya44 .

We would appreciate your testing and feedback.

Also, since I am new to ALSA driver development, I would appreciate feedback on whether the way I integrated this into the ALSA tree is correct.

Thanks for your feedback and best regards,
Rainer Zimmermann

Signature · 2 lines
Lightshed IT Services
Löfflerstr. 27, 22765 Hamburg, Germany * [email protected] * www.lightshed.de
doc/README.maya44 new file +165 -0
diff -r e277289c0650 -r 8e4386475575 doc/README.maya44
@@ -0,0 +1,165 @@
+
+STATE OF DEVELOPMENT:
+
+This driver is being developed on the initiative of Piotr Makowski ([email protected]) and financed by Lars Bergmann.
+Development is carried out by Rainer Zimmermann ([email protected]).
+
+ESI provided a sample Maya44 card for the development work.
+
+However, unfortunately it has turned out difficult to get detailed programming information, so I (Rainer Zimmermann) had to find out some card-specific information by experiment and conjecture. Some information (in particular, several GPIO bits) is still missing.
+
+This is the first testing version of the Maya44 driver released to the alsa-devel mailing list (Feb 5, 2008).
+
+
+The following functions work, as tested by Rainer Zimmermann and Piotr Makowski:
+
+- playback and capture at all sampling rates
+- input/output level
+- crossmixing
+- line/mic switch
+- phantom power switch
+- analogue monitor a.k.a bypass
+
+
+The following functions *should* work, but are not fully tested:
+
+- Channel 3+4 analogue - S/PDIF input switching
+- S/PDIF output
+- all inputs/outputs on the M/IO/DIO extension card
+- internal/external clock selection
+
+
+*In particular, we would appreciate testing of these functions by anyone who has access to an M/IO/DIO extension card.*
+
+
+Things that do not seem to work:
+
+- The level meters ("multi track") in 'alsamixer' do not seem to react to signals in (if this is a bug, it would probably be in the existing ICE1724 code).
+
+- Ardour 2.1 seems to work only via JACK, not using ALSA directly or via OSS. This still needs to be tracked down.
+
+
+DRIVER DETAILS:
+
+the following files were added:
+
+pci/ice1724/maya44.c        - Maya44 specific code
+pci/ice1724/maya44.h
+i2c/other/wm8776.c  - low-level access routines for Wolfson WM8776 codecs 
+include/wm8776.h
+
+
+Note that the wm8776.c code is meant to be card-independent and does not actually register the codec with the ALSA infrastructure.
+This is done in maya44.c, mainly because some of the WM8776 controls are used in Maya44-specific ways, and should be named appropriately.
+
+
+the following files were copied from the alsa-kernel tree back to alsa-driver/pci/ice1724 in order to make modifications:
+
+ice/ice1724/ice1724.c
+ice/ice1724/ice1712.h
+
+the following files were created in pci/ice1724, simply #including the corresponding file from the alsa-kernel tree:
+
+wtm.h
+vt1720_mobo.h
+revo.h
+prodigy192.h
+pontis.h
+phase.h
+maya44.h
+juli.h
+aureon.h
+amp.h
+envy24ht.h
+se.h
+prodigy_hifi.h
+
+
+*I hope this is the correct way to do things.*
+
+
+SAMPLING RATES:
+
+The Maya44 card (or more exactly, the Wolfson WM8776 codecs) allow a maximum sampling rate of 192 kHz for playback and 92 kHz for capture.
+
+As the ICE1724 chip only allows one global sampling rate, this is handled as follows:
+
+* setting the sampling rate on any open PCM device on the maya44 card will always set the *global* sampling rate for all playback and capture channels.
+
+* in PCM capture devices, setting the rate will be limited to 92 kHz.
+
+One caveat - the following is possible:
+
+  1) set the rate to 176.4 or 192 kHz on a playback PCM device
+  2) then capture at (seemingly) this rate on a capture PCM device. 
+
+  *AVOID THIS*, even though it may appear to work. The codec cannot actually capture at that rate, meaning poor quality.
+
+
+The bottom line: be careful when using sampling rates above 96 kHz, in particular when doing both playback and capturing. With sampling rates of 96 kHz or lower, you are safe.
+
+
+
+SOUND DEVICES:
+
+PCM devices correspond to inputs/outputs as follows (assuming Maya44 is card #0):
+
+hw:0,0 input - stereo, analog input 1+2
+hw:0,0 output - stereo, analog output 1+2
+hw:0,1 input - stereo, analog input 3+4 OR S/PDIF input
+hw:0,1 output - stereo, analog output 3+4 (and SPDIF out)
+
+
+NAMING OF MIXER CONTROLS:
+
+(for more information about the signal flow, please refer to the block diagram on p.24 of the ESI Maya44 manual, or in the ESI windows software).
+
+
+PCM: (digital) output level for channel 1+2
+PCM 1: same for channel 3+4
+
+Mic Phantom+48V: switch for +48V phantom power for electrostatic microphones on input 1/2.
+    Make sure this is not turned on while any other source is connected to input 1/2.
+    It might damage the source and/or the maya44 card.
+
+Mic/Line input: if switch is is on, input jack 1/2 is microphone input (mono), otherwise line input (stereo).
+
+Bypass: analogue bypass from ADC input to output for channel 1+2. Same as "Monitor" in the windows driver.
+Bypass 1: same for channel 3+4.
+
+Crossmix: cross-mixer from channels 1+2 to channels 3+4
+Crossmix 1: cross-mixer from channels 3+4 to channels 1+2
+
+IEC958 Output: switch for S/PDIF output.
+    This is not supported by the ESI windows driver.
+    S/PDIF should output the same signal as channel 3+4. [untested!]
+
+
+Digitial output selectors:
+
+    These switches allow a direct digital routing from the ADCs to the DACs.
+    Each switch determines where the digital input data to one of the DACs comes from.
+    They are not supported by the ESI windows driver.
+    For normal operation, they should all be set to "PCM out".
+
+H/W: Output source channel 1
+H/W 1: Output source channel 2
+H/W 2: Output source channel 3
+H/W 3: Output source channel 4
+
+H/W 4 ... H/W 9: unknown function, left in to enable testing.
+    Possibly some of these control S/PDIF output(s).
+    If these turn out to be unused, they will go away in later driver versions.
+
+Selectable values for each of the digital output selectors are:
+   "PCM out" -> DAC output of the corresponding channel (default setting)
+   "Input 1"...
+   "Input 4" -> direct routing from ADC output of the selected input channel
+
+
+--------
+
+Feb 05, 2008
+Rainer Zimmermann
[email protected]
+
i2c/other/Makefile +6 -1
diff -r e277289c0650 -r 8e4386475575 i2c/other/Makefile
@@ -5,7 +5,12 @@ include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/toplevel.config
 include $(SND_TOPDIR)/Makefile.conf
 
-export-objs += ak4xxx-adda.o ak4114.o ak4117.o pt2258.o
+export-objs += ak4xxx-adda.o ak4114.o ak4117.o pt2258.o wm8776.o
+
+snd-wm8776-objs := wm8776.o
+
+# Module Dependency
+obj-$(CONFIG_SND_ICE1724) += snd-wm8776.o
 
 # Toplevel Module Dependency
 # hack for tea575x support
i2c/other/wm8776.c new file +342 -0

342 lines not on this page · raw message

include/sound new file +1 -0
diff -r e277289c0650 -r 8e4386475575 include/sound
@@ -0,0 +1,1 @@
+../alsa-kernel/include
\ No newline at end of file
include/wm8776.h new file +142 -0

142 lines not on this page · raw message

pci/Makefile +1 -1
diff -r e277289c0650 -r 8e4386475575 pci/Makefile
@@ -12,7 +12,7 @@ clean-files := ad1889.c atiixp.c atiixp_
 clean-files := ad1889.c atiixp.c atiixp_modem.c bt87x.c cmipci.c ens1370.c \
 	fm801.c intel8x0.c maestro3.c via82xx.c via82xx_modem.c
 
-obj-$(CONFIG_SND) += pdplus/ asihpi/
+obj-$(CONFIG_SND) += pdplus/ asihpi/ ice1712/
 
 #
 #
pci/ice1712/Makefile +2 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/Makefile
@@ -9,4 +9,6 @@ export-objs = ak4xxx.o
 
 include $(SND_TOPDIR)/alsa-kernel/pci/ice1712/Makefile
 
+snd-ice1724-objs += maya44.o
+
 include $(SND_TOPDIR)/Rules.make
pci/ice1712/amp.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/amp.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/amp.h"
pci/ice1712/aureon.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/aureon.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/aureon.h"
pci/ice1712/envy24ht.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/envy24ht.h
@@ -0,0 +1,1 @@
+#include "../../alsa-kernel/pci/ice1712/envy24ht.h"
pci/ice1712/ice1712.h new file +490 -0

490 lines not on this page · raw message

pci/ice1712/ice1724.c +2563 -1

1,829 lines not on this page · raw message

pci/ice1712/juli.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/juli.h

Lines of this file are not shown. View the raw message.

pci/ice1712/maya44.c new file +649 -0

649 lines not on this page · raw message

pci/ice1712/maya44.h new file +10 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/maya44.h

Lines of this file are not shown. View the raw message.

pci/ice1712/phase.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/phase.h

Lines of this file are not shown. View the raw message.

pci/ice1712/pontis.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/pontis.h

Lines of this file are not shown. View the raw message.

pci/ice1712/prodigy192.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/prodigy192.h

Lines of this file are not shown. View the raw message.

pci/ice1712/prodigy_hifi.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/prodigy_hifi.h

Lines of this file are not shown. View the raw message.

pci/ice1712/revo.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/revo.h

Lines of this file are not shown. View the raw message.

pci/ice1712/se.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/se.h

Lines of this file are not shown. View the raw message.

pci/ice1712/vt1720_mobo.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/vt1720_mobo.h

Lines of this file are not shown. View the raw message.

pci/ice1712/wtm.h new file +1 -0
diff -r e277289c0650 -r 8e4386475575 pci/ice1712/wtm.h

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Part of the diff is not shown here. View the raw message.

#1 lore raw

Hi,

Would be the ESI Maya44 support added to the 1.0.16 alsa version? It would be nice to get it working with upcoming Ubuntu 8.04 .

2008/2/5, Rainer Zimmermann <[email protected]>:

Quoted 29 lines

Hello,

this is the first testing version of the driver for the ESI Maya44 card, which I
developed on the initiative of Piotr Makowski.

The driver is actually an addition to the existing ice1724 code.

More information can be found in doc/README.maya44 .

We would appreciate your testing and feedback.

Also, since I am new to ALSA driver development, I would appreciate feedback on
whether the way I integrated this into the ALSA tree is correct.

Thanks for your feedback and best regards,
Rainer Zimmermann

--
Lightshed IT Services
Löfflerstr. 27, 22765 Hamburg, Germany * [email protected] * www.lightshed.de

Signature · 2 lines
Regards,
Piotr Makowski
#2 lore raw

At Wed, 6 Feb 2008 07:28:23 +0100,

Quoted 5 lines · Piotr Zaryk

Hi,

Would be the ESI Maya44 support added to the 1.0.16 alsa version? It would be nice to get it working with upcoming Ubuntu 8.04 .

Strange, this mail didn't reach to me. Could you repost? (I remember that there was a downtime of alsa-project.org in yesterday
afternoon, which could hit...)

Anyway, the patch would be pretty unlikely in 1.0.16. 1.0.16 is already frozen. Let's get it in the next release.

Takashi

Quoted 41 lines

2008/2/5, Rainer Zimmermann <[email protected]>:

Quoted 29 lines

Hello,

this is the first testing version of the driver for the ESI Maya44 card, which I
developed on the initiative of Piotr Makowski.

The driver is actually an addition to the existing ice1724 code.

More information can be found in doc/README.maya44 .

We would appreciate your testing and feedback.

Also, since I am new to ALSA driver development, I would appreciate feedback on
whether the way I integrated this into the ALSA tree is correct.

Thanks for your feedback and best regards,
Rainer Zimmermann

--
Lightshed IT Services
Löfflerstr. 27, 22765 Hamburg, Germany * [email protected] * www.lightshed.de

Signature · 6 lines
Regards,
Piotr Makowski
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#3 lore raw
In reply to Rainer Zimmermann

Hi,

Thanks for the reverse engineering.

MI/ODI/O is partially supported in prodigy192.c.

Combination Prodigy192 + MI/ODI/O:

SPDIF-out works automatically (basically kind of a parallel connection to the on-board SPDIF-out). The SPDIF input via AK4114 works, I have not tested MIDI yet.

Theoretically, the Xilinx array should supply AK4114 with external clock for SPDIF rate detection - using the MK73-1 frequency multiplier. I have yet to hook up my oscilloscope to analyze the actual functionality. As of now the automatic rate detection does not work.

I guess MI/ODI/O support for Maya44 would be fairly similar.

Good luck and best regards,

Pavel Hofman.

Quoted 28 lines · Rainer Zimmermann

Hello,

this is the first testing version of the driver for the ESI Maya44 card, which I developed on the initiative of Piotr Makowski.

The driver is actually an addition to the existing ice1724 code.

More information can be found in doc/README.maya44 .

We would appreciate your testing and feedback.

Also, since I am new to ALSA driver development, I would appreciate feedback on whether the way I integrated this into the ALSA tree is correct.

Thanks for your feedback and best regards,
Rainer Zimmermann

------------------------------------------------------------------------

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 16 lines
-----------------

inSITE, s.r.o.

Rubesova 29, 326 00 Plzen
Tel., fax: +420 - 37 - 74 493 58
GSM: +420 - 603 - 163 973
Email: [email protected]

www.educity.cz, www.insite.cz
www.meetings.cz, www.hrzive.cz
www.comben.cz, www.hr-online.cz
-------------------------------
Navstivte www.educity.cz, server
s nejvetsi nabidkou profesniho
vzdelavani na ceskem internetu.
#4 lore raw
In reply to Rainer Zimmermann

At Tue, 05 Feb 2008 18:53:48 +0100,

Quoted 7 lines · Rainer Zimmermann

Hello,

this is the first testing version of the driver for the ESI Maya44 card, which I developed on the initiative of Piotr Makowski.

Quoted 8 lines

The driver is actually an addition to the existing ice1724 code.

More information can be found in doc/README.maya44 .

We would appreciate your testing and feedback.

Also, since I am new to ALSA driver development, I would appreciate feedback on whether the way I integrated this into the ALSA tree is correct.

The place you added is fine. Unless you want it to merge to the upstream right now, we can keep locally in the alsa-driver tree.

The file ice1724.c should be rather "patched" instead of copying the whole. See other directories how to add it. Basically, you create *.patch and add rules for the corresponding files in Makefile.

ice1712.h is a bit nasty. If you don't need to modify that file, you can have a skeleton that simply includes the file in alsa-kernel tree. That is, one liner including the following:

	#include "../../alsa-kernel/pci/ice1712/ice1712.h"

Last but not least, try to keep your patch clean and compliant to the kernel coding style. You can run $LINUX_KERNEL/scripts/checkpatch.pl to check what can be wrong as a guide line.

Please repost after these fixes so that I'll merge it to the HG tree.

Thanks,

Takashi