I/O Control Description
SOUND MIXER INFO Fill the structure struct mixer
SOUND MIXER VOLUME Changes the main output volume.
Only the least significant byte is
used to change both left and right
channels.
SOUND MIXER BASS Changes the bass level. Only the
least significant byte is used to
change both left and right channels.
SOUND MIXER TREBLE Changes the treble level. Only
the least significant byte is used to
change both left and right channels.
SOUND MIXER LINE1 Changes the input 1 level. Only
the least significant byte is used to
change both left and right channels.
SOUND MIXER LINE2 Changes the input 2 level.
SOUND MIXER RECSRC Reports the supported recording
sources. Each bit of the mask rep-
resents a recording source.
SOUND MIXER RECMASK Reports the supported recording
channels. Each bit of the mask rep-
resents a recording channel.
SOUND MIXER DEVMASK Reports the supported channels.
Each bit of the mask represents a
channel.
SOUND MIXER STEREODEVS Reports the supported stereo chan-
nels. Each bit of the mask reepre-
sents a stereo channel.
Two examples below show how to set and read a mixer parameter using
’ioctl’ functions for the mixer device. MIXER READ() and MIXER WRITE()
are used to specify if you want to read or to write a mixer setting.
...
/* change the input 1 level to 80% */
level = 80;
ioctl(mixer_fd , MIXER_WRITE( SOUND_MIXER_LINE1 ) , &level );
...
...
/* read the level of the input 1 */
ioctl(mixer_fd , MIXER_READ( SOUND_MIXER_LINE1 ) , &level );
printf("input 1 level %u\n" , level );
...
K-Team S.A. 11