Commit Graph

180 Commits

Author SHA1 Message Date
fvdl
d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
darrenr
960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
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
2003-06-28 14:20:43 +00:00
augustss
4cc039d469 Add FIONREAD ioctl(). 2003-05-26 12:43:35 +00:00
wiz
1ffa7b76c4 DMA, not dma nor Dma. 2003-05-03 18:10:37 +00:00
gmcgarry
2bdf9ba1f2 Fix full-duplex mode (again).
Back-out revision 1.170 and and 1.166.  Revision 1.170 fixes some problems
introduced in revision 1.166.  It isn't clear what problem revision 1.166
was attempting to address.  It seems bogus anyway, since we later check
the modes in audio_check_params().
2003-04-25 03:02:11 +00:00
wiz
68caa698b2 Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.
2003-04-06 18:20:07 +00:00
jdolecek
cd8e491e95 sprinkle const qualifiers to const stuff 2003-03-31 18:47:58 +00:00
thorpej
e354490475 Use aprint_*(). 2003-01-31 02:15:57 +00:00
thorpej
72a7af27b0 Use aprint_normal() in cfprint routines. 2003-01-01 00:10:15 +00:00
augustss
185623c571 Use correct values to compute record high water mark. From kern/19614 by
Ron Roskens.
2002-12-31 00:33:10 +00:00
fredette
9d97e92d89 If the user is providing a mode value in AUDIO_SETINFO, that value
cannot change the recording or playback mode of the device, it can
only change other mode-like values (like AUMODE_PLAY_ALL).  Be very
explicit about fixing up the user's mode value based on the mode of
the device.  Before, giving AUMODE_PLAY_ALL could cause AUMODE_PLAY
to become set on the device, and once AUMODE_PLAY_ALL was set it
was impossible to clear.
2002-12-20 18:30:01 +00:00
christos
514f7047e4 si_ -> sel_ 2002-11-26 18:49:40 +00:00
kent
48dbdc6afe Fix LR contrary problem of play.balance and record.balance. The
change is based on PR kern/18901 by SUNAKAWA Hirokatsu.
2002-11-08 05:02:07 +00:00
jdolecek
e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
jdolecek
cafbd6033f for AUDIO_SETINFO, silently enforce same mode as the currently used one;
this value is supposed to be read-only for this ioctl
2002-10-16 21:07:08 +00:00
thorpej
c9b3657ce9 Add trailing ; to CFATTACH_DECL. 2002-10-02 16:33:28 +00:00
thorpej
e9d707fbd5 Use CFATTACH_DECL(). 2002-09-30 21:17:57 +00:00
thorpej
f818766afe Declare all cfattach structures const. 2002-09-27 20:31:45 +00:00
simonb
4e3613273b Remove breaks after returns, unreachable returns and returns after
returns(!).
2002-09-23 05:51:10 +00:00
christos
6079632012 fix unitialized variable. from simonb. OI 2002-09-23 03:44:56 +00:00
gehenna
77a6b82b27 Merge the gehenna-devsw branch into the trunk.
This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

	device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
  by using this grammer.

- Added the new naming convention.
  The name of the device switch must be <prefix>_[bc]devsw for auto-generation
  of device switch tables.

- The backward compatibility of loading block/character device
  switch by LKM framework is broken. This is necessary to convert
  from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
  We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
  the LKM framework will refer it to assign device major number dynamically.
2002-09-06 13:18:43 +00:00
gson
94addcb364 When a recording interrupt happened in the middle of audio_read(),
changes to cb->used by audio_rint() could be overwritten by audio_read().
2002-07-10 02:25:49 +00:00
gmcgarry
5a74b0b2f5 Back out revision 1.132. This revision broke binary compatibility with
binaries which were working fine on NetBSD 1.5.  We defer this change
until a longer-term fix is found as explain in the commit message in
revision 1.132.

Further details can be found in PR17159.
2002-06-23 01:36:07 +00:00
gson
a257b81df8 The logic in audio_poll() was incorrect in full duplex mode;
among other things, it behaved as if full-duplex audio devices
were always ready for writing.  Also commented the code in case.
This fixes PRs kern/11179 and kern/13829.
2002-06-02 02:00:30 +00:00
gson
910011f658 When audio recording was paused or dropping samples, the "outp" of the
recording ring buffer could overrun the end of the buffer.  When
recording resumed, memory after the end of the buffer would be read,
sometimes causing a system crash.
2002-05-27 17:13:14 +00:00
kent
a37082a494 whitespace and folding fix. 2002-03-23 17:17:10 +00:00
isaki
fa9ce0dedb Fix previous commit. modifying cc is only when factor_denom > 1.
reviewed by kent@netbsd.org
2002-03-21 05:22:24 +00:00
isaki
ec23c6650c Fix infinate loop in recoding on vs0. 2002-03-17 03:20:40 +00:00
isaki
ae997346b5 Add factor_denom, a denominator of factor,
in 'struct audio_param' for vs0 on x68k.

