免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3691 | 回复: 10
打印 上一主题 下一主题

执行sysctl hw.snd.pcm0.vchans=4出错!!?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-23 23:54 |只看该作者 |倒序浏览
我是在vmware 6.0.2里装的FB7.0

按照手册上说的:
root@FreeBSD[/root]sysctl hw.snd.pcm0.vchans=4
sysctl: unknown oid 'hw.snd.pcm0.vchans'

没有这个是什么意思??

root@FreeBSD[/root]sysctl -a | egrep 'snd|pcm'
hw.snd.latency_profile: 1
hw.snd.latency: 5
hw.snd.report_soft_formats: 1
hw.snd.compat_linux_mmap: 0
hw.snd.feeder_buffersize: 16384
hw.snd.feeder_rate_round: 25
hw.snd.feeder_rate_max: 2016000
hw.snd.feeder_rate_min: 1
hw.snd.verbose: 1
hw.snd.maxautovchans: 16
hw.snd.default_unit: 0
hw.snd.version: 2007061600/i386
hw.snd.default_auto: 0
dev.pcm.0.%desc: AudioPCI ES1371-A
dev.pcm.0.%driver: pcm
dev.pcm.0.%location: slot=1 function=0
dev.pcm.0.%pnpinfo: vendor=0x1274 device=0x1371 subvendor=0x1274 subdevice=0x1371 class=0x040100
dev.pcm.0.%parent: pci2
dev.pcm.0.play.vchans: 2
dev.pcm.0.play.vchanrate: 48000
dev.pcm.0.play.vchanformat: s16le
dev.pcm.0.rec.vchans: 1
dev.pcm.0.rec.vchanrate: 48000
dev.pcm.0.rec.vchanformat: s16le
dev.pcm.0.buffersize: 4096
dev.pcm.0.latency_timer: 64
dev.pcm.0.polling: 0



另外,为什么beep-media-play和xmms不能同时打开????

