ALSA - 从左到右路由,中心/ LFE,并为每个通道单独调整音量

时间:2015-06-05 21:29:59

标签: alsa

我不知道它是否可能,但我想将声音从前置扬声器传送到后置扬声器,并且仍然可以单独控制每个声道的音量。

我有一个带3条线的USB声卡,FRONT,REAR和Center / LFE。

我已经想出如何在/etc/asound.conf中将声音从前向后传输到中/ LFE扬声器。经过很长一段时间的谷歌我仍然不知道如何控制前,后和中/ LFE扬声器的音量。

我使用以下asound.conf从前置扬声器进行路由。

pcm.!default {
    type             softvol
    slave.pcm       "20to51"
    control {
        name "softMixer" # This name is used in mopidy config
        card 0
    }
}

ctl.!default {
        type hw
        card 0
}

pcm.20to51 {
  type route
  slave.pcm surround51
  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.1.5 0.5
  ttable.0.5 0.5
}

有关如何单独调整每个频道的任何想法?

编辑: 来自amixer scontents的内容

Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch pswitch-joined penum
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
  Limits: Playback 0 - 197
  Mono:
  Front Left: Playback 4 [2%] [-36.19dB] [off]
  Front Right: Playback 4 [2%] [-36.19dB] [off]
  Rear Left: Playback 4 [2%] [-36.19dB] [off]
  Rear Right: Playback 4 [2%] [-36.19dB] [off]
  Front Center: Playback 4 [2%] [-36.19dB] [off]
  Woofer: Playback 4 [2%] [-36.19dB] [off]
  Side Left: Playback 4 [2%] [-36.19dB] [off]
  Side Right: Playback 4 [2%] [-36.19dB] [off]
Simple mixer control 'PCM',0
  Capabilities: cvolume cswitch cswitch-joined penum
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 6928
  Front Left: Capture 5543 [80%] [5.65dB] [on]
  Front Right: Capture 5543 [80%] [5.65dB] [on]
Simple mixer control 'PCM Capture Source',0
  Capabilities: enum
  Items: 'Mic' 'Line' 'IEC958 In' 'Mixer'
  Item0: 'Mic'
Simple mixer control 'Front Master',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'Line',0
  Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 8065 Capture 0 - 6928
  Front Left: Playback 0 [0%] [-24.00dB] [off] Capture 4096 [59%] [0.01dB] [on]
  Front Right: Playback 0 [0%] [-24.00dB] [off] Capture 4096 [59%] [0.01dB] [on]
Simple mixer control 'Mic',0
  Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 8065 Capture 0 - 6928
  Front Left: Playback 0 [0%] [-24.00dB] [off] Capture 0 [0%] [-16.00dB] [on]
  Front Right: Playback 0 [0%] [-24.00dB] [off] Capture 0 [0%] [-16.00dB] [on]
Simple mixer control 'IEC958 In',0
  Capabilities: cswitch cswitch-joined penum
  Capture channels: Mono
  Mono: Capture [on]
Simple mixer control 'SoftMaster',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 0 [0%]
  Front Right: 0 [0%]
Simple mixer control 'softMixer',0
  Capabilities: volume penum
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: 0 - 255
  Front Left: 240 [94%]
  Front Right: 240 [94%]

1 个答案:

答案 0 :(得分:0)

我想我想出来了

pcm.!default {
        type plug
        slave.pcm "ch2to5"
}

pcm.digitalhw {
        type hw
        card 0
}

pcm.ch2to5 {
        type route
        slave.pcm "digitalhw"
        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.1.5 0.5
        ttable.0.5 0.5
}

ctl.!default {
        type hw
        card 0
}

使用此配置,前方声音被路由到后方和LFE / Center,我可以使用alsamixer来控制每个频道的音量。