Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) =================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) Brief Notes on C-Media 8338/8738/8768/8770 Driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) =================================================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) Takashi Iwai <tiwai@suse.de>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) Front/Rear Multi-channel Playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) ---------------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) CM8x38 chip can use ADC as the second DAC so that two different stereo
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) channels can be used for front/rear playbacks.  Since there are two
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) DACs, both streams are handled independently unlike the 4/6ch multi-
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) channel playbacks in the section below.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) As default, ALSA driver assigns the first PCM device (i.e. hw:0,0 for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) card#0) for front and 4/6ch playbacks, while the second PCM device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) (hw:0,1) is assigned to the second DAC for rear playback.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) There are slight differences between the two DACs:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) - The first DAC supports U8 and S16LE formats, while the second DAC
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)   supports only S16LE.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) - The second DAC supports only two channel stereo.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) Please note that the CM8x38 DAC doesn't support continuous playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) rate but only fixed rates: 5512, 8000, 11025, 16000, 22050, 32000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) 44100 and 48000 Hz.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) The rear output can be heard only when "Four Channel Mode" switch is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) disabled.  Otherwise no signal will be routed to the rear speakers.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) As default it's turned on.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) .. WARNING::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)   When "Four Channel Mode" switch is off, the output from rear speakers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)   will be FULL VOLUME regardless of Master and PCM volumes [#]_.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)   This might damage your audio equipment.  Please disconnect speakers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)   before your turn off this switch.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) .. [#]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)   Well.. I once got the output with correct volume (i.e. same with the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)   front one) and was so excited.  It was even with "Four Channel" bit
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)   on and "double DAC" mode.  Actually I could hear separate 4 channels
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)   from front and rear speakers!  But.. after reboot, all was gone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)   It's a very pity that I didn't save the register dump at that
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)   time..  Maybe there is an unknown register to achieve this...
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) If your card has an extra output jack for the rear output, the rear
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) playback should be routed there as default.  If not, there is a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) control switch in the driver "Line-In As Rear", which you can change
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) via alsamixer or somewhat else.  When this switch is on, line-in jack
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) is used as rear output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) There are two more controls regarding to the rear output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) The "Exchange DAC" switch is used to exchange front and rear playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) routes, i.e. the 2nd DAC is output from front output.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 4/6 Multi-Channel Playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) --------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) The recent CM8738 chips support for the 4/6 multi-channel playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) function.  This is useful especially for AC3 decoding.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) When the multi-channel is supported, the driver name has a suffix
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) "-MC" such like "CMI8738-MC6".  You can check this name from
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) /proc/asound/cards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) When the 4/6-ch output is enabled, the second DAC accepts up to 6 (or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 4) channels.  While the dual DAC supports two different rates or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) formats, the 4/6-ch playback supports only the same condition for all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) channels.  Since the multi-channel playback mode uses both DACs, you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) cannot operate with full-duplex.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) The 4.0 and 5.1 modes are defined as the pcm "surround40" and "surround51"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) in alsa-lib.  For example, you can play a WAV file with 6 channels like
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 	% aplay -Dsurround51 sixchannels.wav
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) For programming the 4/6 channel playback, you need to specify the PCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) channels as you like and set the format S16LE.  For example, for playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) with 4 channels,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) 	snd_pcm_hw_params_set_access(pcm, hw, SND_PCM_ACCESS_RW_INTERLEAVED);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) 	    // or mmap if you like
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	snd_pcm_hw_params_set_format(pcm, hw, SND_PCM_FORMAT_S16_LE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 	snd_pcm_hw_params_set_channels(pcm, hw, 4);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) and use the interleaved 4 channel data.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) There are some control switches affecting to the speaker connections:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) Line-In Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) 	an enum control to change the behavior of line-in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 	jack.  Either "Line-In", "Rear Output" or "Bass Output" can
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) 	be selected.  The last item is available only with model 039
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) 	or newer. 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) 	When "Rear Output" is chosen, the surround channels 3 and 4
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) 	are output to line-in jack.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) Mic-In Mode
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) 	an enum control to change the behavior of mic-in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) 	jack.  Either "Mic-In" or "Center/LFE Output" can be
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 	selected. 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) 	When "Center/LFE Output" is chosen, the center and bass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) 	channels (channels 5 and 6) are output to mic-in jack. 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) Digital I/O
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) -----------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) The CM8x38 provides the excellent SPDIF capability with very cheap
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) price (yes, that's the reason I bought the card :)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) The SPDIF playback and capture are done via the third PCM device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) (hw:0,2).  Usually this is assigned to the PCM device "spdif".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) The available rates are 44100 and 48000 Hz.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) For playback with aplay, you can run like below:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) 	% aplay -Dhw:0,2 foo.wav
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) or
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) ::
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) 	% aplay -Dspdif foo.wav
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) 24bit format is also supported experimentally.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) The playback and capture over SPDIF use normal DAC and ADC,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) respectively, so you cannot playback both analog and digital streams
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) simultaneously.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) To enable SPDIF output, you need to turn on "IEC958 Output Switch"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) control via mixer or alsactl ("IEC958" is the official name of
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) so-called S/PDIF).  Then you'll see the red light on from the card so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) you know that's working obviously :)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) The SPDIF input is always enabled, so you can hear SPDIF input data
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) from line-out with "IEC958 In Monitor" switch at any time (see
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) below).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) You can play via SPDIF even with the first device (hw:0,0),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) but SPDIF is enabled only when the proper format (S16LE), sample rate
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) (441100 or 48000) and channels (2) are used.  Otherwise it's turned
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) off.  (Also don't forget to turn on "IEC958 Output Switch", too.)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) Additionally there are relevant control switches:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) IEC958 Mix Analog
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 	Mix analog PCM playback and FM-OPL/3 streams and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) 	output through SPDIF.  This switch appears only on old chip
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) 	models (CM8738 033 and 037).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 	Note: without this control you can output PCM to SPDIF.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) 	This is "mixing" of streams, so e.g. it's not for AC3 output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) 	(see the next section).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) IEC958 In Select
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) 	Select SPDIF input, the internal CD-in (false)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 	and the external input (true).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) IEC958 Loop
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) 	SPDIF input data is loop back into SPDIF
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) 	output (aka bypass)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) IEC958 Copyright
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) 	Set the copyright bit.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) IEC958 5V
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) 	Select 0.5V (coax) or 5V (optical) interface.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) 	On some cards this doesn't work and you need to change the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) 	configuration with hardware dip-switch.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) IEC958 In Monitor
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) 	SPDIF input is routed to DAC.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) IEC958 In Phase Inverse
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) 	Set SPDIF input format as inverse.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) 	[FIXME: this doesn't work on all chips..]
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) IEC958 In Valid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) 	Set input validity flag detection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) Note: When "PCM Playback Switch" is on, you'll hear the digital output
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) stream through analog line-out.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) The AC3 (RAW DIGITAL) OUTPUT
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) ----------------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) The driver supports raw digital (typically AC3) i/o over SPDIF.  This
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) can be toggled via IEC958 playback control, but usually you need to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) access it via alsa-lib.  See alsa-lib documents for more details.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) On the raw digital mode, the "PCM Playback Switch" is automatically
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) turned off so that non-audio data is heard from the analog line-out.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) Similarly the following switches are off: "IEC958 Mix Analog" and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) "IEC958 Loop".  The switches are resumed after closing the SPDIF PCM
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) device automatically to the previous state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) On the model 033, AC3 is implemented by the software conversion in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) the alsa-lib.  If you need to bypass the software conversion of IEC958
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) subframes, pass the "soft_ac3=0" module option.  This doesn't matter
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) on the newer models.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) ANALOG MIXER INTERFACE
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) ----------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) The mixer interface on CM8x38 is similar to SB16.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) There are Master, PCM, Synth, CD, Line, Mic and PC Speaker playback
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) volumes.  Synth, CD, Line and Mic have playback and capture switches,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) too, as well as SB16.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) In addition to the standard SB mixer, CM8x38 provides more functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) - PCM playback switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) - PCM capture switch (to capture the data sent to DAC)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) - Mic Boost switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) - Mic capture volume
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) - Aux playback volume/switch and capture switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) - 3D control switch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) MIDI CONTROLLER
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) ---------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) With CMI8338 chips, the MPU401-UART interface is disabled as default.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) You need to set the module option "mpu_port" to a valid I/O port address
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) to enable MIDI support.  Valid I/O ports are 0x300, 0x310, 0x320 and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 0x330.  Choose a value that doesn't conflict with other cards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) With CMI8738 and newer chips, the MIDI interface is enabled by default
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) and the driver automatically chooses a port address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) There is *no* hardware wavetable function on this chip (except for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) OPL3 synth below).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) What's said as MIDI synth on Windows is a software synthesizer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) emulation.  On Linux use TiMidity or other softsynth program for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) playing MIDI music.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) FM OPL/3 Synth
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) --------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) The FM OPL/3 is also enabled as default only for the first card.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) Set "fm_port" module option for more cards.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) The output quality of FM OPL/3 is, however, very weird.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) I don't know why..
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) CMI8768 and newer chips do not have the FM synth.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) Joystick and Modem
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) ------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260) The legacy joystick is supported.  To enable the joystick support, pass
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261) joystick_port=1 module option.  The value 1 means the auto-detection.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262) If the auto-detection fails, try to pass the exact I/O address.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264) The modem is enabled dynamically via a card control switch "Modem".
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267) Debugging Information
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268) ---------------------
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270) The registers are shown in /proc/asound/cardX/cmipci.  If you have any
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271) problem (especially unexpected behavior of mixer), please attach the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) output of this proc file together with the bug report.