[ 本帖最后由 lonelywing 于 2008-3-24 21:34 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-03-24 21:53 |只看该作者
莫非是在FB7里已经变成这项了: dev.pcm.0.play.vchans: 2

哪里有FB7的sysctl.conf的各项配置说明啊?

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
3 [报告]
发表于 2008-03-24 22:01 |只看该作者
http://www.bsdlover.cn/html/38/n-138.html
这是我总结的做优化的建议,如果不明白具体的用途,最好保持原样不动。

论坛徽章:
0
4 [报告]
发表于 2008-03-24 22:11 |只看该作者
剑心~~

你那文档里没找到这个参数的内容啊

论坛徽章:
0
5 [报告]
发表于 2008-03-25 13:44 |只看该作者
本身就没这个参数吧?
unknown oid 'hw.snd.pcm0.vchans'
核对下名字。

论坛徽章:
2
丑牛
日期:2013-09-29 09:47:222015七夕节徽章
日期:2015-08-21 11:06:17
6 [报告]
发表于 2008-03-25 15:49 |只看该作者
原帖由 lonelywing 于 2008-3-24 22:11 发表
剑心~~

你那文档里没找到这个参数的内容啊

我做的那个文档只是针对大家经常用的优化的参数的一个说明,希望大家在优化的时候可以参考的,不是所有的,其他的建议都用默认的,不要修改。

另外你这个的按照提示应该是不存在的参数,你在哪看的要对这个参数做优化?

论坛徽章:
0
7 [报告]
发表于 2008-03-25 16:45 |只看该作者
另外你这个的按照提示应该是不存在的参数,你在哪看的要对这个参数做优化?

---------------------郁闷的分割线---------------------------

我是参考FB的手册的
http://cnsnap.cn.freebsd.org/doc ... ok/sound-setup.html 其中的7.2.3 利用多个声源这一节中的内容:
  1. 使用两条sysctl命令来设置虚拟声道的数目。 如果您是 root 用户, 执行下面的操作:
  2. # sysctl hw.snd.pcm0.vchans=4
  3. # sysctl hw.snd.maxautovchans=4
复制代码


但我在VM6里安装的FB7里配置的
root@FreeBSD[/root]sysctl hw.snd.pcm0.vchans=4
sysctl: unknown oid 'hw.snd.pcm0.vchans'

同时我在FB6.3下试了一下,是可以的
是不是FB7里没有这个参数,或者改成别的名字了?
比如上面提到的dev.pcm.0.play.vchans??

论坛徽章:
0
8 [报告]
发表于 2008-03-25 17:57 |只看该作者
恩,不是去掉了就是改了名字。

   Runtime Configuration
     There are a number of sysctl( variables available.  hw.snd.* tunables
     are global settings and dev.pcm.* are device specific.

           hw.snd.latency_profile      Define sets of buffering latency con-
                                       version tables for the hw.snd.latency
                                       tunable.  A value of 0 will use a low
                                       and aggressive latency profile which
                                       can result in possible underruns if the
                                       application cannot keep up with a rapid
                                       irq rate, especially during high work-
                                       load.  The default value is 1, which is
                                       considered a moderate/safe latency pro-
                                       file.

           hw.snd.latency              Configure the buffering latency.  Only
                                       affects applications that do not
                                       explicitly request blocksize / frag-
                                       ments.  This tunable provides finer
                                       granularity than the
                                       hw.snd.latency_profile tunable.  Possi-
                                       ble values range between 0 (lowest
                                       latency) and 10 (highest latency).

           hw.snd.report_soft_formats  Controls the internal format conversion
                                       if it is available transparently to the
                                       application software.  When disabled or
                                       not available, the application will
                                       only be able to select formats the
                                       device natively supports.

           hw.snd.compat_linux_mmap    Enable to allow PROT_EXEC page map-
                                       pings.  All Linux applications using
                                       sound and mmap(2) require this.

           hw.snd.feeder_rate_round    Sample rate rounding threshold, to
                                       avoid large prime division at the cost
                                       of accuracy.  All requested sample
                                       rates will be rounded to the nearest
                                       threshold value.  Possible values range
                                       between 0 (disabled) and 500.  Default

                                       is 25.

           hw.snd.feeder_rate_max      Maximum allowable sample rate.

           hw.snd.feeder_rate_min      Minimum allowable sample rate.

           hw.snd.verbose              Level of verbosity for the /dev/sndstat
                                       device.  Higher values include more
                                       output and the highest level, four,
                                       should be used when reporting problems.
                                       Other options include:

                                       0   Installed devices and their allo-
                                           cated bus resources.

                                       1   The number of playback, record,
                                           virtual channels, and flags per
                                           device.

                                       2   Channel information per device
                                           including the channel's current
                                           format, speed, and pseudo device
                                           statistics such as buffer overruns
                                           and buffer underruns.

                                       3   File names and versions of the cur-
                                           rently loaded sound modules.

                                       4   Various messages intended for
                                           debugging.

           hw.snd.maxautovchans        Global VCHAN setting that only affects
                                       devices with at least one playback or
                                       recording channel available.  The sound
                                       system will dynamically create up this
                                       many VCHANs.  Set to ``0'' if no VCHANS
                                       are desired.  Maximum value is 256.

           hw.snd.default_unit         Default sound card for systems with
                                       multiple sound cards.  When using
                                       devfs(5), the default device for
                                       /dev/dsp.  Equivalent to a symlink from
                                       /dev/dsp to
                                       /dev/dsp${hw.snd.default_unit}.

           hw.snd.default_auto         Enable to automatically assign default
                                       sound unit to the most recent attached
                                       device.

           dev.pcm.%d.[play|rec].vchans
                                       The current number of VCHANs allocated
                                       per device.  This can be set to preal-
                                       locate a certain number of VCHANs.
                                       Setting this value to ``0'' will dis-
                                       able VCHANs for this device.

           dev.pcm.%d.[play|rec].vchanrate
                                       Sample rate speed for VCHAN mixing.
                                       All playback paths will be converted to
                                       this sample rate before the mixing
                                       process begins.

           dev.pcm.%d.[play|rec].vchanformat
                                       Format for VCHAN mixing.  All playback
                                       paths will be converted to this format
                                       before the mixing process begins.

           dev.pcm.%d.polling          Experimental polling mode support where
                                       the driver operates by querying the
                                       device state on each tick using a
                                       callout(9) mechanism.  Disabled by
                                       default and currently only available
                                       for a few device drivers.

详见:man snd

论坛徽章:
0
9 [报告]
发表于 2008-03-25 18:01 |只看该作者
dev.pcm.%d.[play|rec].vchans
                                       The current number of VCHANs allocated
                                       per device.  This can be set to preal-
                                       locate a certain number of VCHANs.
                                       Setting this value to ``0'' will dis-
                                       able VCHANs for this device.

这个和你提到的参数比较像,但7.0中貌似没有你说的那个参数。

论坛徽章:
0
10 [报告]
发表于 2008-03-25 22:44 |只看该作者
有的
FB7里运行
sysctl -a | grep pcm
就可以看到
至少我在VM里是这样的,呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP