| | 131 | === GW16157 Audio Adapter |
| | 132 | [[Image(gw16157.jpg,300px)]] |
| | 133 | |
| | 134 | The GW16157 Audio card was designed for a specific use case and connects to the MIPI connector of a GW73xx/GW72xx providing: |
| | 135 | - NXP SGTL5000 audio codec |
| | 136 | - MIC to connector |
| | 137 | - LINEOUT_L to TPA3110D2 15W Class D amplifier with auto-fault recovery and GPIO control to shutdown via MIPI_GPIO1 (GPIO4_IO4 on IMX8MM) |
| | 138 | |
| | 139 | Power Amplifier |
| | 140 | * Texas Instruments TPA3110D2 |
| | 141 | * Class D Amplifier w/PBTL Mono Output |
| | 142 | * 15W @ 4 ohm with 10% THD |
| | 143 | * 8-26V Supply Voltage (24VDC recommended) |
| | 144 | |
| | 145 | Codec |
| | 146 | * NXP SGTL5000XNBA3 |
| | 147 | * Programmable MIC Gain and MIC Bias Support |
| | 148 | * MIC ADC 85dB SNR |
| | 149 | * Digital Audio Processing: |
| | 150 | * NXP Surround, Bass and Tone Control |
| | 151 | * !Parametric/Graphic Equalizer |
| | 152 | * Digital Mixer |
| | 153 | |
| | 154 | Software notes: |
| | 155 | - Kernel drivers/modules: (recommended to set static if possible) |
| | 156 | * snd-soc-fsl-sai CONFIG_SND_SOC_FSL_SAI SND_IMX_SOC |
| | 157 | * snd-soc-sgtl5000 CONFIG_SND_SOC_SGTL5000 |
| | 158 | * snd-soc-simple-card CONFIG_SND_SIMPLE_CARD |
| | 159 | * CONFIG_SND_IMX_SOC |
| | 160 | - Device tree overlays are required |
| | 161 | |
| | 162 | A sample script used for testing: |
| | 163 | {{{#!bash |
| | 164 | cat /proc/asound/cards # show card |
| | 165 | # enable lineout for 30% volume |
| | 166 | amixer set Lineout on |
| | 167 | amixer set Lineout 30% |
| | 168 | aplay /usr/share/sounds/alsa/Front_Center.wav |
| | 169 | # set capture gain to 8. Valid values: 1-15 |
| | 170 | amixer set Capture 8 |
| | 171 | # turn on capture |
| | 172 | amixer set Capture cap |
| | 173 | #set mic volume to 50% |
| | 174 | amixer set Mic 50 |
| | 175 | # make sure digital input mux is set to I2S. Setting it to ADC routes the microphone to the speaker |
| | 176 | # and causes intense feedback |
| | 177 | amixer set "Digital Input Mux" I2S |
| | 178 | echo "Recording..." |
| | 179 | arecord -d 5 -f dat -r 48000 -vvv -c1 /tmp/test.wav |
| | 180 | echo "Playback..." |
| | 181 | aplay -f dat /tmp/test.wav |
| | 182 | }}} |
| | 183 | |
| | 184 | ==== GW16157 Hardware |
| | 185 | J1 = Microphone Input. |
| | 186 | * Example Microphone: PUI Audio POW-3535L-3-LW100-B-R Link |
| | 187 | * Pin 1 = Ground |
| | 188 | * Pin 2 = MIC Output + |
| | 189 | * Pin 3 = Ground |
| | 190 | |
| | 191 | J2 = Mono Speaker Output |
| | 192 | * Example Speaker: Peerless TC5FC07-04 (4 ohm @ 5W) Link |
| | 193 | * Pin 1 = Speaker - |
| | 194 | * Pin 2 = Ground (no connect) |
| | 195 | * Pin 3 = Speaker + |
| | 196 | |
| | 197 | J3 = Vin Pass Through |
| | 198 | * This connector can be used to simplify cabling and provide Vin to the SBC baseboard. |
| | 199 | * Pin 1 = Vin |
| | 200 | * Pin 2 = GND |
| | 201 | * Pin 3 = Vin |
| | 202 | * Pin 4 = GND |
| | 203 | |
| | 204 | J4 = Voltage Input for Audio Amplifier (8-26V, 24V recommended) |
| | 205 | This should be connected to an external supply and is used by the on board audio amplifier. |
| | 206 | * Pin 1 = Vin |
| | 207 | * Pin 2 = GND |
| | 208 | * Pin 3 = Vin |
| | 209 | * Pin 4 = GND |
| | 210 | |
| | 211 | On Board Headers: |
| | 212 | * J1 & J2 = TE Connectivity 2MM-HSP-S03-VT-02-H-TB |
| | 213 | * J3 & J4 = TE Connectivity 2MM-HSP-S04-VT-02-H-TB |
| | 214 | |
| | 215 | Mating Housing: |
| | 216 | * J1 & J2 = TE Connectivity 2MM-RCP-S03-BX = 2316104-3 |
| | 217 | * J3 & J4 = TE Connectivity 2MM-RCP-S04-BX = 2316104-4 |
| | 218 | |
| | 219 | Crimps for Housing: |
| | 220 | * 2MM-RT-M-T-ST (Tin) = 2-2316113-2 |
| | 221 | * 2MM-RT-M-F-ST (Gold Flash) = 3-2316113-3 |
| | 222 | * 2MM-RT-M-M-ST (Gold 0.38um) = 4-2316113-4 |
| | 223 | * 2MM-RT-M-H-ST (Gold 0.76um) = 5-2316113-5 |