You are not logged in.

#1 2008-10-18 21:05:11

natern
Member
Registered: 2008-02-18
Posts: 9

Mapping Alsa Volume Control for USB SoundCard (C-Media 650)

Hello everyone who is interested in helping me solve my volume control problem!
Lets see, I have sound playback working, currently I am listening to some Foo Fighters mp3s in XMMS using the Alsa plugin, so I can't complain too much.
However, volume control doesn't work. If I set the alsa plugin to use software volume control, then I have volume control but its not ideal and it doesn't help me when I'm not using xmms. When I run alsamixer or open the gnome volume control, I have multiple volume controls for the "Speaker" device. The 1st pair of volume controls do nothing, I can mute them and my music keeps playing... no idea what they're controlling. The 2nd pair ("Speaker 1") DOES control the sound volume. I just need to find a way to remap it or something so I can configure my applications/tray icon/etc to use it. (And preferabbly not the other 6 channels)

In the Gnome sound control, the devices are:
"Speaker" - stereo control that doesn't do anything
and "Speaker 1" - a 7.1 channel (8 sliders) with the first two controlling front left and right sound for my stereo speakers.
I've tried setting xmms to use "speaker 1", but the option is not in the drop-box, tried typing it manually but that didnt work.
I set my tray icon to control "speaker 1" but the sliders don't seem to lock properly and the volume just jumps around, unlocking the channels and not staying balanced or scaling with the slider.
The only way to get the volume to change as expected is to open the gnome volume manager, make sure the channels of "Speaker 1" are UNLOCKED and slide the first 2 sliders to the desired volume.
So I was thinking if I could just remap the first two channels of "speaker 1" to something else using an alias or link or editing asound.state (which just confused me) for example, then I could use my alias to control the sound in my applications. Thanks for any help with this!

Here's some system info that may or may not help:

AMD Athlon 5400 X2
Asus M2N-E SLi /w C-Media 650 onboard 8-channel audio CODEC (transfer audio signal over USB bus)
Fully uptodate Arch Linux 64-bit (pacman -Syu'd this morning)

 aplay -L
default:CARD=default
    PnP Audio Device        , USB Audio
    Default Audio Device
front:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    Front speakers
surround40:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=default,DEV=0
    PnP Audio Device        , USB Audio
    IEC958 (S/PDIF) Digital Audio Output
null
$ cat /proc/asound/devices 
  2:        : timer
  3:        : sequencer
  4: [ 0- 0]: digital audio playback
  5: [ 0- 0]: digital audio capture
  6: [ 0]   : control
asound.state:
state.default {
    control.1 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'Mic Playback Switch'
        value false
    }
    control.2 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 8065'
        comment.dbmin -2400
        comment.dbmax -2400
        iface MIXER
        name 'Mic Playback Volume'
        value.0 6144
        value.1 6144
    }
    control.3 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'CD   Playback Switch'
        value true
    }
    control.4 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 8065'
        comment.dbmin -2400
        comment.dbmax -2400
        iface MIXER
        name 'CD   Playback Volume'
        value.0 5575
        value.1 5575
    }
    control.5 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'Speaker Playback Switch'
        value false
    }
    control.6 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 8065'
        comment.dbmin -2400
        comment.dbmax -2400
        iface MIXER
        name 'Speaker Playback Volume'
        value.0 6144
        value.1 6144
    }
    control.7 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'Speaker Playback Switch'
        index 1
        value true
    }
    control.8 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 8
        comment.range '0 - 197'
        comment.dbmin -3693
        comment.dbmax -147
        iface MIXER
        name 'Speaker Playback Volume'
        index 1
        value.0 196
        value.1 196
        value.2 196
        value.3 196
        value.4 196
        value.5 196
        value.6 196
        value.7 196
    }
    control.9 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'Mic Capture Switch'
        value true
    }
    control.10 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 6928'
        comment.dbmin -1600
        comment.dbmax -1600
        iface MIXER
        name 'Mic Capture Volume'
        value.0 4096
        value.1 4096
    }
    control.11 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'PCM Capture Switch'
        value true
    }
    control.12 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 6928'
        comment.dbmin -1600
        comment.dbmax -1600
        iface MIXER
        name 'PCM Capture Volume'
        value.0 4096
        value.1 4096
    }
    control.13 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'CD   Capture Switch'
        value true
    }
    control.14 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 6928'
        comment.dbmin -1600
        comment.dbmax -1600
        iface MIXER
        name 'CD   Capture Volume'
        value.0 0
        value.1 0
    }
    control.15 {
        comment.access 'read write'
        comment.type BOOLEAN
        comment.count 1
        iface MIXER
        name 'PCM Capture Switch'
        index 1
        value true
    }
    control.16 {
        comment.access 'read write'
        comment.type INTEGER
        comment.count 2
        comment.range '0 - 6928'
        comment.dbmin -1600
        comment.dbmax -1600
        iface MIXER
        name 'PCM Capture Volume'
        index 1
        value.0 4096
        value.1 4096
    }
    control.17 {
        comment.access 'read write'
        comment.type ENUMERATED
        comment.count 1
        comment.item.0 Mic
        comment.item.1 Mixer
        comment.item.2 'CD  '
        comment.item.3 'Input 3'
        iface MIXER
        name 'PCM Capture Source'
        value Mic
    }
}

Thanks again!

Offline

Board footer

Powered by FluxBB