FreeBSD: 스피커 사운드와 내장 헤드폰 잭 간의 자동 전환 기능이 없습니다.

FreeBSD: 스피커 사운드와 내장 헤드폰 잭 간의 자동 전환 기능이 없습니다.

저는 Lenovo Ideapad 100S 14'' IBR-14'' Intel Celeron CPU N3060 @ 1.60GHz, 32GB SSD, 4GB RAM을 사용하고 있으며 칩 소리는 Realtek ALC269입니다.

기기에서 FreeBSD 12.0을 실행 중입니다. 내부 스피커와 헤드폰 잭에서 사운드를 성공적으로 설정했습니다. 하지만 자동으로 전환하는 데 문제가 있습니다.

전환하려면 다음을 실행합니다.

스피커를 활성화하려면(시작 시에도 가능):

sudo sysctl hw.snd.default_unit=1

헤드폰 사운드를 활성화하려면:

sudo sysctl hw.snd.default_unit=0

default_unit을 변경하지 않으면 기본값은 이 모델의 헤드폰 잭인 0으로 설정됩니다.

필요할 때 내장 스피커에서 헤드폰으로 자동 전환하는 데 성공한 사람들의 이야기를 들었습니다.

현재 말씀드린 대로 내부 스피커나 헤드폰을 통해 소리를 수동으로만 전달할 수 있으며 설정은 다음과 같습니다.

/boot/loader.conf

# load sound driver
snd_hda="YES"
# load mixer
mixer_enable="YES"
sound_load="YES"
# Minimize the number of interrupts from the sound card 
hint.pcm.0.buffersize=65536 
hint.pcm.1.buffersize=65536 
hw.snd.feeder_buffersize=65536 
hw.snd.latency=7 

/etc/sysctl.conf

# Without this sound does not even work, both in speakers or headphones
dev.hdac.0.polling=1
# Sound for speakers when booting
hw.snd.default_unit=1

또한 다음을 사용하여 헤드셋의 토글 설정을 시도했습니다.

에 추가 /boot/loader.conf:

# Out : speaker + headphones 
hint.hdac.0.cad0.nid25.config="as=1 seq=15" 

에 추가 /boot/devices.hints:

hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker"
hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones"

그리고:

hint.hdaa.1.nid20.config="as=1 seq=0"
hint.hdaa.1.nid21.config="as=1 seq=15 device=Headphones"

나는 또한 다음을 추가해 보았습니다 /etc/sysctl.conf.

hw.snd.default_auto=1

헤드폰에서 스피커로 전환하는 수정이 성공하지 못했습니다.

지금은 아이디어가 부족합니다. 제안할 사항이 있나요?

PCI 정보

# pciconf -l | grep hda
hdac0@pci0:0:27:0:  class=0x040300 card=0x390517aa chip=0x22848086 rev=0x35 hdr=0x00

# pciconf -lVv -a hdac0
hdac0@pci0:0:27:0:  class=0x040300 card=0x390517aa chip=0x22848086 rev=0x35 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller'
    class      = multimedia
    subclass   = HDA

시스템에 대한 추가 디버깅 정보:

$ dmesg | grep pcm
pcm0: <Realtek ALC269 (Right Analog)> at nid 21 and 24 on hdaa0
pcm1: <Realtek ALC269 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1

$ cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC269 (Right Analog)> (play/rec)
pcm1: <Realtek ALC269 (Internal Analog)> (play/rec) default
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> (play)
No devices installed from userspace.

$ dmesg | grep hdac
hdac0: <Intel (0x2284) HDA Controller> mem 0x91310000-0x91313fff at device 27.0 on pci0
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
hdacc1: <Intel (0x2883) HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel (0x2883) Audio Function Group> at nid 1 on hdacc1

$sysctl hw | grep snd
hw.snd.maxautovchans: 16
hw.snd.default_unit: 1
hw.snd.version: 2009061500/amd64
hw.snd.default_auto: 0
hw.snd.verbose: 0
hw.snd.vpc_mixer_bypass: 1
hw.snd.feeder_rate_quality: 1
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.feeder_rate_polyphase_max: 183040
hw.snd.feeder_rate_presets: 100:8:0.85 100:36:0.92 100:164:0.97
hw.snd.feeder_eq_exact_rate: 0
hw.snd.feeder_eq_presets: PEQ:16000,0.2500,62,0.2500:-9,9,1.0:44100,48000,88200,96000,176400,192000
hw.snd.basename_clone: 1
hw.snd.compat_linux_mmap: 0
hw.snd.syncdelay: -1
hw.snd.usefrags: 0
hw.snd.vpc_reset: 0
hw.snd.vpc_0db: 45
hw.snd.vpc_autoreset: 1
hw.snd.timeout: 5
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_matrix: 1
hw.snd.report_soft_formats: 1

