Recentemente, precisei gravar umas vídeo aulas para um curso que estou ministrando (este aqui, caso alguém se interesse ;-)) e me deparei com um problema interessante: o áudio dos vídeos não estava sendo gravado!
Utilizo o ALSA aqui no meu arch linux para controlar o som do meu computador, e ele conseguia reconhecer o microfone. O problema era que por mais que eu falasse e ouvisse minha voz pelo desgraçado, não conseguia gravar minha voz pra ouvir depois.
Pesquisando um pouco, juntei as peças e consegui finamente fazer o que eu queria. Esses procedimentos levam em consideração que sua placa de som é uma HDA Intel. Caso você não saiba como desbobrir isso, é fácil. Basta abrir seu alsamixer e apertar F6. Se na opção 0, aparecer "HDA Intel", pronto. Problema resolvido.
Primeira etapa. Abra o alsamixer, e aperte a tecla F5. Depois, apertando a seta para a direita do teclado, alcance a barra de nome "Capture". Caso ela esteja assim:
![]() |
![]() |
| Alsamixer pronto. |
$ arecord -d 10 -f cd -t wav test.wav
Fale alguma coisa durante 10 segundos. Depois ponha pra tocar. Se funcionou, parabéns. Pode parar de ler este tutorial ir embora. Passou por média. Senão, relaxe, erga a cabeça e tamo junto pra recuperação.
Infelizmente, tudo que eu fiz acima não funcionou. A bronca pra mim era mais pesada. Descobri que o driver da placa de som é carregado recebendo um parâmetro que corresponde ao modelo da placa. Caso nenhum parâmetro seja carregado, o driver entende que o modelo é o default e algumas funcionalidades menos básicas (como gravar sons) não funcionavam direito. E o ALSA, carrega o driver da placa de som sem parâmetro nenhum. Se sua placa se encaixar no modelo default, beleza. Senão, um abraço.
Pra resolver isso, antes precisamos saber qual o modelo da sua placa de som. Abra o terminal e digite:
# cat /proc/asound/card*/codec\#*|grep -i codec
A primeira linha é a que você vai considerar. Geralmente é algo como "Realtek ALC269". Depois disso, procure pelo modelo neste link. Caso dê problema com o link, segue abaixo o arquivo completo (atualizado até a data de publicação deste post):
1 Model name Description
2 ---------- -----------
3 ALC880
4 ======
5 3stack 3-jack in back and a headphone out
6 3stack-digout 3-jack in back, a HP out and a SPDIF out
7 5stack 5-jack in back, 2-jack in front
8 5stack-digout 5-jack in back, 2-jack in front, a SPDIF out
9 6stack 6-jack in back, 2-jack in front
10 6stack-digout 6-jack with a SPDIF out
11
12 ALC260
13 ======
14 N/A
15
16 ALC262
17 ======
18 inv-dmic Inverted internal mic workaround
19
20 ALC267/268
21 ==========
22 inv-dmic Inverted internal mic workaround
23
24 ALC269/270/275/276/280/282
25 ======
26 laptop-amic Laptops with analog-mic input
27 laptop-dmic Laptops with digital-mic input
28 alc269-dmic Enable ALC269(VA) digital mic workaround
29 alc271-dmic Enable ALC271X digital mic workaround
30 inv-dmic Inverted internal mic workaround
31 lenovo-dock Enables docking station I/O for some Lenovos
32
33 ALC662/663/272
34 ==============
35 mario Chromebook mario model fixup
36 asus-mode1 ASUS
37 asus-mode2 ASUS
38 asus-mode3 ASUS
39 asus-mode4 ASUS
40 asus-mode5 ASUS
41 asus-mode6 ASUS
42 asus-mode7 ASUS
43 asus-mode8 ASUS
44 inv-dmic Inverted internal mic workaround
45
46 ALC680
47 ======
48 N/A
49
50 ALC882/883/885/888/889
51 ======================
52 acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G
53 acer-aspire-8930g Acer Aspire 8330G/6935G
54 acer-aspire Acer Aspire others
55 inv-dmic Inverted internal mic workaround
56 no-primary-hp VAIO Z workaround (for fixed speaker DAC)
57
58 ALC861/660
59 ==========
60 N/A
61
62 ALC861VD/660VD
63 ==============
64 N/A
65
66 CMI9880
67 =======
68 minimal 3-jack in back
69 min_fp 3-jack in back, 2-jack in front
70 full 6-jack in back, 2-jack in front
71 full_dig 6-jack in back, 2-jack in front, SPDIF I/O
72 allout 5-jack in back, 2-jack in front, SPDIF out
73 auto auto-config reading BIOS (default)
74
75 AD1882 / AD1882A
76 ================
77 3stack 3-stack mode
78 3stack-automute 3-stack with automute front HP (default)
79 6stack 6-stack mode
80
81 AD1884A / AD1883 / AD1984A / AD1984B
82 ====================================
83 desktop 3-stack desktop (default)
84 laptop laptop with HP jack sensing
85 mobile mobile devices with HP jack sensing
86 thinkpad Lenovo Thinkpad X300
87 touchsmart HP Touchsmart
88
89 AD1884
90 ======
91 N/A
92
93 AD1981
94 ======
95 basic 3-jack (default)
96 hp HP nx6320
97 thinkpad Lenovo Thinkpad T60/X60/Z60
98 toshiba Toshiba U205
99
100 AD1983
101 ======
102 N/A
103
104 AD1984
105 ======
106 basic default configuration
107 thinkpad Lenovo Thinkpad T61/X61
108 dell_desktop Dell T3400
109
110 AD1986A
111 =======
112 6stack 6-jack, separate surrounds (default)
113 3stack 3-stack, shared surrounds
114 laptop 2-channel only (FSC V2060, Samsung M50)
115 laptop-eapd 2-channel with EAPD (ASUS A6J)
116 laptop-automute 2-channel with EAPD and HP-automute (Lenovo N100)
117 ultra 2-channel with EAPD (Samsung Ultra tablet PC)
118 samsung 2-channel with EAPD (Samsung R65)
119 samsung-p50 2-channel with HP-automute (Samsung P50)
120
121 AD1988/AD1988B/AD1989A/AD1989B
122 ==============================
123 6stack 6-jack
124 6stack-dig ditto with SPDIF
125 3stack 3-jack
126 3stack-dig ditto with SPDIF
127 laptop 3-jack with hp-jack automute
128 laptop-dig ditto with SPDIF
129 auto auto-config reading BIOS (default)
130
131 Conexant 5045
132 =============
133 laptop-hpsense Laptop with HP sense (old model laptop)
134 laptop-micsense Laptop with Mic sense (old model fujitsu)
135 laptop-hpmicsense Laptop with HP and Mic senses
136 benq Benq R55E
137 laptop-hp530 HP 530 laptop
138 test for testing/debugging purpose, almost all controls
139 can be adjusted. Appearing only when compiled with
140 $CONFIG_SND_DEBUG=y
141
142 Conexant 5047
143 =============
144 laptop Basic Laptop config
145 laptop-hp Laptop config for some HP models (subdevice 30A5)
146 laptop-eapd Laptop config with EAPD support
147 test for testing/debugging purpose, almost all controls
148 can be adjusted. Appearing only when compiled with
149 $CONFIG_SND_DEBUG=y
150
151 Conexant 5051
152 =============
153 laptop Basic Laptop config (default)
154 hp HP Spartan laptop
155 hp-dv6736 HP dv6736
156 hp-f700 HP Compaq Presario F700
157 ideapad Lenovo IdeaPad laptop
158 toshiba Toshiba Satellite M300
159
160 Conexant 5066
161 =============
162 laptop Basic Laptop config (default)
163 hp-laptop HP laptops, e g G60
164 asus Asus K52JU, Lenovo G560
165 dell-laptop Dell laptops
166 dell-vostro Dell Vostro
167 olpc-xo-1_5 OLPC XO 1.5
168 ideapad Lenovo IdeaPad U150
169 thinkpad Lenovo Thinkpad
170
171 STAC9200
172 ========
173 ref Reference board
174 oqo OQO Model 2
175 dell-d21 Dell (unknown)
176 dell-d22 Dell (unknown)
177 dell-d23 Dell (unknown)
178 dell-m21 Dell Inspiron 630m, Dell Inspiron 640m
179 dell-m22 Dell Latitude D620, Dell Latitude D820
180 dell-m23 Dell XPS M1710, Dell Precision M90
181 dell-m24 Dell Latitude 120L
182 dell-m25 Dell Inspiron E1505n
183 dell-m26 Dell Inspiron 1501
184 dell-m27 Dell Inspiron E1705/9400
185 gateway-m4 Gateway laptops with EAPD control
186 gateway-m4-2 Gateway laptops with EAPD control
187 panasonic Panasonic CF-74
188 auto BIOS setup (default)
189
190 STAC9205/9254
191 =============
192 ref Reference board
193 dell-m42 Dell (unknown)
194 dell-m43 Dell Precision
195 dell-m44 Dell Inspiron
196 eapd Keep EAPD on (e.g. Gateway T1616)
197 auto BIOS setup (default)
198
199 STAC9220/9221
200 =============
201 ref Reference board
202 3stack D945 3stack
203 5stack D945 5stack + SPDIF
204 intel-mac-v1 Intel Mac Type 1
205 intel-mac-v2 Intel Mac Type 2
206 intel-mac-v3 Intel Mac Type 3
207 intel-mac-v4 Intel Mac Type 4
208 intel-mac-v5 Intel Mac Type 5
209 intel-mac-auto Intel Mac (detect type according to subsystem id)
210 macmini Intel Mac Mini (equivalent with type 3)
211 macbook Intel Mac Book (eq. type 5)
212 macbook-pro-v1 Intel Mac Book Pro 1st generation (eq. type 3)
213 macbook-pro Intel Mac Book Pro 2nd generation (eq. type 3)
214 imac-intel Intel iMac (eq. type 2)
215 imac-intel-20 Intel iMac (newer version) (eq. type 3)
216 ecs202 ECS/PC chips
217 dell-d81 Dell (unknown)
218 dell-d82 Dell (unknown)
219 dell-m81 Dell (unknown)
220 dell-m82 Dell XPS M1210
221 auto BIOS setup (default)
222
223 STAC9202/9250/9251
224 ==================
225 ref Reference board, base config
226 m1 Some Gateway MX series laptops (NX560XL)
227 m1-2 Some Gateway MX series laptops (MX6453)
228 m2 Some Gateway MX series laptops (M255)
229 m2-2 Some Gateway MX series laptops
230 m3 Some Gateway MX series laptops
231 m5 Some Gateway MX series laptops (MP6954)
232 m6 Some Gateway NX series laptops
233 auto BIOS setup (default)
234
235 STAC9227/9228/9229/927x
236 =======================
237 ref Reference board
238 ref-no-jd Reference board without HP/Mic jack detection
239 3stack D965 3stack
240 5stack D965 5stack + SPDIF
241 5stack-no-fp D965 5stack without front panel
242 dell-3stack Dell Dimension E520
243 dell-bios Fixes with Dell BIOS setup
244 volknob Fixes with volume-knob widget 0x24
245 auto BIOS setup (default)
246
247 STAC92HD71B*
248 ============
249 ref Reference board
250 dell-m4-1 Dell desktops
251 dell-m4-2 Dell desktops
252 dell-m4-3 Dell desktops
253 hp-m4 HP mini 1000
254 hp-dv5 HP dv series
255 hp-hdx HP HDX series
256 hp-dv4-1222nr HP dv4-1222nr (with LED support)
257 auto BIOS setup (default)
258
259 STAC92HD73*
260 ===========
261 ref Reference board
262 no-jd BIOS setup but without jack-detection
263 intel Intel DG45* mobos
264 dell-m6-amic Dell desktops/laptops with analog mics
265 dell-m6-dmic Dell desktops/laptops with digital mics
266 dell-m6 Dell desktops/laptops with both type of mics
267 dell-eq Dell desktops/laptops
268 alienware Alienware M17x
269 auto BIOS setup (default)
270
271 STAC92HD83*
272 ===========
273 ref Reference board
274 mic-ref Reference board with power management for ports
275 dell-s14 Dell laptop
276 dell-vostro-3500 Dell Vostro 3500 laptop
277 hp-dv7-4000 HP dv-7 4000
278 hp_cNB11_intquad HP CNB models with 4 speakers
279 hp-zephyr HP Zephyr
280 hp-led HP with broken BIOS for mute LED
281 hp-inv-led HP with broken BIOS for inverted mute LED
282 auto BIOS setup (default)
283
284 STAC9872
285 ========
286 vaio VAIO laptop without SPDIF
287 auto BIOS setup (default)
288
289 Cirrus Logic CS4206/4207
290 ========================
291 mbp55 MacBook Pro 5,5
292 imac27 IMac 27 Inch
293 auto BIOS setup (default)
294
295 VIA VT17xx/VT18xx/VT20xx
296 ========================
297 auto BIOS setup (default)
Para o codec que eu digitei acima, os modelos compatíveis são:
24 ALC269/270/275/276/280/282
25 ======
26 laptop-amic Laptops with analog-mic input
27 laptop-dmic Laptops with digital-mic input
28 alc269-dmic Enable ALC269(VA) digital mic workaround
29 alc271-dmic Enable ALC271X digital mic workaround
30 inv-dmic Inverted internal mic workaround
31 lenovo-dock Enables docking station I/O for some Lenovos
Escolhi o "laptop-dmic" como primeira tentativa. Isso porque meu computador é um laptop e também porque no alsamixer tinha uma barra chamada "Digital". Escolhido o codec, edite o arquivo (crie se não existir) /etc/modprobe.d/alsa.conf, e lá acrescente:
/etc/modprobe.d/alsa.conf
------------------------------
options snd-hda-intel model=laptop-dmic
Feito isso, reinicie o computador, e tente fazer outra gravação. Se funcionar, parabéns! Passou na recuperação. Senão, tente verificar se sua placa de som é mesmo a HDA Intel. Pra fazer isso, digite no terminal:
# lsmod | grep snd
Se no meio da resposta aparecer "snd-hda-intel", sua placa é mesmo a HDA Intel.
É isso. Espero que estas dicas sejam úteis para vocês do mesmo jeito que foi para mim.
Inté.


