2008年12月23日星期二

ubuntu声卡独占解决办法

不知什么时候开始, 系统变得只能有一个程序发出声音,
当开着音乐播放器的时候, opera, firefox打开网络视频就没有声音的.
kof (via virtualbox) 也要把音乐关掉。


解决方案:

  1. $ sudo /etc/init.d/alsa-utils stop
  2. $ sudo vi /var/lib/alsa/asound.state

  3. (add the following text verbatim to the start of this file)

    # This text should be added to the beginning of
    # /var/lib/alsa/asound.state. You only need to add
    # it once -- it is saved across reboots.
    pcm.asymed {
    type asym
    playback.pcm dmix
    capture.pcm dsnoop
    }
    pcm.default {
    type plug
    slave.pcm asymed
    }
    pcm.dmix {
    type dmix
    ipc_key 5678293
    ipc_key_add_uid yes
    slave {
    pcm 'hw:0,0'
    period_time 0
    period_size 128
    buffer_size 2048
    format S16_LE
    rate 48000
    }
    }
    pcm.dsnoop {
    type dsnoop
    ipc_key 5778293
    ipc_key_add_uid yes
    slave {
    pcm 'hw:0,0'
    period_time 0
    period_size 128
    buffer_size 2048
    format S16_LE
    rate 48000
    }
    }

  4. 好像还设置了这个: 系统-首选项-音效


  5. $ sudo /etc/init.d/alsa-utils start

  6. 重启所有会发出声音的应用程序


参考:
http://wiki.ubuntu.org.cn/声音问题解决方案#Software_Mixing

没有评论: