after being converted from float as passed by firefox/libcubeb [2] - Restore behavior from r296140 while adding alignment options in case of issues. This should make things slightly less broken and add more sample formats. [1] - Some apps (e.g. linux-firefox with ports/169896) don't check with ALSA which sample formats are supported and just feed whatever they like, assuming the underlying device supports it. While here also fix mixer device for OSS plugin. It should be /dev/dsp according to 4Front OSS wiki. The only works with ARIFF_OSS enabled but the volume is reset on close(). audio/oss doesn't work either way: the new (OSSv4) way to control mixer is via SNDCTL_MIX_* ioctls. [2] PR: ports/183861 [1] PR: ports/184006 [2] Submitted by: Jan Beich <jbeich@tormail.org> Approved by: maintainer timeout
23 lines
764 B
C
23 lines
764 B
C
--- oss/ctl_oss.c.orig 2008-10-29 08:42:13.000000000 -0400
|
|
+++ oss/ctl_oss.c
|
|
@@ -26,7 +26,11 @@
|
|
#include <sys/ioctl.h>
|
|
#include <alsa/asoundlib.h>
|
|
#include <alsa/control_external.h>
|
|
+#ifdef __linux__
|
|
#include <linux/soundcard.h>
|
|
+#else
|
|
+#include <sys/soundcard.h>
|
|
+#endif
|
|
|
|
typedef struct snd_ctl_oss {
|
|
snd_ctl_ext_t ext;
|
|
@@ -52,7 +56,7 @@ static const char *const vol_devices[SOU
|
|
[SOUND_MIXER_CD] = "CD Playback Volume",
|
|
[SOUND_MIXER_IMIX] = "Monitor Mix Playback Volume",
|
|
[SOUND_MIXER_ALTPCM] = "Headphone Playback Volume",
|
|
- [SOUND_MIXER_RECLEV] = "Capture Volume",
|
|
+ [SOUND_MIXER_RECLEV] = "Master Capture Volume",
|
|
[SOUND_MIXER_IGAIN] = "Capture Volume",
|
|
[SOUND_MIXER_OGAIN] = "Playback Volume",
|
|
[SOUND_MIXER_LINE1] = "Aux Playback Volume",
|