Bug 282002 - audio/virtual_oss is misbehaving
Summary: audio/virtual_oss is misbehaving
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Christos Margiolis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-11 06:23 UTC by Marek Zarychta
Modified: 2024-10-15 11:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (christos)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marek Zarychta 2024-10-11 06:23:07 UTC
It's no longer possible to change the output device when virtual_oss is running. (ie. the command virtual_oss_cmd /dev/vdsp.ctl -O /dev/dsp{0,1,2) does not change it when the deamon is running). 
It has happened for quite a while in CURRENT, but it seems that stable/14 has been affected recently.

My rc.conf settings:
virtual_oss_enable="YES"
virtual_oss_dsp="-T /dev/sndstat -S -i 8 -C 12 -c 6 -r 48000 -b 32 -s 512 -O /dev/dsp2 -R /dev/dsp4 -c 2 -d dsp -c 12 -d vdsp -t vdsp.ctl"

and sysctl.conf:
hw.snd.default_unit=2

I cannot say when the breakage was introduced since I do not regularly build FreeBSD, but IIRC, it was in the first half of this year.
Comment 1 Christos Margiolis freebsd_committer freebsd_triage 2024-10-13 16:56:36 UTC
Hello Marek,

I cannot recall any recent patch to virtual_oss or sound(4) that modifies the device changing behavior. In fact, I ran your command on -CURRENT, played a track in the background, changed the device to another one with virtual_oss_cmd(8) and it all works correctly.

Could you provide more information? Are you sure your devices are all set up properly?
Comment 2 Marek Zarychta 2024-10-14 19:10:09 UTC
(In reply to Christos Margiolis from comment #1)
> In fact, I ran your command on -CURRENT, played a track in the background,
> changed the device to another one with virtual_oss_cmd(8) and it all works correctly.

Thank you for your time spent on testing this Christos. I can no longer reproduce this issue. Maybe unplugged USB audio devices were the culprits. It is also possible that I was testing it on www/chromium where I was able to change the output device in the past. Now Chromium behaves like www/firefox always did with its default PulseAudio backend. Perhaps the default Chromium's audio backend was changed some time ago - I have not investigated it.

So, yes, switching output with virtual_oss_cmd works as intended. Thank you for taking the maintainership of audio/virtual_oss Christos - not a widely used,  yet unique sound daemon in the ports tree.