Commit Graph

159 Commits

Author SHA1 Message Date
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
thorpej cfaba33937 Use device_lookup(). 2000-07-06 00:43:04 +00:00
augustss d28770775b Make it compile with AUDIO_DEBUG after the mmap API change. 2000-06-27 21:25:02 +00:00
mrg f324eef2d2 remove include of <vm/vm.h> 2000-06-27 17:55:38 +00:00
simonb 889c658b5b Change the kernel mmap interface so that the offset to map is an
"off_t" and the return value is a "paddr_t" to allow mappings
at offsets past 2^31 bytes.  Somewhat inspired by FreeBSD, which
only changed the offset to a "vm_offset_t".

Includes updates for the i386, pc532 and sh3 mmmmap from Jason Thorpe.
2000-06-26 04:55:19 +00:00
mrg c543a66253 remove some redundant <vm/vm_xxx.h> includes 2000-06-25 13:26:19 +00:00
augustss c7d698ac41 Support recording conversions that change the sample size. PR 10029, from Gregory McGarry. 2000-05-02 00:00:00 +00:00
augustss 07f142cd50 Add some more debug output. 2000-05-01 17:10:40 +00:00
augustss 5b99967f1d Avoid a pointless debug message. 2000-03-26 10:01:32 +00:00
augustss ba4e755a9c Change the cmd argument in {audio,mixer}_ioctl() to u_long. 2000-03-01 00:44:35 +00:00
kleink 56060556e3 Report all AUDIO_PROP_* properties when attaching an audio device. 1999-12-15 12:09:34 +00:00
augustss 2e175b3f88 Avoid 0 blocksize. 1999-11-23 08:38:30 +00:00
augustss 3ea93b7669 Make sure to call vdevgone() on all devices when deteching. 1999-11-09 16:50:47 +00:00
augustss fb4a4525a8 Be cautious about the blocksize returned by the hardware driver to
avoid division by 0.
1999-11-01 18:06:36 +00:00
kleink 9dfb5a91ec Minor output formatting buglet. 1999-09-23 11:53:13 +00:00
augustss a85a08c2fb Add support for detaching audio devices. 1999-09-09 10:24:39 +00:00
thorpej 12006f3c05 Don't clobber the error returned by uiomove() when starting the audio
output (in case we got a partial block).  Fixes PR #7722, from
Antti Kantee <pooka@iki.fi>.
1999-06-07 19:24:38 +00:00
nathanw 9e14ee3c6e Fix two small bugs:
(1) Fix sense of a strcmp() test so that the monitor subdevice of the
    mixer is properly identified.
(2) Use hw_if->set_port() instead of hw_if->get_port() when changinh
    the monitor level in audiosetinfo().

Fixes PR kern/7661.
1999-05-30 00:21:08 +00:00
nathanw ea0550413c Make these compile on the alpha when AUDIO_DEBUG is defined. 1999-02-26 01:18:09 +00:00
mycroft 35399992bb Indicate whether the decive is full or half duplex at attach time. 1999-02-19 17:09:16 +00:00
mycroft e5f5e628d2 Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.
1999-02-17 02:37:38 +00:00
augustss 33f1482ece Make sure recording is started before we return EWOULDBLOCK in a read(). 1998-12-27 23:25:32 +00:00