Skip to contentSkip to conversation

[1.0.10] Alsa on ICH4 does not set 'Capture Source' correctly

DISCUSSION Stian Ellingsen 1 participant 1 message Apr 27, 2006

lore
Share & tools
lore
#0 lore raw

Hi,
I have Fedora Core 4 with Alsa v 1.0.10rc3 on an Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03). If I try to set the capture source using 'alsamixer' or 'amixer sset', the value of 'Capture Source' will not be set correctly, resulting in wrong channels being captured when recording sound:

Example:

$ amixer cset numid=24 0
numid=24,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw---,values=2,items=8
  ; Item #0 'Mic'
  ; Item #1 'CD'
  ; Item #2 'Video'
  ; Item #3 'Aux'
  ; Item #4 'Line'
  ; Item #5 'Mix'
  ; Item #6 'Mix Mono'
  ; Item #7 'Phone'
  : values=0,0

As expected, Mic will now be set to be captured from:

$ amixer sget Mic
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined
cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 31 [100%] [on] Capture [on]
  Front Right: Playback 31 [100%] [on] Capture [on]

Then, if I set another channel to be captured from:

$ amixer sset Mix cap
Simple mixer control 'Mix',0
  Capabilities: cswitch cswitch-joined cswitch-exclusive
  Capture exclusive group: 0
  Capture channels: Front Left - Front Right
  Front Left: Capture [on]
  Front Right: Capture [on]

Also as expected, Mic will seemingly not capture:

$ amixer sget Mic
Simple mixer control 'Mic',0
  Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined
cswitch-exclusive
  Capture exclusive group: 0
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 31
  Front Left: Playback 31 [100%] [on] Capture [off]
  Front Right: Playback 31 [100%] [on] Capture [off]

But if I use cget on 'Capture Source', I will see that it has only set the left side of the values, so it will capture from both Mix and Mic:

$ amixer cget numid=24
numid=24,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw---,values=2,items=8
  ; Item #0 'Mic'
  ; Item #1 'CD'
  ; Item #2 'Video'
  ; Item #3 'Aux'
  ; Item #4 'Line'
  ; Item #5 'Mix'
  ; Item #6 'Mix Mono'
  ; Item #7 'Phone'
  : values=5,0

Now, if I try to record a sound, I will hear sound from both Mic and Mix when playing the recorded sound.

After 'amixer sset Mix cap', I would expect the values of 'Capture Source' to be 5,5 (Mix only), so that when recording a sound, only the input from Mix would be captured.

The only workaround that I've found is to use 'amixer cset':

$ amixer cset numid=24 5
numid=24,iface=MIXER,name='Capture Source'
  ; type=ENUMERATED,access=rw---,values=2,items=8
  ; Item #0 'Mic'
  ; Item #1 'CD'
  ; Item #2 'Video'
  ; Item #3 'Aux'
  ; Item #4 'Line'
  ; Item #5 'Mix'
  ; Item #6 'Mix Mono'
  ; Item #7 'Phone'
  : values=5,5

Since alsamixer doesn't seem to care about the right side of values, it took me several hours to find out what was really going on. I assume this is a bug?

Sian Ellingsen

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642