Supondo que o driver snd_hda
estava sendo carregado (era), a falta de som de trabalho indica um conflito de driver ou uma configuração padrão incorreta. Para finalizar, adicionei a seguinte linha a /boot/loader.conf
para ativar mensagens detalhadas em dmesg
:
boot_verbose="YES"
Isso torna a saída dmesg
muito mais útil, com todos os tipos de informações adicionais (consulte este link , que é uma leitura essencial.
Extrair as coisas úteis de dmesg
me dá algo parecido com isto:
hdac0: <Intel 82801F HDA Controller> mem 0xe6100000-0xe6103fff irq 16 at device 27.0 on pci0
hdac0: PCI card vendor: 0x1631, device: 0xe011
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 256 for MSI
hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdacc0: <Realtek ALC880 HDA CODEC> at cad 2 on hdac0
hdaa0: <Realtek ALC880 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x08800000
hdaa0: NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: Original pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 20 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 21 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 22 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 23 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 24 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 25 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 26 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 27 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 28 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 29 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 30 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 31 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: Patching widget caps nid=29 0x00400000 -> 0x00700000
hdaa0: Patched pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 20 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 21 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 22 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 23 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 24 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 25 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 26 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 27 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 28 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 30 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 31 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: Tracing input monitor
hdaa0: Tracing other input monitors
hdaa0: Tracing beeper
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
Todos os pinos do dispositivo de áudio foram atribuídos a valores padrão que os tornam desativados, portanto, nenhum dispositivo foi configurado.
Para alterar os padrões para algo sensato, são necessárias modificações na configuração de tempo de inicialização, o que é feito adicionando algumas linhas a /boot/device.hints
. Parece haver muita flexibilidade aqui, mas tentei o seguinte, que foi o suficiente para que a saída de áudio funcionasse imediatamente:
hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker conn=Fixed loc=Onboard color=Unknown"
hint.hdaa.0.nid21.config="as=2 seq=0 device=Line-out conn=Jack loc=Rear color=Green"
hint.hdaa.0.nid27.config="as=2 seq=15 device=Headphones conn=Jack loc=Front color=Green"
Verificando dmesg
agora resulta:
hdac0: <Intel 82801F HDA Controller> mem 0xe6100000-0xe6103fff irq 16 at device 27.0 on pci0
hdac0: PCI card vendor: 0x1631, device: 0xe011
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
hdac0: using IRQ 256 for MSI
hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
hdacc0: <Realtek ALC880 HDA CODEC> at cad 2 on hdac0
hdaa0: <Realtek ALC880 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x08800000
hdaa0: NumGPIO=2 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=1
hdaa0: GPIO0: disabled
hdaa0: GPIO1: disabled
hdaa0: Original pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 20 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 21 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 22 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 23 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 24 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 25 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 26 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 27 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 28 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 29 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 30 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: 31 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0
hdaa0: Patching widget caps nid=29 0x00400000 -> 0x00700000
hdaa0: Patching pin config nid=20 0x00000000 -> 0x99100010
hdaa0: Patching pin config nid=21 0x00000000 -> 0x01004020
hdaa0: Patching pin config nid=27 0x00000000 -> 0x0220402f
hdaa0: Patched pins configuration:
hdaa0: nid 0x as seq device conn jack loc color misc
hdaa0: 20 99100010 1 0 Speaker Fixed Unknown Onboard Unknown 0
hdaa0: 21 01004020 2 0 Line-out Jack Unknown Rear Green 0
hdaa0: 22 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 23 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 24 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 25 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 26 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 27 0220402f 2 15 Headphones Jack Unknown Front Green 0
hdaa0: 28 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 30 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 31 00000000 0 0 Line-out Jack Unknown 0x00 Unknown 0 DISA
hdaa0: 2 associations found:
hdaa0: Association 0 (1) out:
hdaa0: Pin nid=20 seq=0
hdaa0: Association 1 (2) out:
hdaa0: Pin nid=21 seq=0
hdaa0: Pin nid=27 seq=15
hdaa0: Tracing association 0 (1)
hdaa0: Pin 20 traced to DAC 2
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (2)
hdaa0: Pin 21 traced to DAC 3
hdaa0: Pin 27 traced to DAC 3 and hpredir 0
hdaa0: Association 1 (2) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Looking for additional DAC for association 1 (2)
hdaa0: Tracing input monitor
hdaa0: Tracing other input monitors
hdaa0: Tracing beeper
hdaa0: nid 29 traced to out
hdaa0: Pin sense: nid=20 sense=0xffffffff (connected)
hdaa0: Headphones redirection for association 1 nid=27 using unsolicited responses.
hdaa0: Redirect output to: main
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek ALC880 (Onboard Analog Speaker)> at nid 20 on hdaa0
pcm1: <Realtek ALC880 (Analog 2.0+HP)> at nid 21,27 on hdaa0
mostrando que os pinos reconfigurados permitiram a criação de dois dispositivos de saída de áudio, pcm0
e pcm1
. O conteúdo de /dev/sndstat
confirma isso:
Installed devices:
pcm0: <Realtek ALC880 (Onboard Analog Speaker)> (play) default
pcm1: <Realtek ALC880 (Analog 2.0+HP)> (play)
Fazer o trabalho do microfone é deixado como um exercício para o leitor!