简体   繁体   English

音量控制NVidia与ALSA

[英]Volume Control NVidia with ALSA

I am running Ubuntu 12.04 and I have NVidia graphics cards with the nvidia-common driver. 我正在运行Ubuntu 12.04,我有NVIDIA显卡和nvidia-common驱动程序。

ALSA supports mute/unmute with the alsamixer or amixer controls for that device. ALSA支持使用该设备的alsamixer或amixer控件静音/取消静音。 Other audio cards have volume control. 其他音频卡有音量控制。

I want to control the volume of the HDMI out. 我想控制HDMI的音量。 I tried to use the "softvol" pcm type, but it failed to load on my actual hardware (worked on the "default" slave, when I specified a loopback slave, but not when I specified the hw:NVidia slave). 我试图使用“softvol”pcm类型,但它无法加载到我的实际硬件上(当我指定一个环回从属时,在“默认”从属器上工作,但是当我指定hw:NVidia slave时)。

The plan is to route from JACK to the HDMI, and I want to control the volume to that HDMI. 计划是从JACK路由到HDMI,我想控制HDMI的音量。 Any suggestions? 有什么建议么? Below is the addition I made to the .asoundrc (which failed): 下面是我对.asoundrc的补充(失败):

pcm.test {
  type softvol
  slave.pcm "hw:5"
  control {
    name "volname"
    card 5
  }
}

Try designating the device as well as the card. 尝试指定设备以及卡。 Device 7 is where it works for me. 设备7是它适用于我的地方。 So change the lines you have above to 因此,将上面的行更改为

pcm.test {
  type softvol
  slave.pcm "hw:5,7"
  control {
    name "volname"
    card 5
  }
}

and it should work. 它应该工作。 Also, make sure you reboot to test the results. 此外,请确保重新启动以测试结果。 I think that once the OS has taken control of the video cards then alsa can no longer change the settings. 我认为一旦操作系统控制了视频卡,那么alsa就不能再改变设置了。 (Though I could be wrong on that) (虽然我可能错了)

If you run: 如果您运行:

amixer controls -c5

then one of the lines should read: 那么其中一行应该是:

...
numid=25,iface=MIXER,name='volname'
...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM