Bug 246208 - dev/sound: SNDCTL_DSP_GETPLAYVOL does not work on vchans
Summary: dev/sound: SNDCTL_DSP_GETPLAYVOL does not work on vchans
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 01:52 UTC by Kevin Zheng
Modified: 2020-05-25 09:48 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2020-05-05 01:52:31 UTC
The ioctl SNDCTL_DSP_GETPLAYVOL gets the volume of the given device, see:

http://manuals.opensound.com/developer/SNDCTL_DSP_GETPLAYVOL.html

This ioctl works on clone devices (e.g. /dev/dsp, /dev/dsp0, /dev/dsp0) but returns EINVAL for vchan devices (e.g. /dev/dsp0.vp0).

It seems to me that this ioctl should work on vchans as well, for example, to query the volume on virtual channels.
Comment 1 Hans Petter Selasky freebsd_committer 2020-05-25 09:48:20 UTC
It might be that VCHANs, when created need to set the software PCM volume flag.

SD_F_SOFTPCMVOL

Can you investigate?

--HPS