| Age | Commit message (Collapse) | Author |
|
Unclear if there are any paths to the copyout without initialization,
but let's play it safe to keep the auditing effort low.
XXX pullup-8
XXX pullup-9
XXX pullup-10
|
|
Just in case of uninitialized padding which would lead to kernel
stack disclosure. If the compiler can prove the memset redundant
then it can optimize it away; otherwise better safe than sorry.
|
|
The uninitalized field in this structure is `fillers`, an array that
simply reserves space for later changes in OSSv4, which this version
of the OSS compat layer (specifically for Linux applications) makes no
effort to implement.
|
|
|
|
|
|
The OSSv4 spec says we shouldn't really error if an invalid format is
chosen by an application. Things are especially likely to be confused
if we return MULAW, since in OSSv4 terms that means that's the native
hardware format. Instead, set and return the current hardware format
if an invalid format is chosen.
For the 24-bit sample formats, note that the NetBSD kernel currently
can't handle them in its default configuration, and will return an error
code if you attempt to use them. So, if an applicaton requests 24-bit PCM,
promote it to 32-bit PCM. According to the spec, this is valid and
applications should be checking the return value anyway.
In the Linux compat layer, we just use S16LE as a fallback. The OSSv3
headers that are still being shipped with Linux don't contain definitions
for fancier formats and we can reasonably expect all applications to
support S16LE.
|
|
From the perspective of reading the OSSv4 specification, NetBSD's
behaviour when an invalid sample rate is set makes no sense at all:
AUDIO_SETINFO simply returns an error code, and then we immediately
fall through to getting the sample rate, which is still set to the
legacy default of 8000 Hz.
Instead, what OSS applications generally expect is that they will be
able to receive the actual hardware sample rate. This is very, very
unlikely to be 8000 Hz on a modern machine.
No functional change when setting a sample rate between the supported
rates of 1000 and 192000 Hz. When a rate outside this range is requested,
the hardware rate is returned (on modern hardware, generally always 48000
Hz or a multiple of 48000 Hz).
|
|
SNDCTL_DSP_STEREO, SNDCTL_DSP_SETFMT, and SNDCTL_DSP_CHANNELS.
|
|
It's kernel side of PR lib/54667.
|
|
- make "s" unsigned since blocksize is too.
|
|
|
|
- add __unreachable() after functions that can return but won't in
this case, and thus can't be marked __dead easily
|
|
|
|
- hiwat is playback-only parameter.
- 'bytes' should not be rounded down.
|
|
- 'fragments' is the number of full free blocks and should not be
negative value.
- 'bytes' should not be rounded down.
|
|
libossaudio.
|
|
|
|
a correctly typed pointer.
|
|
|
|
a shared lock. Make all calls outside of file systems respect it.
The calls from file systems need review.
No objections from tech-kern.
|
|
|
|
getting back our values, but still does not work.
|
|
|
|
|
|
1.173 for details.
|
|
change, audio now works on amd64 with native firefox, nspluginwrapper, and
the 32-bit linux flash binaries.
|
|
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
|
|
All by the magic of sed ...
|
|
|
|
The general trend is to remove it from all kernel interfaces and
this is a start. In case the calling lwp is desired, curlwp should
be used.
quick consensus on tech-kern
|
|
for OSS_SNDCTL_DSP_PROFILE.
|
|
doesn't obtain the ports, gain and balance related parameters.
Those generally require reading from the hardware and therefore are much
more expensive to obtain. Modify OSS emulation to use the new ioctl
where possible.
This reduces CPU usage of mplayer during mp3 playback with my Thinkpad
from 20% to < 1% and from 50% to 20% during Xvid playback.
Review and comments from jmcneill@
|
|
|
|
|
|
|
|
|
|
|
|
AUDIO_INITINFO(). Now the sound with the linux flash plugin works
properly.
From OpenBSD.
|
|
|
|
unintentional changes of the audio settings e.g. when running "kphone".
Patch submitted by George Michaelson on "tech-kern@NetBSD.org".
|
|
|
|
If a mixer item does not match with AudioNsomething, check whether
it ends with '.' + AudioNsomething. PR#15441
|
|
and need to be examined and discussed more.
|
|
be inserted into ktrace records. The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.
Bump the kernel rev up to 1.6V
|
|
|
|
Avoids a lot of casting and removes the need for some line breaks.
Removed a load of (caddr_t) casts from calls to copyin/copyout as well.
(approved by christos - he has a plan to remove caddr_t...)
|
|
|
|
|
|
code provided by Andreas Wrede in PR kern/19793
|
|
it's merely advisory (and in fact is implemented as a nop in the OSS->ALSA
shim), it should be safe to ignore it.
|