1a02f5895STakashi Iwai=================================
2a02f5895STakashi IwaiNotes on Maya44 USB Audio Support
3a02f5895STakashi Iwai=================================
4a02f5895STakashi Iwai
5a02f5895STakashi Iwai.. note::
6a02f5895STakashi Iwai   The following is the original document of Rainer's patch that the
7a02f5895STakashi Iwai   current maya44 code based on.  Some contents might be obsoleted, but I
8a02f5895STakashi Iwai   keep here as reference -- tiwai
9a02f5895STakashi Iwai
10a02f5895STakashi IwaiFeb 14, 2008
11a02f5895STakashi Iwai
12a02f5895STakashi IwaiRainer Zimmermann <mail@lightshed.de>
13a02f5895STakashi Iwai
14a02f5895STakashi IwaiSTATE OF DEVELOPMENT
15a02f5895STakashi Iwai====================
16a02f5895STakashi Iwai
17a02f5895STakashi IwaiThis driver is being developed on the initiative of Piotr Makowski (oponek@gmail.com) and financed by Lars Bergmann.
18a02f5895STakashi IwaiDevelopment is carried out by Rainer Zimmermann (mail@lightshed.de).
19a02f5895STakashi Iwai
20a02f5895STakashi IwaiESI provided a sample Maya44 card for the development work.
21a02f5895STakashi Iwai
22a02f5895STakashi IwaiHowever, 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.
23a02f5895STakashi Iwai
24a02f5895STakashi IwaiThis is the first testing version of the Maya44 driver released to the alsa-devel mailing list (Feb 5, 2008).
25a02f5895STakashi Iwai
26a02f5895STakashi Iwai
27a02f5895STakashi IwaiThe following functions work, as tested by Rainer Zimmermann and Piotr Makowski:
28a02f5895STakashi Iwai
29a02f5895STakashi Iwai- playback and capture at all sampling rates
30a02f5895STakashi Iwai- input/output level
31a02f5895STakashi Iwai- crossmixing
32a02f5895STakashi Iwai- line/mic switch
33a02f5895STakashi Iwai- phantom power switch
34a02f5895STakashi Iwai- analogue monitor a.k.a bypass
35a02f5895STakashi Iwai
36a02f5895STakashi Iwai
37a02f5895STakashi IwaiThe following functions *should* work, but are not fully tested:
38a02f5895STakashi Iwai
39a02f5895STakashi Iwai- Channel 3+4 analogue - S/PDIF input switching
40a02f5895STakashi Iwai- S/PDIF output
41a02f5895STakashi Iwai- all inputs/outputs on the M/IO/DIO extension card
42a02f5895STakashi Iwai- internal/external clock selection
43a02f5895STakashi Iwai
44a02f5895STakashi Iwai
45a02f5895STakashi Iwai*In particular, we would appreciate testing of these functions by anyone who has access to an M/IO/DIO extension card.*
46a02f5895STakashi Iwai
47a02f5895STakashi Iwai
48a02f5895STakashi IwaiThings that do not seem to work:
49a02f5895STakashi Iwai
50a02f5895STakashi Iwai- 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).
51a02f5895STakashi Iwai
52a02f5895STakashi Iwai- Ardour 2.1 seems to work only via JACK, not using ALSA directly or via OSS. This still needs to be tracked down.
53a02f5895STakashi Iwai
54a02f5895STakashi Iwai
55a02f5895STakashi IwaiDRIVER DETAILS
56a02f5895STakashi Iwai==============
57a02f5895STakashi Iwai
58a02f5895STakashi Iwaithe following files were added:
59a02f5895STakashi Iwai
60a02f5895STakashi Iwai* pci/ice1724/maya44.c - Maya44 specific code
61a02f5895STakashi Iwai* pci/ice1724/maya44.h
62a02f5895STakashi Iwai* pci/ice1724/ice1724.patch
63a02f5895STakashi Iwai* pci/ice1724/ice1724.h.patch - PROPOSED patch to ice1724.h (see SAMPLING RATES)
64a02f5895STakashi Iwai* i2c/other/wm8776.c - low-level access routines for Wolfson WM8776 codecs
65a02f5895STakashi Iwai* include/wm8776.h
66a02f5895STakashi Iwai
67a02f5895STakashi Iwai
68a02f5895STakashi IwaiNote that the wm8776.c code is meant to be card-independent and does not actually register the codec with the ALSA infrastructure.
69a02f5895STakashi IwaiThis is done in maya44.c, mainly because some of the WM8776 controls are used in Maya44-specific ways, and should be named appropriately.
70a02f5895STakashi Iwai
71a02f5895STakashi Iwai
72a02f5895STakashi Iwaithe following files were created in pci/ice1724, simply #including the corresponding file from the alsa-kernel tree:
73a02f5895STakashi Iwai
74a02f5895STakashi Iwai* wtm.h
75a02f5895STakashi Iwai* vt1720_mobo.h
76a02f5895STakashi Iwai* revo.h
77a02f5895STakashi Iwai* prodigy192.h
78a02f5895STakashi Iwai* pontis.h
79a02f5895STakashi Iwai* phase.h
80a02f5895STakashi Iwai* maya44.h
81a02f5895STakashi Iwai* juli.h
82a02f5895STakashi Iwai* aureon.h
83a02f5895STakashi Iwai* amp.h
84a02f5895STakashi Iwai* envy24ht.h
85a02f5895STakashi Iwai* se.h
86a02f5895STakashi Iwai* prodigy_hifi.h
87a02f5895STakashi Iwai
88a02f5895STakashi Iwai
89a02f5895STakashi Iwai*I hope this is the correct way to do things.*
90a02f5895STakashi Iwai
91a02f5895STakashi Iwai
92a02f5895STakashi IwaiSAMPLING RATES
93a02f5895STakashi Iwai==============
94a02f5895STakashi Iwai
95a02f5895STakashi IwaiThe Maya44 card (or more exactly, the Wolfson WM8776 codecs) allow a maximum sampling rate of 192 kHz for playback and 92 kHz for capture.
96a02f5895STakashi Iwai
97a02f5895STakashi IwaiAs the ICE1724 chip only allows one global sampling rate, this is handled as follows:
98a02f5895STakashi Iwai
99a02f5895STakashi Iwai* 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.
100a02f5895STakashi Iwai
101a02f5895STakashi Iwai* In the current state of the driver, setting rates of up to 192 kHz is permitted even for capture devices.
102a02f5895STakashi Iwai
103a02f5895STakashi Iwai*AVOID CAPTURING AT RATES ABOVE 96kHz*, even though it may appear to work. The codec cannot actually capture at such rates, meaning poor quality.
104a02f5895STakashi Iwai
105a02f5895STakashi Iwai
106a02f5895STakashi IwaiI propose some additional code for limiting the sampling rate when setting on a capture pcm device. However because of the global sampling rate, this logic would be somewhat problematic.
107a02f5895STakashi Iwai
108a02f5895STakashi IwaiThe proposed code (currently deactivated) is in ice1712.h.patch, ice1724.c and maya44.c (in pci/ice1712).
109a02f5895STakashi Iwai
110a02f5895STakashi Iwai
111a02f5895STakashi IwaiSOUND DEVICES
112a02f5895STakashi Iwai=============
113a02f5895STakashi Iwai
114a02f5895STakashi IwaiPCM devices correspond to inputs/outputs as follows (assuming Maya44 is card #0):
115a02f5895STakashi Iwai
116a02f5895STakashi Iwai* hw:0,0 input - stereo, analog input 1+2
117a02f5895STakashi Iwai* hw:0,0 output - stereo, analog output 1+2
118a02f5895STakashi Iwai* hw:0,1 input - stereo, analog input 3+4 OR S/PDIF input
119a02f5895STakashi Iwai* hw:0,1 output - stereo, analog output 3+4 (and SPDIF out)
120a02f5895STakashi Iwai
121a02f5895STakashi Iwai
122a02f5895STakashi IwaiNAMING OF MIXER CONTROLS
123a02f5895STakashi Iwai========================
124a02f5895STakashi Iwai
125a02f5895STakashi Iwai(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).
126a02f5895STakashi Iwai
127a02f5895STakashi Iwai
128a02f5895STakashi IwaiPCM
129a02f5895STakashi Iwai    (digital) output level for channel 1+2
130a02f5895STakashi IwaiPCM 1
131a02f5895STakashi Iwai    same for channel 3+4
132a02f5895STakashi Iwai
133a02f5895STakashi IwaiMic Phantom+48V
134a02f5895STakashi Iwai    switch for +48V phantom power for electrostatic microphones on input 1/2.
135a02f5895STakashi Iwai
136a02f5895STakashi Iwai    Make sure this is not turned on while any other source is connected to input 1/2.
137a02f5895STakashi Iwai    It might damage the source and/or the maya44 card.
138a02f5895STakashi Iwai
139a02f5895STakashi IwaiMic/Line input
140a02f5895STakashi Iwai    if switch is on, input jack 1/2 is microphone input (mono), otherwise line input (stereo).
141a02f5895STakashi Iwai
142a02f5895STakashi IwaiBypass
143a02f5895STakashi Iwai    analogue bypass from ADC input to output for channel 1+2. Same as "Monitor" in the windows driver.
144a02f5895STakashi IwaiBypass 1
145a02f5895STakashi Iwai    same for channel 3+4.
146a02f5895STakashi Iwai
147a02f5895STakashi IwaiCrossmix
148a02f5895STakashi Iwai    cross-mixer from channels 1+2 to channels 3+4
149a02f5895STakashi IwaiCrossmix 1
150a02f5895STakashi Iwai    cross-mixer from channels 3+4 to channels 1+2
151a02f5895STakashi Iwai
152a02f5895STakashi IwaiIEC958 Output
153a02f5895STakashi Iwai    switch for S/PDIF output.
154a02f5895STakashi Iwai
155a02f5895STakashi Iwai    This is not supported by the ESI windows driver.
156a02f5895STakashi Iwai    S/PDIF should output the same signal as channel 3+4. [untested!]
157a02f5895STakashi Iwai
158a02f5895STakashi Iwai
159*ba35c3a5SRandy DunlapDigital output selectors
160a02f5895STakashi Iwai    These switches allow a direct digital routing from the ADCs to the DACs.
161a02f5895STakashi Iwai    Each switch determines where the digital input data to one of the DACs comes from.
162a02f5895STakashi Iwai    They are not supported by the ESI windows driver.
163a02f5895STakashi Iwai    For normal operation, they should all be set to "PCM out".
164a02f5895STakashi Iwai
165a02f5895STakashi IwaiH/W
166a02f5895STakashi Iwai    Output source channel 1
167a02f5895STakashi IwaiH/W 1
168a02f5895STakashi Iwai    Output source channel 2
169a02f5895STakashi IwaiH/W 2
170a02f5895STakashi Iwai    Output source channel 3
171a02f5895STakashi IwaiH/W 3
172a02f5895STakashi Iwai    Output source channel 4
173a02f5895STakashi Iwai
174a02f5895STakashi IwaiH/W 4 ... H/W 9
175a02f5895STakashi Iwai    unknown function, left in to enable testing.
176a02f5895STakashi Iwai
177a02f5895STakashi Iwai    Possibly some of these control S/PDIF output(s).
178a02f5895STakashi Iwai    If these turn out to be unused, they will go away in later driver versions.
179a02f5895STakashi Iwai
180a02f5895STakashi IwaiSelectable values for each of the digital output selectors are:
181a02f5895STakashi Iwai
182a02f5895STakashi IwaiPCM out
183a02f5895STakashi Iwai	DAC output of the corresponding channel (default setting)
184a02f5895STakashi IwaiInput 1 ... Input 4
185a02f5895STakashi Iwai	direct routing from ADC output of the selected input channel
186a02f5895STakashi Iwai
187