Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The volume increment or decrement is happening double the intended amount using amixer for my alsa driver using ./amixer -c 0 set Master 1- command. This happens because by default volume controls apply for both playback and capture modules. My alsa driver config doesn't enabled any of the capture controls. Even if there is no capture enabled, the function from simple_none.c returns true for capture channel. All the capture volume controls are applied to my playback driver.

static int is_ops(snd_mixer_elem_t *elem, int dir, int cmd, int val) 
    case SM_OPS_IS_CHANNEL:
        return (unsigned int) val < s->str[dir].channels;

./amixer -c 0 set Master Playback 10+

./amixer -c 0 set Master Playback 10 -

./amixer -c 0 set Master Capture 10+

./amixer -c 0 set Master Capture 10 -

I suspect capture is enabled by default in my system for alsa drivers. Let me know what I need to do to ensure capture disabled.

share|improve this question
    
Debug INFO# ./aplay /vrr/ABeautifulMind_48.wav & Playing WAVE '/vrr/ABeautifulMind_48.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo # ./aplay -l *** List of PLAYBACK Hardware Devices ** card 0: CX2450 [CX2450], device 0: CX4250PCM-0 [All_Ports] Subdevices: 1/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 card 0: CX2450 [CX2450], device 1: CX4250PCM-1 [Analog] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 card 0: CX2450 [CX2450], device 2: CX4250PCM-2 [Digital] Subdevices: 2/2 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 –  user214604 Nov 11 '13 at 10:05
    
# cat /proc/asound/cards 0 [CX2450 ]: CX2450 - CX2450 CX2450 1 cat /proc/asound/modules 0 snd_cnxt # cat /proc/asound/pcm 00-00: CX4250PCM-0 : All_Ports : playback 2 00-01: CX4250PCM-1 : Analog : playback 2 00-02: CX4250PCM-2 : Digital : playback 2 cat /proc/asound/CX2450/pcm0p/info card: 0 device: 0 subdevice: 0 stream: PLAYBACK id: CX4250PCM-0 name: All_Ports subname: subdevice #0 class: 0 subclass: 0 subdevices_count: 2 subdevices_avail: 1 –  user214604 Nov 11 '13 at 10:08
    
# ./amixer -c 0 sget Master Simple mixer control 'Master',0 Capabilities: volume penum Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 100 Front Left: 101 [101%] Front Right: 101 [101%] # ./amixer -c 0 sget Master Simple mixer control 'Master',0 Capabilities: volume penum Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: 0 - 100 Front Left: 101 [101%] Front Right: 101 [101%] –  user214604 Nov 11 '13 at 10:21
    
Hello and welcome to Ask Ubuntu. Please don't use comments to expand your question. It better to hit the edit linkt and enhance your question that way. –  MadMike Nov 12 '13 at 14:36
    
Thanks for your suggestions. The above are debug information to understand the proc entries and other related information. –  user214604 Nov 14 '13 at 6:39
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.