관련 dmesg출력은 boot_verbose=1다음으로 시작 됩니다 /boot/loader.conf.

hdac0: <Intel (0x2284) HDA Controller> mem 0x91310000-0x91313fff at device 27.0 on pci0
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
hdaa0: hdaa_audio_as_parse: Duplicate pin 0 (21) in association 1! Disabling association.
pcm0: <Realtek ALC269 (Right Analog Mic)> at nid 24 on hdaa0
pcm1: <Realtek ALC269 (Internal Analog Mic)> at nid 18 on hdaa0
hdacc1: <Intel (0x2883) HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel (0x2883) Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1
can't evaluate \134_SB_.PCI0.GFX0.ISP0._DCS - AE_NOT_FOUND
FreeBSD 12.0-CURRENT #0 r315864: Thu Mar 23 18:13:29 UTC 2017
CPU: Intel(R) Celeron(R) CPU  N3060  @ 1.60GHz (1600.05-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406c4  Family=0x6  Model=0x4c  Stepping=4
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
hdac0: <Intel (0x2284) HDA Controller> mem 0x91310000-0x91313fff at device 27.0 on pci0
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC269 (Right Analog)> at nid 21 and 24 on hdaa0
pcm1: <Realtek ALC269 (Internal Analog)> at nid 20 and 18 on hdaa0
hdacc1: <Intel (0x2883) HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel (0x2883) Audio Function Group> at nid 1 on hdacc1
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1
info: [drm] Initialized drm 1.1.0 20060810
Calibrating TSC clock ... TSC clock: 1600051020 Hz
CPU: Intel(R) Celeron(R) CPU  N3060  @ 1.60GHz (1600.05-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406c4  Family=0x6  Model=0x4c  Stepping=4
snd_unit_init() u=0x00ff8000 [512] d=0x00007c00 [32] c=0x000003ff [1024]
feeder_register: snd_unit=-1 snd_maxautovchans=16 latency=7 feeder_rate_min=1 feeder_rate_max=2016000 feeder_rate_round=25
ahci0: <AHCI SATA controller> port 0x1060-0x107f mem 0x9131a000-0x9131a7ff at device 19.0 on pci0
ahci0: attempting to allocate 1 MSI vectors (1 supported)
msi: routing MSI IRQ 256 to local APIC 0 vector 50
ahci0: using IRQ 256 for MSI
ahci0: AHCI v1.31 with 2 6Gbps ports, Port Multiplier not supported
ahci0: Caps: 64bit NCQ AL CLO 6Gbps PMD SSC PSC 32cmd 2ports
ahci0: Caps2: DESO SADM SDS APST
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich0: Caps: DSP
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich1: Caps: DSP
hdac0: <Intel (0x2284) HDA Controller> mem 0x91310000-0x91313fff at device 27.0 on pci0
hdac0: PCI card vendor: 0x17aa, device: 0x3905
hdac0: HDA Driver Revision: 20120126_0002
hdac0: Config options: on=0x00000000 off=0x00000000
hdac0: attempting to allocate 1 MSI vectors (1 supported)
msi: routing MSI IRQ 258 to local APIC 0 vector 51
hdac0: using IRQ 258 for MSI
hdac0: Caps: OSS 4, ISS 4, BSS 0, NSDO 1, 64bit, CORB 256, RIRB 256
ioapic0: routing intpin 45 (PCI IRQ 45) to lapic 0 vector 52
ahcich0: AHCI reset...
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
hdaa0: Subsystem ID: 0x17aa3802
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: 18 90a60140 4  0  Mic           Fixed Digital Internal   Unknown 1
hdaa0: 20 90170120 2  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 21 04211010 1  0  Headphones    Jack  1/8     Right      Black   0
hdaa0: 23 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0
hdaa0: 24 04a11030 3  0  Mic           Jack  1/8     Right      Black   0
hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: 29 40f4a105 0  5  Other         None  RCA     0x00       Res.A   1
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1
hdaa0: Patching widget caps nid=29 0x00400400 -> 0x00700400
hdaa0: Patched pins configuration:
hdaa0: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa0: 18 90a60140 4  0  Mic           Fixed Digital Internal   Unknown 1
hdaa0: 20 90170120 2  0  Speaker       Fixed Analog  Internal   Unknown 1
hdaa0: 21 04211010 1  0  Headphones    Jack  1/8     Right      Black   0
hdaa0: 23 40000000 0  0  Line-out      None  Unknown 0x00       Unknown 0 DISA
hdaa0: 24 04a11030 3  0  Mic           Jack  1/8     Right      Black   0
hdaa0: 25 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 26 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 27 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 30 411111f0 15 0  Speaker       None  1/8     Rear       Black   1 DISA
hdaa0: 4 associations found:
hdaa0: Association 0 (1) out:
hdaa0:  Pin nid=21 seq=0
hdaa0: Association 1 (2) out:
hdaa0:  Pin nid=20 seq=0
hdaa0: Association 2 (3) in:
hdaa0:  Pin nid=24 seq=0
hdaa0: Association 3 (4) in:
hdaa0:  Pin nid=18 seq=0
hdaa0: Tracing association 0 (1)
hdaa0:  Pin 21 traced to DAC 2
hdaa0: Association 0 (1) trace succeeded
hdaa0: Tracing association 1 (2)
hdaa0:  Pin 20 traced to DAC 3
hdaa0: Association 1 (2) trace succeeded
hdaa0: Tracing association 2 (3)
hdaa0:  Pin 24 traced to ADC 8
hdaa0: Association 2 (3) trace succeeded
hdaa0: Tracing association 3 (4)
hdaa0:  Pin 18 traced to ADC 9
hdaa0: Association 3 (4) trace succeeded
hdaa0: Looking for additional DAC for association 0 (1)
hdaa0: Looking for additional DAC for association 1 (2)
hdaa0: Looking for additional ADC for association 2 (3)
hdaa0: Looking for additional ADC for association 3 (4)
hdaa0: Tracing input monitor
hdaa0:  Tracing nid 11 to out
hdaa0:  nid 11 is input monitor
hdaa0:  Tracing nid 34 to out
hdaa0:  Tracing nid 35 to out
hdaa0: Tracing other input monitors
hdaa0:  Tracing nid 18 to out
hdaa0:  Tracing nid 24 to out
hdaa0: Tracing beeper
hdaa0: Pin sense: nid=21 sense=0x80000000 (connected)
hdaa0: Pin sense: nid=24 sense=0x80000000 (connected)
hdaa0: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm0: <Realtek ALC269 (Right Analog)> at nid 21 and 24 on hdaa0
pcm0: Playback:
pcm0:      Stream cap: 0x00000001 PCM
pcm0:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
pcm0:             DAC: 2
pcm0: 
pcm0:     nid=21 [pin: Headphones (Black Jack)]
pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
pcm0:              + <- nid=2 [audio output] [src: pcm]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
pcm0: 
pcm0: Record:
pcm0:      Stream cap: 0x00000001 PCM
pcm0:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
pcm0:             ADC: 8
pcm0: 
pcm0:     nid=8 [audio input]
pcm0:       + <- nid=35 [audio mixer] [src: speaker, mic, mix]
pcm0:              + <- nid=24 [pin: Mic (Black Jack)] [src: mic]
pcm0:              + <- nid=29 [beep widget] [src: speaker]
pcm0:              + <- nid=11 [audio mixer] [src: mix]
pcm0: 
pcm0: Input Mix:
pcm0: 
pcm0:     nid=11 [audio mixer]
pcm0:       + <- nid=24 [pin: Mic (Black Jack)] [src: mic]
pcm0:       + <- nid=29 [beep widget] [src: speaker]
pcm0: 
pcm0: Master Volume (OSS: vol): -65/0dB
pcm0:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
pcm0:    +- ctl 10 (nid  12 in   0): mute
pcm0:    +- ctl 11 (nid  12 in   1): mute
pcm0:    +- ctl 18 (nid  21 in ):    mute
pcm0: 
pcm0: PCM Volume (OSS: pcm): -65/0dB
pcm0:    +- ctl  1 (nid   2 out):    -65/0dB (88 steps)
pcm0:    +- ctl 10 (nid  12 in   0): mute
pcm0: 
pcm0: Microphone Volume (OSS: mic): 0/30dB
pcm0:    +- ctl  5 (nid  11 in   0): -34/12dB (32 steps) + mute
pcm0:    +- ctl 21 (nid  24 out):    0/30dB (4 steps)
pcm0:    +- ctl 35 (nid  35 in   0): mute
pcm0: 
pcm0: Speaker/Beep Volume (OSS: speaker): -34/12dB
pcm0:    +- ctl  9 (nid  11 in   4): -34/12dB (32 steps) + mute
pcm0:    +- ctl 39 (nid  35 in   4): mute
pcm0: 
pcm0: Recording Level (OSS: rec): -17/30dB
pcm0:    +- ctl  3 (nid   8 in   0): -17/30dB (64 steps) + mute
pcm0:    +- ctl 35 (nid  35 in   0): mute
pcm0:    +- ctl 39 (nid  35 in   4): mute
pcm0:    +- ctl 40 (nid  35 in   5): mute
pcm0: 
pcm0: Input Mix Level (OSS: mix): -34/12dB
pcm0:    +- ctl  5 (nid  11 in   0): -34/12dB (32 steps) + mute
pcm0:    +- ctl  9 (nid  11 in   4): -34/12dB (32 steps) + mute
pcm0:    +- ctl 11 (nid  12 in   1): mute
pcm0:    +- ctl 40 (nid  35 in   5): mute
pcm0: 
pcm0: Input Monitoring Level (OSS: igain): 0/0dB
pcm0:    +- ctl 11 (nid  12 in   1): mute
pcm0: 
pcm0: Mixer "vol":
pcm0: Mixer "pcm":
pcm0: Mixer "speaker":
pcm0: Mixer "mic":
pcm0: Mixer "mix":
pcm0: Mixer "rec":
pcm0: Mixer "igain":
pcm0: Mixer "ogain":
pcm0: Playback channel set is: Front Left, Front Right, 
pcm0: Playback channel matrix is: 2.0 (connected)
pcm0: Automatically set rec source to: mic
pcm0: Recording channel set is: Front Left, Front Right, 
pcm0: Recording channel matrix is: 2.0 (connected)
random: harvesting attach, 8 bytes (4 bits) from pcm0
pcm1: <Realtek ALC269 (Internal Analog)> at nid 20 and 18 on hdaa0
pcm1: Playback:
pcm1:      Stream cap: 0x00000001 PCM
pcm1:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
pcm1:             DAC: 3
pcm1: 
pcm1:     nid=20 [pin: Speaker (Fixed)]
pcm1:       + <- nid=13 [audio mixer] [src: pcm, mix]
pcm1:              + <- nid=3 [audio output] [src: pcm]
pcm1:              + <- nid=11 [audio mixer] [src: mix]
pcm1: 
pcm1: Record:
pcm1:      Stream cap: 0x00000001 PCM
pcm1:         PCM cap: 0x000e0560 16 20 24 bits, 44 48 96 192 KHz
pcm1:             ADC: 9
pcm1: 
pcm1:     nid=9 [audio input]
pcm1:       + <- nid=34 [audio mixer] [src: speaker, monitor]
pcm1:              + <- nid=29 [beep widget] [src: speaker]
pcm1:              + <- nid=18 [pin: Mic (Fixed)] [src: monitor]
pcm1: 
pcm1: Master Volume (OSS: vol): -65/0dB
pcm1:    +- ctl  2 (nid   3 out):    -65/0dB (88 steps)
pcm1:    +- ctl 12 (nid  13 in   0): mute
pcm1:    +- ctl 13 (nid  13 in   1): mute
pcm1:    +- ctl 17 (nid  20 in ):    mute
pcm1: 
pcm1: PCM Volume (OSS: pcm): -65/0dB
pcm1:    +- ctl  2 (nid   3 out):    -65/0dB (88 steps)
pcm1:    +- ctl 12 (nid  13 in   0): mute
pcm1: 
pcm1: Microphone2 Volume (OSS: monitor): 0/30dB
pcm1:    +- ctl 16 (nid  18 out):    0/30dB (4 steps)
pcm1:    +- ctl 34 (nid  34 in   6): mute
pcm1: 
pcm1: Speaker/Beep Volume (OSS: speaker)
pcm1:    +- ctl 32 (nid  34 in   4): mute
pcm1: 
pcm1: Recording Level (OSS: rec): -17/30dB
pcm1:    +- ctl  4 (nid   9 in   0): -17/30dB (64 steps) + mute
pcm1:    +- ctl 16 (nid  18 out):    0/30dB (4 steps)
pcm1:    +- ctl 32 (nid  34 in   4): mute
pcm1:    +- ctl 34 (nid  34 in   6): mute
pcm1: 
pcm1: Input Mix Level (OSS: mix)
pcm1:    +- ctl 13 (nid  13 in   1): mute
pcm1: 
pcm1: Input Monitoring Level (OSS: igain): 0/0dB
pcm1:    +- ctl 13 (nid  13 in   1): mute
pcm1: 
pcm1: Mixer "vol":
pcm1: Mixer "pcm":
pcm1: Mixer "rec":
pcm1: Mixer "igain":
pcm1: Mixer "ogain":
pcm1: Mixer "monitor":
pcm1: Playback channel set is: Front Left, Front Right, 
pcm1: Playback channel matrix is: 2.0 (unknown)
pcm1: Automatically set rec source to: monitor
pcm1: Recording channel set is: Front Left, Front Right, 
pcm1: Recording channel matrix is: 2.0 (unknown)
hdacc1: <Intel (0x2883) HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel (0x2883) Audio Function Group> at nid 1 on hdacc1
hdaa1: Subsystem ID: 0x80860101
hdaa1: NumGPIO=0 NumGPO=0 NumGPI=0 GPIWake=0 GPIUnsol=0
hdaa1: Original pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1:  7 58560030 3  0  Digital-out   None  Digital 0x18       Unknown 0
hdaa1: Patched pins configuration:
hdaa1: nid   0x    as seq device       conn  jack    loc        color   misc
hdaa1:  5 18560010 1  0  Digital-out   Jack  Digital 0x18       Unknown 0
hdaa1:  6 58560020 2  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1:  7 58560030 3  0  Digital-out   None  Digital 0x18       Unknown 0 DISA
hdaa1: 1 associations found:
hdaa1: Association 0 (1) out:
hdaa1:  Pin nid=5 seq=0
hdaa1: Tracing association 0 (1)
hdaa1:  Pin 5 traced to DAC 2
hdaa1: Association 0 (1) trace succeeded
hdaa1: Looking for additional DAC for association 0 (1)
hdaa1: Tracing input monitor
hdaa1: Tracing other input monitors
hdaa1: Tracing beeper
hdaa1: FG config/quirks: forcestereo ivref50 ivref80 ivref100 ivref
pcm2: <Intel (0x2883) (HDMI/DP 8ch)> at nid 5 on hdaa1
pcm2: Playback:
pcm2:      Stream cap: 0x00000005 AC3 PCM
pcm2:         PCM cap: 0x001e07f0 16 20 24 32 bits, 32 44 48 88 96 176 192 KHz
pcm2:             DAC: 2
pcm2: 
pcm2:     nid=5 [pin: Digital-out (Jack)]
pcm2:       + <- nid=2 [audio output] [src: pcm]
pcm2: 
pcm2: Master Volume (OSS: vol): 0/0dB
pcm2:    +- ctl  1 (nid   5 in ):    mute
pcm2: 
pcm2: PCM Volume (OSS: pcm): 0/0dB
pcm2:    +- ctl  1 (nid   5 in ):    mute
pcm2: 
pcm2: Mixer "vol":
pcm2: Mixer "pcm":
pcm2: Soft PCM mixer ENABLED
pcm2: Playback channel matrix is: unknown, assuming 7.1 (disconnected)
hdac0: poll interval 1000 -> 500 ticks

인용하다:snd_hda FreeBSD 12.0

답변1

Lenovo에서 FreeBSD를 사용하여 다시 시작했으며 현재는 FreeBSD 12.0을 사용하고 있습니다. 이전 답변은 완전히 정확하지는 않지만 올바른 방향으로 나아갔습니다.

사운드가 제대로 작동하려면 상자를 풀고 오디오 잭에 연결된 헤드폰으로 전환하세요.

  • sysctl.confhw.snd.default_unit 명령은 다음에서 가져와야 합니다.
  • 기본 as/audioset은 2이므로 1 대신 2를 사용해야 합니다. 시도해 보니 as=1확실히 예상대로 작동하지 않습니다.

기본 sysctl육안 검사, 질문/이전 게시물 및 @Trevor의 답변을 바탕으로 Lenovo Ideapad 100S IBR이 사운드가 작동하고 자동으로 헤드폰으로 전환되도록 하는 전체 구성은 다음과 같습니다.

파일: /etc/sysctl.conf

# Without this sound does not even work, both in speakers or headphones
dev.hdac.0.polling=1

파일:/boot/loader.conf

snd_hda_load="YES"
mixer_enable="YES"
sound_load="YES"

파일:/boot/device.hints

hint.hdaa.1.nid20.config="as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal"
hint.hdaa.0.nid21.config="as=2 seq=15 device=Headphones conn=Jack"

추신. 문서화 목적으로만 사용되는 기본 시스템 구성은 다음과 같습니다.

# sysctl -a | egrep "nid20|nid21" | grep original
dev.hdaa.0.nid21_original: 0x04211010 as=1 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Right color=Black misc=0
dev.hdaa.0.nid20_original: 0x90170120 as=2 seq=0 device=Speaker conn=Fixed ctype=Analog loc=Internal color=Unknown misc=1

답변2

입력할 때:

sudo sysctl hw.snd.default_unit=1

또는

sudo sysctl hw.snd.default_unit=0

pcm1과 pcm0 사이를 전환하고 있습니다.

pcm0 및 pcm1에 대한 "Playback:" 아래의 dmesg 출력을 보면 계층 구조처럼 보이는 것을 볼 수 있습니다.

line 124:    pcm0:     nid=21 [pin: Headphones (Black Jack)]
             pcm0:       + <- nid=12 [audio mixer] [src: pcm, mix]
             pcm0:              + <- nid=2 [audio output] [src: pcm]
             pcm0:              + <- nid=11 [audio mixer] [src: mix]

line 200:    pcm1:     nid=20 [pin: Speaker (Fixed)]
             pcm1:       + <- nid=13 [audio mixer] [src: pcm, mix]
             pcm1:              + <- nid=3 [audio output] [src: pcm]
             pcm1:              + <- nid=11 [audio mixer] [src: mix]

*nid=21의 헤드폰(nid=12, nid=2 및 nid=11에 매핑됨)

*nid=20의 스피커(nid=13, nid=3 및 nid=11에 매핑됨)

BSD의 경우자동 전환이들 사이에는 모두 동일한 (a)오디오 (들)세트의 구성원이어야 합니다.

"if=1"오디오 세트는 1과 같습니다.

"순서"주문하다서수(0,1,2,...15)

이전에 /boot/device.hints 편집을 시도했습니다.

[ERROR!!]  hint.hdaa.0.nid20.config="as=1 seq=0 device=Speaker"
[CORRECT]  hint.hdaa.0.nid21.config="as=1 seq=15 device=Headphones"

그리고:

[CORRECT]  hint.hdaa.1.nid20.config="as=1 seq=0"
[ERROR!!]  hint.hdaa.1.nid21.config="as=1 seq=15 device=Headphones"

기억하다:

*the Headphones are on pcm0    (pcm0) = hint.hdaa.0
*the Speaker is on pcm1        (pcm1) = hint.hdaa.1

해결책: 동일한 (a)audio(s)et에 넣으려면 "as" 키워드 인수를 사용하십시오.

/boot/device.hints

hint.hdaa.1.nid20.config="as=1 seq=0"
hint.hdaa.0.nid21.config="as=1 seq=15 misc=0"

"misc=0"은 아마도 불필요할 것입니다. 나는 이것이 하드웨어에 특정한 것이라고 생각합니다.

답변3

감사해요. 여기서도 잘 작동합니다. 차이점은 내 PCM 주소입니다.

pcm0: <Realtek ALC1220 (Analog 2.0+HP/2.0)> at nid 20,27 and 24,26 on hdaa0
pcm1: <Realtek ALC1220 (Front Analog Mic)> at nid 25 on hdaa0

그래서 나는 다음과 같이 변경했습니다 /boot/device.hint.

hint.hdaa.1.nid20.config="as=1 seq=0"
hint.hdaa.0.nid27.config="as=1 seq=15"

기적적으로 작동합니다.

관련 정보