This is current/amd64 (dmesg below),
running /usr/bin/sndiod -f rsnd/0 -F rsnd/1

While the -F feature works with most USB audio devices I have tried,
it does not make the switch to use the -F device
with this USB camera with a builtin microphone.
It's an Audom AF640 and it attaches as follows:

uvideo0 at uhub0 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub0 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0

I can confirm that both the camera and the mike themselves work.
After plugging it in, sndioctl says

input.level=0.000
input.mute=1
output.level=0.980
output.mute=0
server.device=0
app/rec0.level=1.000

Notice the server.device=0, meaning it is still using snd/0.
Notice the zero input level and the muted input.
Is this intended?

If I plug a Sennheiser haedset instead, sndioctl says

input.level=0.800
input.mute=0
output.level=0.800
output.mute=0
server.device=1
app/rec0.level=1.000

switching to the USB device plugged in.

Is it because the camera's mike has no output channels?
"channels: 0 play, 1 rec, 2 ctls" - indeed, it only
records mono and has no playback capabilities.

According to the manpage

-F device
        Specify an alternate device to use.  If it doesn't work,
        the one given with the last -f or -F options will be used.
        For instance, specifying a USB device following a PCI device
        allows sndiod to use the USB one preferably when it's
        connected and to fall back to the PCI one when it's
        disconnected. Alternate devices may be switched with the
        server.device control of the sndioctl(1) utility.

Is the -F device required to have at least one playback
and pne record channel to "work"?

Switching with a manual "sndioctl server.device=1"
doesn't work either: sndioctl still shows server.device=0

Is this intended?
How can I further debug this?

        Jan



OpenBSD 6.8-current (GENERIC.MP) #0: Sun Nov 22 17:22:47 CET 2020
    h...@lenovo.stare.cz:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8463781888 (8071MB)
