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