ALSA: oss-mixer - Fixes recording gain control
authorViral Mehta <viral.mehta@einfochips.com>
Tue, 10 Mar 2009 14:43:18 +0000 (15:43 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 18 Mar 2009 06:52:28 +0000 (07:52 +0100)
commit36c7b833e5d2501142a371e4e75281d3a29fbd6b
tree750835589dd140c8e78e62b77da2124d46262448
parent041b62374c7fedc11a8a1eeda2868612d3d1436c
ALSA: oss-mixer - Fixes recording gain control

At the time of initialization, SNDRV_MIXER_OSS_PRESENT_PVOLUME bit is not
set for MIC (slot 7).
So, the same should not be checked when an application tries to do gain
control for audio recording devices.

Just check slot->present for SNDRV_MIXER_OSS_PRESENT_CVOLUME independently.
Verified with a simple application which opens /dev/dsp for recording and
/dev/mixer for volume control.

Have tested two usb audio mic devices.

Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/oss/mixer_oss.c