avail mem = 8191975424 (7812MB)
random: good seed from bootblocks
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.4 @ 0xe0010 (80 entries)
bios0: vendor LENOVO version "7UET94WW (3.24 )" date 10/17/2012
bios0: LENOVO 64741EG
acpi0 at bios0: ACPI 3.0
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET SLIC BOOT ASF! SSDT TCPA SSDT 
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP0(S4) EXP1(S4) EXP2(S4) 
EXP3(S4) EXP4(S4) PCI1(S4) USB0(S3) USB3(S3) USB5(S3) EHC0(S3) EHC1(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.40 MHz, 06-17-06
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu0: 3MB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 7 var ranges, 88 fixed ranges
cpu0: apic clock running at 266MHz
cpu0: mwait min=64, max=64, C-substates=0.2.2.2.2.1.3, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM)2 Duo CPU P8400 @ 2.26GHz, 2261.01 MHz, 06-17-06
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,NXE,LONG,LAHF,PERF,SENSOR,MELTDOWN
cpu1: 3MB 64b/line 8-way L2 cache
cpu1: smt 0, core 1, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins, remapped
acpimcfg0 at acpi0
acpimcfg0: addr 0xe0000000, bus 0-63
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (AGP_)
acpiprt2 at acpi0: bus 2 (EXP0)
acpiprt3 at acpi0: bus 3 (EXP1)
acpiprt4 at acpi0: bus -1 (EXP2)
acpiprt5 at acpi0: bus 5 (EXP3)
acpiprt6 at acpi0: bus 13 (EXP4)
acpiprt7 at acpi0: bus 21 (PCI1)
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpipci0 at acpi0 PCI0: 0x00000000 0x00000011 0x00000001
acpicmos0 at acpi0
tpm0 at acpi0 TPM_ addr 0xfed40000/0x5000, device 0x10208086 rev 0x6
acpibat0 at acpi0: BAT0 model "92P1137" serial    57 type LION oem "SANYO"
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0: version 1.0
"PNP0C14" at acpi0 not configured
acpicpu0 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpicpu1 at acpi0: !C3(100@57 mwait.3@0x30), !C2(500@1 mwait.1@0x10), C1(1000@1 
mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for USB0, USB3, USB5, EHC0, EHC1
acpitz0 at acpi0: critical temperature is 127 degC
acpitz1 at acpi0: critical temperature is 100 degC
acpidock0 at acpi0: GDCK not docked (0)
acpivideo0 at acpi0: VID_
acpivout0 at acpivideo0: LCD0
acpivideo1 at acpi0: VID_
cpu0: Enhanced SpeedStep 2261 MHz: speeds: 2267, 2266, 1600, 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel GM45 Host" rev 0x07
inteldrm0 at pci0 dev 2 function 0 "Intel GM45 Video" rev 0x07
drm0 at inteldrm0
intagp0 at inteldrm0
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0: apic 1 int 16, GM45, gen 4
"Intel GM45 Video" rev 0x07 at pci0 dev 2 function 1 not configured
"Intel GM45 HECI" rev 0x07 at pci0 dev 3 function 0 not configured
puc0 at pci0 dev 3 function 3 "Intel GM45 KT" rev 0x07: ports: 16 com
com4 at puc0 port 0 apic 1 int 17: ns16550a, 16 byte fifo
com4: probed fifo depth: 15 bytes
em0 at pci0 dev 25 function 0 "Intel ICH9 IGP M AMT" rev 0x03: msi, address 
00:1c:25:9b:0a:23
uhci0 at pci0 dev 26 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 20
uhci1 at pci0 dev 26 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 21
uhci2 at pci0 dev 26 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 22
ehci0 at pci0 dev 26 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
azalia0 at pci0 dev 27 function 0 "Intel 82801I HD Audio" rev 0x03: msi
azalia0: codecs: Conexant CX20561
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 82801I PCIE" rev 0x03: msi
pci1 at ppb0 bus 2
ppb1 at pci0 dev 28 function 1 "Intel 82801I PCIE" rev 0x03: msi
pci2 at ppb1 bus 3
iwn0 at pci2 dev 0 function 0 "Intel WiFi Link 5100" rev 0x00: msi, MIMO 1T2R, 
MoW, address 00:26:c6:4b:63:e0
ppb2 at pci0 dev 28 function 3 "Intel 82801I PCIE" rev 0x03: msi
pci3 at ppb2 bus 5
ppb3 at pci0 dev 28 function 4 "Intel 82801I PCIE" rev 0x03: msi
pci4 at ppb3 bus 13
uhci3 at pci0 dev 29 function 0 "Intel 82801I USB" rev 0x03: apic 1 int 16
uhci4 at pci0 dev 29 function 1 "Intel 82801I USB" rev 0x03: apic 1 int 17
uhci5 at pci0 dev 29 function 2 "Intel 82801I USB" rev 0x03: apic 1 int 18
ehci1 at pci0 dev 29 function 7 "Intel 82801I USB" rev 0x03: apic 1 int 19
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 configuration 1 interface 0 "Intel EHCI root hub" rev 2.00/1.00 
addr 1
ppb4 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0x93
pci5 at ppb4 bus 21
cbb0 at pci5 dev 0 function 0 "Ricoh 5C476 CardBus" rev 0xba: apic 1 int 16
"Ricoh 5C832 Firewire" rev 0x04 at pci5 dev 0 function 1 not configured
sdhc0 at pci5 dev 0 function 2 "Ricoh 5C822 SD/MMC" rev 0x21: apic 1 int 18
sdhc0: SDHC 1.0, 33 MHz base clock
sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed
"Ricoh 5C843 MMC" rev 0x11 at pci5 dev 0 function 3 not configured
"Ricoh 5C592 Memory Stick" rev 0x11 at pci5 dev 0 function 4 not configured
"Ricoh 5C852 xD" rev 0x11 at pci5 dev 0 function 5 not configured
cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 22 device 0 cacheline 0x10, lattimer 0xb0
pcmcia0 at cardslot0
pcib0 at pci0 dev 31 function 0 "Intel 82801IEM LPC" rev 0x03
ahci0 at pci0 dev 31 function 2 "Intel 82801I AHCI" rev 0x03: msi, AHCI 1.2
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, OCZ-AGILITY3, 2.15> naa.5e83a97fc6465c9d
sd0: 114473MB, 512 bytes/sector, 234441648 sectors, thin
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GSA-U20N, HX11> removable
ichiic0 at pci0 dev 31 function 3 "Intel 82801I SMBus" rev 0x03: apic 1 int 23
iic0 at ichiic0
usb2 at uhci0: USB revision 1.0
uhub2 at usb2 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb3 at uhci1: USB revision 1.0
uhub3 at usb3 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb4 at uhci2: USB revision 1.0
uhub4 at usb4 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb5 at uhci3: USB revision 1.0
uhub5 at usb5 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb6 at uhci4: USB revision 1.0
uhub6 at usb6 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
usb7 at uhci5: USB revision 1.0
uhub7 at usb7 configuration 1 interface 0 "Intel UHCI root hub" rev 1.00/1.00 
addr 1
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.0, 0x1c0b1 0xb00000 0x0 0xd04791 0x20000
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
ugen0 at uhub3 port 1 "AuthenTec Fingerprint Sensor" rev 2.00/17.03 addr 2
ugen1 at uhub3 port 2 "Lenovo Computer Corp ThinkPad Bluetooth with Enhanced 
Data Rate II" rev 2.00/3.99 addr 3
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
root on sd0a (7e642c4522750e51.a) swap on sd0b dump on sd0b
inteldrm0: 1280x800, 32bpp
wsdisplay0 at inteldrm0 mux 1: console (std, vt100 emulation), using wskbd0
wsdisplay0: screen 1-5 added (std, vt100 emulation)
uaudio0 at uhub2 port 1 configuration 1 interface 1 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 2 rec, 7 ctls
audio1 at uaudio0
uhidev0 at uhub2 port 1 configuration 1 interface 3 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uhidev0: iclass 3/0, 9 report ids
uhid0 at uhidev0 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=1, output=1, feature=0
uhid2 at uhidev0 reportid 4: input=0, output=38, feature=0
uhid3 at uhidev0 reportid 5: input=34, output=0, feature=0
uhid4 at uhidev0 reportid 6: input=0, output=36, feature=0
uhid5 at uhidev0 reportid 7: input=32, output=0, feature=0
uhid6 at uhidev0 reportid 8: input=1, output=0, feature=0
uhid7 at uhidev0 reportid 9: input=0, output=1, feature=0
uvideo0 at uhub1 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio1 at uhub1 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio1: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio2 at uaudio1
audio1 detached
uaudio0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhidev0 detached
video0 detached
uvideo0 detached
audio2 detached
uaudio1 detached
uvideo0 at uhub1 port 2 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 2 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
video0 detached
uvideo0 detached
audio1 detached
uaudio0 detached
uvideo0 at uhub1 port 2 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 2 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
video0 detached
uvideo0 detached
audio1 detached
uaudio0 detached
uaudio0 at uhub2 port 1 configuration 1 interface 1 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 2 rec, 7 ctls
audio1 at uaudio0
uhidev0 at uhub2 port 1 configuration 1 interface 3 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uhidev0: iclass 3/0, 9 report ids
uhid0 at uhidev0 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=1, output=1, feature=0
uhid2 at uhidev0 reportid 4: input=0, output=38, feature=0
uhid3 at uhidev0 reportid 5: input=34, output=0, feature=0
uhid4 at uhidev0 reportid 6: input=0, output=36, feature=0
uhid5 at uhidev0 reportid 7: input=32, output=0, feature=0
uhid6 at uhidev0 reportid 8: input=1, output=0, feature=0
uhid7 at uhidev0 reportid 9: input=0, output=1, feature=0
uvideo0 at uhub1 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio1 at uhub1 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio1: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio2 at uaudio1
audio1 detached
uaudio0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhidev0 detached
video0 detached
uvideo0 detached
audio2 detached
uaudio1 detached
uvideo0 at uhub1 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
video0 detached
uvideo0 detached
audio1 detached
uaudio0 detached
uaudio0 at uhub2 port 1 configuration 1 interface 1 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 2 rec, 7 ctls
audio1 at uaudio0
uhidev0 at uhub2 port 1 configuration 1 interface 3 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uhidev0: iclass 3/0, 9 report ids
uhid0 at uhidev0 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=1, output=1, feature=0
uhid2 at uhidev0 reportid 4: input=0, output=38, feature=0
uhid3 at uhidev0 reportid 5: input=34, output=0, feature=0
uhid4 at uhidev0 reportid 6: input=0, output=36, feature=0
uhid5 at uhidev0 reportid 7: input=32, output=0, feature=0
uhid6 at uhidev0 reportid 8: input=1, output=0, feature=0
uhid7 at uhidev0 reportid 9: input=0, output=1, feature=0
audio1 detached
uaudio0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhidev0 detached
uvideo0 at uhub1 port 2 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub1 port 2 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
video0 detached
uvideo0 detached
audio1 detached
uaudio0 detached
uvideo0 at uhub0 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub0 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0
video0 detached
uvideo0 detached
audio1 detached
uaudio0 detached
uaudio0 at uhub2 port 1 configuration 1 interface 1 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uaudio0: class v1, full-speed, sync, channels: 2 play, 2 rec, 7 ctls
audio1 at uaudio0
uhidev0 at uhub2 port 1 configuration 1 interface 3 "Sennheiser Sennheiser SC 
160 USB" rev 2.00/0.18 addr 2
uhidev0: iclass 3/0, 9 report ids
uhid0 at uhidev0 reportid 1: input=1, output=0, feature=0
uhid1 at uhidev0 reportid 2: input=1, output=1, feature=0
uhid2 at uhidev0 reportid 4: input=0, output=38, feature=0
uhid3 at uhidev0 reportid 5: input=34, output=0, feature=0
uhid4 at uhidev0 reportid 6: input=0, output=36, feature=0
uhid5 at uhidev0 reportid 7: input=32, output=0, feature=0
uhid6 at uhidev0 reportid 8: input=1, output=0, feature=0
uhid7 at uhidev0 reportid 9: input=0, output=1, feature=0
audio1 detached
uaudio0 detached
uhid0 detached
uhid1 detached
uhid2 detached
uhid3 detached
uhid4 detached
uhid5 detached
uhid6 detached
uhid7 detached
uhidev0 detached
uvideo0 at uhub0 port 1 configuration 1 interface 0 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
video0 at uvideo0
uaudio0 at uhub0 port 1 configuration 1 interface 3 "Sunplus IT Co Full HD 
webcam" rev 2.00/0.05 addr 2
uaudio0: class v1, high-speed, sync, channels: 0 play, 1 rec, 2 ctls
audio1 at uaudio0

Reply via email to