{hw,user}_bytes_per_sample is changed to {hw,user}_bits_per_sample
to handle 4bit/sampling.
2002-03-16 08:58:49 +00:00
kent
569fb75aef audio.c: revert a part of previous change.
auconv.c: correct handling of size parameter.
2002-03-15 14:55:03 +00:00
kent
a5bad132ba Fix a bug of audio_read() in a case that params->factor is not 1. 2002-03-15 14:35:32 +00:00
kent
a1f23f2a90 Move sampling rate conversion functions to aurateconv.c.
Introduce "aurateconv" attribute for audio devices.
Add aurateconv to uaudio and auich.
(due to kern/15845 and kern/15848)
2002-03-09 20:30:42 +00:00
toshii
f9d3d32c2e Fix splaudio/splx botch. 2002-03-09 07:25:41 +00:00
thorpej
4c3cc0bfe3 Fix printf format on LP64. 2002-03-08 02:30:54 +00:00
kent
c329c38eef Sampling rate and mono-stereo conversion described in
http://mail-index.netbsd.org/tech-kern/2002/03/04/0005.html

auconv.c: Add conversion functions

audio.c: Sample alignment, calling conversion functions, etc.

audio_if.h: Add four hw_* members to "struct audio_params"

audiovar.h: Add conversion buffers, etc.

auich and uaudio: Add conversion request code to *_set_params().
2002-03-07 14:37:02 +00:00
jdolecek
74c54977ea drop completely superfluous PRINT() macro 2002-01-18 21:59:41 +00:00
perry
4c7e639df1 fix a trivial lint warning 2001-11-17 05:31:27 +00:00
lukem
2bbe2de647 add RCSIDs 2001-11-13 05:32:49 +00:00
augustss
3d2be4cf9b Fix pasto in type of dev_ioctl method. 2001-10-03 20:48:41 +00:00
augustss
1339e88a86 Add a new optional method, dev_ioctl, to the audio hardware driver interface.
It is called when an unrecognized ioctl() is performed on a device,
thus allowing ioctl()s that frob the hardware driver (like loading
microcode).
2001-10-03 00:04:47 +00:00
augustss
9cf205c410 ANSIfy. 2001-10-02 23:31:54 +00:00
wiz
456dff6cb8 Spell 'occurred' with two 'r's. 2001-09-16 16:34:23 +00:00
is
8d9290c427 Allow 24 and 32bit linear audio.
Actually, the silence filler can do any multiple of 8 bits now, but I didn't
allow the parameter check to accept more than 32 bit to avoid confusion
of drivers that fail to check the parameters themselves thoroughly.
This should be changed later.
2001-09-03 18:51:43 +00:00
jhawk
4cfd2cf1d0 s/printf/DPRINTF/ for kern/13101. 2001-06-03 23:52:51 +00:00
minoura
399af9e4a8 X68k built-in voice synthesizer supports 4bit ADPCM. 2001-05-02 12:49:41 +00:00
toshii
b8569c0b8e The previous revision was my fault. audio_calcwater() needs to be
called at every open.
Thanks Witold J. Wnuk for pointing out this problem.
2001-01-25 15:25:34 +00:00
toshii
577ac6e31c Remove the line in audio_open which zeroes sc_[pr]r.blksize.
Because zeroing them causes zero division panic with devices which don't
support 8kHz mulaw, and the effect of this line was to force calling
audio_calcwater even when unnecessary.
2001-01-22 08:37:54 +00:00
augustss
b85fdbbc47 Add a field in mixer_devinfo_t that indicates the minimum delta to
change mixer value.  A value of 0 indicates that the driver doesn't
supply a delta.
The change is backwards compatible.
2000-12-29 10:00:08 +00:00
jmc
5b7fb2728a Back out changes from 1.124 since the additions of *ports.master=-1 wasn't
documented as to why it was added in and it breaks the ability to set the
gain on playback. A longer term fix to set these correctly should be done but
none of the drivers today are doing this and not being able to set the playback
volume otherwise is a bit silly.
2000-12-25 00:01:39 +00:00
nathanw
554019cd4b More printf format munging for off_t: when printing as %lld, cast to long long. 2000-07-19 13:44:24 +00:00