LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 997|回复: 3

疯掉了快要,始终找不到调节环绕和中置的音量调节

[复制链接]
发表于 2007-5-7 19:43:42 | 显示全部楼层 |阅读模式
Suse10.2,Gnome界面,CMI8738声卡,带6声道独立输出,使用还好,但是高了好久,就是弄不好环绕声,开始时是totem可以环绕,mplayer始终不行,后来在.mplayer/config里加了一个channels=6,可以了,但是在所有地方都找不到调节他们音量的地方,现在是totem和mplayer都表现为发声应该是正常,但是就是中置音量很大,其他很小。试了好几个mixer,都不行,界面几乎全不一样,没有中置、重低音和环绕通道的调节界面,谁帮帮我阿
 楼主| 发表于 2007-5-9 00:22:00 | 显示全部楼层
不会吧,看的人都没有
回复 支持 反对

使用道具 举报

发表于 2007-5-9 16:23:53 | 显示全部楼层
alsa现在还没有那么强。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-5-9 22:13:32 | 显示全部楼层
已经自己解决了。过程复杂,方法十分简单
查了一下alsa wiki,其中CMI8738的驱动cmipci专门有一段关于中置音量调节的:

Volume Control

I found one solution to adjust the volume for all channels when using routing to map stereo to 5.1 as the dmix setup does not work with latest 1.0.11rc3 alsa release. On my CMI8738-MC6 the Master Volume only affects the front channel. Since the other channels are on "hw:0,1" and I found no way to adjust the levels on this, one can use "softvol" to do a virtual volume adjustment.

Drawback: Master Volume still does not affect all channels, but the custom "SoftMaster" item can be used to set the volume for all channels.

Here is my .asoundrc:

pcm.softvol {
    type softvol
    slave {
        pcm "hw:0,1"
    }
    control {
        name "SoftMaster"
    }
}

pcm.dsp0 {
    type plug
    slave.pcm "softvol"
    slave.channels 6
    route_policy duplicate
}

pcm.!default {
    type plug
    slave.pcm "softvol"
    slave.channels 6
    route_policy duplicate
}

Here it is folks! A working CMI8738-mc6 config file that supports 5.1, upmixing, dmix, and now, softvol. You can control the volume of your center/lfe channels! This one enables default upmixing of 2.0->5.1 as we all real 5.1 streams to be dmixed at the same time, so you can watch a DVD in 5.1 (analog) and have other sounds still coming from all speakers.

# 6 channel dmix:
pcm.dmix6 {
    type dmix
    ipc_key 1024
    ipc_key_add_uid false
    ipc_perm 0660
    slave {
        pcm "hw:0,1"
        rate 48000
        channels 6
        period_time 0
        period_size 1024
        buffer_time 0
        buffer_size 5120
    }
}

# upmixing:
pcm.ch51dup {
    type route
    slave.pcm dmix6
    slave.channels 6
    ttable.0.0 1
    ttable.1.1 1
    ttable.0.2 1
    ttable.1.3 1
    ttable.0.4 0.5
    ttable.1.4 0.5
    ttable.0.5 0.5
    ttable.1.5 0.5
}

pcm.duplex {
    type asym
    playback.pcm "ch51dup" # upmix first
    capture.pcm "hw:0"
}

# change default device:
pcm.!default {
    type softvol
    slave.pcm "duplex"
    control {
        name "Software Master"
        card 0
    }
}

# for aoss
pcm.dsp "duplex"

pcm.dsp1 "duplex"

大意是说要建立一个软混音器,以便和主声道一起调节中置的音量。看完以后,正准备建立这样的软混音器,突然灵机一动,mplayer里面不是有软混音?马上打开mplayer的gui界面,找到音频设置一段,选中enable software mixer,一试,天哪!这么简单!
而且有意思的是,从此以后,再使用totem,虽然没有设置过任何东西,但软混音器也起作用了,音量调节全部6声道联动的!也不知道mplayer给改了什么东西,估计是什么AC3解码器里给改的,否则不会影响totem的。
有类似问题的兄弟可试试看。不过,不要去调节系统的音量调节,那里没有用的,无论怎样调节还是中置和低音声道一点不变。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表