summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authornetchild <netchild@FreeBSD.org>2005-10-02 15:51:19 +0000
committernetchild <netchild@FreeBSD.org>2005-10-02 15:51:19 +0000
commitf97f0f5c5cbe20d8d7f8d73450e9abfb911286c4 (patch)
tree9cfb28675af31e39ff9918c3321f8a80c0c4b467 /sys
parent092a218b9fa0014f2a7fd32a34abc845a2fcc8a2 (diff)
downloadFreeBSD-src-f97f0f5c5cbe20d8d7f8d73450e9abfb911286c4.zip
FreeBSD-src-f97f0f5c5cbe20d8d7f8d73450e9abfb911286c4.tar.gz
Emulate pcm mixer controller for any uaudio device without it.
Submitted by: Ariff Abdullah <skywizard@MyBSD.org.my>
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/sound/usb/uaudio_pcm.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/sound/usb/uaudio_pcm.c b/sys/dev/sound/usb/uaudio_pcm.c
index 320a3d0..980fe23 100644
--- a/sys/dev/sound/usb/uaudio_pcm.c
+++ b/sys/dev/sound/usb/uaudio_pcm.c
@@ -249,11 +249,20 @@ ua_mixer_init(struct snd_mixer *m)
{
u_int32_t mask;
device_t pa_dev;
+ struct snddev_info *d;
struct ua_info *ua = mix_getdevinfo(m);
pa_dev = device_get_parent(ua->sc_dev);
+ d = device_get_softc(ua->sc_dev);
mask = uaudio_query_mix_info(pa_dev);
+ if (d && !(mask & SOUND_MIXER_PCM)) {
+ /*
+ * Emulate missing pcm mixer controller
+ * through FEEDER_VOLUME
+ */
+ d->flags |= SD_F_SOFTVOL;
+ }
mix_setdevs(m, mask);
mask = uaudio_query_recsrc_info(pa_dev);
OpenPOWER on IntegriCloud