Can't select SPDIF input of USB sound card with 14.x

I am no longer able to select "pcm2" (which is SPDIF input on my USB sound card) nor "line2" as recording source on 14.1-R (nor 14.0-R). mixer(8) does not report these input sources anymore:

sh:
# mixer
pcm0:mixer: <vendor 0x0d8c USB Sound Device> on uaudio0 (play/rec) (default)
    vol       = 0.75:0.75     pbk
    pcm       = 0.75:0.75     pbk
    line      = 0.75:0.75     rec
    mic       = 0.25:0.25     rec src

Trying to set pcm as recsrc:

sh:
# mixer pcm.recsrc=set
mixer: pcm.recsrc=set: Operation not supported by device

usbconfig and /dev/sndstat:

sh:
# usbconfig 
...
ugen0.3: <CM106 Like Sound Device C-Media Electronics, Inc.> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

# cat /dev/sndstat
Installed devices:
pcm0: <vendor 0x0d8c USB Sound Device> (play/rec) default
No devices installed from userspace.

Various external USB sound cards from different vendors show that same behaviour. Any ideas how to select SPDIF input with 14.x?

On another host running 13.3 from memstick:

sh:
# mixer -h
usage: mixer [-f device] [-s | -S] [dev [+|-][voll[:[+|-]volr]] ...
       mixer [-f device] [-s | -S] recsrc ...
       mixer [-f device] [-s | -S] {^|+|-|=}rec rdev ...
 devices: vol, pcm, line, mic
 rec devices: line, mic, pcm2, line1
# mixer =rec pcm2
# mixer recsrc
Recording source: pcm2

sh:
# usbconfig
...
ugen0.10: <vendor 0x0d8c USB Sound Device> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (500mA)

# cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC257 (Analog 2.0+HP/2.0)> (play/rec) default
pcm1: <Realtek ALC257 (Right Analog Mic)> (rec)
pcm2: <Intel Kaby Lake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (play/rec)
No devices installed from userspace.

# sysctl hw.snd.default_unit
hw.snd.default_unit: 3
 
Any ideas how to select SPDIF input with 14.x?
Try setting a usb quirk.

usb_quirk(4)
Rich (BB code):
DESCRIPTION
     The usb_quirk module provides support for dynamically adding and removing
     quirks for USB devices with usbconfig(8).
    ...
    UQ_AU_SET_SPDIF_CM6206
             audio device needs special programming to enable S/PDIF audio
             output
I says for output, it might have an effect for rec as well.

See EXAMPLES section at the end of the manual how to proceed.

The usb_quirk module is in GENERIC kernel, no loading necessary.

If that doesn't work, open a PR.
 
Thanks for the hint. Tried several usb quirks from usb_quirk.h, including UQ_AU_SET_SPDIF_CM6206. Reset sound card, set quirks again. Added them to loader.conf along with usb_quirk_load="YES", rebooted host. But nothing changed. Opening a PR.
 
Back
Top