Using existing FreeBSD facilities, is it possible to issue a command to force a change of the current sound output device? If so, how?
My problem pertains to switching sound output from an in-built desktop sound speaker to headphones plugged in through the front jack socket.
Here are the possibly relevant outputs:
I know I can change the default pcm device so that I get sound only from the speakers or only from the jakc headphones, but can I force this change while the OS is already running?
Thanks for reading and help!
~Andy
My problem pertains to switching sound output from an in-built desktop sound speaker to headphones plugged in through the front jack socket.
Here are the possibly relevant outputs:
Code:
device snd_hda
dev.pcm.4.%parent: hdaa1
dev.pcm.3.%parent: hdaa1
dev.pcm.2.%parent: hdaa1
dev.pcm.1.%parent: hdaa0
dev.pcm.0.%parent: hdaa0
dev.hdaa.1.reconfig: 0
dev.hdaa.1.gpo_config:
dev.hdaa.1.gpo_state:
dev.hdaa.1.gpio_config: 0=keep 1=keep
dev.hdaa.1.gpio_state: 0=disabled 1=disabled
dev.hdaa.1.gpi_state:
dev.hdaa.1.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.1.nid38: vendor widget [DISABLED]
dev.hdaa.1.nid37: vendor widget [DISABLED]
dev.hdaa.1.nid36: vendor widget [DISABLED]
dev.hdaa.1.nid35: audio mixer
dev.hdaa.1.nid34: audio mixer
dev.hdaa.1.nid33: vendor widget [DISABLED]
dev.hdaa.1.nid32: vendor widget [DISABLED]
dev.hdaa.1.nid31: vendor widget [DISABLED]
dev.hdaa.1.nid30_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid30: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid29_original: 0x40028201 as=0 seq=1 device=Line-out conn=None ctype=1/4 loc=0x00 color=Purple misc=2
dev.hdaa.1.nid29_config: 0x40028201 as=0 seq=1 device=Line-out conn=None ctype=1/4 loc=0x00 color=Purple misc=2
dev.hdaa.1.nid29: beep widget
dev.hdaa.1.nid28_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid28_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid28: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid27_original: 0x02211030 as=3 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Front color=Black misc=0
dev.hdaa.1.nid27_config: 0x02211030 as=3 seq=0 device=Headphones conn=Jack ctype=1/8 loc=Front color=Black misc=0
dev.hdaa.1.nid27: pin: Headphones (Black Jack)
dev.hdaa.1.nid26_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid26: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid25_original: 0x02a11c50 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Black misc=12
dev.hdaa.1.nid25_config: 0x02a11c50 as=5 seq=0 device=Mic conn=Jack ctype=1/8 loc=Front color=Black misc=12
dev.hdaa.1.nid25: pin: Mic (Black Jack)
dev.hdaa.1.nid24_original: 0x01813c40 as=4 seq=0 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=12
dev.hdaa.1.nid24_config: 0x01813c40 as=4 seq=0 device=Line-in conn=Jack ctype=1/8 loc=Rear color=Blue misc=12
dev.hdaa.1.nid24: pin: Line-in (Blue Jack)
dev.hdaa.1.nid23: vendor widget [DISABLED]
dev.hdaa.1.nid22_original: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid22_config: 0x411111f0 as=15 seq=0 device=Speaker conn=None ctype=1/8 loc=Rear color=Black misc=1
dev.hdaa.1.nid22: pin: Speaker (None) [DISABLED]
dev.hdaa.1.nid21_original: 0x99130120 as=2 seq=0 device=Speaker conn=Fixed ctype=ATAPI loc=Onboard color=Unknown misc=1
dev.hdaa.1.nid21_config: 0x99130120 as=2 seq=0 device=Speaker conn=Fixed ctype=ATAPI loc=Onboard color=Unknown misc=1
dev.hdaa.1.nid21: pin: Speaker (Fixed)
dev.hdaa.1.nid20_original: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid20_config: 0x01014010 as=1 seq=0 device=Line-out conn=Jack ctype=1/8 loc=Rear color=Green misc=0
dev.hdaa.1.nid20: pin: Line-out (Green Jack)
dev.hdaa.1.nid19: vendor widget [DISABLED]
dev.hdaa.1.nid18: vendor widget [DISABLED]
dev.hdaa.1.nid17: vendor widget [DISABLED]
dev.hdaa.1.nid16: vendor widget [DISABLED]
dev.hdaa.1.nid15: vendor widget [DISABLED]
dev.hdaa.1.nid14: audio mixer
dev.hdaa.1.nid13: audio mixer
dev.hdaa.1.nid12: audio mixer
dev.hdaa.1.nid11: audio mixer
dev.hdaa.1.nid10: vendor widget [DISABLED]
dev.hdaa.1.nid9: audio input
dev.hdaa.1.nid8: audio input
dev.hdaa.1.nid7: vendor widget [DISABLED]
dev.hdaa.1.nid6: audio output [DISABLED]
dev.hdaa.1.nid5: vendor widget [DISABLED]
dev.hdaa.1.nid4: audio output
dev.hdaa.1.nid3: audio output
dev.hdaa.1.nid2: audio output
dev.hdaa.1.%parent: hdacc1
dev.hdaa.1.%pnpinfo: type=0x01 subsystem=0x103c3647
dev.hdaa.1.%location: nid=1
dev.hdaa.1.%driver: hdaa
dev.hdaa.1.%desc: Realtek ALC662 Audio Function Group
dev.hdaa.0.reconfig: 0
dev.hdaa.0.gpo_config:
dev.hdaa.0.gpo_state:
dev.hdaa.0.gpio_config:
dev.hdaa.0.gpio_state:
dev.hdaa.0.gpi_state:
dev.hdaa.0.config: forcestereo,ivref50,ivref80,ivref100,ivref,vref
dev.hdaa.0.nid9: audio output
dev.hdaa.0.nid8: audio output
dev.hdaa.0.nid7_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid7: pin: Digital-out (None) [DISABLED]
dev.hdaa.0.nid6_original: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6_config: 0x585600f0 as=15 seq=0 device=Digital-out conn=None ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid6: pin: Digital-out (None) [DISABLED]
dev.hdaa.0.nid5_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid5: pin: Digital-out (Jack)
dev.hdaa.0.nid4_original: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4_config: 0x185600f0 as=15 seq=0 device=Digital-out conn=Jack ctype=Digital loc=0x18 color=Unknown misc=0
dev.hdaa.0.nid4: pin: Digital-out (Jack)
dev.hdaa.0.%parent: hdacc0
dev.hdaa.0.%pnpinfo: type=0x01 subsystem=0x1043847b
dev.hdaa.0.%location: nid=1
dev.hdaa.0.%driver: hdaa
dev.hdaa.0.%desc: NVIDIA (0x001c) Audio Function Group
dev.hdaa.%parent:
dev.hdacc.1.%parent: hdac1
dev.hdacc.1.%pnpinfo: vendor=0x10ec device=0x0662 revision=0x01 stepping=0x01
dev.hdacc.1.%location: cad=0
dev.hdacc.1.%driver: hdacc
dev.hdacc.1.%desc: Realtek ALC662 HDA CODEC
dev.hdacc.0.%parent: hdac0
dev.hdacc.0.%pnpinfo: vendor=0x10de device=0x001c revision=0x01 stepping=0x00
dev.hdacc.0.%location: cad=0
dev.hdacc.0.%driver: hdacc
dev.hdacc.0.%desc: NVIDIA (0x001c) HDA CODEC
dev.hdacc.%parent:
dev.hdac.1.polling: 0
dev.hdac.1.pindump: 0
dev.hdac.1.%parent: pci0
dev.hdac.1.%pnpinfo: vendor=0x8086 device=0x3a6e subvendor=0x103c subdevice=0x3647 class=0x040300
dev.hdac.1.%location: slot=27 function=0
dev.hdac.1.%driver: hdac
dev.hdac.1.%desc: Intel 82801JD HDA Controller
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.%parent: pci1
dev.hdac.0.%pnpinfo: vendor=0x10de device=0x0e08 subvendor=0x1043 subdevice=0x847b class=0x040300
dev.hdac.0.%location: slot=0 function=1
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: NVIDIA GF119 HDA Controller
dev.hdac.%parent:
Code:
pcm0: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x001c) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC662 (Rear Analog)> (play/rec)
pcm3: <Realtek ALC662 (Analog)> (play/rec) default
pcm4: <Realtek ALC662 (Front Analog Headphones)> (play)
I know I can change the default pcm device so that I get sound only from the speakers or only from the jakc headphones, but can I force this change while the OS is already running?
Thanks for reading and help!
~Andy