Date: Mon, 18 May 2020 09:07:51 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r361175 - stable/11/sys/dev/sound/pcm Message-ID: <202005180907.04I97pnj051119@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Mon May 18 09:07:51 2020 New Revision: 361175 URL: https://svnweb.freebsd.org/changeset/base/361175 Log: MFC r360790: Set PCM_CAP_VIRTUAL for virtual DSP devices. Submitted by: Kevin Zheng <kevinz5000@gmail.com> PR: 246206 Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/sound/pcm/dsp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/sound/pcm/dsp.c ============================================================================== --- stable/11/sys/dev/sound/pcm/dsp.c Mon May 18 09:07:14 2020 (r361174) +++ stable/11/sys/dev/sound/pcm/dsp.c Mon May 18 09:07:51 2020 (r361175) @@ -1701,6 +1701,10 @@ dsp_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg, *arg_i = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER; if (rdch && wrch && !(dsp_get_flags(i_dev) & SD_F_SIMPLEX)) *arg_i |= PCM_CAP_DUPLEX; + if (rdch && (rdch->flags & CHN_F_VIRTUAL) != 0) + *arg_i |= PCM_CAP_VIRTUAL; + if (wrch && (wrch->flags & CHN_F_VIRTUAL) != 0) + *arg_i |= PCM_CAP_VIRTUAL; PCM_UNLOCK(d); break; @@ -2648,6 +2652,7 @@ dsp_oss_audioinfo(struct cdev *i_dev, oss_audioinfo *a * these in pcmchan::caps? */ ai->caps = PCM_CAP_REALTIME | PCM_CAP_MMAP | PCM_CAP_TRIGGER | + ((ch->flags & CHN_F_VIRTUAL) ? PCM_CAP_VIRTUAL : 0) | ((ch->direction == PCMDIR_PLAY) ? PCM_CAP_OUTPUT : PCM_CAP_INPUT); /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005180907.04I97pnj051119>