The NetBSD Project

CVS log for src/sys/dev/Attic/audio.c

[BACK] Up to [cvs.NetBSD.org] / src / sys / dev

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.357.2.14: download - view: text, markup, annotated - select for diffs
Mon Oct 28 19:12:17 2019 UTC (7 years ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-3-RELEASE, netbsd-8-2-RELEASE
Diff to: previous 1.357.2.13: preferred, colored; branchpoint 1.357: preferred, colored; next MAIN 1.358: preferred, colored
Changes since revision 1.357.2.13: +5 -2 lines
Apply patch, requested by nat in ticket #1419:

PR kern/54547:
do not allow mmap() of audio devices that have not been opened for r/w.

Revision 1.457.2.1
Mon Jun 10 22:07:04 2019 UTC (7 years, 5 months ago) by christos
Branches: phil-wifi
FILE REMOVED
Changes since revision 1.457: +2 -2 lines
Sync with HEAD

Revision 1.461
Wed May 8 13:40:17 2019 UTC (7 years, 6 months ago) by isaki
Branches: MAIN
CVS tags: thorpej-futex-base, phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, perseant-exfatfs-base-20261102, perseant-exfatfs-base-20250801, perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, bouyer-xenpvh-base2, bouyer-xenpvh-base1, bouyer-xenpvh-base, bouyer-xenpvh, bouyer-sunxi-drm-base, bouyer-sunxi-drm, ad-namecache-base3, ad-namecache-base2, ad-namecache-base1, ad-namecache-base, ad-namecache, HEAD
FILE REMOVED
Changes since revision 1.460: +2 -2 lines
Merge isaki-audio2 branch, the overhaul of audio subsystem.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly.  Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism.  The encoding/channels/frequency
  conversions are completely handled in the upper layer.  So the hard-
  ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
  - Obsoletes query_encoding and add query_format instead.
  - Obsoletes set_params and add set_format instead.
  - Remove drain, setfd, mappage.
  - The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).

Some file paths are changed:
- dev/audio.c         -> dev/audio/audio.c (rewritten)
- dev/audiovar.h      -> dev/audio/audiovar.h
- dev/audio_dai.h     -> dev/audio/audio_dai.h
- dev/audio_if.h      -> dev/audio/audio_if.h
- dev/audiobell.c     -> dev/audio/audiobell.c
- dev/audiobellvar.h  -> dev/audio/audiobellvar.h
- dev/mulaw.[ch]      -> dev/audio/mulaw.[ch] + dev/audio/alaw.c

Revision 1.460: download - view: text, markup, annotated - select for diffs
Thu May 2 09:19:28 2019 UTC (7 years, 6 months ago) by mlelstv
Branches: MAIN
Diff to: previous 1.459: preferred, colored
Changes since revision 1.459: +6 -3 lines
take interrupt lock when closing backend.

Revision 1.459.2.1
Sun Apr 21 04:28:59 2019 UTC (7 years, 6 months ago) by isaki
Branches: isaki-audio2
FILE REMOVED
Changes since revision 1.459: +2 -2 lines
Reimplement audio subsystem.
http://mail-index.netbsd.org/tech-kern/2019/04/01/msg024944.html
At first step, audio and devices tightly coupled to audio.
 audio.c -> dev/audio.c: completely rewritten.
 mulaw.c -> audio/mulaw.c, audio/alaw.c: improve quality.
 audiovar.h, mulaw.h: should be removed.
 audio/linear.c: efficient new linear-linear converter.
 auconv.[ch]: should be removed but need some functions for now.
 aurateconv, auvolconv: removed (new audio.c handles it).
 audiobell.c: efficient and small new bell driver.
 audiobelldata.h: removed 4KB sine wave data.
 pad/pad.c: catch up audio, but not cloneable for now.

Revision 1.459: download - view: text, markup, annotated - select for diffs
Wed Feb 27 02:27:38 2019 UTC (7 years, 8 months ago) by mrg
Branches: MAIN
CVS tags: isaki-audio2-base
Branch point for: isaki-audio2
Diff to: previous 1.458: preferred, colored
Changes since revision 1.458: +2 -6 lines
remove dated comment that was handled with audiomp or later.
sc_dying being set earlier assumes audio_enter() will reject
attempts to use this device.

Revision 1.452.2.3: download - view: text, markup, annotated - select for diffs
Thu Sep 6 06:55:48 2018 UTC (8 years, 2 months ago) by pgoyette
Branches: pgoyette-compat
CVS tags: pgoyette-compat-merge-20190127
Diff to: previous 1.452.2.2: preferred, colored; branchpoint 1.452: preferred, colored; next MAIN 1.453: preferred, colored
Changes since revision 1.452.2.2: +6 -6 lines
Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.458: download - view: text, markup, annotated - select for diffs
Mon Sep 3 16:29:30 2018 UTC (8 years, 2 months ago) by riastradh
Branches: MAIN
CVS tags: pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Diff to: previous 1.457: preferred, colored
Changes since revision 1.457: +6 -6 lines
Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int.  The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER!  Some subsystems have

	#define min(a, b)	((a) < (b) ? (a) : (b))
	#define max(a, b)	((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX.  Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate.  But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all.  (Who knows, maybe in some cases integer
truncation is actually intended!)

Revision 1.452.2.2: download - view: text, markup, annotated - select for diffs
Mon Jun 25 07:25:49 2018 UTC (8 years, 4 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.452.2.1: preferred, colored; branchpoint 1.452: preferred, colored
Changes since revision 1.452.2.1: +55 -15 lines
Sync with HEAD

Revision 1.357.2.13: download - view: text, markup, annotated - select for diffs
Thu Jun 7 18:24:16 2018 UTC (8 years, 5 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2
Diff to: previous 1.357.2.12: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.12: +57 -17 lines
Pull up following revision(s) (requested by nat in ticket #848):

	share/man/man9/Makefile: revision 1.422
	distrib/sets/lists/comp/mi: revision 1.2198
	share/man/man7/Makefile: revision 1.33
	share/man/man9/audio.9: revision 1.47
	share/man/man7/audio.7: file removal
	sys/dev/audio.c: revision 1.456
	sys/dev/audio.c: revision 1.457
	distrib/sets/lists/man/mi: revision 1.1591
	share/man/man9/intro.9: revision 1.20
	share/man/man7/audio.7: revision 1.3
	share/man/man9/audio_system.9: revision 1.1
	share/man/man7/intro.7: revision 1.26
	share/man/man4/audio.4: revision 1.86

Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring.  Found by mrg@
XXX pullup-8

Using audioctl without the -p switch defaults to the mix ring.  This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.
Addresses PR kern/52781.

Move the audio specification to section 9 under audio_system.
Ok wiz@

Revision 1.457: download - view: text, markup, annotated - select for diffs
Tue May 22 01:35:49 2018 UTC (8 years, 5 months ago) by nat
Branches: MAIN
CVS tags: phil-wifi-base, pgoyette-compat-0728, pgoyette-compat-0625, jdolecek-ncqfixes-base, jdolecek-ncqfixes
Branch point for: phil-wifi
Diff to: previous 1.456: preferred, colored
Changes since revision 1.456: +55 -15 lines
Using audioctl without the -p switch defaults to the mix ring.  This allows
setting the hardware gain etc.

Update the audio spec in audio.7 to reflect these changes.

Addresses PR kern/52781.

Revision 1.452.2.1: download - view: text, markup, annotated - select for diffs
Mon May 21 04:36:04 2018 UTC (8 years, 5 months ago) by pgoyette
Branches: pgoyette-compat
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +86 -25 lines
Sync with HEAD

Revision 1.456: download - view: text, markup, annotated - select for diffs
Thu May 17 11:35:31 2018 UTC (8 years, 6 months ago) by nat
Branches: MAIN
CVS tags: pgoyette-compat-0521
Diff to: previous 1.455: preferred, colored
Changes since revision 1.455: +4 -4 lines
Fix a typo with sc_out/inports when setting the hardware recording gain on the
mix ring.  Found by mrg@

XXX pullup-8

Revision 1.357.2.12: download - view: text, markup, annotated - select for diffs
Tue May 15 13:42:50 2018 UTC (8 years, 6 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.357.2.11: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.11: +86 -25 lines
Pull up following revision(s) (requested by nat in ticket #825):

	share/man/man7/Makefile: revision 1.32
	share/man/man9/audio.9: revision 1.46
	sys/dev/audio.c: revision 1.453
	sys/dev/audio.c: revision 1.454
	sys/dev/audio.c: revision 1.455
	share/man/man7/audio.7: revision 1.1
	share/man/man7/audio.7: revision 1.2
	share/man/man7/intro.7: revision 1.24
	share/man/man4/audio.4: revision 1.85
	distrib/sets/lists/man/mi: revision 1.1586

Fix numbering of vchan mixer controls to correspond to the vchan number in
use.

This makes the numbering of vchans consistient for audioctl and mixerctl.
Expose the audio_info structure of vchan zero(0) the mix ring to allow
setting the hardware gain and balance via audioctl(1) using the -p 0
switch.

It is not possible to influence the hardware gain/blance from the
audio_info structure of vchans 1 onwards.  It is now possible to return
the audio mixers audio format from the audio_info structure of vchan 0 to
ease applications configuring for mmapped play back.

This is conformant to the audio specification posted on tech-kern see:

        "NetBSD Audio Specification 2018"

or audio.7 manual page to be added in a follow up commit.
Add the audio mixer specification to section 7 of the manual.
See posting on tech-kern - "NetBSD Audio Specification 2018."
Update the introduction page to section 7 of the manual noting the audio
spec.

Various improvements, more markup, typo fixes.

Fix over cautious compiler error - setmode may not be initialized.

Revision 1.455: download - view: text, markup, annotated - select for diffs
Tue May 15 10:23:03 2018 UTC (8 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.454: preferred, colored
Changes since revision 1.454: +3 -3 lines
Fix over cautious compiler error - setmode may not be initialized.

Revision 1.454: download - view: text, markup, annotated - select for diffs
Tue May 15 00:28:00 2018 UTC (8 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.453: preferred, colored
Changes since revision 1.453: +56 -20 lines
Expose the audio_info structure of vchan zero(0) the mix ring to allow
setting the hardware gain and balance via audioctl(1) using the -p 0
switch.

It is not possible to influence the hardware gain/blance from the
audio_info structure of vchans 1 onwards.  It is now possible to return
the audio mixers audio format from the audio_info structure of vchan 0 to
ease applications configuring for mmapped play back.

This is conformant to the audio specification posted on tech-kern see:
	"NetBSD Audio Specification 2018"
or audio.7 manual page to be added in a follow up commit.

Revision 1.453: download - view: text, markup, annotated - select for diffs
Tue May 15 00:19:08 2018 UTC (8 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.452: preferred, colored
Changes since revision 1.452: +31 -6 lines
Fix numbering of vchan mixer controls to correspond to the vchan number in
use.
This makes the numbering of vchans consistient for audioctl and mixerctl.

Revision 1.357.2.11: download - view: text, markup, annotated - select for diffs
Mon Apr 16 14:11:44 2018 UTC (8 years, 7 months ago) by martin
Branches: netbsd-8
CVS tags: netbsd-8-0-RC1
Diff to: previous 1.357.2.10: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.10: +85 -76 lines
Pull up following revision(s) (requested by nat in ticket #759):

	sys/dev/audio.c: revision 1.367
	sys/dev/audio.c: revision 1.369
	sys/dev/audio.c: revision 1.376 (patch)
	sys/dev/audio.c: revision 1.377 (patch)
	sys/dev/audio.c: revision 1.378
	sys/dev/audio.c: revision 1.382 (patch)
	sys/dev/audio.c: revision 1.383 (patch)
	sys/dev/audio.c: revision 1.384
	sys/dev/audio.c: revision 1.388
	sys/dev/audio.c: revision 1.389
	sys/dev/audio.c: revision 1.395
	sys/dev/audio.c: revision 1.396 (patch)
	sys/dev/audio.c: revision 1.397
	sys/dev/audio.c: revision 1.403
	sys/dev/audio.c: revision 1.451
	sys/dev/audio.c: revision 1.452
	sys/dev/audiovar.h: revision 1.59 (patch)
	sys/dev/aurateconv.c: revision 1.21 (patch)
	sys/dev/auconv.c: revision 1.31 (patch)
	sys/dev/audiovar.h: revision 1.60 (patch)

Broadcast all conditional variables if in being deactivated so no readers
or writers get stuck.

Fix a panic caused by opening pad(4)'s mixer before the corresponding
audio device has attached.

Addresses PR kern/52424.

Improve audio_set_vchan_defaults().
- Correct confused input/output parameters.
- Remove sc->{sc_channels, sc_precision, sc_frequency}.  They are
  the same as sc->sc_vchan_params.{channels, precision, sample_rate}.
The input parameter of audio_set_vchan_defaults() is now only
sc->sc_vchan_params.

Fix PR kern/52437

const-ify.

0 -> NULL in audioattach()

"bits" sounds better than "name" for argument name.
I feel expression (name / NBBY) a little strange.

The audio module will now compile with WARNS=5.

Typo in debug message.

Remove a duplicated line.

Add missing initialization of sc_rfilters in audioattach().

Remove dead codes.

sc->sc_opens never changes in this loop and as a result of
previous sc_audiochan cleanup "sc_opens == 0" is the same as
"sc_audiochan is empty".

Clean up audio_allocbufs().

As a result of sc_audiochan cleanup, it is easy to access sc_hwvc.

Clean up audio_open().

As a result of sc_audiochan cleanup, this loop is the same as last + 1.
hw_if->set_params is mandatory, so it will never be NULL.

CID-1427745: kill possible buffer overflows.

Revert my wrong r1.380 and add a comment instead.

Revision 1.452: download - view: text, markup, annotated - select for diffs
Tue Feb 6 04:39:18 2018 UTC (8 years, 9 months ago) by isaki
Branches: MAIN
CVS tags: pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Diff to: previous 1.451: preferred, colored
Changes since revision 1.451: +3 -3 lines
Revert my wrong r1.380 and add a comment instead.

Revision 1.451: download - view: text, markup, annotated - select for diffs
Sun Jan 21 17:34:33 2018 UTC (8 years, 9 months ago) by christos
Branches: MAIN
Diff to: previous 1.450: preferred, colored
Changes since revision 1.450: +15 -11 lines
CID-1427745: kill possible buffer overflows.

Revision 1.357.2.10: download - view: text, markup, annotated - select for diffs
Mon Jan 15 00:08:55 2018 UTC (8 years, 10 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.9: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.9: +600 -376 lines
Pull up following revision(s) (requested by nat in ticket #489):
	share/man/man4/audio.4: 1.81-1.82
	sys/dev/audio.c: 1.376 via patch, 1.407-1.413, 1.415-1.440, 1.441 via patch, 1.443-1.450
	sys/dev/audiovar.h: 1.59 via patch, 1.65-1.68
Improve audio_set_vchan_defaults().
- Correct confused input/output parameters.
- Remove sc->{sc_channels, sc_precision, sc_frequency}.  They are
  the same as sc->sc_vchan_params.{channels, precision, sample_rate}.
The input parameter of audio_set_vchan_defaults() is now only
sc->sc_vchan_params.
Fix PR kern/52437
Move play/rec mix ring buffers into a virtual channel sc_mixring.  NFCI.
Call audio_mix for a third time - thus ensuring there is a block of data
in the mix ring before the audio interrupt occurs.
This addresses the instability seen in the audio atf tests.
Improve logic in audio_initbufs().  No functional changes intended.
Ensure proper use of sc_opens (play back) and sc_recopens (recording).
Fix logic for /dev/sound so audiosetinfo is only called once.
These changes are to ensure that init_output/input is only called once for
the respective function play back or recording.  For multiple recording or
plack back streams init_input/output is only called once fot the first
play/rec stream.
This addresses PR kern/52580, PR kern/52581 and PR kern/52582 analyzed and
reported by isaki@.
Fix return value.  fo_mmap is expected to return errno on error.
Fix return value.  fo_poll is expected to return revents on error.
Fix return value.  fo_kqfilter is expected to return errno on error.
This is the rest of 1.226 (10 years ago).
Add latency sysctl to adjust hw blocksize and hence latency of the mixer.
        usage: sysctl -w hw.hdafg0.lantency="value in milliseconds"
It is possible to set the latency of the mixer unless a static blocksize
is configured by the underlying hardware driver (pad, vcaudio on RPI).
Documentation updates to audio.4 will occur in a follow up commit.
OK christos@.
Ensure that the low/high water marks are at least PREFILL_BLOCKS.
Independent blocksizes for virtual channels where a static blocksize is
not stipulated by the underlying hw driver.
This improves latency in games esp. when the stream format differs from
the harware format.
OK christos@.
No externs in .c files!  Include ioconf.h for struct cfdriver xyz_cd.
round_blocksize is only used for the hardware ring buffer.  All other
buffers (mix ring, streams) are set to be a power of 2.
This allows for consistent latency where a static blocksize is enforced by
the underlying audio device driver.
Ok christos@.
Move calculation of sc_latency into a function.
The latency of the audio device is updated on attach in the audio auto
config and shown on screen.
Ok christos@.
Only allow blocksizes greater or equal to the calculated one.
This should help applications as the blocksize obtained (AUDIO_SET/GETINFO)
will work without stutter.
Ok christos@.
Revert commit rev 1.419 to audio.c.  This should address PR kern/52685.
This also means that drivers that have a static block size will have more
latency at lower sample rates/precision/channels.  Also audio drivers that
do more than supply rounded blocksizes in their round_blocksize functions
will have to be changed.
Use mix ring block size in audio write, startp, and audio drain.
Allow for block sizes less than hw block size.  This allows for the lowest
possible latency for all precision, sample rate and frequencies.
This is a rework of rev 1.419.
Calc latency when altering precision, frequency and channels sysctls.
No need to ratify block size twice as this is done in audio_initbufs.
This is a rework of rev 1.421.
Revert to previous.  It is necessary to use the calculated blocksize if
none supplied.
Tested by martin@.
Blocksizes sould be rounded to a power of 2 as OSS applications need this.
Tested by martin@.
AU_RING_SIZE -> s.bufsize in audio_initbufs.
A sysctl is now available to disable the in kernel mixer.
        sysctl -w hw.hdafg0.usemixer=0
There currently is a problem draining the last block with the mixer
disabled.  I will fix this in a follow up commit.
AFAIK there will be a problem wiht vs(4) on x68k with the mixer disabled
as the filters for mulaw, alaw and unsigned linear have been removed post
audio mixing changes.
Documentation for this sysctl variable will be made to audio.4 in a follow
up commit.
Ok christos@.
Use mixring blocksizes in the right places when mixer is enabled.
This means that x68k's vs audio works once again with sysctl usemixer=1.
Tested with xm6i.
Don't return EIO falsely when dealing with the hardware vc.
Draining of the hardware vc on close is now possible.
Plug memory leak as the mixer state does not grow or shrink when audio
mixing is disabled.  This avoids triggering a panic also.
Improved draining function for when the mixer is and is not enabled.
One block of silence is also played in audio drivers using start_output
when draining the hardware, this helps playback of short (less than
blocksize) samples.
Improved audiostartp for when audio mixing is disabled.
audio_pint improvements for when audio mixing is disabled.
When audio mixing is disabled there is only the hardware vc the mix ring
is not used.
The harware vc is rounded to a power of two then round_blocksize is called.
This improves playback and makes it possibile to use mmapped audio on usb.
For the virtual stream it is required to insert silence.  As these streams
are not harware streams audio_pint_silence is ineffective.
As audio_mix() was the only consumer of audio_pint_silence it has been
removed along with sc_sil_count - which was only used by this function.
Add vc to debug messages in audio_mix.
Also add debug message when available data in the vc is less than the mix
ring blocksize.  NFC.
Use correct combination of mix ring block size and vc playring used low
for signalling the writer or fetching data from the vc play ring filters.
When dealing with the ring buffer sc_mpr.s it is necessary to use the hwvc
or mixring block sizes as they represent the final size of the data to be
played back from the stream vc.
When dealing with sc_pustream when there is play back filters or not one
should use the vc->sc_mpr.blocksize, as this represents the amount of data
before going through play back filters.
This should address PR kern/52685.
Speed up improvements for MIX_FUNC.
As suggested by jmcneill@.
Only init the mix ring if sc_usemixer is enabled as with mixing set to
false the mix ring is not used.
Allow the hwvc block size to be set to any amount with audio mixing
disabled.
Convert double block size of data though the play back filters.  This is
primarily for when audio mixing is disabled to stop inserting silence when
there is data available.
This change should have no effect when mixing is enabled as there is only
1 block of data in the mix ring.
Whitespace.
Only signal a pause change on a transition of a pause change.
This addresses a problem found in audio/sox causing high cpu usage.
Path and analysis by Onno van der Linden.
Rework of play/rec threads to ensure effective use of locks.
Addresses part of PR kern/52889 where the mixing thread would not exit on
audio detach.
Forcefully detach children of audio instances.
This addresses part of PR kern/52889 as children of pad(4) were not
detaching.
Document the hw.driverN.latency sysctl variable.
Bump date for previous. Remove superfluous Pp.
Allow open of audioctl devices whilst audio is open with the mixer
disabled.

Revision 1.450: download - view: text, markup, annotated - select for diffs
Fri Jan 12 04:10:10 2018 UTC (8 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.449: preferred, colored
Changes since revision 1.449: +13 -2 lines
Allow open of audioctl devices whilst audio is open with the mixer
disabled.

XXX pullup -8

Revision 1.449: download - view: text, markup, annotated - select for diffs
Tue Jan 9 04:14:21 2018 UTC (8 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.448: preferred, colored
Changes since revision 1.448: +3 -3 lines
Forcefully detach children of audio instances.

This addresses part of PR kern/52889 as children of pad(4) were not
detaching.

Revision 1.448: download - view: text, markup, annotated - select for diffs
Tue Jan 9 04:10:27 2018 UTC (8 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.447: preferred, colored
Changes since revision 1.447: +23 -17 lines
Rework of play/rec threads to ensure effective use of locks.

Addresses part of PR kern/52889 where the mixing thread would not exit on
audio detach.

Revision 1.447: download - view: text, markup, annotated - select for diffs
Sat Jan 6 23:15:36 2018 UTC (8 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.446: preferred, colored
Changes since revision 1.446: +10 -6 lines
Only signal a pause change on a transition of a pause change.

This addresses a problem found in audio/sox causing high cpu usage.

Path and analysis by Onno van der Linden.

Revision 1.446: download - view: text, markup, annotated - select for diffs
Sat Jan 6 21:16:36 2018 UTC (8 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.445: preferred, colored
Changes since revision 1.445: +3 -3 lines
Whitespace.

Revision 1.445: download - view: text, markup, annotated - select for diffs
Sat Dec 16 16:04:20 2017 UTC (8 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.444: preferred, colored
Changes since revision 1.444: +10 -5 lines
Convert double block size of data though the play back filters.  This is
primarily for when audio mixing is disabled to stop inserting silence when
there is data available.

This change should have no effect when mixing is enabled as there is only
1 block of data in the mix ring.

Revision 1.444: download - view: text, markup, annotated - select for diffs
Sat Dec 16 15:58:56 2017 UTC (8 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.443: preferred, colored
Changes since revision 1.443: +5 -4 lines
Allow the hwvc block size to be set to any amount with audio mixing
disabled.

Revision 1.443: download - view: text, markup, annotated - select for diffs
Sat Dec 16 15:56:00 2017 UTC (8 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.442: preferred, colored
Changes since revision 1.442: +4 -4 lines
Only init the mix ring if sc_usemixer is enabled as with mixing set to
false the mix ring is not used.

Revision 1.261.2.2: download - view: text, markup, annotated - select for diffs
Sun Dec 3 11:36:58 2017 UTC (8 years, 11 months ago) by jdolecek
Branches: tls-maxphys
Diff to: previous 1.261.2.1: preferred, colored; branchpoint 1.261: preferred, colored; next MAIN 1.262: preferred, colored
Changes since revision 1.261.2.1: +2980 -1183 lines
update from HEAD

Revision 1.442: download - view: text, markup, annotated - select for diffs
Thu Nov 30 20:25:54 2017 UTC (8 years, 11 months ago) by christos
Branches: MAIN
CVS tags: tls-maxphys-base-20171202
Diff to: previous 1.441: preferred, colored
Changes since revision 1.441: +3 -2 lines
add fo_name so we can identify the fileops in a simple way.

Revision 1.441: download - view: text, markup, annotated - select for diffs
Tue Nov 28 07:35:27 2017 UTC (8 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.440: preferred, colored
Changes since revision 1.440: +8 -2 lines
Speed up improvements for MIX_FUNC.

As suggested by jmcneill@.

Revision 1.440: download - view: text, markup, annotated - select for diffs
Thu Nov 16 23:43:48 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.439: preferred, colored
Changes since revision 1.439: +4 -4 lines
Use correct combination of mix ring block size and vc playring used low
for signalling the writer or fetching data from the vc play ring filters.

When dealing with the ring buffer sc_mpr.s it is necessary to use the hwvc
or mixring block sizes as they represent the final size of the data to be
played back from the stream vc.

When dealing with sc_pustream when there is play back filters or not one
should use the vc->sc_mpr.blocksize, as this represents the amount of data
before going through play back filters.

This should address PR kern/52685.

Revision 1.439: download - view: text, markup, annotated - select for diffs
Thu Nov 16 23:32:11 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.438: preferred, colored
Changes since revision 1.438: +13 -10 lines
Add vc to debug messages in audio_mix.
Also add debug message when available data in the vc is less than the mix
ring blocksize.  NFC.

Revision 1.438: download - view: text, markup, annotated - select for diffs
Wed Nov 15 04:28:45 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.437: preferred, colored
Changes since revision 1.437: +5 -70 lines
For the virtual stream it is required to insert silence.  As these streams
are not harware streams audio_pint_silence is ineffective.

As audio_mix() was the only consumer of audio_pint_silence it has been
removed along with sc_sil_count - which was only used by this function.

Revision 1.437: download - view: text, markup, annotated - select for diffs
Wed Nov 15 02:13:33 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.436: preferred, colored
Changes since revision 1.436: +12 -20 lines
The harware vc is rounded to a power of two then round_blocksize is called.

This improves playback and makes it possibile to use mmapped audio on usb.

Revision 1.436: download - view: text, markup, annotated - select for diffs
Wed Nov 15 02:02:55 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.435: preferred, colored
Changes since revision 1.435: +17 -13 lines
audio_pint improvements for when audio mixing is disabled.

When audio mixing is disabled there is only the hardware vc the mix ring
is not used.

Revision 1.435: download - view: text, markup, annotated - select for diffs
Wed Nov 15 01:58:48 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.434: preferred, colored
Changes since revision 1.434: +16 -9 lines
Improved audiostartp for when audio mixing is disabled.

Revision 1.434: download - view: text, markup, annotated - select for diffs
Wed Nov 15 01:55:45 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.433: preferred, colored
Changes since revision 1.433: +11 -6 lines
Improved draining function for when the mixer is and is not enabled.

One block of silence is also played in audio drivers using start_output
when draining the hardware, this helps playback of short (less than
blocksize) samples.

Revision 1.433: download - view: text, markup, annotated - select for diffs
Wed Nov 15 01:49:59 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.432: preferred, colored
Changes since revision 1.432: +4 -3 lines
Plug memory leak as the mixer state does not grow or shrink when audio
mixing is disabled.  This avoids triggering a panic also.

Revision 1.432: download - view: text, markup, annotated - select for diffs
Wed Nov 15 01:45:57 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.431: preferred, colored
Changes since revision 1.431: +3 -3 lines
Don't return EIO falsely when dealing with the hardware vc.
Draining of the hardware vc on close is now possible.

Revision 1.431: download - view: text, markup, annotated - select for diffs
Tue Nov 7 09:26:55 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.430: preferred, colored
Changes since revision 1.430: +8 -8 lines
Use mixring blocksizes in the right places when mixer is enabled.

This means that x68k's vs audio works once again with sysctl usemixer=1.

Tested with xm6i.

Revision 1.430: download - view: text, markup, annotated - select for diffs
Tue Nov 7 01:13:19 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.429: preferred, colored
Changes since revision 1.429: +162 -63 lines
A sysctl is now available to disable the in kernel mixer.
	sysctl -w hw.hdafg0.usemixer=0

There currently is a problem draining the last block with the mixer
disabled.  I will fix this in a follow up commit.

AFAIK there will be a problem wiht vs(4) on x68k with the mixer disabled
as the filters for mulaw, alaw and unsigned linear have been removed post
audio mixing changes.

Documentation for this sysctl variable will be made to audio.4 in a follow
up commit.

Ok christos@.

Revision 1.429: download - view: text, markup, annotated - select for diffs
Sat Nov 4 01:50:48 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.428: preferred, colored
Changes since revision 1.428: +3 -3 lines
AU_RING_SIZE -> s.bufsize in audio_initbufs.

Revision 1.428: download - view: text, markup, annotated - select for diffs
Fri Nov 3 21:15:18 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.427: preferred, colored
Changes since revision 1.427: +8 -2 lines
Blocksizes sould be rounded to a power of 2 as OSS applications need this.

Tested by martin@.

Revision 1.427: download - view: text, markup, annotated - select for diffs
Fri Nov 3 21:12:44 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.426: preferred, colored
Changes since revision 1.426: +7 -3 lines
Revert to previous.  It is necessary to use the calculated blocksize if
none supplied.

Tested by martin@.

Revision 1.426: download - view: text, markup, annotated - select for diffs
Fri Nov 3 05:31:38 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.425: preferred, colored
Changes since revision 1.425: +3 -7 lines
No need to ratify block size twice as this is done in audio_initbufs.

This is a rework of rev 1.421.

Revision 1.425: download - view: text, markup, annotated - select for diffs
Fri Nov 3 05:09:49 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.424: preferred, colored
Changes since revision 1.424: +8 -2 lines
Calc latency when altering precision, frequency and channels sysctls.

Revision 1.424: download - view: text, markup, annotated - select for diffs
Fri Nov 3 05:07:37 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.423: preferred, colored
Changes since revision 1.423: +20 -4 lines
Allow for block sizes less than hw block size.  This allows for the lowest
possible latency for all precision, sample rate and frequencies.

This is a rework of rev 1.419.

Revision 1.423: download - view: text, markup, annotated - select for diffs
Fri Nov 3 05:04:17 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.422: preferred, colored
Changes since revision 1.422: +8 -7 lines
Use mix ring block size in audio write, startp, and audio drain.

Revision 1.422: download - view: text, markup, annotated - select for diffs
Thu Nov 2 02:08:02 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.421: preferred, colored
Changes since revision 1.421: +4 -16 lines
Revert commit rev 1.419 to audio.c.  This should address PR kern/52685.

This also means that drivers that have a static block size will have more
latency at lower sample rates/precision/channels.  Also audio drivers that
do more than supply rounded blocksizes in their round_blocksize functions
will have to be changed.

Revision 1.421: download - view: text, markup, annotated - select for diffs
Tue Oct 31 21:18:02 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.420: preferred, colored
Changes since revision 1.420: +4 -6 lines
Only allow blocksizes greater or equal to the calculated one.

This should help applications as the blocksize obtained (AUDIO_SET/GETINFO)
will work without stutter.

Ok christos@.

Revision 1.420: download - view: text, markup, annotated - select for diffs
Tue Oct 31 21:13:24 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.419: preferred, colored
Changes since revision 1.419: +27 -15 lines
Move calculation of sc_latency into a function.

The latency of the audio device is updated on attach in the audio auto
config and shown on screen.

Ok christos@.

Revision 1.419: download - view: text, markup, annotated - select for diffs
Tue Oct 31 21:09:26 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.418: preferred, colored
Changes since revision 1.418: +16 -4 lines
round_blocksize is only used for the hardware ring buffer.  All other
buffers (mix ring, streams) are set to be a power of 2.

This allows for consistent latency where a static blocksize is enforced by
the underlying audio device driver.

Ok christos@.

Revision 1.418: download - view: text, markup, annotated - select for diffs
Sat Oct 28 03:34:26 2017 UTC (9 years ago) by riastradh
Branches: MAIN
Diff to: previous 1.417: preferred, colored
Changes since revision 1.417: +4 -5 lines
No externs in .c files!  Include ioconf.h for struct cfdriver xyz_cd.

Revision 1.417: download - view: text, markup, annotated - select for diffs
Fri Oct 27 01:34:32 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.416: preferred, colored
Changes since revision 1.416: +40 -23 lines
Independent blocksizes for virtual channels where a static blocksize is
not stipulated by the underlying hw driver.

This improves latency in games esp. when the stream format differs from
the harware format.

OK christos@.

Revision 1.416: download - view: text, markup, annotated - select for diffs
Thu Oct 26 22:45:00 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.415: preferred, colored
Changes since revision 1.415: +6 -4 lines
Ensure that the low/high water marks are at least PREFILL_BLOCKS.

Revision 1.415: download - view: text, markup, annotated - select for diffs
Thu Oct 26 22:38:27 2017 UTC (9 years ago) by nat
Branches: MAIN
Diff to: previous 1.414: preferred, colored
Changes since revision 1.414: +75 -5 lines
Add latency sysctl to adjust hw blocksize and hence latency of the mixer.

	usage: sysctl -w hw.hdafg0.lantency="value in milliseconds"

It is possible to set the latency of the mixer unless a static blocksize
is configured by the underlying hardware driver (pad, vcaudio on RPI).

Documentation updates to audio.4 will occur in a follow up commit.

OK christos@.  XXX pullup-8.

Revision 1.414: download - view: text, markup, annotated - select for diffs
Wed Oct 25 08:12:38 2017 UTC (9 years ago) by maya
Branches: MAIN
Diff to: previous 1.413: preferred, colored
Changes since revision 1.413: +14 -6 lines
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- 	{ a, b, c, d
+ 	{
+ 	.f_isfd = a,
+ 	.f_attach = b,
+ 	.f_detach = c,
+ 	.f_event = d,
};

Revision 1.413: download - view: text, markup, annotated - select for diffs
Sat Oct 21 09:58:56 2017 UTC (9 years ago) by isaki
Branches: MAIN
Diff to: previous 1.412: preferred, colored
Changes since revision 1.412: +8 -7 lines
Fix return value.  fo_kqfilter is expected to return errno on error.
This is the rest of 1.226 (10 years ago).

Revision 1.412: download - view: text, markup, annotated - select for diffs
Sat Oct 21 09:12:40 2017 UTC (9 years ago) by isaki
Branches: MAIN
Diff to: previous 1.411: preferred, colored
Changes since revision 1.411: +5 -5 lines
Fix return value.  fo_poll is expected to return revents on error.

Revision 1.411: download - view: text, markup, annotated - select for diffs
Sat Oct 21 09:02:23 2017 UTC (9 years ago) by isaki
Branches: MAIN
Diff to: previous 1.410: preferred, colored
Changes since revision 1.410: +3 -3 lines
Fix return value.  fo_mmap is expected to return errno on error.

Revision 1.410: download - view: text, markup, annotated - select for diffs
Sun Oct 1 21:49:20 2017 UTC (9 years, 1 month ago) by nat
Branches: MAIN
Diff to: previous 1.409: preferred, colored
Changes since revision 1.409: +22 -20 lines
Ensure proper use of sc_opens (play back) and sc_recopens (recording).
Fix logic for /dev/sound so audiosetinfo is only called once.

These changes are to ensure that init_output/input is only called once for
the respective function play back or recording.  For multiple recording or
plack back streams init_input/output is only called once fot the first
play/rec stream.

This addresses PR kern/52580, PR kern/52581 and PR kern/52582 analyzed and
reported by isaki@.

Revision 1.409: download - view: text, markup, annotated - select for diffs
Sat Sep 30 05:37:55 2017 UTC (9 years, 1 month ago) by isaki
Branches: MAIN
Diff to: previous 1.408: preferred, colored
Changes since revision 1.408: +18 -14 lines
Improve logic in audio_initbufs().  No functional changes intended.

Revision 1.408: download - view: text, markup, annotated - select for diffs
Tue Sep 26 04:34:59 2017 UTC (9 years, 1 month ago) by nat
Branches: MAIN
Diff to: previous 1.407: preferred, colored
Changes since revision 1.407: +3 -2 lines
Call audio_mix for a third time - thus ensuring there is a block of data
in the mix ring before the audio interrupt occurs.

This addresses the instability seen in the audio atf tests.

Revision 1.407: download - view: text, markup, annotated - select for diffs
Sun Sep 24 23:40:41 2017 UTC (9 years, 1 month ago) by nat
Branches: MAIN
Diff to: previous 1.406: preferred, colored
Changes since revision 1.406: +90 -69 lines
Move play/rec mix ring buffers into a virtual channel sc_mixring.  NFCI.

Revision 1.357.2.9: download - view: text, markup, annotated - select for diffs
Sat Sep 23 17:39:34 2017 UTC (9 years, 1 month ago) by snj
Branches: netbsd-8
CVS tags: matt-nb8-mediatek-base, matt-nb8-mediatek
Diff to: previous 1.357.2.8: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.8: +57 -100 lines
Pull up following revision(s) (requested by isaki in ticket #285):
	sys/dev/audiovar.h: 1.64
	sys/dev/audio.c: 1.399-1.402, 1.404-1.405
	sys/dev/audio.c: 1.406 via patch
Clean up mix_write().
--
Fix typo. sc_mrr -> sc_mpr for play buffer.
--
Remove goto in mix_write()
--
Remove meaningless sc_blkset.
audio_calc_blksize() checks whether sc_blkset is set but
it seems to be always cleared before calling audio_calc_blksize().
--
Don't assign sc->sc_pr/rr.blksize in audio_initbufs().
For hwvc, it is calculated in audiosetinfno().  And the user vc should
not change sc->sc_pr/rr.blksize.  In addition, this assignments appear twice.
--
Remove duplicated code.
For hwvc, audio_calc_blksize() appears soon again.
For user vc, the userland format and HW format are separeted, so
audio_calc_blksize() here is no longer necessary.  In addition,
vc->sc_mpr.blksize is already initialized in audio_open().
--
Separete sc->sc_pr/rr (mix ring) block size and hwvc->sc_mpr/mrr (hw ring)
block size.  Now MI audio supports(revives) device with different precision
than mix ring's precision like vs(4) (4bit ADPCM).

Revision 1.357.2.8: download - view: text, markup, annotated - select for diffs
Sat Sep 23 17:13:10 2017 UTC (9 years, 1 month ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.7: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.7: +101 -186 lines
Pull up following revision(s) (requested by isaki in ticket #278):
	sys/dev/audiovar.h: revision 1.61-1.62
	sys/dev/audiovar.h: revision 1.63 via patch
	sys/dev/audio.c: revision 1.381, 1.390, 1.391, 1.393
	sys/dev/audio.c: revision 1.394 via patch
Use do .. while (0) for macros.
--
Introduce audio_destroy_pfilters()/audio_destroy_rfilters()
and use it.
--
Remove dead codes. chan will never be NULL in SIMPLEQ_FOREACH.
--
Move defines to the appropriate place.
--
Remove mixer chan from sc_audiochan.
Now sc_audiochan contains opened audio chan (and first special
element) only.
First I splitted sc_audiochan into sc_audiochan which has
audio chan (and first special element) and sc_mixerchan
which has mixer chan only.  However nobody else refers this
sc_mixerchan except additions to list and deletions from
list.  So mixer chan's list is not necessary.
--
Split the first special element from sc_audiochan list.
- This makes sc_audiochan a list of only open audio chan.
- "SIMPLEQ_FIRST(&sc->sc_audiochan)->vc" is now "sc->hwvc".
No functional changes (except one debug message).

Revision 1.357.2.7: download - view: text, markup, annotated - select for diffs
Mon Sep 11 05:33:23 2017 UTC (9 years, 2 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.6: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.6: +70 -73 lines
Pull up following revision(s) (requested by isaki in ticket #274):
	sys/dev/audio.c: 1.379, 1.380, 1.385, 1.398
Fix error handling of ring buffers allocation in audioattach().
NULL dereference, dead code, reference to uninitialized variable,
and mutex leak.
XXX In the current implementation, if audio_alloc_ring() returns error,
    it is not guaranteed that ringbuf->s.start will be NULL.
--
Fix a resource leak on error handling in audio_alloc_ring().
--
Fix resource leaks on error handling in audio_open().
--
Avoid possibility of integer overflow (and clean up).
- On 32bit arch and type argument is int32_t, orig[m] * tomix[m] is
  calculated first with int32 (possibility of overflow here) and then
  cast to int64_t for assignment.
- bigger_type is sufficient for product and result.

Revision 1.357.2.6: download - view: text, markup, annotated - select for diffs
Mon Sep 11 05:29:37 2017 UTC (9 years, 2 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.5: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.5: +30 -30 lines
Pull up following revision(s) (requested by isaki in ticket #273):
	sys/dev/audio.c: 1.368, 1.370
	sys/dev/audiovar.h: revision 1.57
Fix division by zero when precision < 8 in ifdef AUDIO_INTR_TIME.
--
Improve in #ifdef AUDIO_INTR_TIME.
Stop 19 years old weird #define, stop signed/unsigned mixing,
use int64_t instead of (u_)long to avoid integer overflow,
rearrange definitions in header, and fix indent.

Revision 1.406: download - view: text, markup, annotated - select for diffs
Sat Sep 2 15:26:43 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
Diff to: previous 1.405: preferred, colored
Changes since revision 1.405: +31 -45 lines
Separete sc->sc_pr/rr (mix ring) block size and hwvc->sc_mpr/mrr (hw ring)
block size.  Now MI audio supports(revives) device with different precision
than mix ring's precision like vs(4) (4bit ADPCM).

Revision 1.405: download - view: text, markup, annotated - select for diffs
Sat Sep 2 13:28:11 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
Diff to: previous 1.404: preferred, colored
Changes since revision 1.404: +2 -12 lines
Remove duplicated code.
For hwvc, audio_calc_blksize() appears soon again.
For user vc, the userland format and HW format are separeted, so
audio_calc_blksize() here is no longer necessary.  In addition,
vc->sc_mpr.blksize is already initialized in audio_open().

Revision 1.404: download - view: text, markup, annotated - select for diffs
Sat Sep 2 13:22:51 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
Diff to: previous 1.403: preferred, colored
Changes since revision 1.403: +3 -10 lines
Don't assign sc->sc_pr/rr.blksize in audio_initbufs().
For hwvc, it is calculated in audiosetinfno().  And the user vc should
not change sc->sc_pr/rr.blksize.  In addition, this assignments appear twice.

Revision 1.357.2.5: download - view: text, markup, annotated - select for diffs
Thu Aug 31 11:10:37 2017 UTC (9 years, 2 months ago) by martin
Branches: netbsd-8
Diff to: previous 1.357.2.4: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.4: +8 -8 lines
Pull up following revision(s) (requested by nat in ticket #238):
	sys/dev/audio.c: revision 1.392
	sys/dev/audio.c: revision 1.386
	sys/dev/audio.c: revision 1.387
Reset mixer ports on opening /dev/sound.
This fixes an issue reported on port-arm@ by Brian Buhrow.

Ensure to call mix write if inserting silence into the hw ring.
Addresses PR kern/52459.
Patch provided and tested by isaki@.

If the harware ring is starved of data...Insert silence into the mix ring
so mix_write can function properly.

Revision 1.266.2.4: download - view: text, markup, annotated - select for diffs
Mon Aug 28 17:52:00 2017 UTC (9 years, 2 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.266.2.3: preferred, colored; branchpoint 1.266: preferred, colored; next MAIN 1.267: preferred, colored
Changes since revision 1.266.2.3: +1366 -1272 lines
Sync with HEAD

Revision 1.403: download - view: text, markup, annotated - select for diffs
Sun Aug 20 05:12:17 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
CVS tags: nick-nhusb-base-20170825
Diff to: previous 1.402: preferred, colored
Changes since revision 1.402: +3 -3 lines
hw_if->set_params is mandatory, so it will never be NULL.

Revision 1.402: download - view: text, markup, annotated - select for diffs
Sun Aug 20 03:13:04 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
Diff to: previous 1.401: preferred, colored
Changes since revision 1.401: +2 -11 lines
Remove meaningless sc_blkset.
audio_calc_blksize() checks whether sc_blkset is set but
it seems to be always cleared before calling audio_calc_blksize().

Revision 1.401: download - view: text, markup, annotated - select for diffs
Sun Aug 20 03:02:36 2017 UTC (9 years, 2 months ago) by isaki
Branches: MAIN
Diff to: previous 1.400: preferred, colored
Changes since revision 1.400: +29 -31 lines
Remove goto in mix_write()

Revision 1.400: download - view: text, markup, annotated - select for diffs
Thu Aug 17 04:33:22 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.399: preferred, colored
Changes since revision 1.399: +3 -3 lines
Fix typo. sc_mrr -> sc_mpr for play buffer.

Revision 1.399: download - view: text, markup, annotated - select for diffs
Tue Aug 15 08:30:21 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.398: preferred, colored
Changes since revision 1.398: +6 -7 lines
Clean up mix_write().

Revision 1.398: download - view: text, markup, annotated - select for diffs
Tue Aug 15 08:28:21 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.397: preferred, colored
Changes since revision 1.397: +6 -6 lines
Avoid possibility of integer overflow (and clean up).
- On 32bit arch and type argument is int32_t, orig[m] * tomix[m] is
  calculated first with int32 (possibility of overflow here) and then
  cast to int64_t for assignment.
- bigger_type is sufficient for product and result.

Revision 1.397: download - view: text, markup, annotated - select for diffs
Tue Aug 15 05:31:52 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.396: preferred, colored
Changes since revision 1.396: +5 -6 lines
Clean up audio_open().
As a result of sc_audiochan cleanup, this loop is the same as last + 1.

Revision 1.396: download - view: text, markup, annotated - select for diffs
Tue Aug 15 05:11:25 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.395: preferred, colored
Changes since revision 1.395: +8 -5 lines
Clean up audio_allocbufs().
As a result of sc_audiochan cleanup, it is easy to access sc_hwvc.

Revision 1.395: download - view: text, markup, annotated - select for diffs
Tue Aug 15 05:05:32 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.394: preferred, colored
Changes since revision 1.394: +2 -8 lines
Remove dead codes.
sc->sc_opens never changes in this loop and as a result of
previous sc_audiochan cleanup "sc_opens == 0" is the same as
"sc_audiochan is empty".

Revision 1.394: download - view: text, markup, annotated - select for diffs
Tue Aug 15 04:42:56 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.393: preferred, colored
Changes since revision 1.393: +57 -109 lines
Split the first special element from sc_audiochan list.
- This makes sc_audiochan a list of only open audio chan.
- "SIMPLEQ_FIRST(&sc->sc_audiochan)->vc" is now "sc->hwvc".
No functional changes (except one debug message).

Revision 1.393: download - view: text, markup, annotated - select for diffs
Sun Aug 13 05:04:08 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.392: preferred, colored
Changes since revision 1.392: +5 -24 lines
Remove mixer chan from sc_audiochan.
Now sc_audiochan contains opened audio chan (and first special
element) only.

First I splitted sc_audiochan into sc_audiochan which has
audio chan (and first special element) and sc_mixerchan
which has mixer chan only.  However nobody else refers this
sc_mixerchan except additions to list and deletions from
list.  So mixer chan's list is not necessary.

Revision 1.392: download - view: text, markup, annotated - select for diffs
Tue Aug 8 22:21:35 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.391: preferred, colored
Changes since revision 1.391: +6 -6 lines
If the harware ring is starved of data...Insert silence into the mix ring
so mix_write can function properly.

Revision 1.391: download - view: text, markup, annotated - select for diffs
Tue Aug 8 05:58:12 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.390: preferred, colored
Changes since revision 1.390: +2 -14 lines
Remove dead codes. chan will never be NULL in SIMPLEQ_FOREACH.

Revision 1.390: download - view: text, markup, annotated - select for diffs
Tue Aug 8 05:54:14 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.389: preferred, colored
Changes since revision 1.389: +39 -45 lines
Introduce audio_destroy_pfilters()/audio_destroy_rfilters()
and use it.

Revision 1.389: download - view: text, markup, annotated - select for diffs
Tue Aug 8 05:46:23 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.388: preferred, colored
Changes since revision 1.388: +5 -4 lines
Add missing initialization of sc_rfilters in audioattach().

Revision 1.388: download - view: text, markup, annotated - select for diffs
Tue Aug 8 05:42:30 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.387: preferred, colored
Changes since revision 1.387: +2 -3 lines
Remove a duplicated line.

Revision 1.387: download - view: text, markup, annotated - select for diffs
Sun Aug 6 10:07:31 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.386: preferred, colored
Changes since revision 1.386: +2 -4 lines
Ensure to call mix write if inserting silence into the hw ring.

Addresses PR kern/52459.

Patch provided and tested by isaki@.

Revision 1.386: download - view: text, markup, annotated - select for diffs
Sat Aug 5 13:34:06 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.385: preferred, colored
Changes since revision 1.385: +4 -2 lines
Reset mixer ports on opening /dev/sound.

This fixes an issue reported on port-arm@ by Brian Buhrow.

Revision 1.385: download - view: text, markup, annotated - select for diffs
Thu Aug 3 11:39:06 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.384: preferred, colored
Changes since revision 1.384: +10 -21 lines
Fix resource leaks on error handling in audio_open().

Revision 1.357.2.4: download - view: text, markup, annotated - select for diffs
Tue Aug 1 23:25:11 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.3: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.3: +6 -17 lines
Pull up following revision(s) (requested by nat in ticket #167):
	sys/dev/audio.c: revision 1.373
	sys/dev/audio.c: revision 1.374
	sys/dev/audio.c: revision 1.375
Refactoring of order of auto config combinations.  Most common formats
come first.
Do not exceed AUDIO_MAX_CHANNELS.
Addresses PR kern/52435.
--
Remove unused code from audio_set_params.
Addresses PR kern/52434.
--
Remove dead code from audio open.  Found by isaki@.
Better error handling incase memory for the streams' ringbuffers cannot be
allocated.
Addresses PR kern/52433.

Revision 1.357.2.3: download - view: text, markup, annotated - select for diffs
Tue Aug 1 23:23:00 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.2: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.2: +3 -3 lines
Pull up following revision(s) (requested by nat in ticket #166):
	sys/dev/auconv.c: revision 1.30
	sys/dev/audio.c: revision 1.372
	sys/dev/ic/ac97.c: revision 1.97
	sys/dev/pci/azalia_codec.c: revision 1.81
Mixer device bounds checking.
Analysis by Ilja van Sprundel.

Revision 1.384: download - view: text, markup, annotated - select for diffs
Sun Jul 30 02:41:58 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.383: preferred, colored
Changes since revision 1.383: +3 -3 lines
Typo in debug message.

Revision 1.383: download - view: text, markup, annotated - select for diffs
Sun Jul 30 00:47:48 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.382: preferred, colored
Changes since revision 1.382: +12 -10 lines
The audio module will now compile with WARNS=5.

Revision 1.382: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:45:35 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.381: preferred, colored
Changes since revision 1.381: +8 -8 lines
"bits" sounds better than "name" for argument name.
I feel expression (name / NBBY) a little strange.

Revision 1.381: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:36:21 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.380: preferred, colored
Changes since revision 1.380: +11 -7 lines
Use do .. while (0) for macros.

Revision 1.380: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:33:45 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.379: preferred, colored
Changes since revision 1.379: +3 -2 lines
Fix a resource leak on error handling in audio_alloc_ring().

Revision 1.379: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:30:56 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.378: preferred, colored
Changes since revision 1.378: +57 -50 lines
Fix error handling of ring buffers allocation in audioattach().
NULL dereference, dead code, reference to uninitialized variable,
and mutex leak.
XXX In the current implementation, if audio_alloc_ring() returns error,
    it is not guaranteed that ringbuf->s.start will be NULL.

Revision 1.378: download - view: text, markup, annotated - select for diffs
Sat Jul 29 06:00:47 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.377: preferred, colored
Changes since revision 1.377: +14 -14 lines
0 -> NULL in audioattach()

Revision 1.377: download - view: text, markup, annotated - select for diffs
Sat Jul 29 05:55:58 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.376: preferred, colored
Changes since revision 1.376: +6 -6 lines
const-ify.

Revision 1.376: download - view: text, markup, annotated - select for diffs
Sat Jul 29 03:05:51 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.375: preferred, colored
Changes since revision 1.375: +62 -73 lines
Improve audio_set_vchan_defaults().
- Correct confused input/output parameters.
- Remove sc->{sc_channels, sc_precision, sc_frequency}.  They are
  the same as sc->sc_vchan_params.{channels, precision, sample_rate}.
The input parameter of audio_set_vchan_defaults() is now only
sc->sc_vchan_params.

Fix PR kern/52437

Revision 1.375: download - view: text, markup, annotated - select for diffs
Fri Jul 28 03:58:54 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.374: preferred, colored
Changes since revision 1.374: +4 -9 lines
Remove dead code from audio open.  Found by isaki@.
Better error handling incase memory for the streams' ringbuffers cannot be
allocated.

Addresses PR kern/52433.

Revision 1.374: download - view: text, markup, annotated - select for diffs
Fri Jul 28 03:29:19 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.373: preferred, colored
Changes since revision 1.373: +2 -8 lines
Remove unused code from audio_set_params.

Addresses PR kern/52434.

Revision 1.373: download - view: text, markup, annotated - select for diffs
Fri Jul 28 02:53:54 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.372: preferred, colored
Changes since revision 1.372: +4 -4 lines
Refactoring of order of auto config combinations.  Most common formats
come first.

Do not exceed AUDIO_MAX_CHANNELS.

Addresses PR kern/52435.

Revision 1.372: download - view: text, markup, annotated - select for diffs
Fri Jul 28 01:36:40 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.371: preferred, colored
Changes since revision 1.371: +3 -3 lines
Mixer device bounds checking.

Analysis by Ilja van Sprundel.

Revision 1.371: download - view: text, markup, annotated - select for diffs
Thu Jul 27 08:37:27 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.370: preferred, colored
Changes since revision 1.370: +6 -6 lines
"sc_format[0]." is better than "sc_format->" here.

Revision 1.370: download - view: text, markup, annotated - select for diffs
Thu Jul 27 08:28:18 2017 UTC (9 years, 3 months ago) by isaki
Branches: MAIN
Diff to: previous 1.369: preferred, colored
Changes since revision 1.369: +30 -30 lines
Improve in #ifdef AUDIO_INTR_TIME.
Stop 19 years old weird #define, stop signed/unsigned mixing,
use int64_t instead of (u_)long to avoid integer overflow,
rearrange definitions in header, and fix indent.

Revision 1.369: download - view: text, markup, annotated - select for diffs
Tue Jul 25 13:29:16 2017 UTC (9 years, 3 months ago) by nat
Branches: MAIN
Diff to: previous 1.368: preferred, colored
Changes since revision 1.368: +6 -3 lines
Fix a panic caused by opening pad(4)'s mixer before the corresponding
audio device has attached.

Addresses PR kern/52424.

Revision 1.257.2.5: download - view: text, markup, annotated - select for diffs
Fri Jul 21 04:06:50 2017 UTC (9 years, 3 months ago) by snj
Branches: netbsd-6
Diff to: previous 1.257.2.4: preferred, colored; branchpoint 1.257: preferred, colored; next MAIN 1.258: preferred, colored
Changes since revision 1.257.2.4: +6 -2 lines
Apply patch (requested by nat in ticket #1457):
Fix occasional stuttering that can be caused by ringbuffer overflow.

Revision 1.368: download - view: text, markup, annotated - select for diffs
Sun Jul 9 12:08:39 2017 UTC (9 years, 4 months ago) by isaki
Branches: MAIN
CVS tags: perseant-stdc-iso10646-base, perseant-stdc-iso10646
Diff to: previous 1.367: preferred, colored
Changes since revision 1.367: +8 -8 lines
Fix division by zero when precision < 8 in ifdef AUDIO_INTR_TIME.

Revision 1.263.2.2: download - view: text, markup, annotated - select for diffs
Sat Jul 8 16:37:54 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-7
CVS tags: netbsd-7-2-RELEASE
Diff to: previous 1.263.2.1: preferred, colored; branchpoint 1.263: preferred, colored; next MAIN 1.264: preferred, colored
Changes since revision 1.263.2.1: +6 -2 lines
Apply patch (requested by nat in ticket #1433):
Fix occasional stuttering that can be caused by ringbuffer overflow.

Revision 1.367: download - view: text, markup, annotated - select for diffs
Sat Jul 1 05:44:52 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.366: preferred, colored
Changes since revision 1.366: +6 -2 lines
Broadcast all conditional variables if in being deactivated so no readers
or writers get stuck.

Revision 1.357.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 30 06:43:07 2017 UTC (9 years, 4 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357.2.1: preferred, colored; branchpoint 1.357: preferred, colored
Changes since revision 1.357.2.1: +37 -27 lines
Pull up following revision(s) (requested by nat in ticket #71):
	sys/dev/audio.c: 1.359-1.366
	sys/dev/audiovar.h: 1.56
No need to reset the audioinfo whem dealing with the hardware ring.  This
avoids a panic with some audio devices.
Ok christos@.
--
sc_iffreq -> sc_frequency.  NFCI.
Ok christos@.
--
Allow for bigger data types to mix into to avoid overflow.
--
Check hardare precision in vchan_autoconfig.  Passes atf test again.
--
Use pustream params when clearing the next block in the mixring.
--
Check validbits against precision in vchan_autoconfig.  At present
validbits != precision is not supported.
This change will most likely break autoconfig on vs(4), for these machines
the parameters can be set to the paramaters reported at attach time via
sysctl.
--
Don't start playback or recording on the hw ring only stream ring buffers.
--
Don't autoconfig for 24 bits precision.  It does not work as yet.

Revision 1.366: download - view: text, markup, annotated - select for diffs
Sun Jun 25 10:28:22 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.365: preferred, colored
Changes since revision 1.365: +3 -3 lines
Don't autoconfig for 24 bits precision.  It does not work as yet.

Revision 1.365: download - view: text, markup, annotated - select for diffs
Sun Jun 25 09:42:40 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.364: preferred, colored
Changes since revision 1.364: +8 -2 lines
Don't start playback or recording on the hw ring only stream ring buffers.

Revision 1.364: download - view: text, markup, annotated - select for diffs
Sun Jun 25 02:47:28 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.363: preferred, colored
Changes since revision 1.363: +4 -2 lines
Check validbits against precision in vchan_autoconfig.  At present
validbits != precision is not supported.

This change will most likely break autoconfig on vs(4), for these machines
the parameters can be set to the paramaters reported at attach time via
sysctl.

Revision 1.363: download - view: text, markup, annotated - select for diffs
Sun Jun 25 02:11:40 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.362: preferred, colored
Changes since revision 1.362: +6 -6 lines
Use pustream params when clearing the next block in the mixring.

Revision 1.362: download - view: text, markup, annotated - select for diffs
Wed Jun 21 08:40:05 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.361: preferred, colored
Changes since revision 1.361: +5 -3 lines
Check hardare precision in vchan_autoconfig.  Passes atf test again.

Revision 1.361: download - view: text, markup, annotated - select for diffs
Tue Jun 20 08:33:11 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.360: preferred, colored
Changes since revision 1.360: +10 -10 lines
Allow for bigger data types to mix into to avoid overflow.

Revision 1.360: download - view: text, markup, annotated - select for diffs
Tue Jun 20 07:45:01 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.359: preferred, colored
Changes since revision 1.359: +12 -12 lines
sc_iffreq -> sc_frequency.  NFCI.

Ok christos@.

Revision 1.359: download - view: text, markup, annotated - select for diffs
Tue Jun 20 07:42:31 2017 UTC (9 years, 4 months ago) by nat
Branches: MAIN
Diff to: previous 1.358: preferred, colored
Changes since revision 1.358: +3 -3 lines
No need to reset the audioinfo whem dealing with the hardware ring.  This
avoids a panic with some audio devices.

Ok christos@.

Revision 1.357.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 9 17:00:46 2017 UTC (9 years, 5 months ago) by snj
Branches: netbsd-8
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +21 -10 lines
Pull up following revision(s) (requested by nat in ticket #18):
	sys/dev/audio.c: revision 1.358
Retrn error to userland from startp/startr depending on the error from
trigger/start output/input.
Found by jmcneill@.

Revision 1.358: download - view: text, markup, annotated - select for diffs
Thu Jun 8 13:05:03 2017 UTC (9 years, 5 months ago) by nat
Branches: MAIN
Diff to: previous 1.357: preferred, colored
Changes since revision 1.357: +21 -10 lines
Retrn error to userland from startp/startr depending on the error from
trigger/start output/input.

Found by jmcneill@.

Revision 1.357: download - view: text, markup, annotated - select for diffs
Thu Jun 1 09:44:30 2017 UTC (9 years, 5 months ago) by pgoyette
Branches: MAIN
CVS tags: netbsd-8-base
Branch point for: netbsd-8
Diff to: previous 1.356: preferred, colored
Changes since revision 1.356: +56 -4 lines
Add infrastructure for modularization of audio, midi, and sequencer

Revision 1.356: download - view: text, markup, annotated - select for diffs
Thu Jun 1 02:45:08 2017 UTC (9 years, 5 months ago) by chs
Branches: MAIN
Diff to: previous 1.355: preferred, colored
Changes since revision 1.355: +3 -4 lines
remove checks for failure after memory allocation calls that cannot fail:

  kmem_alloc() with KM_SLEEP
  kmem_zalloc() with KM_SLEEP
  percpu_alloc()
  pserialize_create()
  psref_class_create()

all of these paths include an assertion that the allocation has not failed,
so callers should not assert that again.

Revision 1.355: download - view: text, markup, annotated - select for diffs
Sun May 28 21:36:18 2017 UTC (9 years, 5 months ago) by nat
Branches: MAIN
Diff to: previous 1.354: preferred, colored
Changes since revision 1.354: +2 -6 lines
Now that the scope of setting the gain is limited, the hack for /dev/sound
no longer applies.

Revision 1.354: download - view: text, markup, annotated - select for diffs
Sun May 28 21:12:59 2017 UTC (9 years, 5 months ago) by nat
Branches: MAIN
Diff to: previous 1.353: preferred, colored
Changes since revision 1.353: +7 -14 lines
The scope of setting the gain for playback or recording is now limited to
operating on the volume of its virtual channel.

Revision 1.353: download - view: text, markup, annotated - select for diffs
Sat May 27 13:55:58 2017 UTC (9 years, 5 months ago) by nat
Branches: MAIN
Diff to: previous 1.352: preferred, colored
Changes since revision 1.352: +11 -7 lines
Be even more carefull with devices that support only play back OR capture.

Addresses PR kern/52256.

Revision 1.352: download - view: text, markup, annotated - select for diffs
Tue May 23 07:57:26 2017 UTC (9 years, 5 months ago) by nat
Branches: MAIN
Diff to: previous 1.351: preferred, colored
Changes since revision 1.351: +18 -15 lines
Fix broken logic with regard to the use of uvm_unmap.  Call uvm_unmap with
the correct arguments.

Ok chs@.

Revision 1.327.2.5: download - view: text, markup, annotated - select for diffs
Fri May 19 00:22:56 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.327.2.4: preferred, colored; branchpoint 1.327: preferred, colored; next MAIN 1.328: preferred, colored
Changes since revision 1.327.2.4: +60 -42 lines
Resolve conflicts from previous merge (all resulting from $NetBSD
keywork expansion)

Revision 1.351: download - view: text, markup, annotated - select for diffs
Tue May 16 23:55:53 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
CVS tags: prg-localcount2-base3
Diff to: previous 1.350: preferred, colored
Changes since revision 1.350: +7 -4 lines
Set sc_[trigger/rec]_started before the call to trigger_[input/output].
This prevents multiple calls to trigger_[input/output] for those drivers
that drop sc_intr_lock in there trigger_[input/output] functions.

Revision 1.350: download - view: text, markup, annotated - select for diffs
Tue May 16 21:43:18 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.349: preferred, colored
Changes since revision 1.349: +2 -6 lines
Revert the changes made with holding sc_lock in audiostartp/startr made in
rev 1.347.  The audio tests should run again.

Revision 1.349: download - view: text, markup, annotated - select for diffs
Mon May 15 12:07:32 2017 UTC (9 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.348: preferred, colored
Changes since revision 1.348: +10 -6 lines
Be carefull with play-only/record-only devices. Suggestion from Jared,
avoids a crash with hdmi audio.

Revision 1.348: download - view: text, markup, annotated - select for diffs
Mon May 15 09:43:56 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.347: preferred, colored
Changes since revision 1.347: +6 -4 lines
Possibile vchan mixer overflow panic avoided.

Revision 1.347: download - view: text, markup, annotated - select for diffs
Mon May 15 01:03:47 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.346: preferred, colored
Changes since revision 1.346: +6 -2 lines
Don't hold sc_lock whilst calling mix_write/read.  This makes uaudio work
again.

With regard to uaudio however tyr-quake's audio does not work well.

Revision 1.346: download - view: text, markup, annotated - select for diffs
Sun May 14 10:57:32 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.345: preferred, colored
Changes since revision 1.345: +4 -4 lines
Increase the priority of the mixing/record threads as high as possibile.

Suggested by mrg@.

Revision 1.345: download - view: text, markup, annotated - select for diffs
Sun May 14 10:08:49 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.344: preferred, colored
Changes since revision 1.344: +5 -5 lines
Restore the use of sc_intr_lock as it was in rev 1.334.
The ring buffer pages are now wired so the use of the interrupt lock won't
cause panics.

Ok riastradh@.

Revision 1.344: download - view: text, markup, annotated - select for diffs
Sun May 14 10:01:34 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.343: preferred, colored
Changes since revision 1.343: +15 -8 lines
Use uvm_map_pageable to wire audio ringbuffer pages an virtual addresses.

Ok riastradh@.

Revision 1.343: download - view: text, markup, annotated - select for diffs
Fri May 12 07:12:37 2017 UTC (9 years, 6 months ago) by martin
Branches: MAIN
Diff to: previous 1.342: preferred, colored
Changes since revision 1.342: +3 -3 lines
Fix a debug printf

Revision 1.342: download - view: text, markup, annotated - select for diffs
Fri May 12 04:15:40 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.341: preferred, colored
Changes since revision 1.341: +15 -8 lines
Blksize is now calculated on sc_pustream/sc_rustream.
Don't allow hw ring buffer to be saturated and data overwritten.

It should help PR kern/52175.

Revision 1.341: download - view: text, markup, annotated - select for diffs
Thu May 11 23:39:15 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.340: preferred, colored
Changes since revision 1.340: +4 -4 lines
UVM_ADV_NORMAL-> UVM_ADV_RANDOM as this reflects the usage more acurately.

Ok riastradh@.

Revision 1.340: download - view: text, markup, annotated - select for diffs
Thu May 11 23:32:27 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.339: preferred, colored
Changes since revision 1.339: +3 -3 lines
If silence is inserted into hw ring directly the free space in the hw ring
not mix ring is needed.

Revision 1.339: download - view: text, markup, annotated - select for diffs
Thu May 11 23:26:48 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.338: preferred, colored
Changes since revision 1.338: +4 -7 lines
Improved overflow test for audio_mmap.

Ok riastradh@.

Revision 1.338: download - view: text, markup, annotated - select for diffs
Thu May 11 23:20:38 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.337: preferred, colored
Changes since revision 1.337: +6 -8 lines
Revert FNONBLOCK logic to that from rev 1.335.

Ok riastradh@.

Revision 1.327.2.4: download - view: text, markup, annotated - select for diffs
Thu May 11 02:58:38 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.327.2.3: preferred, colored; branchpoint 1.327: preferred, colored
Changes since revision 1.327.2.3: +136 -81 lines
Sync with HEAD

Revision 1.337: download - view: text, markup, annotated - select for diffs
Mon May 8 07:31:34 2017 UTC (9 years, 6 months ago) by martin
Branches: MAIN
CVS tags: prg-localcount2-base2
Diff to: previous 1.336: preferred, colored
Changes since revision 1.336: +3 -3 lines
Fix a debugging message

Revision 1.336: download - view: text, markup, annotated - select for diffs
Sun May 7 08:19:39 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.335: preferred, colored
Changes since revision 1.335: +107 -64 lines
Audio mmap now works with all devices as hw->mappage is no longer used.
Audio ring buffers are now uvm objects.

This was made possibile with help from christos@ and much help and mmap
functions written by riastradh@.

Revision 1.335: download - view: text, markup, annotated - select for diffs
Sat May 6 00:13:25 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.334: preferred, colored
Changes since revision 1.334: +20 -14 lines
Improved hw draining.  Draining of hw will only complete if silence has
been played in the mix ring.

Must hold sc_intr_lock when gettin used value of mix ring.

Clearing of the next block to be written to of the mix ring has moved into
audio_mix.

Revision 1.334: download - view: text, markup, annotated - select for diffs
Fri May 5 05:46:49 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.333: preferred, colored
Changes since revision 1.333: +10 -12 lines
Revert to previous.

Simplification of copying data from mix ring to hw ring.

Revision 1.333: download - view: text, markup, annotated - select for diffs
Fri May 5 00:38:50 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.332: preferred, colored
Changes since revision 1.332: +7 -7 lines
Bounds checking inside the mixing of the audio block.

Addresses PR kern/52175.

Revision 1.332: download - view: text, markup, annotated - select for diffs
Tue May 2 07:25:50 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.331: preferred, colored
Changes since revision 1.331: +4 -4 lines
Ignore the interrupt if playback or recording has not started vs not open
for recording or playback.

Revision 1.331: download - view: text, markup, annotated - select for diffs
Tue May 2 06:37:11 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.330: preferred, colored
Changes since revision 1.330: +6 -4 lines
More debuging output - if mix or hw ring inserts silence.

This is to help identify the cause of PR kern/52175.

Revision 1.330: download - view: text, markup, annotated - select for diffs
Tue May 2 06:25:05 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
Diff to: previous 1.329: preferred, colored
Changes since revision 1.329: +8 -2 lines
Explicitly set ioflag in audio_[read/write] IO_NDELAY if O_NONBLOCK is set
in f_flags.  This makes nonblocking reads and writes behave normally.

Addresses PR kern/52196.

Revision 1.327.2.3: download - view: text, markup, annotated - select for diffs
Tue May 2 03:19:18 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.327.2.2: preferred, colored; branchpoint 1.327: preferred, colored
Changes since revision 1.327.2.2: +60 -81 lines
Sync with HEAD - tag prg-localcount2-base1

Revision 1.327.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 29 11:12:14 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.327.2.1: preferred, colored; branchpoint 1.327: preferred, colored
Changes since revision 1.327.2.1: +2 -3 lines
Remove more unnecessary #include for sys/localcount.h

Revision 1.329: download - view: text, markup, annotated - select for diffs
Fri Apr 28 06:59:49 2017 UTC (9 years, 6 months ago) by martin
Branches: MAIN
CVS tags: prg-localcount2-base1
Diff to: previous 1.328: preferred, colored
Changes since revision 1.328: +20 -16 lines
Make "options AUDIO_DEBUG=0" create a silent-by-default version of the
debug output, toggled at runtime by setting audiodebug to a higher value.
To get boot time debugging, use "options AUDIO_DEBUG=1".

Revision 1.327.2.1: download - view: text, markup, annotated - select for diffs
Thu Apr 27 05:36:35 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: prg-localcount2
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +23 -8 lines
Restore all work from the former pgoyette-localcount branch (which is
now abandoned doe to cvs merge botch).

The branch now builds, and installs via anita.  There are still some
problems (cgd is non-functional and all atf tests time-out) but they
will get resolved soon.

Revision 1.291.2.3: download - view: text, markup, annotated - select for diffs
Wed Apr 26 11:45:23 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.291.2.2: preferred, colored; branchpoint 1.291: preferred, colored; next MAIN 1.292: preferred, colored
Changes since revision 1.291.2.2: +42 -67 lines
Sync with HEAD

Revision 1.328: download - view: text, markup, annotated - select for diffs
Wed Apr 26 11:32:04 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
CVS tags: bouyer-socketcan-base1
Diff to: previous 1.327: preferred, colored
Changes since revision 1.327: +42 -67 lines
Improved blksize calculation.
audio_fill_silence instead of audio_pint_silence for the mix ring.

Addresses PR kern/52195.

Revision 1.291.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 26 10:10:04 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.291.2.1: preferred, colored; branchpoint 1.291: preferred, colored
Changes since revision 1.291.2.1: +10 -5 lines
SYnc with HEAD

Revision 1.268.2.8: download - view: text, markup, annotated - select for diffs
Wed Apr 26 02:53:10 2017 UTC (9 years, 6 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.7: preferred, colored; branchpoint 1.268: preferred, colored; next MAIN 1.269: preferred, colored
Changes since revision 1.268.2.7: +87 -103 lines
Sync with HEAD

Revision 1.327: download - view: text, markup, annotated - select for diffs
Sat Apr 22 10:37:51 2017 UTC (9 years, 6 months ago) by nat
Branches: MAIN
CVS tags: prg-localcount2-base, pgoyette-localcount-20170426
Branch point for: prg-localcount2
Diff to: previous 1.326: preferred, colored
Changes since revision 1.326: +10 -5 lines
If there is no data in the mix ring, insert silence.

This will ensure that the hardware output pointer remains valid.

Revision 1.291.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 21 16:53:44 2017 UTC (9 years, 6 months ago) by bouyer
Branches: bouyer-socketcan
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +1126 -930 lines
Sync with HEAD

Revision 1.326: download - view: text, markup, annotated - select for diffs
Mon Apr 17 22:40:06 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.325: preferred, colored
Changes since revision 1.325: +17 -79 lines
Improved mixing function - more expensive in cycles though.
hw.driverN.saturate is no longer needed and has been removed.

Mixing function thanks to jmcneill@.

Revision 1.325: download - view: text, markup, annotated - select for diffs
Mon Apr 17 20:17:08 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.324: preferred, colored
Changes since revision 1.324: +6 -6 lines
hw.driverN.saturate bool->integer (default 16).

This means for a greater number than 16 (or user set value) the saturate
function is turned off.  Results in better listening if a large number of
channels are in use.

Revision 1.324: download - view: text, markup, annotated - select for diffs
Fri Apr 14 00:05:46 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.323: preferred, colored
Changes since revision 1.323: +9 -7 lines
Increase the priority of the mixing thread yet again.
Ensure that there is data in the mix ring.

Addresses PR kern/52098.

Revision 1.323: download - view: text, markup, annotated - select for diffs
Wed Apr 12 14:21:12 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.322: preferred, colored
Changes since revision 1.322: +4 -4 lines
Increase the priority of the mixing thread to improve performace under
load.

This should address PR kern/52098.

Revision 1.322: download - view: text, markup, annotated - select for diffs
Wed Apr 12 14:15:50 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.321: preferred, colored
Changes since revision 1.321: +8 -4 lines
Insert silence into the mix ring if there is no audio (or audio cannot
keep up) from the channels.

Addresses PR kern/34647.

Revision 1.321: download - view: text, markup, annotated - select for diffs
Tue Apr 11 23:49:17 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.320: preferred, colored
Changes since revision 1.320: +11 -10 lines
audioclear needs first channel in the queue not 0 (fixes panic).
Ignore the interrupt completely (audio_[pr]int) if not open.

Revision 1.320: download - view: text, markup, annotated - select for diffs
Mon Apr 3 04:09:12 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
CVS tags: jdolecek-ncq-base, jdolecek-ncq
Diff to: previous 1.319: preferred, colored
Changes since revision 1.319: +4 -2 lines
Exclude mixer channels from channel numbering.

Revision 1.319: download - view: text, markup, annotated - select for diffs
Wed Mar 29 06:24:22 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.318: preferred, colored
Changes since revision 1.318: +10 -5 lines
Fix channel assignment for multiple channels.

This fixes a problem if two or more channels are opened and the first
(any but last channel) is closed and new channels are opened.

Revision 1.318: download - view: text, markup, annotated - select for diffs
Mon Mar 27 23:25:24 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.317: preferred, colored
Changes since revision 1.317: +6 -2 lines
Use play/record gain from last open.  Fixes jumping volume when opening
/dev/sound then /dev/audio.

Revision 1.317: download - view: text, markup, annotated - select for diffs
Tue Mar 21 07:04:29 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.316: preferred, colored
Changes since revision 1.316: +26 -3 lines
Renane ioctl AUDIO_SETPROC to AUDIO_SETCHAN.

Add an ioctl to return channel number (AUDIO_GETCHAN). This can be used
on audio/sound/audioctl devices.

Return EIO in read/write/ioctl/poll/stat if fp has been closed or is
invalid.

Update audio.4, audioio.h and audioctl(1) to reflect these changes.

Revision 1.316: download - view: text, markup, annotated - select for diffs
Mon Mar 20 22:42:39 2017 UTC (9 years, 7 months ago) by nat
Branches: MAIN
Diff to: previous 1.315: preferred, colored
Changes since revision 1.315: +5 -5 lines
Adjust array bounds depending on type in macros for mix/saturate/recswvol.

Revision 1.268.2.7: download - view: text, markup, annotated - select for diffs
Mon Mar 20 06:57:26 2017 UTC (9 years, 7 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.6: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.6: +1114 -907 lines
Sync with HEAD

Revision 1.315: download - view: text, markup, annotated - select for diffs
Thu Mar 16 00:21:30 2017 UTC (9 years, 8 months ago) by maya
Branches: MAIN
CVS tags: pgoyette-localcount-20170320
Diff to: previous 1.314: preferred, colored
Changes since revision 1.314: +111 -299 lines
Dedup functions which vary only by type using fancy macros.
mark them static. NFCI

Revision 1.314: download - view: text, markup, annotated - select for diffs
Mon Feb 27 23:31:00 2017 UTC (9 years, 8 months ago) by mrg
Branches: MAIN
Diff to: previous 1.313: preferred, colored
Changes since revision 1.313: +61 -38 lines
minor clean ups:
- mark a bunch of local things static
- export an explicit set of functions for audiobell, instead of hooking
  directly into the device callbacks, and avoid non-shared headers for
  the same prototypes
- s/audioprobe/audiomatch/
- use __func__

Revision 1.313: download - view: text, markup, annotated - select for diffs
Mon Feb 27 10:31:02 2017 UTC (9 years, 8 months ago) by nat
Branches: MAIN
Diff to: previous 1.312: preferred, colored
Changes since revision 1.312: +5 -6 lines
Audio passes the atf test again.

Revision 1.312: download - view: text, markup, annotated - select for diffs
Sun Feb 26 16:22:55 2017 UTC (9 years, 8 months ago) by riastradh
Branches: MAIN
Diff to: previous 1.311: preferred, colored
Changes since revision 1.311: +7 -7 lines
Paranoia: parenthesize macro operands.

Should be no functional change, based on how these macros are used in
this file.

Revision 1.311: download - view: text, markup, annotated - select for diffs
Fri Feb 24 16:53:24 2017 UTC (9 years, 8 months ago) by nat
Branches: MAIN
Diff to: previous 1.310: preferred, colored
Changes since revision 1.310: +2 -4 lines
Remove use of sc_intr_lock from audio_read.  Fixes LOCKDEBUG panics.

Revision 1.310: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:49:49 2017 UTC (9 years, 8 months ago) by nat
Branches: MAIN
Diff to: previous 1.309: preferred, colored
Changes since revision 1.309: +40 -38 lines
Simplify locking.  Hold intr lock only when dealing with sc_pr (mix ring)
or virtual channel 0 (hardware).

Revision 1.309: download - view: text, markup, annotated - select for diffs
Fri Feb 24 07:52:39 2017 UTC (9 years, 8 months ago) by skrll
Branches: MAIN
Diff to: previous 1.308: preferred, colored
Changes since revision 1.308: +3 -2 lines
Fix a locking botch in previous

Revision 1.308: download - view: text, markup, annotated - select for diffs
Thu Feb 23 23:19:04 2017 UTC (9 years, 8 months ago) by nat
Branches: MAIN
Diff to: previous 1.307: preferred, colored
Changes since revision 1.307: +18 -9 lines
Hold the intr_lock when broadcasting/waiting on sc_[rec]condvar.

Revision 1.307: download - view: text, markup, annotated - select for diffs
Tue Feb 21 20:23:37 2017 UTC (9 years, 8 months ago) by nat
Branches: MAIN
Diff to: previous 1.306: preferred, colored
Changes since revision 1.306: +21 -8 lines
Ensure we still have a virtual channel after sleeping on sc_lock.

Addresses PR kern/51746: Panics from audio.

Revision 1.306: download - view: text, markup, annotated - select for diffs
Tue Feb 14 09:41:29 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.305: preferred, colored
Changes since revision 1.305: +3 -3 lines
Don't call grow_mixer_states with sc_intr_lock held.

Addresses PR kern/51965.

Revision 1.305: download - view: text, markup, annotated - select for diffs
Mon Feb 13 04:47:59 2017 UTC (9 years, 9 months ago) by ozaki-r
Branches: MAIN
Diff to: previous 1.304: preferred, colored
Changes since revision 1.304: +7 -6 lines
Fix build of ALL of amd64

Revision 1.304: download - view: text, markup, annotated - select for diffs
Mon Feb 13 01:59:14 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.303: preferred, colored
Changes since revision 1.303: +3 -11 lines
Use fnullop_fcntl instead of audiofcntl.

Revision 1.303: download - view: text, markup, annotated - select for diffs
Sat Feb 11 08:36:30 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.302: preferred, colored
Changes since revision 1.302: +5 -5 lines
Audio passed the atf test again.

Revision 1.302: download - view: text, markup, annotated - select for diffs
Fri Feb 10 19:31:42 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.301: preferred, colored
Changes since revision 1.301: +780 -526 lines
Audio now uses fdclone, there is no longer a limitation of one audio
instance per process.  Virtual channels are placed in a queue, so there is
no longer a compile time limit of VAUDIOCHANS.

A new sysctl has been added to control multiple user access.
Mixer labels on virtual channels are now prefixed by vchan.

audiobell.c and audioctl have been updated to reflect these changes.

Use of fdclone was posted to tech-kern@ and improvements made.
Multiuser access control changes and the use of a queue were suggessted by
pgoyette@

Revision 1.301: download - view: text, markup, annotated - select for diffs
Tue Feb 7 02:05:26 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.300: preferred, colored
Changes since revision 1.300: +5 -2 lines
Ensure the vc block size is set before call to set defaults.

It should address PR kern/51746 Panics from audio.

Revision 1.266.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 5 13:40:26 2017 UTC (9 years, 9 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.266.2.2: preferred, colored; branchpoint 1.266: preferred, colored
Changes since revision 1.266.2.2: +2336 -825 lines
Sync with HEAD

Revision 1.300: download - view: text, markup, annotated - select for diffs
Fri Feb 3 20:13:52 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
CVS tags: nick-nhusb-base-20170204
Diff to: previous 1.299: preferred, colored
Changes since revision 1.299: +2 -4 lines
Don't check hardware precision in autoconfig as some drivers e.g vs(4) the
hardware precision is 4 bits.

Addresses PR/kern 51879: vs(4) audio attach failed.

Revision 1.299: download - view: text, markup, annotated - select for diffs
Fri Feb 3 20:07:55 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.298: preferred, colored
Changes since revision 1.298: +40 -22 lines
Improved drain function for vc[0].
No need to drain vc[0] for drivers written with start_output.

Revision 1.298: download - view: text, markup, annotated - select for diffs
Fri Jan 27 05:05:51 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.297: preferred, colored
Changes since revision 1.297: +17 -24 lines
Audio passes the ver 1.2 of the atf test again.  t_pad_outpuut will be
reverted in a follow up commit.

Revision 1.297: download - view: text, markup, annotated - select for diffs
Thu Jan 26 04:15:38 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.296: preferred, colored
Changes since revision 1.296: +82 -29 lines
Use sc_pr the mixing ring in full not just the first block.

Audio will pass the atf test again.

Revision 1.296: download - view: text, markup, annotated - select for diffs
Mon Jan 23 00:21:34 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.295: preferred, colored
Changes since revision 1.295: +3 -3 lines
Only call audio_initbufs and start playback if there were no errors.

Addresses PR kern/51707.

Revision 1.295: download - view: text, markup, annotated - select for diffs
Sun Jan 22 19:52:02 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.294: preferred, colored
Changes since revision 1.294: +2 -4 lines
Don't call initbufs before audio_set_defaults.  It is called in
audiosetinfo anyway.

Addresses PR kern/51707.

Revision 1.294: download - view: text, markup, annotated - select for diffs
Sat Jan 21 23:37:17 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.293: preferred, colored
Changes since revision 1.293: +11 -11 lines
Use more specific error messages if the setting of channel parameters
fails.  Use aprint_error_dev for this.

As suggested by pgoyette@

Revision 1.293: download - view: text, markup, annotated - select for diffs
Sat Jan 21 22:54:11 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.292: preferred, colored
Changes since revision 1.292: +7 -18 lines
Don't release/reacquire thread lock during open in setup_[p/r]filters.
This can lead to panics and/or unpredictable behaviour.
Found by maya@

Addresses PR kern/51746.

Revision 1.292: download - view: text, markup, annotated - select for diffs
Sat Jan 21 22:22:41 2017 UTC (9 years, 9 months ago) by nat
Branches: MAIN
Diff to: previous 1.291: preferred, colored
Changes since revision 1.291: +70 -9 lines
Add auto config for channel/hw format.

Addresses PR kern/51703.
Addresses PR kern/51760.
Addresses PR kern/51879.

Revision 1.291: download - view: text, markup, annotated - select for diffs
Sun Jan 15 00:04:01 2017 UTC (9 years, 10 months ago) by nat
Branches: MAIN
CVS tags: bouyer-socketcan-base
Branch point for: bouyer-socketcan
Diff to: previous 1.290: preferred, colored
Changes since revision 1.290: +2 -7 lines
Forgot not to decrement sc_opens on unsuccessful open.

Revision 1.290: download - view: text, markup, annotated - select for diffs
Sat Jan 14 20:05:37 2017 UTC (9 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.289: preferred, colored
Changes since revision 1.289: +10 -15 lines
Increment sc_opens only after channel is set up.

It should help PR kern/51746: Panics from audio.

Revision 1.268.2.6: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:31 2017 UTC (9 years, 10 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.5: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.5: +2229 -817 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.289: download - view: text, markup, annotated - select for diffs
Mon Jan 2 00:16:45 2017 UTC (9 years, 10 months ago) by nat
Branches: MAIN
CVS tags: pgoyette-localcount-20170107
Diff to: previous 1.288: preferred, colored
Changes since revision 1.288: +8 -4 lines
Audio passes the atf test again.

Revision 1.288: download - view: text, markup, annotated - select for diffs
Wed Dec 28 02:44:59 2016 UTC (9 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.287: preferred, colored
Changes since revision 1.287: +85 -147 lines
Audio device won't fail if one cannot set the common/hw format.

Audio won't be able to be opened though unless a common format is
configured properly.

This would alow the user to change the common format via sysctls
until hardware is configured.

Simplification of several functions.

Revision 1.287: download - view: text, markup, annotated - select for diffs
Sun Dec 25 22:44:24 2016 UTC (9 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.286: preferred, colored
Changes since revision 1.286: +47 -35 lines
Fix suspend/resume logic.

Revision 1.286: download - view: text, markup, annotated - select for diffs
Fri Dec 23 21:01:00 2016 UTC (9 years, 10 months ago) by nat
Branches: MAIN
Diff to: previous 1.285: preferred, colored
Changes since revision 1.285: +9 -16 lines
Simplify.  Handle draining of vc[0] differently.

Addresses PR kern/51710 audio playback works only once.

Revision 1.285: download - view: text, markup, annotated - select for diffs
Sat Dec 17 17:04:04 2016 UTC (9 years, 11 months ago) by maya
Branches: MAIN
Diff to: previous 1.284: preferred, colored
Changes since revision 1.284: +9 -7 lines
audio: don't use an uninitialized variable.

PR kern/51717: audioattach erroneously fails due to uninitialized variable
from flxd.

while here, switch to use aprint_error_dev.

Revision 1.284: download - view: text, markup, annotated - select for diffs
Sat Dec 17 16:08:29 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.283: preferred, colored
Changes since revision 1.283: +17 -20 lines
factor out duplicated code.

Revision 1.283: download - view: text, markup, annotated - select for diffs
Sat Dec 17 15:18:28 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.282: preferred, colored
Changes since revision 1.282: +30 -42 lines
fix broken, audio_{g,s}et_port logic.

Revision 1.282: download - view: text, markup, annotated - select for diffs
Fri Dec 16 22:14:15 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.281: preferred, colored
Changes since revision 1.281: +4 -4 lines
fix reversed test, NULL for clarity.

Revision 1.281: download - view: text, markup, annotated - select for diffs
Fri Dec 16 22:03:10 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.280: preferred, colored
Changes since revision 1.280: +3 -3 lines
catch attachment fault sooner.

Revision 1.280: download - view: text, markup, annotated - select for diffs
Fri Dec 16 16:03:28 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.279: preferred, colored
Changes since revision 1.279: +18 -2 lines
On failed attach hw_if is NULL, so guard against it in more places. Should
avoid crashes people have been seeing recently.

Revision 1.279: download - view: text, markup, annotated - select for diffs
Thu Dec 15 22:01:57 2016 UTC (9 years, 11 months ago) by pgoyette
Branches: MAIN
Diff to: previous 1.278: preferred, colored
Changes since revision 1.278: +5 -3 lines
In the n == VAUDIOCHANS case we need to call mutex_exit() before
returning.


Perhaps this will address PR kern/51721

Revision 1.278: download - view: text, markup, annotated - select for diffs
Tue Dec 13 17:12:51 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.277: preferred, colored
Changes since revision 1.277: +38 -4 lines
Add rescan for audio children.

Revision 1.277: download - view: text, markup, annotated - select for diffs
Sun Dec 11 10:28:00 2016 UTC (9 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.276: preferred, colored
Changes since revision 1.276: +3 -3 lines
Improve a panic message with a bit details

Revision 1.276: download - view: text, markup, annotated - select for diffs
Sun Dec 11 07:36:30 2016 UTC (9 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.275: preferred, colored
Changes since revision 1.275: +4 -3 lines
PR 50613: Onno van der Linden: unpausing audio(4) causes already written
          data to be dropped.
Applied patch prepared by Onno.

Revision 1.275: download - view: text, markup, annotated - select for diffs
Sat Dec 10 22:37:12 2016 UTC (9 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.274: preferred, colored
Changes since revision 1.274: +2 -8 lines
remove VAUDIOSPEAKER, needs to be done differently.

Revision 1.274: download - view: text, markup, annotated - select for diffs
Sat Dec 10 17:31:33 2016 UTC (9 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.273: preferred, colored
Changes since revision 1.273: +4 -4 lines
Avoid crashes in calcwater when audioattach did not fully complete

Revision 1.273: download - view: text, markup, annotated - select for diffs
Sat Dec 10 17:01:08 2016 UTC (9 years, 11 months ago) by maya
Branches: MAIN
Diff to: previous 1.272: preferred, colored
Changes since revision 1.272: +13 -13 lines
fix AUDIO_DEBUG build (it builds, it boots, it plays music)

typos (vhan to vchan), sc->sc_mode[n] to vc->sc_mode, etc.

Revision 1.272: download - view: text, markup, annotated - select for diffs
Sat Dec 10 16:08:04 2016 UTC (9 years, 11 months ago) by maya
Branches: MAIN
Diff to: previous 1.271: preferred, colored
Changes since revision 1.271: +2 -6 lines
remove redundant null check
allocating with KM_SLEEP can't fail

Revision 1.271: download - view: text, markup, annotated - select for diffs
Fri Dec 9 13:06:02 2016 UTC (9 years, 11 months ago) by martin
Branches: MAIN
Diff to: previous 1.270: preferred, colored
Changes since revision 1.270: +3 -3 lines
paddr_t might be a different size then a pointer, so cast  viauintptr_t
to avoid compiler warnings.

Revision 1.270: download - view: text, markup, annotated - select for diffs
Thu Dec 8 20:33:52 2016 UTC (9 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.269: preferred, colored
Changes since revision 1.269: +3 -3 lines
Fix a build error.  Found by joerg@

Revision 1.269: download - view: text, markup, annotated - select for diffs
Thu Dec 8 10:28:44 2016 UTC (9 years, 11 months ago) by nat
Branches: MAIN
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +2232 -798 lines
The audio sub-system now supports the following features as
posted to tech-kern:

    * Simultaneous playback and mixing of multiple streams
    * Playback streams can be of different encoding, frequency, precision
      and number of channels
    * Simultaneous recording to different formats
    * One audio device per process
    * Sysctls to set the common format frequency, precision and channels
    * Independent mixer controls for recording/playback per stream
    * Utilizes little cpu time for multiple streams / good performance
    * Compatible with existing programs that use OSS/NetBSD audio
    * Changes to audioctl(1) to allow specifying process id for corresponding
      audio device

Revision 1.266.2.2: download - view: text, markup, annotated - select for diffs
Wed Oct 5 20:55:39 2016 UTC (10 years, 1 month ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.266.2.1: preferred, colored; branchpoint 1.266: preferred, colored
Changes since revision 1.266.2.1: +16 -18 lines
Sync with HEAD

Revision 1.268.2.5: download - view: text, markup, annotated - select for diffs
Tue Jul 26 05:54:39 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.4: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.4: +3 -3 lines
Rename LOCALCOUNT_INITIALIZER to DEVSW_MODULE_INIT.  This better describes
what we're doing, and why.

Revision 1.268.2.4: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:52:14 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.3: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.3: +3 -3 lines
Fix typo in local copy

Revision 1.268.2.3: download - view: text, markup, annotated - select for diffs
Tue Jul 26 03:24:20 2016 UTC (10 years, 3 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.2: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.2: +20 -8 lines
Sync with HEAD

Revision 1.268.2.2: download - view: text, markup, annotated - select for diffs
Tue Jul 19 06:26:58 2016 UTC (10 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268.2.1: preferred, colored; branchpoint 1.268: preferred, colored
Changes since revision 1.268.2.1: +3 -9 lines
Instead of repeatedly typing the conditional initialization of the
.d_localcount members in the various {b,c}devsw, define an initializer
macro and use it.  This also removes the need for defining new symbols
for each 'struct localcount'.

As suggested by riastradh@

Revision 1.268.2.1: download - view: text, markup, annotated - select for diffs
Mon Jul 18 03:49:59 2016 UTC (10 years, 4 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.268: preferred, colored
Changes since revision 1.268: +10 -2 lines
Rump drivers are always installed via devsw_attach() so we need to
always allocate a 'struct localcount' for these drivers whenever they
are built as modules.

Revision 1.268: download - view: text, markup, annotated - select for diffs
Thu Jul 14 10:19:05 2016 UTC (10 years, 4 months ago) by msaitoh
Branches: MAIN
CVS tags: pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, nick-nhusb-base-20161204, nick-nhusb-base-20161004, localcount-20160914
Branch point for: pgoyette-localcount
Diff to: previous 1.267: preferred, colored
Changes since revision 1.267: +14 -16 lines
- Use aprint*() more in xxx_attach().
- Add missing aprint_naive("\n").
- Remove extra spaces and tabs.
- KNF.

Revision 1.267: download - view: text, markup, annotated - select for diffs
Sat Apr 23 10:15:31 2016 UTC (10 years, 6 months ago) by skrll
Branches: MAIN
CVS tags: nick-nhusb-base-20160907, nick-nhusb-base-20160529
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +5 -5 lines
Merge nick-nhusb

- API / infrastructure changes to support memory management changes.
- Memory management improvements and bug fixes.
- HCDs should now be MP safe
- conversion to KERNHIST based debug
- FS/LS isoc support on ehci(4).
- conversion to kmem(9)
- Some USB 3 support - mostly from Takahiro HAYASHI (t-hash).
- interrupt transfers now get proper DMA operations
- general bug fixes
    - kern/48308
    - uhub status notification improvements
    - umass(4) probe fix (applied to HEAD already)
    - ohci(4) short transfer fix

Revision 1.266.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 23 22:12:03 2016 UTC (10 years, 7 months ago) by skrll
Branches: nick-nhusb
Diff to: previous 1.266: preferred, colored
Changes since revision 1.266: +5 -5 lines
Tweak comment

Revision 1.263.2.1: download - view: text, markup, annotated - select for diffs
Sun Nov 23 13:07:05 2014 UTC (11 years, 11 months ago) by martin
Branches: netbsd-7
CVS tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +10 -2 lines
Pull up following revision(s) (requested by jmcneill in ticket #249):
	sys/modules/pad/Makefile: revision 1.2
	sys/arch/arm/allwinner/awin_hdmiaudio.c: revision 1.5
	sys/dev/pad/pad.c: revision 1.22
	sys/dev/pad/padvol.c: file removal
	sys/dev/pad/files.pad: revision 1.5
	sys/dev/auvolconv.c: revision 1.1
	sys/dev/pad/padvol.h: file removal
	sys/dev/audio.c: revision 1.266
	sys/dev/files.audio: revision 1.3 (via patch: sys/conf/files)
	sys/dev/auvolconv.h: revision 1.1
	sys/dev/pad/padvar.h: revision 1.5
	sys/dev/audio_if.h: revision 1.70
	sys/arch/arm/allwinner/files.awin: revision 1.26
Add common audio converters for software volume control. Only supports
slinear16_le and slinear16_be for now.
Convert pad(4) and awin_hdmiaudio to use the new converters.

Revision 1.266: download - view: text, markup, annotated - select for diffs
Tue Nov 18 01:50:12 2014 UTC (12 years ago) by jmcneill
Branches: MAIN
CVS tags: nick-nhusb-base-20160422, nick-nhusb-base-20160319, nick-nhusb-base-20151226, nick-nhusb-base-20150921, nick-nhusb-base-20150606, nick-nhusb-base-20150406, nick-nhusb-base
Branch point for: nick-nhusb
Diff to: previous 1.265: preferred, colored
Changes since revision 1.265: +10 -2 lines
add a helper function to get the hw device_t from an audio_softc

Revision 1.265: download - view: text, markup, annotated - select for diffs
Sat Nov 1 07:54:18 2014 UTC (12 years ago) by uebayasi
Branches: MAIN
Diff to: previous 1.264: preferred, colored
Changes since revision 1.264: +23 -2 lines
Revert previous.

Not only audio_attach_mi() but also audioprint() have to be separated.
midi.c has the same problem, and a little more complicated.  These will be
revisited later.

Revision 1.264: download - view: text, markup, annotated - select for diffs
Sat Nov 1 05:56:36 2014 UTC (12 years ago) by uebayasi
Branches: MAIN
Diff to: previous 1.263: preferred, colored
Changes since revision 1.263: +2 -23 lines
audio(4): Fix indirect circular dependency with audio if drivers

Provide audio_attach_mi(4) as inline so that audio if drivers don't need to
call functions in audio.c.  This way audio if drivers (e.g. auich(4)) can be
linked into kernel without audio.c.

Revision 1.261.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 20 00:03:35 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +14 -4 lines
Rebase to HEAD as of a few days ago.

Revision 1.262.2.1: download - view: text, markup, annotated - select for diffs
Sun Aug 10 06:54:50 2014 UTC (12 years, 3 months ago) by tls
Branches: tls-earlyentropy
Diff to: previous 1.262: preferred, colored; next MAIN 1.263: preferred, colored
Changes since revision 1.262: +3 -2 lines
Rebase.

Revision 1.263: download - view: text, markup, annotated - select for diffs
Fri Jul 25 08:10:35 2014 UTC (12 years, 3 months ago) by dholland
Branches: MAIN
CVS tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Diff to: previous 1.262: preferred, colored
Changes since revision 1.262: +3 -2 lines
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.

Revision 1.253.2.3: download - view: text, markup, annotated - select for diffs
Thu May 22 11:40:19 2014 UTC (12 years, 5 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.253.2.2: preferred, colored; branchpoint 1.253: preferred, colored; next MAIN 1.254: preferred, colored
Changes since revision 1.253.2.2: +13 -4 lines
sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.261.4.1: download - view: text, markup, annotated - select for diffs
Sun May 18 17:45:34 2014 UTC (12 years, 6 months ago) by rmind
Branches: rmind-smpnet
Diff to: previous 1.261: preferred, colored; next MAIN 1.262: preferred, colored
Changes since revision 1.261: +13 -4 lines
sync with head

Revision 1.262: download - view: text, markup, annotated - select for diffs
Sun Mar 16 05:20:26 2014 UTC (12 years, 8 months ago) by dholland
Branches: MAIN
CVS tags: yamt-pagecache-base9, rmind-smpnet-nbase, rmind-smpnet-base, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Diff to: previous 1.261: preferred, colored
Changes since revision 1.261: +13 -4 lines
Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.

Revision 1.257.2.4: download - view: text, markup, annotated - select for diffs
Wed Jun 13 19:14:17 2012 UTC (14 years, 5 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Diff to: previous 1.257.2.3: preferred, colored; branchpoint 1.257: preferred, colored
Changes since revision 1.257.2.3: +4 -4 lines
Pull up following revision(s) (requested by mrg in ticket #331):
	sys/dev/audio.c: revision 1.261
ensure that the intr lock is held for all audio_clear() callers.

Revision 1.253.2.2: download - view: text, markup, annotated - select for diffs
Wed May 23 10:07:55 2012 UTC (14 years, 5 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.253.2.1: preferred, colored; branchpoint 1.253: preferred, colored
Changes since revision 1.253.2.1: +4 -4 lines
sync with head.

Revision 1.257.2.3: download - view: text, markup, annotated - select for diffs
Mon May 7 03:03:18 2012 UTC (14 years, 6 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.257.2.2: preferred, colored; branchpoint 1.257: preferred, colored
Changes since revision 1.257.2.2: +14 -14 lines
Pull up following revision(s) (requested by mrg in ticket #205):
	sys/dev/audio.c: revision 1.260
don't hold the thread lock while calling allocm() or freem().  fixes PR#46121

Revision 1.255.2.5: download - view: text, markup, annotated - select for diffs
Mon Apr 30 02:42:32 2012 UTC (14 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.255.2.4: preferred, colored; branchpoint 1.255: preferred, colored; next MAIN 1.256: preferred, colored
Changes since revision 1.255.2.4: +4 -4 lines
pullup audio.c 1.261: audio_clear() locking fixes

Revision 1.261: download - view: text, markup, annotated - select for diffs
Mon Apr 30 02:16:46 2012 UTC (14 years, 6 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, khorben-n900, jmcneill-usbmp-base10, agc-symver-base, agc-symver
Branch point for: tls-maxphys, rmind-smpnet
Diff to: previous 1.260: preferred, colored
Changes since revision 1.260: +4 -4 lines
ensure that the intr lock is held for all audio_clear() callers.

Revision 1.255.2.4: download - view: text, markup, annotated - select for diffs
Sun Apr 29 23:04:47 2012 UTC (14 years, 6 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.255.2.3: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.2.3: +14 -14 lines
sync to latest -current.

Revision 1.253.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:07:24 2012 UTC (14 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +682 -430 lines
sync with head

Revision 1.257.2.2: download - view: text, markup, annotated - select for diffs
Mon Apr 9 17:46:58 2012 UTC (14 years, 7 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.257.2.1: preferred, colored; branchpoint 1.257: preferred, colored
Changes since revision 1.257.2.1: +19 -11 lines
Pull up following revision(s) (requested by mrg in ticket #164):
	sys/dev/audio.c: revision 1.259
deal with PR#46232:  ensure locking around audio_clear() is handled
consistently and avoid locking against self.

Revision 1.260: download - view: text, markup, annotated - select for diffs
Fri Apr 6 06:15:13 2012 UTC (14 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: yamt-pagecache-base4, jmcneill-usbmp-base9
Diff to: previous 1.259: preferred, colored
Changes since revision 1.259: +14 -14 lines
don't hold the thread lock while calling allocm() or freem().  fixes PR#46121

Revision 1.255.2.3: download - view: text, markup, annotated - select for diffs
Thu Apr 5 21:33:23 2012 UTC (14 years, 7 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.255.2.2: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.2.2: +17 -9 lines
sync to latest -current.

Revision 1.259: download - view: text, markup, annotated - select for diffs
Mon Mar 26 18:26:10 2012 UTC (14 years, 7 months ago) by mrg
Branches: MAIN
CVS tags: jmcneill-usbmp-base8
Diff to: previous 1.258: preferred, colored
Changes since revision 1.258: +19 -11 lines
deal with PR#46232:  ensure locking around audio_clear() is handled
consistently and avoid locking against self.

Revision 1.255.2.2: download - view: text, markup, annotated - select for diffs
Fri Feb 24 09:11:40 2012 UTC (14 years, 8 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.255.2.1: preferred, colored; branchpoint 1.255: preferred, colored
Changes since revision 1.255.2.1: +3 -3 lines
sync to -current.

Revision 1.257.2.1: download - view: text, markup, annotated - select for diffs
Thu Feb 23 18:23:03 2012 UTC (14 years, 8 months ago) by riz
Branches: netbsd-6
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +3 -3 lines
Pull up following revision(s) (requested by nonaka in ticket #25):
	sys/dev/audio.c: revision 1.258
kern/45927: fix incorrect assert.

Revision 1.258: download - view: text, markup, annotated - select for diffs
Tue Feb 21 20:53:34 2012 UTC (14 years, 8 months ago) by nonaka
Branches: MAIN
CVS tags: jmcneill-usbmp-base7, jmcneill-usbmp-base6, jmcneill-usbmp-base5, jmcneill-usbmp-base4, jmcneill-usbmp-base3
Diff to: previous 1.257: preferred, colored
Changes since revision 1.257: +3 -3 lines
kern/45927: fix incorrect assert.

Revision 1.255.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 18 07:34:04 2012 UTC (14 years, 9 months ago) by mrg
Branches: jmcneill-usbmp
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +6 -4 lines
merge to -current.

Revision 1.257: download - view: text, markup, annotated - select for diffs
Tue Dec 13 12:26:32 2011 UTC (14 years, 11 months ago) by mrg
Branches: MAIN
CVS tags: netbsd-6-base, jmcneill-usbmp-base2
Branch point for: netbsd-6
Diff to: previous 1.256: preferred, colored
Changes since revision 1.256: +4 -4 lines
- convert the audio softintr's to SOFTINT_SERIAL.  right now they're on
  the same priority level as USB and if an audio softintr is blocked
  waiting for a usb event, they'll dead lock.  also, audio being higher
  priority is a fine idea.

- revert the previous audio.c changes as they were unsafe and this change
  obviates the need for them.

XXX:  convert the audio softint's to use a high priority thread or a
XXX:  workqueue would be better again.

Revision 1.256: download - view: text, markup, annotated - select for diffs
Fri Dec 9 05:08:25 2011 UTC (14 years, 11 months ago) by mrg
Branches: MAIN
Diff to: previous 1.255: preferred, colored
Changes since revision 1.255: +4 -2 lines
drop the thread lock in a couple of error cases that were missing.

Revision 1.255: download - view: text, markup, annotated - select for diffs
Fri Nov 25 03:13:06 2011 UTC (14 years, 11 months ago) by jakllsch
Branches: MAIN
CVS tags: jmcneill-usbmp-pre-base2, jmcneill-usbmp-base
Branch point for: jmcneill-usbmp
Diff to: previous 1.254: preferred, colored
Changes since revision 1.254: +4 -4 lines
Correct copy/paste/modify issue in audio_suspend().

Revision 1.254: download - view: text, markup, annotated - select for diffs
Wed Nov 23 23:07:31 2011 UTC (14 years, 11 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +661 -419 lines
Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From
the original ad-audiomp branch notes:

  Add MP locking to the audio drivers.

  Making the audio drivers MP safe is necessary before efforts
  can be made to make the VM system MP safe.

  The are two locks per device instance, an ISR lock and
  a character device lock. The ISR lock replaces calls to
  splaudio()/splx(), and will be held across calls to device
  methods which were called at splaudio() before (e.g.
  trigger_output). The character device lock is held across
  calls to nearly all of the methods, excluding some only
  used for initialization, e.g. get_locks.

Welcome to 5.99.57.

Revision 1.253.4.2: download - view: text, markup, annotated - select for diffs
Sun Nov 20 10:58:10 2011 UTC (15 years ago) by mrg
Branches: jmcneill-audiomp3
Diff to: previous 1.253.4.1: preferred, colored; branchpoint 1.253: preferred, colored; next MAIN 1.254: preferred, colored
Changes since revision 1.253.4.1: +16 -5 lines
change the locking protocol for audio_get_props().  make it always
assert that the thread lock is held before entry, and arrange to
make this always so.

Revision 1.253.4.1: download - view: text, markup, annotated - select for diffs
Sat Nov 19 21:49:34 2011 UTC (15 years ago) by jmcneill
Branches: jmcneill-audiomp3
Diff to: previous 1.253: preferred, colored
Changes since revision 1.253: +650 -419 lines
port ad-audiomp2 branch changes to 5.99.56
todo:
 - port ad-audiomp2 pcppi changes
 - these drivers need to be fixed:
   - emuxki
   - gcscaudio
   - hdafg
   - uaudio
   - umidi
   - MD audio drivers

Revision 1.253: download - view: text, markup, annotated - select for diffs
Tue Sep 6 01:16:44 2011 UTC (15 years, 2 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, jmcneill-audiomp3-base
Branch point for: yamt-pagecache, jmcneill-audiomp3
Diff to: previous 1.252: preferred, colored
Changes since revision 1.252: +4 -2 lines
Add AUDIO_ENCODING_AC3 encoding type.

Revision 1.251.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 5 20:52:59 2011 UTC (15 years, 8 months ago) by rmind
Branches: rmind-uvmplock
Diff to: previous 1.251: preferred, colored; next MAIN 1.252: preferred, colored
Changes since revision 1.251: +4 -4 lines
sync with head

Revision 1.243.6.4: download - view: text, markup, annotated - select for diffs
Tue Dec 21 22:25:56 2010 UTC (15 years, 10 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, matt-nb5-pq3-base, matt-nb5-pq3
Diff to: previous 1.243.6.3: preferred, colored; branchpoint 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243.6.3: +4 -4 lines
Pull up following revision(s) (requested by tsutsui in ticket #1498):
	sys/dev/audio.c: revision 1.252
Fix botches in rev 1.185 (kent-audio1 merge) which cause buffer overrun
and "tlb_exception: no copyin/out fault hander" panic in
audio_fill_silence() after audio playback on dreamcast.
The problem is tracked and fix is provieded by Ryo SHIMIZU,
who is the auther of aica(4) audio driver for dreamcast.

Revision 1.252: download - view: text, markup, annotated - select for diffs
Sat Nov 20 18:03:49 2010 UTC (15 years, 11 months ago) by tsutsui
Branches: MAIN
CVS tags: rmind-uvmplock-nbase, rmind-uvmplock-base, matt-mips64-premerge-20101231, jruoho-x86intr-base, jruoho-x86intr, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.251: preferred, colored
Changes since revision 1.251: +4 -4 lines
Fix botches in rev 1.185 (kent-audio1 merge) which cause buffer overrun
and "tlb_exception: no copyin/out fault hander" panic in
audio_fill_silence() after audio playback on dreamcast.

The problem is tracked and fix is provieded by Ryo SHIMIZU,
who is the auther of aica(4) audio driver for dreamcast.

Revision 1.250.2.1: download - view: text, markup, annotated - select for diffs
Fri Apr 30 14:43:04 2010 UTC (16 years, 6 months ago) by uebayasi
Branches: uebayasi-xip
Diff to: previous 1.250: preferred, colored; next MAIN 1.251: preferred, colored
Changes since revision 1.250: +6 -6 lines
Sync with HEAD.

Revision 1.243.14.1: download - view: text, markup, annotated - select for diffs
Wed Apr 21 00:27:32 2010 UTC (16 years, 7 months ago) by matt
Branches: matt-nb5-mips64
CVS tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +150 -71 lines
sync to netbsd-5

Revision 1.239.2.2: download - view: text, markup, annotated - select for diffs
Thu Mar 11 15:03:21 2010 UTC (16 years, 8 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.239.2.1: preferred, colored; branchpoint 1.239: preferred, colored; next MAIN 1.240: preferred, colored
Changes since revision 1.239.2.1: +163 -87 lines
sync with head

Revision 1.251: download - view: text, markup, annotated - select for diffs
Wed Feb 24 22:37:56 2010 UTC (16 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base9, yamt-nfs-mp-base11, yamt-nfs-mp-base10, uebayasi-xip-base4, uebayasi-xip-base3, uebayasi-xip-base2, uebayasi-xip-base1
Branch point for: rmind-uvmplock
Diff to: previous 1.250: preferred, colored
Changes since revision 1.250: +6 -6 lines
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.

Revision 1.250: download - view: text, markup, annotated - select for diffs
Fri Jan 8 20:05:15 2010 UTC (16 years, 10 months ago) by dyoung
Branches: MAIN
CVS tags: uebayasi-xip-base
Branch point for: uebayasi-xip
Diff to: previous 1.249: preferred, colored
Changes since revision 1.249: +6 -6 lines
Expand PMF_FN_* macros.

Revision 1.249: download - view: text, markup, annotated - select for diffs
Sun Dec 6 22:42:48 2009 UTC (16 years, 11 months ago) by dyoung
Branches: MAIN
CVS tags: matt-premerge-20091211
Diff to: previous 1.248: preferred, colored
Changes since revision 1.248: +6 -9 lines
Simplify these device-activation hooks using the following semantic
patch.

XXX sc_dying must die.

@@
type device_t;

identifier act, midi_softc, midiactivate, sc, self;
@@

int
midiactivate(device_t self, enum devact act)
{
(
	struct midi_softc *sc = device_private(self);
|
-	struct midi_softc *sc;
+	struct midi_softc *sc = device_private(self);
...
-	sc = device_private(self);
)
...
	switch (act) {
-	case DVACT_ACTIVATE:
-		return (EOPNOTSUPP);
-
	case DVACT_DEACTIVATE:
(
	sc->dying
|
	sc->sc_dying
)
		=
(
	1
|
	true
)
		;
-		break;
+		return 0;
+	default:
+		return EOPNOTSUPP;
	}
-	return (0);
}

Revision 1.243.6.3: download - view: text, markup, annotated - select for diffs
Fri Oct 16 05:43:37 2009 UTC (17 years, 1 month ago) by snj
Branches: netbsd-5
CVS tags: netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1
Diff to: previous 1.243.6.2: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.6.2: +146 -70 lines
Pull up following revision(s) (requested by sborrill in ticket #1038):
	share/man/man4/audio.4: revision 1.70 via patch
	sys/dev/audio.c: revision 1.248
	sys/dev/audio_if.h: revision 1.66
	sys/dev/pci/hdaudio/hdaudio_afg.c: revision 1.16
	sys/sys/audioio.h: revision 1.33
Add support for playback- or capture-only devices.
Fixes PR 42050

Revision 1.243.6.2: download - view: text, markup, annotated - select for diffs
Tue Sep 29 22:50:11 2009 UTC (17 years, 1 month ago) by snj
Branches: netbsd-5
Diff to: previous 1.243.6.1: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.6.1: +5 -8 lines
Pull up following revision(s) (requested by sborrill in ticket #1016):
	sys/dev/audio.c: revision 1.247
Revert previous and instead select whether to call mixer_ioctl() or
audio_ioctl() based on whether the command smells like a mixer ioctl or not.

Revision 1.243.6.1: download - view: text, markup, annotated - select for diffs
Tue Sep 29 22:46:56 2009 UTC (17 years, 1 month ago) by snj
Branches: netbsd-5
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +8 -2 lines
Pull up following revision(s) (requested by sborrill in ticket #1016):
	sys/dev/audio.c: revision 1.246
OSS audio allows mixer operations on the dsp device. NetBSD would return
EINVAL in these circumstances. This can break audio in apps running
under Linux emulation (e.g. Citrix ICA client will mute all audio when
volume control used). Therefore, pass unrecognised ioctls attempted on
dsp devices to mixer_ioctl.

Revision 1.248: download - view: text, markup, annotated - select for diffs
Tue Sep 29 15:58:54 2009 UTC (17 years, 1 month ago) by sborrill
Branches: MAIN
CVS tags: jym-xensuspend-nbase
Diff to: previous 1.247: preferred, colored
Changes since revision 1.247: +146 -70 lines
Add support for playback- or capture-only devices by adding
AUDIO_PROP_PLAYBACK and AUDIO_PROP_CAPTURE properties.

From jmcneill@.

Fixes PR#42050

Revision 1.247: download - view: text, markup, annotated - select for diffs
Thu Sep 24 16:03:11 2009 UTC (17 years, 1 month ago) by sborrill
Branches: MAIN
Diff to: previous 1.246: preferred, colored
Changes since revision 1.246: +5 -8 lines
Revert previous and instead select whether to call mixer_ioctl() or
audio_ioctl() based on whether the command smells like a mixer ioctl or not.

Revision 1.246: download - view: text, markup, annotated - select for diffs
Thu Sep 24 11:13:38 2009 UTC (17 years, 1 month ago) by sborrill
Branches: MAIN
Diff to: previous 1.245: preferred, colored
Changes since revision 1.245: +8 -2 lines
OSS audio allows mixer operations on the dsp device. NetBSD would return
EINVAL in these circumstances. This can break audio in apps running under
Linux emulation (e.g. Citrix ICA client will mute all audio when volume
control used). Therefore, pass unrecognised ioctls attempted on dsp devices
to mixer_ioctl.

Revision 1.245: download - view: text, markup, annotated - select for diffs
Wed Sep 16 16:34:50 2009 UTC (17 years, 2 months ago) by dyoung
Branches: MAIN
Diff to: previous 1.244: preferred, colored
Changes since revision 1.244: +7 -7 lines
In pmf(9), improve the implementation of device self-suspension
and make suspension by self, by drvctl(8), and by ACPI system sleep
play nice together.  Start solidifying some temporary API changes.

1. Extract a new header file, <sys/device_if.h>, from <sys/device.h> and
   #include it from <sys/pmf.h> instead of <sys/device.h> to break the
   circular dependency between <sys/device.h> and <sys/pmf.h>.

2. Introduce pmf_qual_t, an aggregate of qualifications on a PMF
   suspend/resume call.  Start to replace instances of PMF_FN_PROTO,
   PMF_FN_ARGS, et cetera, with a pmf_qual_t.

3. Introduce the notion of a "suspensor," an entity that holds a
   device in suspension.  More than one suspensor may hold a device
   at once.  A device stays suspended as long as at least one
   suspensor holds it.  A device resumes when the last suspensor
   releases it.

   Currently, the kernel defines three suspensors,

   3a the system-suspensor: for system suspension, initiated
      by 'sysctl -w machdep.sleep_state=3', by lid closure, by
      power-button press, et cetera,

   3b the drvctl-suspensor: for device suspension by /dev/drvctl
      ioctl, e.g., drvctl -S sip0.

   3c the system self-suspensor: for device drivers that suspend
      themselves and their children.  Several drivers for network
      interfaces put the network device to sleep while it is not
      administratively up, that is, after the kernel calls if_stop(,
      1).  The self-suspensor should not be used directly.  See
      the description of suspensor delegates, below.

   A suspensor can have one or more "delegates".  A suspensor can
   release devices that its delegates hold suspended.  Right now,
   only the system self-suspensor has delegates.  For each device
   that a self-suspending driver attaches, it creates the device's
   self-suspensor, a delegate of the system self-suspensor.

   Suspensors stop a system-wide suspend/resume cycle from waking
   devices that the operator put to sleep with drvctl before the cycle.
   They also help self-suspension to work more simply, safely, and in
   accord with expectations.

4. Add the notion of device activation level, devact_level_t,
   and a routine for checking the current activation level,
   device_activation().  Current activation levels are DEVACT_LEVEL_BUS,
   DEVACT_LEVEL_DRIVER, and DEVACT_LEVEL_CLASS, which respectively
   indicate that the device's bus is active, that the bus and device are
   active, and that the bus, device, and the functions of the device's
   class (network, audio) are active.

   Suspend/resume calls can be qualified with a devact_level_t.
   The power-management framework treats a devact_level_t that
   qualifies a device suspension as the device's current activation
   level; it only runs hooks to reduce the activation level from
   the presumed current level to the fully suspended state.  The
   framework treats a devact_level_t qualifying device resumption
   as the target activation level; it only runs hooks to raise the
   activation level to the target.

5. Use pmf_qual_t, devact_level_t, and self-suspensors in several
   drivers.

6. Temporarily add an unused power-management workqueue that I will
   remove or replace, soon.

Revision 1.243.10.1: download - view: text, markup, annotated - select for diffs
Wed May 13 17:19:05 2009 UTC (17 years, 6 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +5 -4 lines
Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.

Revision 1.239.2.1: download - view: text, markup, annotated - select for diffs
Mon May 4 08:12:32 2009 UTC (17 years, 6 months ago) by yamt
Branches: yamt-nfs-mp
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +56 -34 lines
sync with head.

Revision 1.243.4.1: download - view: text, markup, annotated - select for diffs
Tue Apr 28 07:35:13 2009 UTC (17 years, 6 months ago) by skrll
Branches: nick-hppapmap
Diff to: previous 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243: +5 -4 lines
Sync with HEAD.

Revision 1.244: download - view: text, markup, annotated - select for diffs
Fri Apr 17 20:04:35 2009 UTC (17 years, 7 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-nfs-mp-base8, yamt-nfs-mp-base7, yamt-nfs-mp-base6, yamt-nfs-mp-base5, yamt-nfs-mp-base4, yamt-nfs-mp-base3, nick-hppapmap-base4, nick-hppapmap-base3, nick-hppapmap-base, jymxensuspend-base, jym-xensuspend-base
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +5 -4 lines
Detach audio(4) during shutdown.

Revision 1.243.8.9: download - view: text, markup, annotated - select for diffs
Sat Dec 13 12:32:10 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.8: preferred, colored; branchpoint 1.243: preferred, colored; next MAIN 1.244: preferred, colored
Changes since revision 1.243.8.8: +49 -5 lines
- Add a table listing hw_if methods, and which locks are held when called.
- Grab locks in a couple more places.

Revision 1.243.8.8: download - view: text, markup, annotated - select for diffs
Fri Dec 12 12:47:02 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.7: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.7: +4 -2 lines
Acquire interrupt level lock for hw->close, on error.

Revision 1.243.8.7: download - view: text, markup, annotated - select for diffs
Fri Dec 12 09:57:35 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.6: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.6: +4 -4 lines
audiommap() doesn't need a writer lock.

Revision 1.243.8.6: download - view: text, markup, annotated - select for diffs
Thu Dec 11 19:49:29 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.5: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.5: +5 -6 lines
Checkpoint work in progress.

Revision 1.243.8.5: download - view: text, markup, annotated - select for diffs
Tue Dec 9 12:22:41 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.4: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.4: +4 -4 lines
No need to run the softint at SOFTINT_SERIAL.

Revision 1.243.8.4: download - view: text, markup, annotated - select for diffs
Mon Dec 8 13:12:22 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.3: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.3: +20 -4 lines
Allow hw->mappage to sleep.

Revision 1.243.8.3: download - view: text, markup, annotated - select for diffs
Sun Dec 7 18:27:45 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.2: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.2: +29 -16 lines
Fix a panic and some comments.

Revision 1.243.8.2: download - view: text, markup, annotated - select for diffs
Sun Dec 7 15:29:35 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243.8.1: preferred, colored; branchpoint 1.243: preferred, colored
Changes since revision 1.243.8.1: +307 -269 lines
- Serialize changes to filters and audio device settings while a read/write
  is in progress.
- Fix other concurrency issues.
- Convert to use kmem_alloc().
- Don't do evil NOWAIT allocations.
- Don't assume sc_intr_lock is a spinlock.
- Add a comment block about the locking.

Revision 1.243.8.1: download - view: text, markup, annotated - select for diffs
Sun Dec 7 13:02:12 2008 UTC (17 years, 11 months ago) by ad
Branches: ad-audiomp2
Diff to: previous 1.243: preferred, colored
Changes since revision 1.243: +395 -276 lines
Ressurect the ad-audiomp branch at request of matt@.

With this commit:

- core audio subsystem made MPSAFE
- eap, btsco drivers made MPSAFE

TODO:

- midi
- convert remaining drivers

Revision 1.234.6.6: download - view: text, markup, annotated - select for diffs
Sun Jun 29 09:33:04 2008 UTC (18 years, 4 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234.6.5: preferred, colored; branchpoint 1.234: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234.6.5: +8 -8 lines
Sync with HEAD.

Revision 1.239.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 23 04:30:57 2008 UTC (18 years, 4 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.239: preferred, colored; next MAIN 1.240: preferred, colored
Changes since revision 1.239: +53 -32 lines
Sync w/ -current. 34 merge conflicts to follow.

Revision 1.242.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 18 16:33:03 2008 UTC (18 years, 5 months ago) by simonb
Branches: simonb-wapbl
Diff to: previous 1.242: preferred, colored; next MAIN 1.243: preferred, colored
Changes since revision 1.242: +9 -9 lines
Sync with head.

Revision 1.238.2.3: download - view: text, markup, annotated - select for diffs
Tue Jun 17 09:14:24 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.238.2.2: preferred, colored; branchpoint 1.238: preferred, colored; next MAIN 1.239: preferred, colored
Changes since revision 1.238.2.2: +10 -10 lines
sync with head.

Revision 1.243: download - view: text, markup, annotated - select for diffs
Tue Jun 10 22:53:08 2008 UTC (18 years, 5 months ago) by cegger
Branches: MAIN
CVS tags: yamt-pf42-base4, wrstuden-revivesa-base-4, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, simonb-wapbl-nbase, simonb-wapbl-base, nick-hppapmap-base2, netbsd-5-base, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, mjf-devfs2-base, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, haad-nbase2, haad-dm-base2, haad-dm-base1, haad-dm-base, haad-dm, ad-audiomp2-base
Branch point for: nick-hppapmap, netbsd-5, matt-nb5-mips64, jym-xensuspend, ad-audiomp2
Diff to: previous 1.242: preferred, colored
Changes since revision 1.242: +9 -9 lines
device_private(device_lookup()) -> device_lookup_private()
ok cube@

Revision 1.242: download - view: text, markup, annotated - select for diffs
Sun Jun 8 18:18:33 2008 UTC (18 years, 5 months ago) by tsutsui
Branches: MAIN
Branch point for: simonb-wapbl
Diff to: previous 1.241: preferred, colored
Changes since revision 1.241: +3 -3 lines
Use device_lookup_private() rather than using cd_devs[] directly to get softc.

XXX maybe we should change a type of cd_devs[] in struct cfdriver
    from (void *) to device_t.

Revision 1.234.6.5: download - view: text, markup, annotated - select for diffs
Thu Jun 5 19:14:35 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234.6.4: preferred, colored; branchpoint 1.234: preferred, colored
Changes since revision 1.234.6.4: +43 -22 lines
Sync with HEAD.

Also fix build.

Revision 1.238.2.2: download - view: text, markup, annotated - select for diffs
Wed Jun 4 02:05:09 2008 UTC (18 years, 5 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.238.2.1: preferred, colored; branchpoint 1.238: preferred, colored
Changes since revision 1.238.2.1: +45 -24 lines
sync with head

Revision 1.215.2.1.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 3 20:47:19 2008 UTC (18 years, 5 months ago) by skrll
Branches: wrstuden-fixsa
Diff to: previous 1.215.2.1.2.1: preferred, colored; next MAIN 1.215.2.2: preferred, colored
Changes since revision 1.215.2.1.2.1: +5 -4 lines
Sync with netbsd-4.

Revision 1.241: download - view: text, markup, annotated - select for diffs
Tue Jun 3 06:21:17 2008 UTC (18 years, 5 months ago) by bjs
Branches: MAIN
CVS tags: yamt-pf42-base3
Diff to: previous 1.240: preferred, colored
Changes since revision 1.240: +13 -9 lines
 - Fix the conditions for POLLOUT to match those elsewhere

 - Refactor pause attribute handling so that it it's preserved
   appropriately and reset in audio_clear().

Now audio/jack-devel works with the native driver.

Revision 1.240: download - view: text, markup, annotated - select for diffs
Tue Jun 3 02:16:18 2008 UTC (18 years, 5 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.239: preferred, colored
Changes since revision 1.239: +34 -17 lines
pmf: in audio_volume_up and audio_volume_down, honour the mixer control's
delta field rather than arbitrary '32' when stepping up or down master
volume.

Revision 1.234.6.4: download - view: text, markup, annotated - select for diffs
Mon Jun 2 13:23:11 2008 UTC (18 years, 5 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234.6.3: preferred, colored; branchpoint 1.234: preferred, colored
Changes since revision 1.234.6.3: +8 -8 lines
Sync with HEAD.

Revision 1.238.2.1: download - view: text, markup, annotated - select for diffs
Sun May 18 12:33:30 2008 UTC (18 years, 6 months ago) by yamt
Branches: yamt-pf42
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +8 -8 lines
sync with head.

Revision 1.239: download - view: text, markup, annotated - select for diffs
Thu Apr 24 15:35:27 2008 UTC (18 years, 6 months ago) by ad
Branches: MAIN
CVS tags: yamt-pf42-base2, yamt-nfs-mp-base2, yamt-nfs-mp-base, hpcarm-cleanup-nbase
Branch point for: yamt-nfs-mp, wrstuden-revivesa
Diff to: previous 1.238: preferred, colored
Changes since revision 1.238: +8 -8 lines
Network protocol interrupts can now block on locks, so merge the globals
proclist_mutex and proclist_lock into a single adaptive mutex (proc_lock).
Implications:

- Inspecting process state requires thread context, so signals can no longer
  be sent from a hardware interrupt handler. Signal activity must be
  deferred to a soft interrupt or kthread.

- As the proc state locking is simplified, it's now safe to take exit()
  and wait() out from under kernel_lock.

- The system spends less time at IPL_SCHED, and there is less lock activity.

Revision 1.234.6.3: download - view: text, markup, annotated - select for diffs
Sun Apr 6 09:58:49 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234.6.2: preferred, colored; branchpoint 1.234: preferred, colored
Changes since revision 1.234.6.2: +3 -3 lines
- after some discussion with agc@ i agreed it would be a good idea to move
  device_unregister_* to device_deregister_* to be more like the pmf(9)
  functions, especially since a lot of the time the function calls are next
  to each other.

- add device_register_name() support for dk(4).

Revision 1.234.6.2: download - view: text, markup, annotated - select for diffs
Sat Apr 5 23:33:20 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234.6.1: preferred, colored; branchpoint 1.234: preferred, colored
Changes since revision 1.234.6.1: +16 -2 lines
- add "file-system DEVFS" and "pseudo-device devfsctl" to conf/std seeing
  as these are always needed.

- convert many, many drivers over to the New Devfs World Order. For a
  list of device drivers yet to be converted see,
  http://www.netbsd.org/~mjf/devfs-todo.html.

- add a new device_unregister_all(device_t) function to remove all device
  names associated with a device_t, which saves us having to construct
  device names when the driver is detached.

- add a DEV_AUDIO type for devices.

Revision 1.234.6.1: download - view: text, markup, annotated - select for diffs
Thu Apr 3 12:42:36 2008 UTC (18 years, 7 months ago) by mjf
Branches: mjf-devfs2
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +49 -46 lines
Sync with HEAD.

Revision 1.238: download - view: text, markup, annotated - select for diffs
Tue Apr 1 00:52:11 2008 UTC (18 years, 7 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base
Branch point for: yamt-pf42
Diff to: previous 1.237: preferred, colored
Changes since revision 1.237: +4 -4 lines
Fix audio_volume_toggle. How did this ever work for me? Thinkpad T61
mutes audio automatically when the mute key is pressed.

Revision 1.234.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 24 07:15:11 2008 UTC (18 years, 7 months ago) by keiichi
Branches: keiichi-mipv6
Diff to: previous 1.234: preferred, colored; next MAIN 1.235: preferred, colored
Changes since revision 1.234: +47 -44 lines
sync with head.

Revision 1.223.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 02:04:34 2008 UTC (18 years, 7 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.223.2.2: preferred, colored; branchpoint 1.223: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223.2.2: +74 -46 lines
sync with HEAD

Revision 1.197.2.10: download - view: text, markup, annotated - select for diffs
Mon Mar 17 09:14:36 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.9: preferred, colored; branchpoint 1.197: preferred, colored; next MAIN 1.198: preferred, colored
Changes since revision 1.197.2.9: +47 -44 lines
sync with head.

Revision 1.237: download - view: text, markup, annotated - select for diffs
Wed Mar 12 18:02:21 2008 UTC (18 years, 8 months ago) by dyoung
Branches: MAIN
CVS tags: yamt-lazymbuf-base15, yamt-lazymbuf-base14, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, ad-socklock-base1
Diff to: previous 1.236: preferred, colored
Changes since revision 1.236: +11 -11 lines
Use device_t and its accessors throughout.  Use aprint_*_dev().

Improve PMF-ability.

        Add a 'flags' argument to suspend/resume handlers and
        callers such as pmf_system_suspend().

        Define a flag, PMF_F_SELF, which indicates to PMF that a
        device is suspending/resuming itself.  Add helper routines,
        pmf_device_suspend_self(dev) and pmf_device_resume_self(dev),
        that call pmf_device_suspend(dev, PMF_F_SELF) and
        pmf_device_resume(dev, PMF_F_SELF), respectively.  Use
        PMF_F_SELF to suspend/resume self in ath(4), audio(4),
        rtw(4), and sip(4).

        In ath(4) and in rtw(4), replace the icky sc_enable/sc_disable
        callbacks, provided by the bus front-end, with
        self-suspension/resumption.  Also, clean up the bus
        front-ends.  Make sure that the interrupt handler is
        disestablished during suspension.  Get rid of driver-private
        flags (e.g., RTW_F_ENABLED, ath_softc->sc_invalid); use
        device_is_active()/device_has_power() calls, instead.

        In the network-class suspend handler, call if_stop(, 0)
        instead of if_stop(, 1), because the latter is superfluous
        (bus- and driver-suspension hooks will 'disable' the NIC),
        and it may cause recursion.

        In the network-class resume handler, prevent infinite
        recursion through if_init() by getting out early if we are
        self-suspending (PMF_F_SELF).

rtw(4) improvements:

        Destroy rtw(4) callouts when we detach it.  Make rtw at
        pci detachable.  Print some more information with the "rx
        frame too long" warning.

Remove activate() methods:

        Get rid of rtw_activate() and ath_activate().  The device
        activate() methods are not good for much these days.

Make ath at cardbus resume with crypto functions intact:

        Introduce a boolean device property, "pmf-powerdown".  If
        pmf-powerdown is present and false, it indicates that a
        bus back-end should not remove power from a device.

        Honor this property in cardbus_child_suspend().

        Set this property to 'false' in ath_attach(), since removing
        power from an ath at cardbus seems to lobotomize the WPA
        crypto engine.  XXX Should the pmf-powerdown property
        propagate toward the root of the device tree?

Miscellaneous ath(4) changes:

        Warn if ath(4) tries to write crypto keys to suspended
        hardware.

        Reduce differences between FreeBSD and NetBSD in ath(4)
        multicast filter setup.

        Make ath_printrxbuf() print an rx descriptor's status &
        key index, to help debug crypto errors.

        Shorten a staircase in ath_ioctl().  Don't check for
        ieee80211_ioctl() return code ERESTART, it never happens.

Revision 1.236: download - view: text, markup, annotated - select for diffs
Tue Mar 4 18:23:44 2008 UTC (18 years, 8 months ago) by cube
Branches: MAIN
Diff to: previous 1.235: preferred, colored
Changes since revision 1.235: +31 -33 lines
Split device_t and softc for audio(4), and other related cosmetic changes.

Revision 1.235: download - view: text, markup, annotated - select for diffs
Sat Mar 1 14:16:50 2008 UTC (18 years, 8 months ago) by rmind
Branches: MAIN
Diff to: previous 1.234: preferred, colored
Changes since revision 1.234: +9 -4 lines
Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call.  It will
  indicate which event (POLL_IN, POLL_OUT, etc) happen.  If unknown,
  zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>

Revision 1.197.2.9: download - view: text, markup, annotated - select for diffs
Wed Feb 27 08:36:31 2008 UTC (18 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.8: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.8: +26 -2 lines
sync with head.

Revision 1.224.4.3: download - view: text, markup, annotated - select for diffs
Mon Feb 18 21:05:31 2008 UTC (18 years, 9 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.224.4.2: preferred, colored; branchpoint 1.224: preferred, colored; next MAIN 1.225: preferred, colored
Changes since revision 1.224.4.2: +29 -4 lines
Sync with HEAD.

Revision 1.234: download - view: text, markup, annotated - select for diffs
Wed Feb 13 18:31:51 2008 UTC (18 years, 9 months ago) by jmcneill
Branches: MAIN
CVS tags: nick-net80211-sync-base, nick-net80211-sync, mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Diff to: previous 1.233: preferred, colored
Changes since revision 1.233: +26 -2 lines
Disable audio idle timer. It was a fun experiment, but causes more issues
than it was worth.

Revision 1.197.2.8: download - view: text, markup, annotated - select for diffs
Mon Feb 4 09:23:17 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.7: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.7: +5 -4 lines
sync with head.

Revision 1.215.2.4: download - view: text, markup, annotated - select for diffs
Sun Feb 3 19:08:41 2008 UTC (18 years, 9 months ago) by riz
Branches: netbsd-4
CVS tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Diff to: previous 1.215.2.3: preferred, colored; branchpoint 1.215: preferred, colored; next MAIN 1.216: preferred, colored
Changes since revision 1.215.2.3: +5 -4 lines
Pull up following revision(s) (requested by gson in ticket #1054):
	sys/dev/audio.c: revision 1.233
Don't enter an infinite loop in audio_read() when the sc->sc_rustream
buffer is full.  Fixes kern/34659.

Revision 1.227.2.3: download - view: text, markup, annotated - select for diffs
Wed Jan 23 19:27:32 2008 UTC (18 years, 9 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.227.2.2: preferred, colored; next MAIN 1.228: preferred, colored
Changes since revision 1.227.2.2: +3 -2 lines
Sync with HEAD.

Revision 1.233: download - view: text, markup, annotated - select for diffs
Wed Jan 23 14:14:55 2008 UTC (18 years, 9 months ago) by gson
Branches: MAIN
CVS tags: bouyer-xeni386-nbase
Diff to: previous 1.232: preferred, colored
Changes since revision 1.232: +5 -4 lines
Don't enter an infinite loop in audio_read() when the sc->sc_rustream
buffer is full.  Fixes kern/34659.

Revision 1.197.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 21 09:42:22 2008 UTC (18 years, 9 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.6: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.6: +281 -37 lines
sync with head

Revision 1.223.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:52:09 2008 UTC (18 years, 10 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.223.2.1: preferred, colored; branchpoint 1.223: preferred, colored
Changes since revision 1.223.2.1: +292 -46 lines
sync with HEAD

Revision 1.227.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 2 21:53:44 2008 UTC (18 years, 10 months ago) by bouyer
Branches: bouyer-xeni386
CVS tags: bouyer-xeni386-merge1
Diff to: previous 1.227.2.1: preferred, colored
Changes since revision 1.227.2.1: +3 -1 lines
Sync with HEAD

Revision 1.224.4.2: download - view: text, markup, annotated - select for diffs
Thu Dec 27 00:44:44 2007 UTC (18 years, 10 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.224.4.1: preferred, colored; branchpoint 1.224: preferred, colored
Changes since revision 1.224.4.1: +281 -37 lines
Sync with HEAD.

Revision 1.225.2.2: download - view: text, markup, annotated - select for diffs
Wed Dec 26 21:39:19 2007 UTC (18 years, 10 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.225.2.1: preferred, colored; branchpoint 1.225: preferred, colored; next MAIN 1.226: preferred, colored
Changes since revision 1.225.2.1: +281 -37 lines
Sync with head.

Revision 1.232: download - view: text, markup, annotated - select for diffs
Sun Dec 23 19:14:03 2007 UTC (18 years, 10 months ago) by jmcneill
Branches: MAIN
CVS tags: vmlocking2-base3, matt-armv6-base, bouyer-xeni386-base
Diff to: previous 1.231: preferred, colored
Changes since revision 1.231: +4 -2 lines
Deregister activity handler on detach.

Revision 1.231: download - view: text, markup, annotated - select for diffs
Sat Dec 22 18:34:56 2007 UTC (18 years, 10 months ago) by christos
Branches: MAIN
Diff to: previous 1.230: preferred, colored
Changes since revision 1.230: +3 -3 lines
Use M_NOWAIT in audio_stream_ctor; it can be called from a softintr context
through pmf_resume.

Revision 1.227.2.1: download - view: text, markup, annotated - select for diffs
Thu Dec 13 21:55:19 2007 UTC (18 years, 11 months ago) by bouyer
Branches: bouyer-xeni386
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +18 -10 lines
Sync with HEAD

Revision 1.230: download - view: text, markup, annotated - select for diffs
Thu Dec 13 14:40:36 2007 UTC (18 years, 11 months ago) by joerg
Branches: MAIN
Diff to: previous 1.229: preferred, colored
Changes since revision 1.229: +11 -10 lines
Don't count poll(2) and select(2) as device activity. Don't activate the
device on write(2) if it is suspended and was not idle.

Revision 1.229: download - view: text, markup, annotated - select for diffs
Thu Dec 13 14:02:53 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.228: preferred, colored
Changes since revision 1.228: +8 -2 lines
When resuming the audio device, call audiosetinfo with the last known good
parameters. Fixes an issue with suspending the audio device while playback
is paused.

Revision 1.226.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 11 15:22:25 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-kmem
Diff to: previous 1.226: preferred, colored; next MAIN 1.227: preferred, colored
Changes since revision 1.226: +271 -36 lines
sync with head.

Revision 1.228: download - view: text, markup, annotated - select for diffs
Tue Dec 11 00:08:14 2007 UTC (18 years, 11 months ago) by martin
Branches: MAIN
CVS tags: yamt-kmem-base3, yamt-kmem-base2, cube-autoconf-base, cube-autoconf
Diff to: previous 1.227: preferred, colored
Changes since revision 1.227: +3 -2 lines
When collecting mixer values while suspending, initialize the number
of channels from the mixer device info. Fixes PR kern/37512.
OK: jmcneill

Revision 1.227: download - view: text, markup, annotated - select for diffs
Sun Dec 9 20:27:51 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
Branch point for: bouyer-xeni386
Diff to: previous 1.226: preferred, colored
Changes since revision 1.226: +270 -36 lines
Merge jmcneill-pm branch.

Revision 1.222.6.12: download - view: text, markup, annotated - select for diffs
Sun Dec 9 19:37:39 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.11: preferred, colored; branchpoint 1.222: preferred, colored; next MAIN 1.223: preferred, colored
Changes since revision 1.222.6.11: +3 -3 lines
Sync with HEAD.

Revision 1.224.4.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 18:19:16 2007 UTC (18 years, 11 months ago) by mjf
Branches: mjf-devfs
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +13 -11 lines
Sync with HEAD.

Revision 1.225.2.1: download - view: text, markup, annotated - select for diffs
Sat Dec 8 17:57:14 2007 UTC (18 years, 11 months ago) by ad
Branches: vmlocking2
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +3 -3 lines
Sync with head.

Revision 1.222.6.11: download - view: text, markup, annotated - select for diffs
Sat Dec 8 16:21:01 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.10: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.10: +16 -16 lines
Rename pnp(9) -> pmf(9), as requested by many.

Revision 1.197.2.6: download - view: text, markup, annotated - select for diffs
Fri Dec 7 17:29:14 2007 UTC (18 years, 11 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.5: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.5: +13 -11 lines
sync with head

Revision 1.222.6.10: download - view: text, markup, annotated - select for diffs
Thu Dec 6 14:20:47 2007 UTC (18 years, 11 months ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.222.6.9: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.9: +18 -2 lines
Readd lost splaudio around suspend/resume/volume management.

Revision 1.226: download - view: text, markup, annotated - select for diffs
Wed Dec 5 17:19:47 2007 UTC (18 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: yamt-kmem-base, vmlocking2-base2, reinoud-bufcleanup-nbase, reinoud-bufcleanup-base, jmcneill-pm-base
Branch point for: yamt-kmem
Diff to: previous 1.225: preferred, colored
Changes since revision 1.225: +3 -3 lines
Do not "return 1" from kqfilter for errors.  That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.

Revision 1.222.6.9: download - view: text, markup, annotated - select for diffs
Sat Dec 1 05:13:25 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.8: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.8: +12 -10 lines
Sync with HEAD.

Revision 1.225: download - view: text, markup, annotated - select for diffs
Sat Dec 1 05:11:08 2007 UTC (18 years, 11 months ago) by jmcneill
Branches: MAIN
CVS tags: vmlocking2-base1, vmlocking-nbase
Branch point for: vmlocking2
Diff to: previous 1.224: preferred, colored
Changes since revision 1.224: +12 -10 lines
aprintify

Revision 1.223.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:25:25 2007 UTC (19 years ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +10 -9 lines
sync with HEAD

Revision 1.222.6.8: download - view: text, markup, annotated - select for diffs
Tue Nov 6 14:27:11 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.222.6.7: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.7: +151 -101 lines
Refactor PNP API:
- Make suspend/resume directly a device functionality. It consists of
  three layers (class logic, device logic, bus logic), all of them being
  optional. This replaces D0/D3 transitions.
- device_is_active returns true if the device was not disabled and was
  not suspended (even partially), device_is_enabled returns true if the
  device was enabled.
- Change pnp_global_transition into pnp_system_suspend and
  pnp_system_resume. Before running any suspend/resume handlers, check
  that all currently attached devices support power management and bail
  out otherwise. The latter is not done for the shutdown/panic case.
- Make the former bus-specific generic network handlers a class handler.
- Make PNP message like volume up/down/toogle PNP events. Each device
  can register what events they are interested in and whether the handler
  should be global or not.
- Introduce device_active API for devices to mark themselve in use from
  either the system or the device. Use this to implement the idle handling
  for audio and input devices. This is intended to replace most ad-hoc
  watchdogs as well.
- Fix somes situations in which audio resume would lose mixer settings.
- Make USB host controllers better deal with suspend in the light of
  shared interrupts.
- Flush filesystem cache on suspend.
- Flush disk caches on suspend. Put ATA disks into standby on suspend as
  well.
- Adopt drivers to use the new PNP API.
- Fix a critical bug in the generic cardbus layer that made D0->D3
  break.
- Fix ral(4) to set if_stop.
- Convert cbb(4) to the new PNP API.
- Apply the PCI Express SCI fix on resume again.

Revision 1.197.2.5: download - view: text, markup, annotated - select for diffs
Sat Oct 27 11:29:56 2007 UTC (19 years ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.4: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.4: +10 -9 lines
sync with head.

Revision 1.222.6.7: download - view: text, markup, annotated - select for diffs
Fri Oct 26 15:44:08 2007 UTC (19 years ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.222.6.6: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.6: +10 -9 lines
Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.

Revision 1.222.6.6: download - view: text, markup, annotated - select for diffs
Sun Oct 21 19:10:28 2007 UTC (19 years, 1 month ago) by joerg
Branches: jmcneill-pm
Diff to: previous 1.222.6.5: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.5: +3 -3 lines
Fix compilation with DIAGNOSTIC.

Revision 1.222.6.5: download - view: text, markup, annotated - select for diffs
Thu Oct 18 02:07:20 2007 UTC (19 years, 1 month ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.4: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.4: +110 -7 lines
Improve PNP audio power management. Instead of starting an idle timer
to power down the audio device on last close, allow the pm policy to
power down the device while it's still open.

Since X mixers typically poll /dev/mixer with AUDIO_GET_INFO ioctls, we need
to avoid resetting the idle timer when these applications are running. As a
result, introduce audio_mixer_{capture,restore} in MI audio and use them in
its power handler. When an audio device is asleep, we simply return cached
values on AUDIO_GET_INFO ioctls. A nice side effect is that MI audio now
properly captures and restores mixer values across hw device suspend/resume.

XXX: I've added locking in pnp_power(), but I'm using mutex_owned() in
a way that mutex(9) claims I shouldn't be doing. Needs to be revisited.

Revision 1.223.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 14 11:47:58 2007 UTC (19 years, 1 month ago) by yamt
Branches: yamt-x86pmap
Diff to: previous 1.223: preferred, colored; next MAIN 1.224: preferred, colored
Changes since revision 1.223: +10 -9 lines
sync with head.

Revision 1.224: download - view: text, markup, annotated - select for diffs
Mon Oct 8 16:18:02 2007 UTC (19 years, 1 month ago) by ad
Branches: MAIN
CVS tags: yamt-x86pmap-base4, yamt-x86pmap-base3, vmlocking-base, jmcneill-base, bouyer-xenamd64-base2, bouyer-xenamd64-base, bouyer-xenamd64
Branch point for: mjf-devfs
Diff to: previous 1.223: preferred, colored
Changes since revision 1.223: +10 -9 lines
Use the softint API.

Revision 1.222.6.4: download - view: text, markup, annotated - select for diffs
Thu Sep 13 04:45:12 2007 UTC (19 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.3: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.3: +5 -2 lines
If outputs.master doesn't exist, fallback to inputs.dac as the next best
possible candidate.

Revision 1.222.6.3: download - view: text, markup, annotated - select for diffs
Fri Sep 7 23:55:29 2007 UTC (19 years, 2 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.2: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.2: +2 -7 lines
Remove azalia mixer hack that should never have been commited in the first
place.

Revision 1.197.2.4: download - view: text, markup, annotated - select for diffs
Mon Sep 3 14:33:08 2007 UTC (19 years, 2 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.3: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.3: +93 -72 lines
sync with head.

Revision 1.215.2.1.2.1: download - view: text, markup, annotated - select for diffs
Mon Sep 3 07:04:17 2007 UTC (19 years, 2 months ago) by wrstuden
Branches: wrstuden-fixsa
Diff to: previous 1.215.2.1: preferred, colored
Changes since revision 1.215.2.1: +35 -14 lines
Sync w/ NetBSD-4-RC_1

Revision 1.192.4.7: download - view: text, markup, annotated - select for diffs
Sun Aug 26 19:08:02 2007 UTC (19 years, 2 months ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.192.4.6: preferred, colored; branchpoint 1.192: preferred, colored; next MAIN 1.193: preferred, colored
Changes since revision 1.192.4.6: +6 -4 lines
Pull up following revision(s) (requested by uwe in ticket #1831):
	sys/dev/audio.c: revision 1.223
au_setup_ports - don't hide ports->nports++ inside another expression,
especially if that other expression is the right hand side operand of
&& which is short-circuiting.  The effect was that audiorecord(1)
would always fail trying to set recording port with AUDIO_SETINFO.
Tested on wss@pnpbios.  It looks like this problem has been reported
as PR/35239, filed against port-hp700.

Revision 1.215.2.3: download - view: text, markup, annotated - select for diffs
Fri Aug 24 20:23:09 2007 UTC (19 years, 2 months ago) by liamjfoy
Branches: netbsd-4
CVS tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, matt-nb4-arm-base, matt-nb4-arm
Diff to: previous 1.215.2.2: preferred, colored; branchpoint 1.215: preferred, colored
Changes since revision 1.215.2.2: +6 -4 lines
Pull up following revision(s) (requested by uwe in ticket #835):
	sys/dev/audio.c: revision 1.223
au_setup_ports - don't hide ports->nports++ inside another expression,
especially if that other expression is the right hand side operand of
&& which is short-circuiting.  The effect was that audiorecord(1)
would always fail trying to set recording port with AUDIO_SETINFO.
Tested on wss@pnpbios.  It looks like this problem has been reported
as PR/35239, filed against port-hp700.

Revision 1.221.2.3: download - view: text, markup, annotated - select for diffs
Mon Aug 20 18:36:36 2007 UTC (19 years, 3 months ago) by ad
Branches: vmlocking
Diff to: previous 1.221.2.2: preferred, colored; branchpoint 1.221: preferred, colored; next MAIN 1.222: preferred, colored
Changes since revision 1.221.2.2: +6 -4 lines
Sync with HEAD.

Revision 1.222.6.2: download - view: text, markup, annotated - select for diffs
Thu Aug 16 11:03:02 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222.6.1: preferred, colored; branchpoint 1.222: preferred, colored
Changes since revision 1.222.6.1: +6 -4 lines
Sync with HEAD.

Revision 1.222.2.1: download - view: text, markup, annotated - select for diffs
Wed Aug 15 13:48:11 2007 UTC (19 years, 3 months ago) by skrll
Branches: nick-csl-alignment
Diff to: previous 1.222: preferred, colored; next MAIN 1.223: preferred, colored
Changes since revision 1.222: +6 -4 lines
Sync with HEAD.

Revision 1.223: download - view: text, markup, annotated - select for diffs
Tue Aug 14 21:34:03 2007 UTC (19 years, 3 months ago) by uwe
Branches: MAIN
CVS tags: yamt-x86pmap-base2, yamt-x86pmap-base, nick-csl-alignment-base5
Branch point for: yamt-x86pmap, matt-armv6
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +6 -4 lines
au_setup_ports - don't hide ports->nports++ inside another expression,
especially if that other expression is the right hand side operand of
&& which is short-circuiting.  The effect was that audiorecord(1)
would always fail trying to set recording port with AUDIO_SETINFO.

Tested on wss@pnpbios.  It looks like this problem has been reported
as PR/35239, filed against port-hp700.

Revision 1.222.6.1: download - view: text, markup, annotated - select for diffs
Fri Aug 3 22:17:12 2007 UTC (19 years, 3 months ago) by jmcneill
Branches: jmcneill-pm
Diff to: previous 1.222: preferred, colored
Changes since revision 1.222: +99 -32 lines
Pull in power management changes from private branch.

Revision 1.221.2.2: download - view: text, markup, annotated - select for diffs
Sun Jul 15 13:21:05 2007 UTC (19 years, 4 months ago) by ad
Branches: vmlocking
Diff to: previous 1.221.2.1: preferred, colored; branchpoint 1.221: preferred, colored
Changes since revision 1.221.2.1: +31 -12 lines
Sync with head.

Revision 1.221.4.1: download - view: text, markup, annotated - select for diffs
Wed Jul 11 20:04:56 2007 UTC (19 years, 4 months ago) by mjf
Branches: mjf-ufs-trans
Diff to: previous 1.221: preferred, colored; next MAIN 1.222: preferred, colored
Changes since revision 1.221: +31 -12 lines
Sync with head.

Revision 1.221.2.1: download - view: text, markup, annotated - select for diffs
Sun Jun 17 21:30:48 2007 UTC (19 years, 5 months ago) by ad
Branches: vmlocking
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +10 -9 lines
- Increase the number of thread priorities from 128 to 256. How the space
  is set up is to be revisited.
- Implement soft interrupts as kernel threads. A generic implementation
  is provided, with hooks for fast-path MD code that can run the interrupt
  threads over the top of other threads executing in the kernel.
- Split vnode::v_flag into three fields, depending on how the flag is
  locked (by the interlock, by the vnode lock, by the file system).
- Miscellaneous locking fixes and improvements.

Revision 1.215.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 12 10:11:08 2007 UTC (19 years, 5 months ago) by liamjfoy
Branches: netbsd-4
Diff to: previous 1.215.2.1: preferred, colored; branchpoint 1.215: preferred, colored
Changes since revision 1.215.2.1: +31 -12 lines
Pull up following revision(s) (requested by jmcneill in ticket #716):
	share/man/man4/audio.4: revision 1.66
	sys/compat/ossaudio/ossaudio.c: revision 1.56
	sys/sys/audioio.h: revision 1.32
	lib/libossaudio/ossaudio.c: revision 1.21
	sys/dev/audio.c: revision 1.222
Add a new ioctl AUDIO_GETBUFINFO. It works like AUDIO_GETINFO, but
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@

Revision 1.222: download - view: text, markup, annotated - select for diffs
Mon Jun 11 13:05:46 2007 UTC (19 years, 5 months ago) by joerg
Branches: MAIN
CVS tags: nick-csl-alignment-base, mjf-ufs-trans-base, matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: nick-csl-alignment, jmcneill-pm
Diff to: previous 1.221: preferred, colored
Changes since revision 1.221: +31 -12 lines
Add a new ioctl AUDIO_GETBUFINFO. It works like AUDIO_GETINFO, but
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@

Revision 1.217.2.2: download - view: text, markup, annotated - select for diffs
Mon Mar 12 05:53:02 2007 UTC (19 years, 8 months ago) by rmind
Branches: yamt-idlelwp
Diff to: previous 1.217.2.1: preferred, colored; next MAIN 1.218: preferred, colored
Changes since revision 1.217.2.1: +60 -60 lines
Sync with HEAD.

Revision 1.215.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 10 12:06:05 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-4
Branch point for: wrstuden-fixsa
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +3 -3 lines
Pull up following revision(s) (requested by kent in ticket #499):
	sys/dev/audio.c: revision 1.221
return information about playing buffer, not recording bufer,
for AUDIO_WSEEK.
PR#35171

Revision 1.192.4.5.2.1: download - view: text, markup, annotated - select for diffs
Sat Mar 10 11:50:54 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-3-1
CVS tags: netbsd-3-1-1-RELEASE
Diff to: previous 1.192.4.5: preferred, colored; next MAIN 1.192.4.6: preferred, colored
Changes since revision 1.192.4.5: +1 -1 lines
Pull up following revision(s) (requested by kent in ticket #1678):
	sys/dev/audio.c: revision 1.221
return information about playing buffer, not recording bufer,
for AUDIO_WSEEK.
PR#35171

Revision 1.192.4.2.2.3: download - view: text, markup, annotated - select for diffs
Sat Mar 10 11:50:05 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-3-0
CVS tags: netbsd-3-0-3-RELEASE
Diff to: previous 1.192.4.2.2.2: preferred, colored; branchpoint 1.192.4.2: preferred, colored; next MAIN 1.192.4.3: preferred, colored
Changes since revision 1.192.4.2.2.2: +3 -3 lines
Pull up following revision(s) (requested by kent in ticket #1678):
	sys/dev/audio.c: revision 1.221
return information about playing buffer, not recording bufer,
for AUDIO_WSEEK.
PR#35171

Revision 1.192.4.6: download - view: text, markup, annotated - select for diffs
Sat Mar 10 11:46:52 2007 UTC (19 years, 8 months ago) by bouyer
Branches: netbsd-3
Diff to: previous 1.192.4.5: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.4.5: +1 -1 lines
Pull up following revision(s) (requested by kent in ticket #1678):
	sys/dev/audio.c: revision 1.221
return information about playing buffer, not recording bufer,
for AUDIO_WSEEK.
PR#35171

Revision 1.221: download - view: text, markup, annotated - select for diffs
Fri Mar 9 13:20:12 2007 UTC (19 years, 8 months ago) by kent
Branches: MAIN
CVS tags: yamt-idlelwp-base8, thorpej-atomic-base, thorpej-atomic, reinoud-bufcleanup
Branch point for: vmlocking, mjf-ufs-trans
Diff to: previous 1.220: preferred, colored
Changes since revision 1.220: +3 -3 lines
return information about playing buffer, not recording bufer,
for AUDIO_WSEEK.

PR#35171

Revision 1.220: download - view: text, markup, annotated - select for diffs
Sun Mar 4 06:01:40 2007 UTC (19 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.219: preferred, colored
Changes since revision 1.219: +7 -7 lines
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.

Revision 1.219: download - view: text, markup, annotated - select for diffs
Thu Mar 1 17:31:35 2007 UTC (19 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.218: preferred, colored
Changes since revision 1.218: +54 -54 lines
TRUE -> true, FALSE -> false

Revision 1.217.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 16:53:46 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-idlelwp
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +5 -5 lines
- sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.

Revision 1.218.2.1: download - view: text, markup, annotated - select for diffs
Tue Feb 27 14:15:55 2007 UTC (19 years, 8 months ago) by ad
Branches: ad-audiomp
Diff to: previous 1.218: preferred, colored; next MAIN 1.219: preferred, colored
Changes since revision 1.218: +338 -148 lines
Add MP locking for audio drivers.

Revision 1.197.2.3: download - view: text, markup, annotated - select for diffs
Mon Feb 26 09:09:50 2007 UTC (19 years, 8 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.2: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.2: +66 -25 lines
sync with head.

Revision 1.218: download - view: text, markup, annotated - select for diffs
Wed Feb 21 22:59:58 2007 UTC (19 years, 8 months ago) by thorpej
Branches: MAIN
CVS tags: ad-audiomp-base
Branch point for: ad-audiomp
Diff to: previous 1.217: preferred, colored
Changes since revision 1.217: +5 -5 lines
Replace the Mach-derived boolean_t type with the C99 bool type.  A
future commit will replace use of TRUE and FALSE with true and false.

Revision 1.217: download - view: text, markup, annotated - select for diffs
Thu Feb 15 18:12:05 2007 UTC (19 years, 9 months ago) by ad
Branches: MAIN
Branch point for: yamt-idlelwp
Diff to: previous 1.216: preferred, colored
Changes since revision 1.216: +6 -9 lines
Defer wakeup() to the soft interrupt also.

Revision 1.216: download - view: text, markup, annotated - select for diffs
Fri Feb 9 21:55:26 2007 UTC (19 years, 9 months ago) by ad
Branches: MAIN
CVS tags: post-newlock2-merge
Diff to: previous 1.215: preferred, colored
Changes since revision 1.215: +59 -15 lines
Merge newlock2 to head.

Revision 1.209.2.3: download - view: text, markup, annotated - select for diffs
Sat Jan 27 00:24:52 2007 UTC (19 years, 9 months ago) by ad
Branches: newlock2
Diff to: previous 1.209.2.2: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.2.2: +55 -22 lines
Don't call selnotify() or psignal() while above IPL_VM: defer them to a
soft interrupt.

Revision 1.209.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 19 09:39:57 2007 UTC (19 years, 10 months ago) by ad
Branches: newlock2
Diff to: previous 1.209.2.1: preferred, colored; branchpoint 1.209: preferred, colored
Changes since revision 1.209.2.1: +16 -5 lines
Acquire proclist_mutex before sending signals.

Revision 1.197.2.2: download - view: text, markup, annotated - select for diffs
Sat Dec 30 20:47:49 2006 UTC (19 years, 10 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197.2.1: preferred, colored; branchpoint 1.197: preferred, colored
Changes since revision 1.197.2.1: +49 -37 lines
sync with head.

Revision 1.209.4.2: download - view: text, markup, annotated - select for diffs
Sun Dec 10 07:16:52 2006 UTC (19 years, 11 months ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.209.4.1: preferred, colored; branchpoint 1.209: preferred, colored; next MAIN 1.210: preferred, colored
Changes since revision 1.209.4.1: +44 -38 lines
sync with head.

Revision 1.209.2.1: download - view: text, markup, annotated - select for diffs
Sat Nov 18 21:34:03 2006 UTC (20 years ago) by ad
Branches: newlock2
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +44 -34 lines
Sync with head.

Revision 1.215: download - view: text, markup, annotated - select for diffs
Thu Nov 16 01:32:44 2006 UTC (20 years ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base5, yamt-splraiseipl-base4, yamt-splraiseipl-base3, newlock2-nbase, newlock2-base, netbsd-4-base
Branch point for: netbsd-4
Diff to: previous 1.214: preferred, colored
Changes since revision 1.214: +16 -16 lines
__unused removal on arguments; approved by core.

Revision 1.214: download - view: text, markup, annotated - select for diffs
Wed Nov 1 10:13:37 2006 UTC (20 years ago) by cbiere
Branches: MAIN
Diff to: previous 1.213: preferred, colored
Changes since revision 1.213: +6 -6 lines
Set oldpblksize and oldrblksize early enough so that zero-initialisation
isn't necessary. The GCC warning was not a false-positive, AFAICS.

Revision 1.213: download - view: text, markup, annotated - select for diffs
Wed Nov 1 09:36:52 2006 UTC (20 years ago) by xtraeme
Branches: MAIN
Diff to: previous 1.212: preferred, colored
Changes since revision 1.212: +4 -2 lines
Initialize old[pr]blksize to 0 to avoid gcc warnings.

Revision 1.212: download - view: text, markup, annotated - select for diffs
Wed Nov 1 06:39:19 2006 UTC (20 years ago) by cbiere
Branches: MAIN
Diff to: previous 1.211: preferred, colored
Changes since revision 1.211: +26 -22 lines
Fix for kern/17446. Restore the audio settings if an error occured.

Revision 1.209.4.1: download - view: text, markup, annotated - select for diffs
Sun Oct 22 06:05:28 2006 UTC (20 years ago) by yamt
Branches: yamt-splraiseipl
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +20 -16 lines
sync with head

Revision 1.211: download - view: text, markup, annotated - select for diffs
Thu Oct 12 01:30:50 2006 UTC (20 years, 1 month ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base2
Diff to: previous 1.210: preferred, colored
Changes since revision 1.210: +18 -15 lines
- sprinkle __unused on function decls.
- fix a couple of unused bugs
- no more -Wno-unused for i386

Revision 1.210: download - view: text, markup, annotated - select for diffs
Sun Sep 24 03:53:08 2006 UTC (20 years, 1 month ago) by jmcneill
Branches: MAIN
Diff to: previous 1.209: preferred, colored
Changes since revision 1.209: +4 -3 lines
Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@

Revision 1.199.4.1: download - view: text, markup, annotated - select for diffs
Sat Sep 9 02:49:09 2006 UTC (20 years, 2 months ago) by rpaulo
Branches: rpaulo-netinet-merge-pcb
Diff to: previous 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199: +109 -18 lines
sync with head

Revision 1.200.2.6: download - view: text, markup, annotated - select for diffs
Sun Sep 3 15:23:55 2006 UTC (20 years, 2 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200.2.5: preferred, colored; branchpoint 1.200: preferred, colored; next MAIN 1.201: preferred, colored
Changes since revision 1.200.2.5: +5 -5 lines
sync with head.

Revision 1.209: download - view: text, markup, annotated - select for diffs
Sun Aug 27 23:54:50 2006 UTC (20 years, 2 months ago) by christos
Branches: MAIN
CVS tags: yamt-splraiseipl-base, yamt-pdpolicy-base9, yamt-pdpolicy-base8, rpaulo-netinet-merge-pcb-base
Branch point for: yamt-splraiseipl, newlock2
Diff to: previous 1.208: preferred, colored
Changes since revision 1.208: +5 -5 lines
add missing initializers.

Revision 1.200.2.5: download - view: text, markup, annotated - select for diffs
Fri Aug 11 15:43:52 2006 UTC (20 years, 3 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200.2.4: preferred, colored; branchpoint 1.200: preferred, colored
Changes since revision 1.200.2.4: +4 -2 lines
sync with head

Revision 1.206.4.1: download - view: text, markup, annotated - select for diffs
Thu Jul 13 17:49:16 2006 UTC (20 years, 4 months ago) by gdamore
Branches: gdamore-uart
Diff to: previous 1.206: preferred, colored; next MAIN 1.207: preferred, colored
Changes since revision 1.206: +43 -2 lines
Merge from HEAD.

Revision 1.208: download - view: text, markup, annotated - select for diffs
Tue Jun 27 02:07:08 2006 UTC (20 years, 4 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pdpolicy-base7, abandoned-netbsd-4-base, abandoned-netbsd-4
Diff to: previous 1.207: preferred, colored
Changes since revision 1.207: +4 -2 lines
Protect audio_powerhook with '#if NAUDIO > 0'. PR kern/33832.

Revision 1.200.2.4: download - view: text, markup, annotated - select for diffs
Mon Jun 26 12:50:37 2006 UTC (20 years, 4 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200.2.3: preferred, colored; branchpoint 1.200: preferred, colored
Changes since revision 1.200.2.3: +41 -2 lines
sync with head.

Revision 1.206.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 22 03:39:48 2006 UTC (20 years, 5 months ago) by chap
Branches: chap-midi
Diff to: previous 1.206: preferred, colored; next MAIN 1.207: preferred, colored
Changes since revision 1.206: +41 -2 lines
Complete a sync sys/ with head.

Revision 1.197.2.1: download - view: text, markup, annotated - select for diffs
Wed Jun 21 15:02:11 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-lazymbuf
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +148 -58 lines
sync with head.

Revision 1.207: download - view: text, markup, annotated - select for diffs
Mon Jun 19 10:19:08 2006 UTC (20 years, 5 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pdpolicy-base6, chap-midi-nbase, chap-midi-base
Diff to: previous 1.206: preferred, colored
Changes since revision 1.206: +41 -2 lines
Halt input/output on soft suspend if currently running, and restore them
on soft resume.

Revision 1.199.6.2: download - view: text, markup, annotated - select for diffs
Thu Jun 1 22:36:02 2006 UTC (20 years, 5 months ago) by kardel
Branches: simonb-timecounters
CVS tags: simonb-timcounters-final
Diff to: previous 1.199.6.1: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199.6.1: +21 -13 lines
Sync with head.

Revision 1.201.4.2: download - view: text, markup, annotated - select for diffs
Wed May 24 15:50:07 2006 UTC (20 years, 5 months ago) by tron
Branches: peter-altq
Diff to: previous 1.201.4.1: preferred, colored; branchpoint 1.201: preferred, colored; next MAIN 1.202: preferred, colored
Changes since revision 1.201.4.1: +46 -11 lines
Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.

Revision 1.200.2.3: download - view: text, markup, annotated - select for diffs
Wed May 24 10:57:36 2006 UTC (20 years, 5 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200.2.2: preferred, colored; branchpoint 1.200: preferred, colored
Changes since revision 1.200.2.2: +48 -13 lines
sync with head.

Revision 1.206: download - view: text, markup, annotated - select for diffs
Tue May 16 13:46:19 2006 UTC (20 years, 6 months ago) by kent
Branches: MAIN
CVS tags: yamt-pdpolicy-base5, simonb-timecounters-base, gdamore-uart-base
Branch point for: gdamore-uart, chap-midi
Diff to: previous 1.205: preferred, colored
Changes since revision 1.205: +15 -9 lines
If one or more playback filters are applied, minimize loading
size of the hardware buffer to improve accuracy of AUDIO_GETIOFFS.

Revision 1.192.4.5: download - view: text, markup, annotated - select for diffs
Sat May 13 16:44:41 2006 UTC (20 years, 6 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1
Branch point for: netbsd-3-1
Diff to: previous 1.192.4.4: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.4.4: +8 -6 lines
Pull up following revision(s) (requested by kent in ticket #1317):
	sys/dev/audio.c: revision 1.205
Fixes a bug that audio_offset_t::samples for AUDIO_GETxOFFS has
incorrect value.  It also affects SNDCTL_DSP_GETOPTR of
ossaudio.
PR: kern/32405 by Stephane Witzman

Revision 1.201.2.3: download - view: text, markup, annotated - select for diffs
Thu May 11 23:28:04 2006 UTC (20 years, 6 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.201.2.2: preferred, colored; branchpoint 1.201: preferred, colored; next MAIN 1.202: preferred, colored
Changes since revision 1.201.2.2: +37 -8 lines
sync with head

Revision 1.205: download - view: text, markup, annotated - select for diffs
Wed May 10 01:56:21 2006 UTC (20 years, 6 months ago) by kent
Branches: MAIN
CVS tags: elad-kernelauth-base
Diff to: previous 1.204: preferred, colored
Changes since revision 1.204: +8 -6 lines
Fixes a bug that audio_offset_t::samples for AUDIO_GETxOFFS has
incorrect value.  It also affects SNDCTL_DSP_GETOPTR of
ossaudio.

PR: kern/32405 by Stephane Witzman

Revision 1.199.6.1: download - view: text, markup, annotated - select for diffs
Sat Apr 22 11:38:45 2006 UTC (20 years, 7 months ago) by simonb
Branches: simonb-timecounters
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +48 -6 lines
Sync with head.

Revision 1.192.4.2.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 19 21:01:00 2006 UTC (20 years, 7 months ago) by tron
Branches: netbsd-3-0
CVS tags: netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE
Diff to: previous 1.192.4.2.2.1: preferred, colored; branchpoint 1.192.4.2: preferred, colored
Changes since revision 1.192.4.2.2.1: +15 -13 lines
Pull up following revision(s) (requested by jmcneill in ticket #1281):
	sys/dev/audio_if.h: revision 1.61
	sys/dev/audiovar.h: revision 1.36
	sys/dev/audio.c: revision 1.204 via patch
Don't use simple_locks; we can't hold them while calling malloc and
friends.

Revision 1.192.4.4: download - view: text, markup, annotated - select for diffs
Wed Apr 19 20:59:13 2006 UTC (20 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.192.4.3: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.4.3: +15 -13 lines
Pull up following revision(s) (requested by jmcneill in ticket #1281):
	sys/dev/audio_if.h: revision 1.61
	sys/dev/audiovar.h: revision 1.36
	sys/dev/audio.c: revision 1.204 via patch
Don't use simple_locks; we can't hold them while calling malloc and
friends.

Revision 1.204: download - view: text, markup, annotated - select for diffs
Wed Apr 19 14:10:58 2006 UTC (20 years, 7 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.203: preferred, colored
Changes since revision 1.203: +15 -13 lines
Don't use simple_locks; we can't hold them while calling malloc and
friends.

Revision 1.201.2.2: download - view: text, markup, annotated - select for diffs
Wed Apr 19 03:24:23 2006 UTC (20 years, 7 months ago) by elad
Branches: elad-kernelauth
Diff to: previous 1.201.2.1: preferred, colored; branchpoint 1.201: preferred, colored
Changes since revision 1.201.2.1: +3692 -0 lines
sync with head.

Revision 1.192.4.2.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 18 21:15:07 2006 UTC (20 years, 7 months ago) by tron
Branches: netbsd-3-0
Diff to: previous 1.192.4.2: preferred, colored
Changes since revision 1.192.4.2: +29 -4 lines
Pull up following revision(s) (requested by jmcneill in ticket #1277):
	sys/dev/audio_if.h: revision 1.60 via patch
	sys/dev/audiovar.h: revision 1.35 via patch
	sys/dev/audio.c: revision 1.203 via patch
Protect audio_write's filter graph from being modified in the
middle of a
write. Fixes the 'audioctl of death' problem (PR#32563).

Revision 1.192.4.3: download - view: text, markup, annotated - select for diffs
Tue Apr 18 21:12:46 2006 UTC (20 years, 7 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.192.4.2: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.4.2: +29 -4 lines
Pull up following revision(s) (requested by jmcneill in ticket #1277):
	sys/dev/audio_if.h: revision 1.60 via patch
	sys/dev/audiovar.h: revision 1.35 via patch
	sys/dev/audio.c: revision 1.203 via patch
Protect audio_write's filter graph from being modified in the
middle of a
write. Fixes the 'audioctl of death' problem (PR#32563).

Revision 1.203: download - view: text, markup, annotated - select for diffs
Tue Apr 18 19:15:27 2006 UTC (20 years, 7 months ago) by jmcneill
Branches: MAIN
Diff to: previous 1.202: preferred, colored
Changes since revision 1.202: +29 -4 lines
Protect audio_write's filter graph from being modified in the middle of a
write. Fixes the 'audioctl of death' problem (PR#32563).

Revision 1.200.2.2: download - view: text, markup, annotated - select for diffs
Sat Apr 1 12:06:43 2006 UTC (20 years, 7 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200.2.1: preferred, colored; branchpoint 1.200: preferred, colored
Changes since revision 1.200.2.1: +3 -3 lines
sync with head.

Revision 1.201.4.1: download - view: text, markup, annotated - select for diffs
Fri Mar 31 09:45:17 2006 UTC (20 years, 7 months ago) by tron
Branches: peter-altq
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -3 lines
Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.

Revision 1.202: download - view: text, markup, annotated - select for diffs
Tue Mar 28 17:38:29 2006 UTC (20 years, 7 months ago) by thorpej
Branches: MAIN
CVS tags: yamt-pdpolicy-base4, yamt-pdpolicy-base3
Diff to: previous 1.201: preferred, colored
Changes since revision 1.201: +3 -3 lines
Use device_unit().

Revision 1.200.2.1: download - view: text, markup, annotated - select for diffs
Mon Mar 13 09:07:08 2006 UTC (20 years, 8 months ago) by yamt
Branches: yamt-pdpolicy
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +12 -2 lines
sync with head.

Revision 1.201.2.1
Tue Mar 7 15:17:47 2006 UTC (20 years, 8 months ago) by elad
Branches: elad-kernelauth
FILE REMOVED
Changes since revision 1.201: +0 -3692 lines
file audio.c was added on branch elad-kernelauth on 2006-04-19 03:24:23 +0000

Revision 1.201: download - view: text, markup, annotated - select for diffs
Tue Mar 7 15:17:47 2006 UTC (20 years, 8 months ago) by jmcneill
Branches: MAIN
CVS tags: yamt-pdpolicy-base2, peter-altq-base
Branch point for: peter-altq, elad-kernelauth
Diff to: previous 1.200: preferred, colored
Changes since revision 1.200: +12 -2 lines
Add a 'powerstate' callback to audio_hw_if, to allow hw drivers to power
themselves down when not in use.

Revision 1.199.2.1: download - view: text, markup, annotated - select for diffs
Wed Mar 1 09:28:11 2006 UTC (20 years, 8 months ago) by yamt
Branches: yamt-uio_vmspace
Diff to: previous 1.199: preferred, colored; next MAIN 1.200: preferred, colored
Changes since revision 1.199: +8 -3 lines
sync with head.

Revision 1.200: download - view: text, markup, annotated - select for diffs
Sat Feb 25 11:32:51 2006 UTC (20 years, 8 months ago) by rpaulo
Branches: MAIN
CVS tags: yamt-uio_vmspace-base5, yamt-pdpolicy-base
Branch point for: yamt-pdpolicy
Diff to: previous 1.199: preferred, colored
Changes since revision 1.199: +8 -3 lines
In mixer_remove() it's better to check if lwp is not NULL before trying
to access a children node of it.

Fixes PR 32823, by Yours Truly. I guess I should read the code before
sending a PR.

Revision 1.199: download - view: text, markup, annotated - select for diffs
Sat Dec 24 20:27:29 2005 UTC (20 years, 10 months ago) by perry
Branches: MAIN
Branch point for: yamt-uio_vmspace, simonb-timecounters, rpaulo-netinet-merge-pcb
Diff to: previous 1.198: preferred, colored
Changes since revision 1.198: +10 -10 lines
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.198: download - view: text, markup, annotated - select for diffs
Sun Dec 11 12:20:53 2005 UTC (20 years, 11 months ago) by christos
Branches: MAIN
Diff to: previous 1.197: preferred, colored
Changes since revision 1.197: +39 -38 lines
merge ktrace-lwp.

Revision 1.180.2.10: download - view: text, markup, annotated - select for diffs
Thu Nov 10 14:03:00 2005 UTC (21 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.9: preferred, colored; next MAIN 1.181: preferred, colored
Changes since revision 1.180.2.9: +21 -39 lines
Sync with HEAD. Here we go again...

Revision 1.197: download - view: text, markup, annotated - select for diffs
Tue Jun 21 14:01:11 2005 UTC (21 years, 5 months ago) by ws
Branches: MAIN
CVS tags: yamt-vop-base3, yamt-vop-base2, yamt-vop-base, yamt-vop, yamt-readahead-pervnode, yamt-readahead-perfile, yamt-readahead-base3, yamt-readahead-base2, yamt-readahead-base, yamt-readahead, thorpej-vnode-attr-base, thorpej-vnode-attr, ktrace-lwp-base
Branch point for: yamt-lazymbuf
Diff to: previous 1.196: preferred, colored
Changes since revision 1.196: +8 -8 lines
PR-30566: Poll must not return <sys/errno.h> values.
Start with those places I can easily test.

Revision 1.155.4.7: download - view: text, markup, annotated - select for diffs
Fri Jun 17 12:46:35 2005 UTC (21 years, 5 months ago) by tron
Branches: netbsd-1-6
Diff to: previous 1.155.4.6: preferred, colored; branchpoint 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155.4.6: +9 -19 lines
Pull up revision 1.196 via patch (requested by is in ticket #5793):
Make sure buffer sizes are initialized correctly even when the pause state
is explicitly set.
Without this, the machine would crash for some audio hardware that needs
to divide by the block size (e.g., cs4281.c/cs4280.c).

Revision 1.182.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 12 21:28:27 2005 UTC (21 years, 5 months ago) by tron
Branches: netbsd-2-0
CVS tags: netbsd-2-0-3-RELEASE
Diff to: previous 1.182.2.1: preferred, colored; branchpoint 1.182: preferred, colored; next MAIN 1.183: preferred, colored
Changes since revision 1.182.2.1: +9 -19 lines
Pull up revision 1.196 via patch (requested by is in ticket #1990):
Make sure buffer sizes are initialized correctly even when the pause state
is explicitly set.
Without this, the machine would crash for some audio hardware that needs
to divide by the block size (e.g., cs4281.c/cs4280.c).

Revision 1.182.2.1.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 12 21:28:22 2005 UTC (21 years, 5 months ago) by tron
Branches: netbsd-2
CVS tags: netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1
Diff to: previous 1.182.2.1.2.1: preferred, colored; branchpoint 1.182.2.1: preferred, colored; next MAIN 1.182.2.2: preferred, colored
Changes since revision 1.182.2.1.2.1: +9 -19 lines
Pull up revision 1.196 via patch (requested by is in ticket #1990):
Make sure buffer sizes are initialized correctly even when the pause state
is explicitly set.
Without this, the machine would crash for some audio hardware that needs
to divide by the block size (e.g., cs4281.c/cs4280.c).

Revision 1.192.4.2: download - view: text, markup, annotated - select for diffs
Sat Jun 11 11:18:32 2005 UTC (21 years, 5 months ago) by tron
Branches: netbsd-3
CVS tags: netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1
Branch point for: netbsd-3-0
Diff to: previous 1.192.4.1: preferred, colored; branchpoint 1.192: preferred, colored
Changes since revision 1.192.4.1: +7 -17 lines
Pull up revision 1.196 (requested by is in ticket #445):
Make sure buffer sizes are initialized correctly even when the pause state
is explicitly set.
Without this, the machine would crash for some audio hardware that needs
to divide by the block size (e.g., cs4281.c/cs4280.c).

Revision 1.196: download - view: text, markup, annotated - select for diffs
Sat Jun 11 08:14:19 2005 UTC (21 years, 5 months ago) by is
Branches: MAIN
Diff to: previous 1.195: preferred, colored
Changes since revision 1.195: +9 -19 lines
Make sure buffer sizes are initialized correctly even when the pause state
is explicitly set. Without this, the machine would crash in the audio interupt when the driver
needs to divide by the block size (e.g., cs4281.c/cs4280.c).
Idea for the fix by yamt.

Revision 1.195: download - view: text, markup, annotated - select for diffs
Wed May 18 20:10:25 2005 UTC (21 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.194: preferred, colored
Changes since revision 1.194: +5 -4 lines
Allow the audio device to be opened for read resp. write by separate calls
to open().  Previously only one call to open() was allowed.
This change should allow some Linux derived programs to work unaltered.

XXX This isn't really possible to implement correctly in a simple way.
So this implementation is incorrect: It is not until device has been closed
by both the reader and writer that it is possible to open it at all again.

Revision 1.182.2.1.2.1: download - view: text, markup, annotated - select for diffs
Wed May 11 21:21:36 2005 UTC (21 years, 6 months ago) by riz
Branches: netbsd-2
Diff to: previous 1.182.2.1: preferred, colored
Changes since revision 1.182.2.1: +3 -3 lines
Apply a patch to fix audio recording buffer handling to fix PR#26706
by Chapman Flack.  (requested by kent in ticket #1414)

Revision 1.194: download - view: text, markup, annotated - select for diffs
Wed May 4 01:57:23 2005 UTC (21 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.193: preferred, colored
Changes since revision 1.193: +4 -11 lines
When audioclose is called it's the last close of the device, so there
is no need to fiddle with resetting individual bits.  Just clear them.

Revision 1.187.2.4: download - view: text, markup, annotated - select for diffs
Fri Apr 29 11:28:44 2005 UTC (21 years, 6 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.187.2.3: preferred, colored; next MAIN 1.188: preferred, colored
Changes since revision 1.187.2.3: +137 -24 lines
sync with -current

Revision 1.192.4.1: download - view: text, markup, annotated - select for diffs
Mon Apr 25 14:49:46 2005 UTC (21 years, 6 months ago) by tron
Branches: netbsd-3
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +3 -5 lines
Pull up revision 1.193 (requested by jmcneill in ticket #200):
Enable full-duplex mode by default on drivers that support it if the
underlying audio device was opened read/write. This is consistent with
Linux OSS behaviour and fixes a bug with certain applications (including
Skype) that assume this behaviour.
Fixes PR# 30044.

Revision 1.193: download - view: text, markup, annotated - select for diffs
Mon Apr 25 13:19:46 2005 UTC (21 years, 6 months ago) by jmcneill
Branches: MAIN
CVS tags: kent-audio2-base
Diff to: previous 1.192: preferred, colored
Changes since revision 1.192: +3 -5 lines
Enable full-duplex mode by default on drivers that support it if the
underlying audio device was opened read/write. This is consistent with
Linux OSS behaviour and fixes a bug with certain applications (including
Skype) that assume this behaviour.

Fixes PR# 30044.

Revision 1.155.4.6: download - view: text, markup, annotated - select for diffs
Thu Apr 14 22:09:16 2005 UTC (21 years, 7 months ago) by tron
Branches: netbsd-1-6
Diff to: previous 1.155.4.5: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.4.5: +3 -3 lines
Apply patch (requested by kent in ticket #5744):
Correct audio recording buffer handling. Fixes PR kern/26706.

Revision 1.188.2.2: download - view: text, markup, annotated - select for diffs
Sat Mar 19 08:33:53 2005 UTC (21 years, 8 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.188.2.1: preferred, colored; branchpoint 1.188: preferred, colored; next MAIN 1.189: preferred, colored
Changes since revision 1.188.2.1: +66 -14 lines
sync with head.  xen and whitespace.  xen part is not finished.

Revision 1.180.2.9: download - view: text, markup, annotated - select for diffs
Tue Feb 15 21:33:12 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.8: preferred, colored
Changes since revision 1.180.2.8: +66 -14 lines
Sync with HEAD.

Revision 1.192: download - view: text, markup, annotated - select for diffs
Sun Feb 13 23:53:20 2005 UTC (21 years, 9 months ago) by fredb
Branches: MAIN
CVS tags: yamt-km-base4, yamt-km-base3, netbsd-3-base
Branch point for: netbsd-3
Diff to: previous 1.191: preferred, colored
Changes since revision 1.191: +53 -11 lines
For the "record.port", choose "record.source" over "inputs.source" if the
former exists.  Partial fix for PR kern/29178.

Revision 1.191: download - view: text, markup, annotated - select for diffs
Sun Feb 13 23:50:22 2005 UTC (21 years, 9 months ago) by fredb
Branches: MAIN
Diff to: previous 1.190: preferred, colored
Changes since revision 1.190: +12 -2 lines
Comment as to why we run through the devinfo list twice, in audioattach().

Revision 1.190: download - view: text, markup, annotated - select for diffs
Sun Feb 13 17:05:15 2005 UTC (21 years, 9 months ago) by kent
Branches: MAIN
Diff to: previous 1.189: preferred, colored
Changes since revision 1.189: +3 -3 lines
fix a typo in audiogetinfo().
No behaviour changes though the code was wrong.

Revision 1.187.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 13 04:36:15 2005 UTC (21 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.187.2.2: preferred, colored
Changes since revision 1.187.2.2: +36 -24 lines
* add AUDIO_PROP_PLAY and AUDIO_PROP_RECORD for internal use
  XXX: need to modify all of audio HW drivers.

* At the first open(), open the HW as play and record mode even if the open
flags contains either FREAD or FWRITE.

* remove AUMODE_READ and AUMODE_WRITE, and use FREAD and FWRITE instead.

Revision 1.188.2.1: download - view: text, markup, annotated - select for diffs
Sat Feb 12 18:17:42 2005 UTC (21 years, 9 months ago) by yamt
Branches: yamt-km
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +39 -11 lines
sync with head.

Revision 1.187.2.2: download - view: text, markup, annotated - select for diffs
Fri Feb 4 15:01:48 2005 UTC (21 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.187.2.1: preferred, colored
Changes since revision 1.187.2.1: +40 -12 lines
sync with -current

Revision 1.187.2.1: download - view: text, markup, annotated - select for diffs
Fri Feb 4 14:53:53 2005 UTC (21 years, 9 months ago) by kent
Branches: kent-audio2
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +131 -21 lines
add entiries for cloned fd

Revision 1.180.2.8: download - view: text, markup, annotated - select for diffs
Fri Feb 4 11:45:09 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.7: preferred, colored
Changes since revision 1.180.2.7: +39 -11 lines
Sync with HEAD.

Revision 1.189: download - view: text, markup, annotated - select for diffs
Sat Jan 29 18:16:49 2005 UTC (21 years, 9 months ago) by kent
Branches: MAIN
CVS tags: yamt-km-base2
Diff to: previous 1.188: preferred, colored
Changes since revision 1.188: +39 -11 lines
* audiosetinfo()
  call audio_clear() only when blocksizes are actually changed.
  This fixes a problem on some audio devices and applications which
use ossaudio and call SNDCTL_DSP_GETOSPACE repeatedly while playing.

* audiostartp()
  add some debug prints.

Revision 1.180.2.7: download - view: text, markup, annotated - select for diffs
Mon Jan 24 08:35:18 2005 UTC (21 years, 9 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.6: preferred, colored
Changes since revision 1.180.2.6: +3 -3 lines
Sync with HEAD.

Revision 1.180.2.6: download - view: text, markup, annotated - select for diffs
Mon Jan 17 19:30:38 2005 UTC (21 years, 10 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.5: preferred, colored
Changes since revision 1.180.2.5: +988 -796 lines
Sync with HEAD.

Revision 1.188: download - view: text, markup, annotated - select for diffs
Mon Jan 17 14:13:19 2005 UTC (21 years, 10 months ago) by minoura
Branches: MAIN
CVS tags: yamt-km-base
Branch point for: yamt-km
Diff to: previous 1.187: preferred, colored
Changes since revision 1.187: +3 -3 lines
Fix panic when precision < 8.
From kent@.

Revision 1.187: download - view: text, markup, annotated - select for diffs
Sat Jan 15 16:23:03 2005 UTC (21 years, 10 months ago) by kent
Branches: MAIN
Branch point for: kent-audio2
Diff to: previous 1.186: preferred, colored
Changes since revision 1.186: +150 -105 lines
minor KNF

Revision 1.186: download - view: text, markup, annotated - select for diffs
Sat Jan 15 04:57:18 2005 UTC (21 years, 10 months ago) by kent
Branches: MAIN
Diff to: previous 1.185: preferred, colored
Changes since revision 1.185: +3 -3 lines
fix a typo in audiostartp().  This change fixes a problem introduced by
kent-audio1 merger with some audio hardware such as emuxki.

Revision 1.185: download - view: text, markup, annotated - select for diffs
Mon Jan 10 22:01:37 2005 UTC (21 years, 10 months ago) by kent
Branches: MAIN
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +855 -708 lines
merge kent-audio1 branch, which introduces audio filter pipeline to the MI
audio framework


Summary of changes:

* struct audio_params
  - remove sw_code, factor, factor_denom, hw_sample_rate,
hw_encoding ,hw_precision, and hw_channels.  Conversion information
is conveyed by stream_filter_list_t.
  - change the type of sample_rate: u_long -> u_int
  - add `validbits,' which represents the valid data size in
precision bits.  It is required in order to distinguish 24/32bit
from 24/24bit or 32/32bit.

* audio_hw_if
 - add two parameters to set_params()
	stream_filter_list_t *pfil, stream_filter_list *rfil
   A HW driver should set filter recipes for requested formats
 - constify audio_params parameters of trigger_output() and
trigger_input().  They represent audio formats for the hardware.
 - make open() and close() optional
 - add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
 to round_blocksize()

* sw_code is replaced with stream_filter_t.
  stream_filer_t converts audio data in an input buffer and writes
into another output buffer unlike sw_code, which converts data in
single buffer.
  converters in dev/auconv.c, dev/mulaw.c, dev/aurateconv.c,
dev/tc/bba.c, dev/ic/msm6258.c, and arch/arm/iomd/vidcaudio.c are
reimplemented as stream_filter_t

* MI audio
 - audiosetinfo() builds filter pipelines from stream_filter_list_t
filled by audio_hw_if::set_params()
 - audiosetinfo() returns with EINVAL if mmapped and set_params()
requests filters
 - audio_write(), audio_pint(), and audio_rint() invoke a filter
pipeline.
 - ioctl() for FIONREAD, AUDIO_WSEEK, AUDIO_GETIOFFS,
AUDIO_GETOOFFS, and audio_prinfo::{seek,samples} for
AUDIO_GETINFO handle values for a buffer nearest to userland.

* add `struct device *' parameter to ac97_attach()

* all of audio HW drivers follow audio_hw_if and ac97 changes

Revision 1.184.2.29: download - view: text, markup, annotated - select for diffs
Sun Jan 9 09:23:21 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.28: preferred, colored; branchpoint 1.184: preferred, colored; next MAIN 1.185: preferred, colored
Changes since revision 1.184.2.28: +8 -8 lines
pass HW encoding to round_blocksize()

Revision 1.184.2.28: download - view: text, markup, annotated - select for diffs
Sun Jan 9 08:42:45 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.27: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.27: +19 -14 lines
audio_hw_if change
 * make open() and close() optional
 * add int (AUMODE_PLAY or AUMODE_RECORD) and audio_params_t parameters
 to round_blocksize()

Revision 1.184.2.27: download - view: text, markup, annotated - select for diffs
Sat Jan 8 18:34:09 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.26: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.26: +12 -4 lines
fix cyclic noise with uaudio(4)

Revision 1.184.2.26: download - view: text, markup, annotated - select for diffs
Wed Jan 5 12:49:44 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.25: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.25: +8 -7 lines
don't fill silence if audio_stream_t::inp is wrapped.

Revision 1.184.2.25: download - view: text, markup, annotated - select for diffs
Mon Jan 3 16:40:26 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.24: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.24: +62 -2 lines
* remove stream_filter_list_append and stream_filter_list_prepend
* add stream_filter_list_t::{append(), prepend(), set()}

Revision 1.184.2.24: download - view: text, markup, annotated - select for diffs
Sun Jan 2 15:54:44 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.23: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.23: +206 -146 lines
* audiosetinfo()
  rebuild filter pipeline only when audio_parameters is changed.

* audio_write()
  set uio_fetcher before calling fetch_to() every time because
  audio_pint() sets null_fetcher.

* introduce audio_stream::used, audio_stream_add_inp(), and
  audio_stream_add_outp()

* aurateconv
  fix infinite loop for up-sampling

Revision 1.184.2.23: download - view: text, markup, annotated - select for diffs
Sat Jan 1 19:51:33 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.22: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.22: +26 -12 lines
* fix a playing filter setup bug
* make this comple with AUDIO_DEBUG
* add some debug printf

Revision 1.184.2.22: download - view: text, markup, annotated - select for diffs
Sat Jan 1 17:35:27 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.21: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.21: +13 -11 lines
* unconstfy some parameters of trigger_output() and start_output() because
  const pointers are harmful to unifying playing routine and recording
  routine in a hardware driver.

* strem_filter_list_t::filters[0] represents the most hardware-side filter
  even for playing filter pipeline to access hardware encoding by
  filters[0].param.

Revision 1.184.2.21: download - view: text, markup, annotated - select for diffs
Sat Jan 1 16:18:26 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.20: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.20: +29 -10 lines
keeping track of number of bytes of played or recorded data in the encoding
in which the kernel provides to userland.

Revision 1.184.2.20: download - view: text, markup, annotated - select for diffs
Sat Jan 1 13:29:29 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.19: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.19: +12 -4 lines
* re-correct filt_audioread()
* make sure filters are not available if mmapped

Revision 1.184.2.19: download - view: text, markup, annotated - select for diffs
Sat Jan 1 12:46:00 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.18: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.18: +8 -7 lines
audio_prinfo::buffer_size and audio_offset should be values for
the buffer near to userland.

Revision 1.184.2.18: download - view: text, markup, annotated - select for diffs
Sat Jan 1 11:30:27 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.17: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.17: +4 -4 lines
pass hardware audio encoding to trigger_input()/trigger_output()

Revision 1.184.2.17: download - view: text, markup, annotated - select for diffs
Sat Jan 1 11:28:26 2005 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.16: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.16: +130 -97 lines
* remove audio_ringbuffer::used.
* usedlow and usedhigh represent watermarks for the buffer near to userland.
* fix incorrect implementation for kqueue filters

Revision 1.184.2.16: download - view: text, markup, annotated - select for diffs
Thu Dec 30 16:02:26 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.15: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.15: +14 -4 lines
normalize encoding by audio_check_params()

Revision 1.184.2.15: download - view: text, markup, annotated - select for diffs
Wed Dec 29 19:55:16 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.14: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.14: +4 -4 lines
correct usage of stream_filter_t::filters[].param

Revision 1.184.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 29 18:17:38 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.13: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.13: +6 -2 lines
* audio_stream_ctor()
 stream->end - stream->start should be multiple of the frame size

Revision 1.184.2.13: download - view: text, markup, annotated - select for diffs
Wed Dec 29 15:02:28 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.12: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.12: +5 -4 lines
add audio_params::validbits to distinguish 24bit data in 24bit container,
24bit data in 32bit container, 32bit data in 32bit container.

There is no userland API to specify audio_params::validbits, and
audio_params::validbits is always the same value as audio_params::precision
at this moment.

Revision 1.184.2.12: download - view: text, markup, annotated - select for diffs
Wed Dec 29 13:54:05 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.11: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.11: +23 -23 lines
change types of the followings:
  au_mixer_ports::isenum: u_char -> boolean_t
  au_mixer_ports::isdual: u_char -> boolean_t
  audio_softc::sc_blkset: u_char -> boolean_t
  audio_softc::sc_sil_start: u_char* -> uint8_t*
  audio_softc::sc_rbus: u_char -> boolean_t
  audio_softc::sc_pbus: u_char -> boolean_t
  audio_softc::sc_dying: u_char -> boolean_t

Revision 1.184.2.11: download - view: text, markup, annotated - select for diffs
Wed Dec 29 13:41:57 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.10: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.10: +2 -25 lines
remove old aurateconv stuff

Revision 1.184.2.10: download - view: text, markup, annotated - select for diffs
Tue Dec 28 14:54:19 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.9: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.9: +11 -15 lines
* add audio_stream_add()
* remove 4th parameter of stream_fetcher::fetch_to()
* add must-have variables to stream_filter.

Revision 1.184.2.9: download - view: text, markup, annotated - select for diffs
Sun Dec 26 17:38:25 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.8: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.8: +185 -47 lines
* stream_filter_t
  remove get_input_size() and get_output_size() for simplicity.
The MI audio decides buffer sizes.

* audio_softc
  has audio_stram_t instances instead of audio_stream_t pointers

* audiosetinfo()
  setup filter chains, and add some helper functions
  The variables, cleard and modechange, are represented as boolean_t.

* audio_rint()
  set null_fetcher so that every filter has non-null previous fetcher.

Revision 1.184.2.8: download - view: text, markup, annotated - select for diffs
Sat Dec 25 17:19:42 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.7: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.7: +7 -7 lines
correct audio_params parameter of audio_fill_silence()

Revision 1.184.2.7: download - view: text, markup, annotated - select for diffs
Sat Dec 25 13:25:16 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.6: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.6: +13 -29 lines
remove audio_params::sw_code, factor, factor_denom,
hw_sample_rate, hw_encoding, hw_precision, hw_channels.

Revision 1.184.2.6: download - view: text, markup, annotated - select for diffs
Sat Dec 25 12:32:22 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.5: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.5: +76 -76 lines
remove needless parentheses for return

Revision 1.184.2.5: download - view: text, markup, annotated - select for diffs
Sat Dec 25 12:24:38 2004 UTC (21 years, 10 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.4: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.4: +96 -187 lines
* audio_read()
  remove aurateconv/sw_code related code.  It simply copies data
from the last audio_stream_t instance.

* audio_ioctl()
  FIONREAD/AUDIO_WSEEK: return the available data size of the
last audio_stream_t

* audio_rint()
  apply filters here so that FIONREAD and AUDIO_WSEEK can return
correct value.

* audio_softc
  remove sc_input_fragment_length, sc_input_fragment,
sc_pconvbuffer_size, sc_pconvbuffer, sc_pconv,
sc_rconvbuffer_size, sc_rconfbuffer_begin, sc_rconvbuffer_end,
sc_rconvbuffer, sc_rconv.

* audio_if.h
 add audio_stream_get_used().

Revision 1.184.2.4: download - view: text, markup, annotated - select for diffs
Sun Dec 12 12:48:10 2004 UTC (21 years, 11 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.3: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.3: +72 -149 lines
- add audio_stream_get_space()
- stream_fetcher::fetch_to() returns an errno and # of written bytes
- audio_write() uses stream_filter pipeline

Revision 1.184.2.3: download - view: text, markup, annotated - select for diffs
Sat Dec 11 16:30:11 2004 UTC (21 years, 11 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.2: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.2: +6 -2 lines
add audio_stream_t pointers and stream_filter_t instances to audio_softc.

Revision 1.184.2.2: download - view: text, markup, annotated - select for diffs
Fri Dec 10 07:25:56 2004 UTC (21 years, 11 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184.2.1: preferred, colored; branchpoint 1.184: preferred, colored
Changes since revision 1.184.2.1: +27 -26 lines
introduce two macros: SPECIFIED(x) and SPECIFIED_CH(x)
for readability.

Revision 1.184.2.1: download - view: text, markup, annotated - select for diffs
Fri Dec 10 00:30:55 2004 UTC (21 years, 11 months ago) by kent
Branches: kent-audio1
Diff to: previous 1.184: preferred, colored
Changes since revision 1.184: +117 -128 lines
* introduce audio_stream_t, and make audio_ringbuffer a subclass of
  audio_stream_t
* introduce stream_fetcher_t, stream_filter_t, stream_filter_factory_t,
  and stream_filter_list_t.
* Empty stream_filter_list_t instances are passed to audio_hw_if::set_params()

Non-essential changes:
 * represent buffers as uint8_t* instead of u_char*
 * make outp const
 * make the second parameter of audio_hw_if::start_output() const
 * make the second parameter of audio_hw_if::trigger_output() const
 * change types of audio_ringbuffer::{pause,copying,needfill,mmapped}:
   char -> boolean_t
 * change the type of audio_params::sample_rate: u_long -> u_int
   The sample rate is exposed to userland as u_int.
 * typedef audio_params_t

Revision 1.180.2.5: download - view: text, markup, annotated - select for diffs
Tue Nov 2 07:51:19 2004 UTC (22 years ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.4: preferred, colored
Changes since revision 1.180.2.4: +15 -15 lines
Sync with HEAD.

Revision 1.184: download - view: text, markup, annotated - select for diffs
Fri Oct 29 12:57:16 2004 UTC (22 years ago) by yamt
Branches: MAIN
CVS tags: kent-audio1-beforemerge, kent-audio1-base
Branch point for: kent-audio1
Diff to: previous 1.183: preferred, colored
Changes since revision 1.183: +15 -15 lines
constify audio_hw_if, midi_hw_if, and radio_hw_if.

Revision 1.180.2.4: download - view: text, markup, annotated - select for diffs
Tue Sep 21 13:26:24 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.3: preferred, colored
Changes since revision 1.180.2.3: +39 -38 lines
Fix the sync with head I botched.

Revision 1.180.2.3: download - view: text, markup, annotated - select for diffs
Sat Sep 18 14:44:27 2004 UTC (22 years, 2 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.2: preferred, colored
Changes since revision 1.180.2.2: +38 -39 lines
Sync with HEAD.

Revision 1.180.2.2: download - view: text, markup, annotated - select for diffs
Tue Aug 3 10:44:53 2004 UTC (22 years, 3 months ago) by skrll
Branches: ktrace-lwp
Diff to: previous 1.180.2.1: preferred, colored
Changes since revision 1.180.2.1: +255 -184 lines
Sync with HEAD

Revision 1.182.2.1: download - view: text, markup, annotated - select for diffs
Fri Jul 23 23:05:50 2004 UTC (22 years, 3 months ago) by he
Branches: netbsd-2-0
CVS tags: netbsd-2-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +5 -3 lines
Pull up revision 1.183 (requested by mycroft in ticket #699):
  If we are short-circuiting audiostartp() because there is
  not enough data present, do an extra wakeup() on the write
  channel.  This happens when we change parameters during
  playback, at which point we flush the buffer and would
  stall.

Revision 1.183: download - view: text, markup, annotated - select for diffs
Wed Jul 7 22:30:22 2004 UTC (22 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.182: preferred, colored
Changes since revision 1.182: +5 -3 lines
If we're short-circuiting audiostartp() because there isn't enough data
present, do an extra wakeup() on the write channel.  This happens when we
change parameters during playback, at which point we flush the buffer, and
would stall.

Revision 1.182: download - view: text, markup, annotated - select for diffs
Sat Jan 31 00:07:56 2004 UTC (22 years, 9 months ago) by fredb
Branches: MAIN
CVS tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Diff to: previous 1.181: preferred, colored
Changes since revision 1.181: +149 -88 lines
Fix a couple of long-standing bugs in the volume control(s) part of the
audio device interface:

1) When attempting to match the appropriate mixer control, we weren't
checking the class label, but only the second level label, so for
devices that had both an "inputs.cd" and a "record.cd", for example,
we could never do the right thing except by chance. For this reason,
evidently, all the record masters were labeled (by the underlying
drivers) either "record.record" or "record.volume", to distinguish
from "outputs.master". We'll now accept "record.master", and document
that as the the new preferred way.

2) More importantly, the model was deficient. Selecting a port on many
chips completely disables most of the level controls, which doesn't play
nice with other applications which are trying to use the interface. Now,
selecting a port simply sets which mixer input control shall be changed,
setting state in the audio layer. In other words, the "mixerout" port
is really selected all the time, enabling the final stage mixer, and
setting "gain" sets the level of the appropriate input. It should be
possible for separate applications to each control the mic, dac, and cd
inputs at the same time using this interface, simply by reiterating their
port selections with each change, but applications that don't bother to
do that aren't any worse off than they were before.

The user is expected to set the master output with another application,
dedicated to that task. Though it is now meaningful to select "no port"
with the audio device interface, to manipulate the master output, there's
no particular reason for an audio device consumer to do that. (I added
the capability in order to restore the initial state of the audio device,
for testing purposes. It might also be useful to users of broken binary-
only applications.)

Observe that the mixer device interface (and so, "mixerctl") still
retains all capabilities, including the ability to set the actual input
port on the chip, overriding the level controls. No change is being made
to the mixer device interface. The mixer device simply presents all the
controls on the chip, with no attempt at abstraction, so there are no
bugs there.

The upshot is, that applications that have been trying to use the audio
device interface to change the volume, such as mplayer, now "just work".

I've tested these changes extensively with "eso" and "eap" since first
proposing them on tech-kern last January, and somewhat with "esm" and a
few others. This closes both PR kern/10221, and PR kern/17159.

Revision 1.181: download - view: text, markup, annotated - select for diffs
Thu Oct 2 07:15:20 2003 UTC (23 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +105 -97 lines
A bit of cleanup:
* Separate the code to set the default parameters into a new function,
  audio_set_defaults().  Make it use audiosetinfo(), which properly initializes
  the block size and whatnot.  Use this in both audioattach() and the
  /dev/audio case of audio_open().
* Do not force a reinitialization when /dev/sound is opened.
* Do all of the block size sanity checks in auto_init_ringbuffer(), not in
  both audio_calc_blksize() and audiosetinfo().
* Fix a bug in audiosetinfo() that caused the block size to not be recalculated
  immediately if we set it to 0.
* For AUDIO_GET[IO]OFFS, modify the deltablks calculation so that it gives us
  the number of block boundaries crossed.

Revision 1.180.2.1: download - view: text, markup, annotated - select for diffs
Wed Jul 2 15:25:58 2003 UTC (23 years, 4 months ago) by darrenr
Branches: ktrace-lwp
Diff to: previous 1.180: preferred, colored
Changes since revision 1.180: +39 -38 lines
Apply the aborted ktrace-lwp changes to a specific branch.  This is just for
others to review, I'm concerned that patch fuziness may have resulted in some
errant code being generated but I'll look at that later by comparing the diff
from the base to the branch with the file I attempt to apply to it.  This will,
at the very least, put the changes in a better context for others to review
them and attempt to tinker with removing passing of 'struct lwp' through
the kernel.

Revision 1.180: download - view: text, markup, annotated - select for diffs
Sun Jun 29 22:29:56 2003 UTC (23 years, 4 months ago) by fvdl
Branches: MAIN
Branch point for: ktrace-lwp
Diff to: previous 1.179: preferred, colored
Changes since revision 1.179: +36 -37 lines
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.

Revision 1.179: download - view: text, markup, annotated - select for diffs
Sat Jun 28 14:21:29 2003 UTC (23 years, 4 months ago) by darrenr
Branches: MAIN
Diff to: previous 1.178: preferred, colored
Changes since revision 1.178: +39 -38 lines
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

Revision 1.155.4.5: download - view: text, markup, annotated - select for diffs
Tue Jun 24 09:42:04 2003 UTC (23 years, 4 months ago) by grant
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Diff to: previous 1.155.4.4: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.4.4: +3 -3 lines
Pull up revision 1.161 (requested by nakayama in ticket #1332):

fix unitialized variable. from simonb. OI

Revision 1.178: download - view: text, markup, annotated - select for diffs
Mon May 26 12:43:35 2003 UTC (23 years, 5 months ago) by augustss
Branches: MAIN
Diff to: previous 1.177: preferred, colored
Changes since revision 1.177: +6 -2 lines
Add FIONREAD ioctl().

Revision 1.177: download - view: text, markup, annotated - select for diffs
Sat May 3 18:11:08 2003 UTC (23 years, 6 months ago) by wiz
Branches: MAIN
Diff to: previous 1.176: preferred, colored
Changes since revision 1.176: +4 -4 lines
DMA, not dma nor Dma.

Revision 1.176: download - view: text, markup, annotated - select for diffs
Fri Apr 25 03:02:11 2003 UTC (23 years, 6 months ago) by gmcgarry
Branches: MAIN
Diff to: previous 1.175: preferred, colored
Changes since revision 1.175: +7 -22 lines
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().

Revision 1.175: download - view: text, markup, annotated - select for diffs
Sun Apr 6 18:20:11 2003 UTC (23 years, 7 months ago) by wiz
Branches: MAIN
Diff to: previous 1.174: preferred, colored
Changes since revision 1.174: +3 -3 lines
Respect the law: Use A-law and mu-law as spellings as far as easily possible.
Inspired by Igor Sobrado in PR 19680.

Revision 1.174: download - view: text, markup, annotated - select for diffs
Mon Mar 31 18:47:58 2003 UTC (23 years, 7 months ago) by jdolecek
Branches: MAIN
Diff to: previous 1.173: preferred, colored
Changes since revision 1.173: +8 -8 lines
sprinkle const qualifiers to const stuff

Revision 1.173: download - view: text, markup, annotated - select for diffs
Fri Jan 31 02:15:57 2003 UTC (23 years, 9 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.172: preferred, colored
Changes since revision 1.172: +3 -3 lines
Use aprint_*().

Revision 1.135.2.16: download - view: text, markup, annotated - select for diffs
Fri Jan 3 17:07:30 2003 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
CVS tags: nathanw_sa_end
Diff to: previous 1.135.2.15: preferred, colored; branchpoint 1.135: preferred, colored; next MAIN 1.136: preferred, colored
Changes since revision 1.135.2.15: +4 -4 lines
Sync with HEAD.

Revision 1.172: download - view: text, markup, annotated - select for diffs
Wed Jan 1 00:10:15 2003 UTC (23 years, 10 months ago) by thorpej
Branches: MAIN
CVS tags: nathanw_sa_before_merge, nathanw_sa_base, fvdl_fs64_base
Diff to: previous 1.171: preferred, colored
Changes since revision 1.171: +3 -3 lines
Use aprint_normal() in cfprint routines.

Revision 1.171: download - view: text, markup, annotated - select for diffs
Tue Dec 31 00:33:10 2002 UTC (23 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.170: preferred, colored
Changes since revision 1.170: +3 -3 lines
Use correct values to compute record high water mark.  From kern/19614 by
Ron Roskens.

Revision 1.135.2.15: download - view: text, markup, annotated - select for diffs
Sun Dec 29 20:49:14 2002 UTC (23 years, 10 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.135.2.14: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.14: +10 -4 lines
Sync with HEAD.

Revision 1.170: download - view: text, markup, annotated - select for diffs
Fri Dec 20 18:30:01 2002 UTC (23 years, 11 months ago) by fredette
Branches: MAIN
Diff to: previous 1.169: preferred, colored
Changes since revision 1.169: +10 -4 lines
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.

Revision 1.155.4.4: download - view: text, markup, annotated - select for diffs
Wed Dec 11 18:12:03 2002 UTC (23 years, 11 months ago) by he
Branches: netbsd-1-6
CVS tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Diff to: previous 1.155.4.3: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.4.3: +11 -9 lines
Pull up revision 1.168 (requested by kent in ticket #981):
  Fix LR reversal problem of play.balance vs. record.balance.
  Based on PR#18901.

Revision 1.135.2.14: download - view: text, markup, annotated - select for diffs
Wed Dec 11 06:37:47 2002 UTC (23 years, 11 months ago) by thorpej
Branches: nathanw_sa
Diff to: previous 1.135.2.13: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.13: +4 -4 lines
Sync with HEAD.

Revision 1.169: download - view: text, markup, annotated - select for diffs
Tue Nov 26 18:49:40 2002 UTC (23 years, 11 months ago) by christos
Branches: MAIN
CVS tags: gmcgarry_ucred_base, gmcgarry_ucred, gmcgarry_ctxsw_base, gmcgarry_ctxsw
Diff to: previous 1.168: preferred, colored
Changes since revision 1.168: +6 -6 lines
si_ -> sel_

Revision 1.135.2.13: download - view: text, markup, annotated - select for diffs
Mon Nov 11 22:08:38 2002 UTC (24 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.12: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.12: +146 -12 lines
Catch up to -current

Revision 1.155.4.3: download - view: text, markup, annotated - select for diffs
Sun Nov 10 07:42:08 2002 UTC (24 years ago) by tron
Branches: netbsd-1-6
Diff to: previous 1.155.4.2: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.4.2: +13 -2 lines
Pull up revision 1.157 (requested by gson in ticket #972):
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.

Revision 1.168: download - view: text, markup, annotated - select for diffs
Fri Nov 8 05:02:07 2002 UTC (24 years ago) by kent
Branches: MAIN
Diff to: previous 1.167: preferred, colored
Changes since revision 1.167: +11 -9 lines
Fix LR contrary problem of play.balance and record.balance.  The
change is based on PR kern/18901 by SUNAKAWA Hirokatsu.

Revision 1.167: download - view: text, markup, annotated - select for diffs
Wed Oct 23 09:12:58 2002 UTC (24 years ago) by jdolecek
Branches: MAIN
CVS tags: kqueue-aftermerge
Diff to: previous 1.166: preferred, colored
Changes since revision 1.166: +127 -6 lines
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

Revision 1.135.2.12: download - view: text, markup, annotated - select for diffs
Fri Oct 18 02:41:24 2002 UTC (24 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.11: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.11: +3 -6 lines
Catch up to -current.

Revision 1.166: download - view: text, markup, annotated - select for diffs
Wed Oct 16 21:07:08 2002 UTC (24 years, 1 month ago) by jdolecek
Branches: MAIN
CVS tags: kqueue-beforemerge
Diff to: previous 1.165: preferred, colored
Changes since revision 1.165: +14 -3 lines
for AUDIO_SETINFO, silently enforce same mode as the currently used one;
this value is supposed to be read-only for this ioctl

Revision 1.137.2.9: download - view: text, markup, annotated - select for diffs
Thu Oct 10 18:38:17 2002 UTC (24 years, 1 month ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.8: preferred, colored; next MAIN 1.138: preferred, colored
Changes since revision 1.137.2.8: +19 -11 lines
sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work

Revision 1.137.2.8: download - view: text, markup, annotated - select for diffs
Wed Oct 2 22:02:29 2002 UTC (24 years, 1 month ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.7: preferred, colored
Changes since revision 1.137.2.7: +7 -7 lines
do not need the (void *) cast for kn_hook anymore

Revision 1.165: download - view: text, markup, annotated - select for diffs
Wed Oct 2 16:33:28 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
CVS tags: kqueue-base
Diff to: previous 1.164: preferred, colored
Changes since revision 1.164: +3 -3 lines
Add trailing ; to CFATTACH_DECL.

Revision 1.164: download - view: text, markup, annotated - select for diffs
Mon Sep 30 21:19:38 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.163: preferred, colored
Changes since revision 1.163: +4 -6 lines
Use CFATTACH_DECL().

Revision 1.163: download - view: text, markup, annotated - select for diffs
Fri Sep 27 20:37:28 2002 UTC (24 years, 1 month ago) by thorpej
Branches: MAIN
Diff to: previous 1.162: preferred, colored
Changes since revision 1.162: +3 -3 lines
Declare all cfattach structures const.

Revision 1.162: download - view: text, markup, annotated - select for diffs
Mon Sep 23 05:51:10 2002 UTC (24 years, 1 month ago) by simonb
Branches: MAIN
Diff to: previous 1.161: preferred, colored
Changes since revision 1.161: +2 -3 lines
Remove breaks after returns, unreachable returns and returns after
returns(!).

Revision 1.161: download - view: text, markup, annotated - select for diffs
Mon Sep 23 03:44:56 2002 UTC (24 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.160: preferred, colored
Changes since revision 1.160: +3 -3 lines
fix unitialized variable. from simonb. OI

Revision 1.135.2.11: download - view: text, markup, annotated - select for diffs
Tue Sep 17 21:19:15 2002 UTC (24 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.10: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.10: +13 -3 lines
Catch up to -current.

Revision 1.160: download - view: text, markup, annotated - select for diffs
Fri Sep 6 13:18:43 2002 UTC (24 years, 2 months ago) by gehenna
Branches: MAIN
Diff to: previous 1.159: preferred, colored
Changes since revision 1.159: +15 -5 lines
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.

Revision 1.137.2.7: download - view: text, markup, annotated - select for diffs
Fri Sep 6 08:43:44 2002 UTC (24 years, 2 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.6: preferred, colored
Changes since revision 1.137.2.6: +5 -6 lines
sync kqueue branch with HEAD

Revision 1.155.4.2: download - view: text, markup, annotated - select for diffs
Tue Aug 27 09:46:17 2002 UTC (24 years, 2 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2
Diff to: previous 1.155.4.1: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.4.1: +4 -0 lines
Pull up revision 1.156 (requested by gmcgarry in ticket #729):
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.

Revision 1.135.2.10: download - view: text, markup, annotated - select for diffs
Thu Aug 1 02:44:32 2002 UTC (24 years, 3 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.9: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.9: +5 -6 lines
Catch up to -current.

Revision 1.155.2.4: download - view: text, markup, annotated - select for diffs
Mon Jul 15 10:35:07 2002 UTC (24 years, 4 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.155.2.3: preferred, colored; branchpoint 1.155: preferred, colored; next MAIN 1.156: preferred, colored
Changes since revision 1.155.2.3: +5 -6 lines
catch up with -current.

Revision 1.159: download - view: text, markup, annotated - select for diffs
Wed Jul 10 02:25:49 2002 UTC (24 years, 4 months ago) by gson
Branches: MAIN
CVS tags: gehenna-devsw-base
Diff to: previous 1.158: preferred, colored
Changes since revision 1.158: +3 -4 lines
When a recording interrupt happened in the middle of audio_read(),
changes to cb->used by audio_rint() could be overwritten by audio_read().

Revision 1.155.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 24 05:06:27 2002 UTC (24 years, 4 months ago) by lukem
Branches: netbsd-1-6
CVS tags: netbsd-1-6-RC1
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +4 -4 lines
Pull up revision 1.158 (requested by gmcgarry in ticket #351):
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.

Revision 1.137.2.6: download - view: text, markup, annotated - select for diffs
Sun Jun 23 17:44:57 2002 UTC (24 years, 4 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.5: preferred, colored
Changes since revision 1.137.2.5: +207 -174 lines
catch up with -current on kqueue branch

Revision 1.158: download - view: text, markup, annotated - select for diffs
Sun Jun 23 01:36:07 2002 UTC (24 years, 5 months ago) by gmcgarry
Branches: MAIN
Diff to: previous 1.157: preferred, colored
Changes since revision 1.157: +4 -4 lines
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.

Revision 1.155.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 20 16:31:19 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.155.2.2: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.2: +15 -4 lines
catch up with -current.

Revision 1.135.2.9: download - view: text, markup, annotated - select for diffs
Thu Jun 20 03:43:21 2002 UTC (24 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.8: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.8: +19 -4 lines
Catch up to -current.

Revision 1.157: download - view: text, markup, annotated - select for diffs
Sun Jun 2 02:00:30 2002 UTC (24 years, 5 months ago) by gson
Branches: MAIN
Diff to: previous 1.156: preferred, colored
Changes since revision 1.156: +15 -4 lines
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.

Revision 1.155.2.2: download - view: text, markup, annotated - select for diffs
Thu May 30 14:45:26 2002 UTC (24 years, 5 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.155.2.1: preferred, colored; branchpoint 1.155: preferred, colored
Changes since revision 1.155.2.1: +6 -2 lines
Catch up with -current.

Revision 1.156: download - view: text, markup, annotated - select for diffs
Mon May 27 17:13:14 2002 UTC (24 years, 5 months ago) by gson
Branches: MAIN
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +6 -2 lines
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.

Revision 1.155.2.1: download - view: text, markup, annotated - select for diffs
Thu May 16 04:52:05 2002 UTC (24 years, 6 months ago) by gehenna
Branches: gehenna-devsw
Diff to: previous 1.155: preferred, colored
Changes since revision 1.155: +15 -5 lines
Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.

Revision 1.135.2.8: download - view: text, markup, annotated - select for diffs
Mon Apr 1 07:44:59 2002 UTC (24 years, 7 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.7: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.7: +472 -214 lines
Catch up to -current.
(CVS: It's not just a program. It's an adventure!)

Revision 1.155: download - view: text, markup, annotated - select for diffs
Sat Mar 23 17:17:10 2002 UTC (24 years, 8 months ago) by kent
Branches: MAIN
CVS tags: netbsd-1-6-base
Branch point for: netbsd-1-6, gehenna-devsw
Diff to: previous 1.154: preferred, colored
Changes since revision 1.154: +143 -140 lines
whitespace and folding fix.

Revision 1.154: download - view: text, markup, annotated - select for diffs
Thu Mar 21 05:22:24 2002 UTC (24 years, 8 months ago) by isaki
Branches: MAIN
CVS tags: eeh-devprop-base, eeh-devprop
Diff to: previous 1.153: preferred, colored
Changes since revision 1.153: +5 -3 lines
Fix previous commit.  modifying cc is only when factor_denom > 1.
reviewed by kent@netbsd.org

Revision 1.153: download - view: text, markup, annotated - select for diffs
Sun Mar 17 03:20:40 2002 UTC (24 years, 8 months ago) by isaki
Branches: MAIN
Diff to: previous 1.152: preferred, colored
Changes since revision 1.152: +4 -3 lines
Fix infinate loop in recoding on vs0.

Revision 1.137.2.5: download - view: text, markup, annotated - select for diffs
Sat Mar 16 16:00:46 2002 UTC (24 years, 8 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.4: preferred, colored
Changes since revision 1.137.2.4: +313 -73 lines
Catch up with -current.

Revision 1.152: download - view: text, markup, annotated - select for diffs
Sat Mar 16 08:58:49 2002 UTC (24 years, 8 months ago) by isaki
Branches: MAIN
Diff to: previous 1.151: preferred, colored
Changes since revision 1.151: +45 -34 lines
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.

Revision 1.151: download - view: text, markup, annotated - select for diffs
Fri Mar 15 14:55:03 2002 UTC (24 years, 8 months ago) by kent
Branches: MAIN
Diff to: previous 1.150: preferred, colored
Changes since revision 1.150: +4 -4 lines
audio.c: revert a part of previous change.
auconv.c: correct handling of size parameter.

Revision 1.150: download - view: text, markup, annotated - select for diffs
Fri Mar 15 14:35:32 2002 UTC (24 years, 8 months ago) by kent
Branches: MAIN
Diff to: previous 1.149: preferred, colored
Changes since revision 1.149: +8 -7 lines
Fix a bug of audio_read() in a case that params->factor is not 1.

Revision 1.149: download - view: text, markup, annotated - select for diffs
Sat Mar 9 20:30:43 2002 UTC (24 years, 8 months ago) by kent
Branches: MAIN
CVS tags: newlock-base, newlock
Diff to: previous 1.148: preferred, colored
Changes since revision 1.148: +40 -2 lines
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)

Revision 1.148: download - view: text, markup, annotated - select for diffs
Sat Mar 9 07:25:41 2002 UTC (24 years, 8 months ago) by toshii
Branches: MAIN
Diff to: previous 1.147: preferred, colored
Changes since revision 1.147: +3 -3 lines
Fix splaudio/splx botch.

Revision 1.147: download - view: text, markup, annotated - select for diffs
Fri Mar 8 02:30:54 2002 UTC (24 years, 8 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.146: preferred, colored
Changes since revision 1.146: +4 -4 lines
Fix printf format on LP64.

Revision 1.146: download - view: text, markup, annotated - select for diffs
Thu Mar 7 14:37:02 2002 UTC (24 years, 8 months ago) by kent
Branches: MAIN
Diff to: previous 1.145: preferred, colored
Changes since revision 1.145: +275 -73 lines
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().

Revision 1.135.2.7: download - view: text, markup, annotated - select for diffs
Thu Feb 28 04:13:09 2002 UTC (24 years, 8 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.6: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.6: +6 -11 lines
Catch up to -current.

Revision 1.137.2.4: download - view: text, markup, annotated - select for diffs
Mon Feb 11 20:09:36 2002 UTC (24 years, 9 months ago) by jdolecek
Branches: kqueue
Diff to: previous 1.137.2.3: preferred, colored
Changes since revision 1.137.2.3: +6 -11 lines
Sync w/ -current.

Revision 1.145: download - view: text, markup, annotated - select for diffs
Fri Jan 18 21:59:41 2002 UTC (24 years, 10 months ago) by jdolecek
Branches: MAIN
CVS tags: ifpoll-base
Diff to: previous 1.144: preferred, colored
Changes since revision 1.144: +6 -11 lines
drop completely superfluous PRINT() macro

Revision 1.137.2.3: download - view: text, markup, annotated - select for diffs
Thu Jan 10 19:52:44 2002 UTC (24 years, 10 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.137.2.2: preferred, colored
Changes since revision 1.137.2.2: +144 -271 lines
Sync kqueue branch with -current.

Revision 1.135.2.6: download - view: text, markup, annotated - select for diffs
Tue Jan 8 00:29:17 2002 UTC (24 years, 10 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.5: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.5: +3 -3 lines
Catch up to -current.

Revision 1.144: download - view: text, markup, annotated - select for diffs
Sat Nov 17 05:31:27 2001 UTC (25 years ago) by perry
Branches: MAIN
Diff to: previous 1.143: preferred, colored
Changes since revision 1.143: +3 -3 lines
fix a trivial lint warning

Revision 1.135.2.5: download - view: text, markup, annotated - select for diffs
Wed Nov 14 19:13:40 2001 UTC (25 years ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.4: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.4: +4 -1 lines
Catch up to -current.

Revision 1.143: download - view: text, markup, annotated - select for diffs
Tue Nov 13 05:32:49 2001 UTC (25 years ago) by lukem
Branches: MAIN
Diff to: previous 1.142: preferred, colored
Changes since revision 1.142: +4 -1 lines
add RCSIDs

Revision 1.135.2.4: download - view: text, markup, annotated - select for diffs
Mon Oct 22 20:41:15 2001 UTC (25 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.3: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.3: +5 -6 lines
Catch up to -current.

Revision 1.138.2.4: download - view: text, markup, annotated - select for diffs
Thu Oct 11 00:02:00 2001 UTC (25 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.138.2.3: preferred, colored; branchpoint 1.138: preferred, colored; next MAIN 1.139: preferred, colored
Changes since revision 1.138.2.3: +141 -270 lines
Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.

Revision 1.135.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 8 20:10:54 2001 UTC (25 years, 1 month ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.2: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.2: +139 -268 lines
Catch up to -current.

Revision 1.142: download - view: text, markup, annotated - select for diffs
Wed Oct 3 20:48:41 2001 UTC (25 years, 1 month ago) by augustss
Branches: MAIN
CVS tags: thorpej-mips-cache-base, thorpej-mips-cache, thorpej-devvp-base3
Diff to: previous 1.141: preferred, colored
Changes since revision 1.141: +5 -6 lines
Fix pasto in type of dev_ioctl method.

Revision 1.141: download - view: text, markup, annotated - select for diffs
Wed Oct 3 00:04:49 2001 UTC (25 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.140: preferred, colored
Changes since revision 1.140: +12 -4 lines
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).

Revision 1.140: download - view: text, markup, annotated - select for diffs
Tue Oct 2 23:31:54 2001 UTC (25 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.139: preferred, colored
Changes since revision 1.139: +128 -265 lines
ANSIfy.

Revision 1.138.2.3: download - view: text, markup, annotated - select for diffs
Mon Oct 1 12:44:09 2001 UTC (25 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.138.2.2: preferred, colored; branchpoint 1.138: preferred, colored
Changes since revision 1.138.2.2: +2 -2 lines
Catch up with -current.

Revision 1.138.2.2: download - view: text, markup, annotated - select for diffs
Wed Sep 26 15:28:08 2001 UTC (25 years, 1 month ago) by fvdl
Branches: thorpej-devvp
Diff to: previous 1.138.2.1: preferred, colored; branchpoint 1.138: preferred, colored
Changes since revision 1.138.2.1: +35 -17 lines
* add a VCLONED vnode flag that indicates a vnode representing a cloned
  device.
* rename REVOKEALL to REVOKEALIAS, and add a REVOKECLONE flag, to pass
  to VOP_REVOKE
* the revoke system call will revoke all aliases, as before, but not the
  clones
* vdevgone is called when detaching a device, so make it use REVOKECLONE
  to get rid of all clones as well
* clean up all uses of VOP_OPEN wrt. locking.
* add a few VOPS to spec_vnops that need to do something when it's a
  clone vnode (access and getattr)
* add a copy of the vnode vattr structure of the original 'master' vnode
  to the specinfo of a cloned vnode. could possibly redirect getattr to
  the 'master' vnode, but this has issues with revoke
* add a vdev_reassignvp function that disassociates a vnode from its
  original device, and reassociates it with the specified dev_t. to be
  used by cloning devices only, in case a new minor is allocated.
* change all direct references in drivers to v_devcookie and v_rdev
  to vdev_privdata(vp) and vdev_rdev(vp). for diagnostic purposes
  when debugging race conditions that still exist wrt. locking and
  revoking vnodes.
* make the locking state of a vnode consistent when passed to
  d_open and d_close (unlocked). locked would be better, but has
  some deadlock issues

Revision 1.135.2.2: download - view: text, markup, annotated - select for diffs
Fri Sep 21 22:35:27 2001 UTC (25 years, 2 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135.2.1: preferred, colored; branchpoint 1.135: preferred, colored
Changes since revision 1.135.2.1: +25 -17 lines
Catch up to -current.

Revision 1.139: download - view: text, markup, annotated - select for diffs
Sun Sep 16 16:34:36 2001 UTC (25 years, 2 months ago) by wiz
Branches: MAIN
CVS tags: thorpej-devvp-base2
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +2 -2 lines
Spell 'occurred' with two 'r's.

Revision 1.137.2.2: download - view: text, markup, annotated - select for diffs
Thu Sep 13 01:15:34 2001 UTC (25 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.137.2.1: preferred, colored
Changes since revision 1.137.2.1: +24 -16 lines
Update the kqueue branch to HEAD.

Revision 1.137.2.1: download - view: text, markup, annotated - select for diffs
Sat Sep 8 20:03:43 2001 UTC (25 years, 2 months ago) by thorpej
Branches: kqueue
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +124 -4 lines
Add kqueue support (someone who understands how the audio code
works should make sure I got this right).

Revision 1.138.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 7 04:45:22 2001 UTC (25 years, 2 months ago) by thorpej
Branches: thorpej-devvp
Diff to: previous 1.138: preferred, colored
Changes since revision 1.138: +45 -50 lines
Commit my "devvp" changes to the thorpej-devvp branch.  This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).

Revision 1.138: download - view: text, markup, annotated - select for diffs
Mon Sep 3 18:51:43 2001 UTC (25 years, 2 months ago) by is
Branches: MAIN
CVS tags: thorpej-devvp-base, pre-chs-ubcperf, post-chs-ubcperf
Branch point for: thorpej-devvp
Diff to: previous 1.137: preferred, colored
Changes since revision 1.137: +24 -16 lines
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.

Revision 1.135.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 21 20:01:13 2001 UTC (25 years, 5 months ago) by nathanw
Branches: nathanw_sa
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +6 -3 lines
Catch up to -current.

Revision 1.137: download - view: text, markup, annotated - select for diffs
Sun Jun 3 23:52:51 2001 UTC (25 years, 5 months ago) by jhawk
Branches: MAIN
Branch point for: kqueue
Diff to: previous 1.136: preferred, colored
Changes since revision 1.136: +2 -2 lines
s/printf/DPRINTF/ for kern/13101.

Revision 1.136: download - view: text, markup, annotated - select for diffs
Wed May 2 12:49:41 2001 UTC (25 years, 6 months ago) by minoura
Branches: MAIN
Diff to: previous 1.135: preferred, colored
Changes since revision 1.135: +5 -2 lines
X68k built-in voice synthesizer supports 4bit ADPCM.

Revision 1.117.2.3: download - view: text, markup, annotated - select for diffs
Sun Feb 11 19:15:14 2001 UTC (25 years, 9 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.117.2.2: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117.2.2: +3 -2 lines
Sync with HEAD.

Revision 1.135: download - view: text, markup, annotated - select for diffs
Thu Jan 25 15:25:34 2001 UTC (25 years, 9 months ago) by toshii
Branches: MAIN
CVS tags: thorpej_scsipi_nbase, thorpej_scsipi_beforemerge, thorpej_scsipi_base
Branch point for: nathanw_sa
Diff to: previous 1.134: preferred, colored
Changes since revision 1.134: +3 -1 lines
The previous revision was my fault.  audio_calcwater() needs to be
called at every open.
Thanks Witold J. Wnuk for pointing out this problem.

Revision 1.134: download - view: text, markup, annotated - select for diffs
Mon Jan 22 08:37:54 2001 UTC (25 years, 10 months ago) by toshii
Branches: MAIN
Diff to: previous 1.133: preferred, colored
Changes since revision 1.133: +1 -2 lines
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.

Revision 1.117.2.2: download - view: text, markup, annotated - select for diffs
Fri Jan 5 17:35:31 2001 UTC (25 years, 10 months ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.117.2.1: preferred, colored
Changes since revision 1.117.2.1: +4 -3 lines
Sync with HEAD

Revision 1.133: download - view: text, markup, annotated - select for diffs
Fri Dec 29 10:00:08 2000 UTC (25 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.132: preferred, colored
Changes since revision 1.132: +2 -1 lines
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.

Revision 1.132: download - view: text, markup, annotated - select for diffs
Mon Dec 25 00:01:39 2000 UTC (25 years, 10 months ago) by jmc
Branches: MAIN
Diff to: previous 1.131: preferred, colored
Changes since revision 1.131: +3 -3 lines
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.

Revision 1.117.2.1: download - view: text, markup, annotated - select for diffs
Mon Nov 20 11:39:45 2000 UTC (26 years ago) by bouyer
Branches: thorpej_scsipi
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +86 -42 lines
Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.

Revision 1.125.4.2: download - view: text, markup, annotated - select for diffs
Sat Jul 22 04:58:46 2000 UTC (26 years, 4 months ago) by simonb
Branches: netbsd-1-5
CVS tags: netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Diff to: previous 1.125.4.1: preferred, colored; branchpoint 1.125: preferred, colored; next MAIN 1.126: preferred, colored
Changes since revision 1.125.4.1: +2 -2 lines
Pull up rev 1.131 from nathanw:
 More printf format munging for off_t: when printing as %lld, cast to
 long long.

Revision 1.131: download - view: text, markup, annotated - select for diffs
Wed Jul 19 13:44:24 2000 UTC (26 years, 4 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.130: preferred, colored
Changes since revision 1.130: +2 -2 lines
More printf format munging for off_t: when printing as %lld, cast to long long.

Revision 1.130: download - view: text, markup, annotated - select for diffs
Thu Jul 6 00:43:04 2000 UTC (26 years, 4 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.129: preferred, colored
Changes since revision 1.129: +9 -12 lines
Use device_lookup().

Revision 1.125.4.1: download - view: text, markup, annotated - select for diffs
Fri Jun 30 16:27:45 2000 UTC (26 years, 4 months ago) by simonb
Branches: netbsd-1-5
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +10 -8 lines
Pull up mmap paddr_t/off_t changes from trunk.

Revision 1.129: download - view: text, markup, annotated - select for diffs
Tue Jun 27 21:25:02 2000 UTC (26 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.128: preferred, colored
Changes since revision 1.128: +2 -2 lines
Make it compile with AUDIO_DEBUG after the mmap API change.

Revision 1.128: download - view: text, markup, annotated - select for diffs
Tue Jun 27 17:58:22 2000 UTC (26 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.127: preferred, colored
Changes since revision 1.127: +1 -3 lines
remove include of <vm/vm.h>

Revision 1.127: download - view: text, markup, annotated - select for diffs
Mon Jun 26 04:56:17 2000 UTC (26 years, 4 months ago) by simonb
Branches: MAIN
Diff to: previous 1.126: preferred, colored
Changes since revision 1.126: +9 -7 lines
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.

Revision 1.126: download - view: text, markup, annotated - select for diffs
Sun Jun 25 13:26:19 2000 UTC (26 years, 4 months ago) by mrg
Branches: MAIN
Diff to: previous 1.125: preferred, colored
Changes since revision 1.125: +1 -2 lines
remove some redundant <vm/vm_xxx.h> includes

Revision 1.125: download - view: text, markup, annotated - select for diffs
Tue May 2 00:00:00 2000 UTC (26 years, 6 months ago) by augustss
Branches: MAIN
CVS tags: netbsd-1-5-base, minoura-xpg4dl-base, minoura-xpg4dl
Branch point for: netbsd-1-5
Diff to: previous 1.124: preferred, colored
Changes since revision 1.124: +15 -1 lines
Support recording conversions that change the sample size.  PR 10029, from Gregory McGarry.

Revision 1.124: download - view: text, markup, annotated - select for diffs
Mon May 1 17:10:40 2000 UTC (26 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.123: preferred, colored
Changes since revision 1.123: +7 -3 lines
Add some more debug output.

Revision 1.123: download - view: text, markup, annotated - select for diffs
Sun Mar 26 10:01:32 2000 UTC (26 years, 7 months ago) by augustss
Branches: MAIN
Diff to: previous 1.122: preferred, colored
Changes since revision 1.122: +2 -2 lines
Avoid a pointless debug message.

Revision 1.122: download - view: text, markup, annotated - select for diffs
Wed Mar 1 00:44:35 2000 UTC (26 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.121: preferred, colored
Changes since revision 1.121: +13 -13 lines
Change the cmd argument in {audio,mixer}_ioctl() to u_long.

Revision 1.117.6.1: download - view: text, markup, annotated - select for diffs
Mon Dec 27 18:34:34 1999 UTC (26 years, 10 months ago) by wrstuden
Branches: wrstuden-devbsize
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +36 -6 lines
Pull up to last week's -current.

Revision 1.121: download - view: text, markup, annotated - select for diffs
Wed Dec 15 12:09:34 1999 UTC (26 years, 11 months ago) by kleink
Branches: MAIN
CVS tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, chs-ubc2-newbase
Diff to: previous 1.120: preferred, colored
Changes since revision 1.120: +19 -5 lines
Report all AUDIO_PROP_* properties when attaching an audio device.

Revision 1.113.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 30 13:33:45 1999 UTC (26 years, 11 months ago) by itojun
Branches: kame
CVS tags: kame_141_19991130
Diff to: previous 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113: +12 -6 lines
bring in latest KAME (as of 19991130, KAME/NetBSD141) into kame branch
just for reference purposes.
This commit includes 1.4 -> 1.4.1 sync for kame branch.

The branch does not compile at all (due to the lack of ALTQ and some other
source code).  Please do not try to modify the branch, this is just for
referenre purposes.

synchronization to latest KAME will take place on HEAD branch soon.

Revision 1.120: download - view: text, markup, annotated - select for diffs
Tue Nov 23 08:38:30 1999 UTC (27 years ago) by augustss
Branches: MAIN
Diff to: previous 1.119: preferred, colored
Changes since revision 1.119: +7 -1 lines
Avoid 0 blocksize.

Revision 1.117.4.1: download - view: text, markup, annotated - select for diffs
Mon Nov 15 00:40:10 1999 UTC (27 years ago) by fvdl
Branches: fvdl-softdep
Diff to: previous 1.117: preferred, colored; next MAIN 1.118: preferred, colored
Changes since revision 1.117: +12 -2 lines
Sync with -current

Revision 1.119: download - view: text, markup, annotated - select for diffs
Tue Nov 9 16:50:47 1999 UTC (27 years ago) by augustss
Branches: MAIN
CVS tags: fvdl-softdep-base
Diff to: previous 1.118: preferred, colored
Changes since revision 1.118: +5 -2 lines
Make sure to call vdevgone() on all devices when deteching.

Revision 1.118: download - view: text, markup, annotated - select for diffs
Mon Nov 1 18:06:36 1999 UTC (27 years ago) by augustss
Branches: MAIN
CVS tags: comdex-fall-1999-base, comdex-fall-1999
Diff to: previous 1.117: preferred, colored
Changes since revision 1.117: +8 -1 lines
Be cautious about the blocksize returned by the hardware driver to
avoid division by 0.

Revision 1.117: download - view: text, markup, annotated - select for diffs
Thu Sep 23 11:53:13 1999 UTC (27 years, 2 months ago) by kleink
Branches: MAIN
Branch point for: wrstuden-devbsize, thorpej_scsipi, fvdl-softdep
Diff to: previous 1.116: preferred, colored
Changes since revision 1.116: +2 -2 lines
Minor output formatting buglet.

Revision 1.116: download - view: text, markup, annotated - select for diffs
Thu Sep 9 10:24:39 1999 UTC (27 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.115: preferred, colored
Changes since revision 1.115: +235 -97 lines
Add support for detaching audio devices.

Revision 1.113.2.2: download - view: text, markup, annotated - select for diffs
Tue Jun 22 14:18:41 1999 UTC (27 years, 5 months ago) by perry
Branches: netbsd-1-4
CVS tags: netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Diff to: previous 1.113.2.1: preferred, colored; branchpoint 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113.2.1: +3 -3 lines
pullup 1.113->1.114 (nathanw). We are now sync'ed to 1.115

Revision 1.113.4.1: download - view: text, markup, annotated - select for diffs
Mon Jun 21 01:17:35 1999 UTC (27 years, 5 months ago) by thorpej
Branches: chs-ubc2
Diff to: previous 1.113: preferred, colored; next MAIN 1.114: preferred, colored
Changes since revision 1.113: +12 -6 lines
Sync w/ -current.

Revision 1.113.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 18 17:07:27 1999 UTC (27 years, 5 months ago) by perry
Branches: netbsd-1-4
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +10 -4 lines
pullup 1.114->1.115 (thorpej)

Revision 1.115: download - view: text, markup, annotated - select for diffs
Mon Jun 7 19:24:38 1999 UTC (27 years, 5 months ago) by thorpej
Branches: MAIN
CVS tags: chs-ubc2-base
Diff to: previous 1.114: preferred, colored
Changes since revision 1.114: +10 -4 lines
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>.

Revision 1.114: download - view: text, markup, annotated - select for diffs
Sun May 30 00:21:08 1999 UTC (27 years, 5 months ago) by nathanw
Branches: MAIN
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +3 -3 lines
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.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Fri Feb 26 01:18:09 1999 UTC (27 years, 8 months ago) by nathanw
Branches: MAIN
CVS tags: netbsd-1-4-base, netbsd-1-4-RELEASE, kame_14_19990705, kame_14_19990628
Branch point for: netbsd-1-4, kame, chs-ubc2
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +7 -7 lines
Make these compile on the alpha when AUDIO_DEBUG is defined.

Revision 1.112: download - view: text, markup, annotated - select for diffs
Fri Feb 19 17:09:16 1999 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +6 -3 lines
Indicate whether the decive is full or half duplex at attach time.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Wed Feb 17 02:37:38 1999 UTC (27 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +18 -16 lines
Pass the direction to the allocm and round_buffersize methods.
Some drivers need this to properly allocate DMAable memory.

Revision 1.110: download - view: text, markup, annotated - select for diffs
Sun Dec 27 23:25:32 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +5 -5 lines
Make sure recording is started before we return EWOULDBLOCK in a read().

Revision 1.109: download - view: text, markup, annotated - select for diffs
Sun Dec 27 22:52:23 1998 UTC (27 years, 10 months ago) by augustss
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +83 -52 lines
Fold lines to 80 chars.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sun Dec 20 14:26:44 1998 UTC (27 years, 11 months ago) by drochner
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +4 -4 lines
Make midi_attach_mi() and audioprint() available also if MIDIBUS
(but not necessarily MIDI) is defined.
Fixes PR port-i386/6615 (Krister Walfridsson <cato@ulysses.df.lth.se>).
(XXX this should probably go into a separate file to get rid of
the #ifdef mess)

Revision 1.107: download - view: text, markup, annotated - select for diffs
Wed Nov 25 13:44:13 1998 UTC (27 years, 11 months ago) by mycroft
Branches: MAIN
CVS tags: kenh-if-detach-base, kenh-if-detach
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +3 -1 lines
Do not permit a class to be recorded as a master or monitor port.

Revision 1.77.2.2: download - view: text, markup, annotated - select for diffs
Mon Nov 23 03:12:57 1998 UTC (28 years ago) by cgd
Branches: netbsd-1-3
CVS tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Diff to: previous 1.77.2.1: preferred, colored; branchpoint 1.77: preferred, colored; next MAIN 1.78: preferred, colored
Changes since revision 1.77.2.1: +2 -2 lines
Fix many real and potential security problems with character device
driver mmap routines that did not properly bounds check offsets.
See NetBSD security advisory NetBSD-SA1998-005 for details.  Done
as a patch because it's large, and a fair number of bits are different
in -current.  (mrg)

Revision 1.106: download - view: text, markup, annotated - select for diffs
Thu Nov 19 15:38:25 1998 UTC (28 years ago) by mrg
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +2 -2 lines
fix problems in many d_mmap routines:
	- returned EOPNOTSUPP rather than -1.
	- no check for negative offset.
many of these fix potential security problems in these drivers.


XXX XXX XXX
the d_mmap cdev routine should be changed to have a prototype like:
	paddr_t (*d_mmap) __P((dev_t, off_t, int));

by someone!

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sun Sep 27 16:43:56 1998 UTC (28 years, 1 month ago) by christos
Branches: MAIN
CVS tags: chs-ubc-base, chs-ubc
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +9 -1 lines
Make this compile again with no audio but with midi devices.

Revision 1.104: download - view: text, markup, annotated - select for diffs
Tue Sep 1 07:27:06 1998 UTC (28 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +4 -4 lines
Move some debugging output to more useful levels.

Revision 1.103: download - view: text, markup, annotated - select for diffs
Fri Aug 28 12:07:41 1998 UTC (28 years, 2 months ago) by pk
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +31 -25 lines
Slight optimization in audio_[pr]int().

Revision 1.102: download - view: text, markup, annotated - select for diffs
Fri Aug 28 07:44:12 1998 UTC (28 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +37 -32 lines
Handle the case of MIDI devices with no audio devices.

Revision 1.101: download - view: text, markup, annotated - select for diffs
Tue Aug 18 18:17:17 1998 UTC (28 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +0 -3 lines
Back out previous.

Revision 1.100: download - view: text, markup, annotated - select for diffs
Tue Aug 18 06:16:45 1998 UTC (28 years, 3 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +4 -1 lines
Deal with somewhat bogus uninitialized warning in new egcs.  Behavior
is such that would inidicate that __attribute__((__noreturn__)) is not
being honored.

Revision 1.99: download - view: text, markup, annotated - select for diffs
Mon Aug 17 21:16:11 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +17 -16 lines
* Redo the way the way the MIDI driver attaches to audio devices.
* Improve the midisyn layer a little.
* Add a driver for the Yamaha OPL[23] FM synths.
  The opl driver is not finished yet; it sounds pretty awful.

For some strange reason I cannot get any FM sound from my SB64 cards,
but a regular SB16 works fine.

Revision 1.98: download - view: text, markup, annotated - select for diffs
Mon Aug 10 01:17:33 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +2 -2 lines
Oops.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Mon Aug 10 01:13:20 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +6 -6 lines
Call set_params if usemode changes.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Aug 9 20:28:07 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +45 -28 lines
Add trigger_output and trigger_input entry points, which replace
init_{in,out}put and start_{in,out}put, and are only called once.

Revision 1.95: download - view: text, markup, annotated - select for diffs
Sun Aug 9 07:25:58 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +13 -8 lines
Make sure output is thoroughly halted on close, and remember that we stopped
it.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sun Aug 9 05:44:51 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +3 -2 lines
Mask off extra usemode bits.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sun Aug 9 04:54:44 1998 UTC (28 years, 3 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +3 -5 lines
Always copy back both the record and play parameters, in case the driver had
to change one behind our back.

Revision 1.89.2.2: download - view: text, markup, annotated - select for diffs
Sat Aug 8 03:06:45 1998 UTC (28 years, 3 months ago) by eeh
Branches: eeh-paddr_t
Diff to: previous 1.89.2.1: preferred, colored; branchpoint 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89.2.1: +2 -2 lines
Revert cdevsw mmap routines to return int.

Revision 1.89.2.1: download - view: text, markup, annotated - select for diffs
Fri Aug 7 12:39:49 1998 UTC (28 years, 3 months ago) by drochner
Branches: eeh-paddr_t
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +2 -2 lines
make it compile in paddr_t world

Revision 1.92: download - view: text, markup, annotated - select for diffs
Fri Aug 7 00:00:58 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +1 -9 lines
Add MIDI support.  The MIDI devices can be accessed as ``raw'' through
the /dev/rmidiN devices, or with a sequencer interface via /dev/music.
So far the only supported MIDI device is the MPU401 port on SoundBlaster
(and only on SB on isapnp, since we do not have locators with multiple
values yet).

Revision 1.91: download - view: text, markup, annotated - select for diffs
Wed Aug 5 16:38:09 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +6 -5 lines
Clarify a comment.

Revision 1.90: download - view: text, markup, annotated - select for diffs
Tue Aug 4 11:26:14 1998 UTC (28 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +10 -9 lines
Allow option AUDIO_INTR_TIME even if the platform does not support
FP in the kernel.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Thu Jul 9 09:27:33 1998 UTC (28 years, 4 months ago) by mycroft
Branches: MAIN
CVS tags: eeh-paddr_t-base
Branch point for: eeh-paddr_t
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +1 -3 lines
This doesn't need opt_compat_netbsd.h any more.

Revision 1.88: download - view: text, markup, annotated - select for diffs
Thu Jul 9 02:45:45 1998 UTC (28 years, 4 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +1 -3 lines
Don't #ifdef the encoding compatibility crud.  It's needed for source
compatibility with other systems and much third party software.

Revision 1.87: download - view: text, markup, annotated - select for diffs
Sun Jul 5 08:49:41 1998 UTC (28 years, 4 months ago) by jonathan
Branches: MAIN
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +3 -1 lines
* defopt COMPAT_{09,10,11,12,13} and COMPAT_NOMID.
TODO: revisit interaction between native compat and emul compat usage.

Revision 1.86: download - view: text, markup, annotated - select for diffs
Mon May 18 18:27:43 1998 UTC (28 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +5 -5 lines
Avoid spaces in tsleep() string.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri May 15 15:45:58 1998 UTC (28 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +3 -1 lines
Be more verbose if attaching the audio device fails.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Apr 28 23:19:20 1998 UTC (28 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +4 -4 lines
Change debug printing a littel again.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Tue Apr 28 09:07:12 1998 UTC (28 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +42 -92 lines
Add a few more debug messages and clean up debug printing a little.

Revision 1.82: download - view: text, markup, annotated - select for diffs
Tue Mar 3 09:16:15 1998 UTC (28 years, 8 months ago) by augustss
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +7 -6 lines
Avoid the name free so the MALLOCLOG option works again.
Fix some typos.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Mon Jan 12 08:44:08 1998 UTC (28 years, 10 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +2 -4 lines
Adjust for config changes.

Revision 1.80: download - view: text, markup, annotated - select for diffs
Wed Dec 3 01:01:19 1997 UTC (28 years, 11 months ago) by augustss
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +20 -6 lines
Fix three problems spotted by mycroft:
- Closing the audio device should stop recording.
- Manipulating the pause function could accidentally start playing or recording.
- AUDIO_FLUSH could accidentally start playing or recording.

Revision 1.77.2.1: download - view: text, markup, annotated - select for diffs
Wed Nov 5 02:46:55 1997 UTC (29 years ago) by mellon
Branches: netbsd-1-3
CVS tags: netbsd-1-3-RELEASE, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +41 -15 lines
Pull rev 1.79 up from trunk (augustss)

Revision 1.79: download - view: text, markup, annotated - select for diffs
Wed Oct 29 02:11:45 1997 UTC (29 years ago) by augustss
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +3 -3 lines
Fix slight glitch in last commit when AUDIO_DEBUG is on.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Wed Oct 29 02:00:20 1997 UTC (29 years ago) by augustss
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +39 -13 lines
Do audio attachment the right way. From Chris Demetriou.
(Maybe I'll get the hang of the configuration stuff one of these days. :-)

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Oct 19 07:41:56 1997 UTC (29 years, 1 month ago) by augustss
Branches: MAIN
CVS tags: netbsd-1-3-base
Branch point for: netbsd-1-3
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +454 -41 lines
Make the audio API (almost) SunOS compatible.
The changes is to allow some limited mixer manipulation through
the audio device (instead of the mixer device).
This rendered 4 methods in audio_hw_if unused so garbage collect these.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Thu Oct 16 23:58:01 1997 UTC (29 years, 1 month ago) by is
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +14 -1 lines
TMS320AV110 (mpeg layer 2 decoder chip) and ZBUS Melody board, which uses it.
No optionboards yet for Melody, only audio driver.
MPEG data types for audio.c

Revision 1.75: download - view: text, markup, annotated - select for diffs
Thu Oct 16 16:41:18 1997 UTC (29 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +7 -1 lines
Aignore interrupts if the device isn't open.

Revision 1.57.2.6: download - view: text, markup, annotated - select for diffs
Wed Oct 15 05:35:48 1997 UTC (29 years, 1 month ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57.2.5: preferred, colored; branchpoint 1.57: preferred, colored; next MAIN 1.58: preferred, colored
Changes since revision 1.57.2.5: +1 -3 lines
Update marc-pcmcia branch from trunk.

Revision 1.74: download - view: text, markup, annotated - select for diffs
Tue Oct 14 18:43:42 1997 UTC (29 years, 1 month ago) by augustss
Branches: MAIN
CVS tags: marc-pcmcia-base
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +1 -3 lines
Don't test for unused methods.

Revision 1.57.2.5: download - view: text, markup, annotated - select for diffs
Tue Oct 14 10:22:04 1997 UTC (29 years, 1 month ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57.2.4: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.4: +9 -8 lines
Update marc-pcmcia branch from trunk.

Revision 1.73: download - view: text, markup, annotated - select for diffs
Sat Oct 11 11:16:28 1997 UTC (29 years, 1 month ago) by mycroft
Branches: MAIN
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +3 -6 lines
GETPROPS does not indicate whether the device is currently in full-duplex
mode.  Reinstate GETFD to return this information.

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Oct 7 22:40:43 1997 UTC (29 years, 1 month ago) by augustss
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +7 -3 lines
Sanity check hi/lo water mark settings better.

Revision 1.57.2.4: download - view: text, markup, annotated - select for diffs
Sat Sep 6 18:49:43 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57.2.3: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.3: +46 -34 lines
Update marc-pcmcia branch from trunk.

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sat Sep 6 01:14:48 1997 UTC (29 years, 2 months ago) by augustss
Branches: MAIN
CVS tags: thorpej-signal-base, thorpej-signal
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +46 -34 lines
Move around splaudio() to (hopefully) get rid of some rare race conditions.
Add a missing call to round_blocksize.
Add some MIDI stuff that will be used in the future.

Revision 1.57.2.3: download - view: text, markup, annotated - select for diffs
Mon Sep 1 20:20:39 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57.2.2: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.2: +7 -5 lines
Update marc-pcmcia branch from trunk.

Revision 1.57.2.2: download - view: text, markup, annotated - select for diffs
Wed Aug 27 23:29:43 1997 UTC (29 years, 2 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57.2.1: preferred, colored; branchpoint 1.57: preferred, colored
Changes since revision 1.57.2.1: +200 -137 lines
Update marc-pcmcia branch from trunk.

Revision 1.70: download - view: text, markup, annotated - select for diffs
Wed Aug 27 18:54:28 1997 UTC (29 years, 2 months ago) by thorpej
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +7 -5 lines
Don't deference a bad pointers if you try to open an audio device that's
not configured.

Revision 1.69: download - view: text, markup, annotated - select for diffs
Tue Aug 26 19:04:00 1997 UTC (29 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +5 -3 lines
Make sure audio device starts in half-duplex mode and document the fact.

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Aug 24 22:31:29 1997 UTC (29 years, 2 months ago) by augustss
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +198 -137 lines
- Change audio_hw_if a little: set_param now sets the play and record modes
  at the same time instead by using two different calls.  This enables
  it to check more easily if the combined mode is all right.
- Improve the error checking in audio.c.
- Add a new audio property, AUDIO_PROP_INDEPENDENT, show if the
  play and record settings are independent.
- Fix some buglets in audio.c.

Revision 1.57.2.1: download - view: text, markup, annotated - select for diffs
Sat Aug 23 07:12:43 1997 UTC (29 years, 3 months ago) by thorpej
Branches: marc-pcmcia
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +389 -252 lines
Update marc-pcmcia branch from trunk.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Tue Aug 19 23:49:56 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +166 -167 lines
Change the MI audio driver so it attaches to the MD driver in the
normal way.  This requires adding a line to the config files to
get audio to work again.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Mon Aug 18 23:20:09 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +18 -6 lines
Make a slight change to when blocksize, hi- and lo-water marks are
recalculated.  The new semantics is more intuitive(?) and makes Doom
work :-)

Revision 1.65: download - view: text, markup, annotated - select for diffs
Mon Aug 18 21:19:02 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +45 -10 lines
Implement /dev/audioctl.  It behaves much like /dev/sound, but only
allows ioctl() and can be opened at any time.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Mon Aug 11 01:38:12 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +65 -14 lines
Implement delivery of SIGIO on changes to /dev/mixer.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Aug 8 00:03:26 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +8 -1 lines
Make setting the audio block size sticky.
Change the calculated block size to correspond to 50 ms of sound
(was 20 ms, it seems needlessly small).

Revision 1.62: download - view: text, markup, annotated - select for diffs
Wed Aug 6 23:08:26 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +55 -61 lines
Restructure a little to make sure AUDIO_FLUSH restarts the looping DMA.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Wed Aug 6 07:39:59 1997 UTC (29 years, 3 months ago) by fair
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +8 -8 lines
%x -> 0x%x

Revision 1.60: download - view: text, markup, annotated - select for diffs
Mon Aug 4 09:29:51 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +33 -10 lines
Audio:
* Make it possible to use software assisted encodings that expand the
  sample size.
* Use 16 bits per sample when emulating mulaw coding on the SB.
* Prepare for SB16 without CT1745 mixer.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Fri Aug 1 17:04:00 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +4 -1 lines
Implement FIONBIO in audio_ioctl.

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu Jul 31 22:33:18 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +27 -14 lines
Audio changes:
	- Change the way attach and open works to allow multiple audio
	  devices.
	- Split the mulaw.c file into two to avoid dragging in mulaw
	  convertsion when they are not needed.  Add 16 bit alaw/mulaw tables.
	- Change the way audio properties are gotten.
	- Recognize more versions os SoundBlaster.

Revision 1.57: download - view: text, markup, annotated - select for diffs
Mon Jul 28 20:56:09 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
CVS tags: marc-pcmcia-bp
Branch point for: marc-pcmcia
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +24 -29 lines
Audio: Remove the machine dependant code I put in audio.c by mistake.
This adds another method to audio_hw_if.  Also remove a field from
audio_hw_if that was not read-only.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Mon Jul 28 09:28:04 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +8 -4 lines
Temporary fix to make it compile on non-i386.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Jul 28 01:31:50 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +6 -5 lines
audio: Minor cleanup and enable looping DMA for PSS and PAS.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Sun Jul 27 23:51:53 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +39 -27 lines
audio: Simplify handling of AUDIO_SETFD and committing of encoding mode.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Sun Jul 27 23:06:04 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +7 -3 lines
Fix divide by 0 bug in audio driver.

Revision 1.52: download - view: text, markup, annotated - select for diffs
Sun Jul 27 01:16:44 1997 UTC (29 years, 3 months ago) by augustss
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +835 -592 lines
Changes to the sudio system:
  - It is now possible to handle devices that want "looping" DMA,
    e.g. the SoundBlaster correctly.  The WSS and SB drivers use this.
    To do this several new methods were introduced in audio_hw_if.
  - Different silence handling (forced by previous change).
  - The audio driver can now be mmap()-ed, but due to problems in
    the VM system only for writing for now.
  - The OSS (Linux) audio emulation takes advantage of some of the
    new features.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Tue Jul 15 07:46:11 1997 UTC (29 years, 4 months ago) by augustss
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +22 -8 lines
In the name of backwards compatibility AUDIO_ENCODING_LINEAR has been
renamed AUDIO_ENCODING_SLINEAR and AUDIO_ENCODING_LINEAR reverts to the
NetBSD 1.2 sematics.  A kernel with COMPAT_12 defined will accept
AUDIO_ENCODING_LINEAR and treat it as before, without COMPAT_12 it
will be rejected.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Tue May 27 23:24:56 1997 UTC (29 years, 5 months ago) by augustss
Branches: MAIN
CVS tags: bouyer-scsipi
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +34 -19 lines
Allow more than one hardware driver to attach to the audio upper layer.

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue May 20 12:51:43 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +2 -2 lines
Make the audio default parameters into a globally accessible constant.

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat May 17 23:26:33 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +2 -2 lines
Change lowater calculation a little.
Fix mixer setting bug and add some missing splaudio().
Set SB drq16 to 5 and don't pretend to be SB v1.0.

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sun May 11 00:41:12 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +12 -33 lines
Clean up audio_silence_copyout().

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat May 10 19:01:53 1997 UTC (29 years, 6 months ago) by jtk
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +2 -2 lines
fix typo: LINEAR should have been ULINEAR

Revision 1.45: download - view: text, markup, annotated - select for diffs
Fri May 9 22:16:30 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +19 -23 lines
Change the interface between high and lowlevel audio drivers again:
Set the encoding parameters slightly differently.
Remove the SW encoding/decodinf functions from this interface
and move them to the audio_parameter struct; this is both more efficient
and flexible.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Wed May 7 19:24:34 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +2 -1 lines
Return audio buffer size in audio_info_t with ioctl() AUDIO_GETINFO.
Use the buffer size to implement one more OSS ioctl().

Revision 1.43: download - view: text, markup, annotated - select for diffs
Wed May 7 18:51:39 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +53 -25 lines
Convert to new orthogonal audio encoding scheme and implement
some of the new encodings.  The change to ioctl AUDIO_GETENC is
NOT backwards compatible.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Thu May 1 12:27:10 1997 UTC (29 years, 6 months ago) by kleink
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +2 -2 lines
Fix typo in last commit; from Thorsten Frueauf <frueauf@ira.uka.de>
in PR/3566.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Apr 29 21:01:46 1997 UTC (29 years, 6 months ago) by augustss
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +119 -141 lines
Change the interface between the high and low level audio drivers
so that all audio encoding parameters are set at once.  This simplifies
the interface and make error checking easier.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Sat Apr 19 21:25:43 1997 UTC (29 years, 7 months ago) by pk
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +5 -2 lines
Remove bogus pointer cast.
Accept FIONBIO ioctls.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Thu Mar 20 16:13:55 1997 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +47 -40 lines
Make sure to recalculate the block size after changing the
sampling rate.  Also, nuke the global variable audio_blocksize.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Mar 20 06:48:48 1997 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +64 -30 lines
Combine set_encoding and set_precision into a single set_format interface.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Thu Mar 20 03:19:53 1997 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +34 -4 lines
Fill in silence-padded blocks so we don't get gaps.  From PR 3357,
by Lennart Augustsson.

Revision 1.36: download - view: text, markup, annotated - select for diffs
Thu Mar 13 02:45:07 1997 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +11 -12 lines
Modify audio_fill_silence() to take an encoding number rather than a softc*
and mode.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Thu Mar 13 02:19:44 1997 UTC (29 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +46 -41 lines
Don't share the silence block between devices.  Make silence filling work for
more encodings, and make it device-independent.  From Lennart Augustsson, in
PR kern/3305.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Sat Jan 18 04:02:58 1997 UTC (29 years, 10 months ago) by perry
Branches: MAIN
CVS tags: mrg-vm-swap, is-newarp-before-merge, is-newarp-base, is-newarp
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -2 lines
close 3079 from Jason Baker -- fixes a test in audio_poll

Revision 1.33: download - view: text, markup, annotated - select for diffs
Fri Nov 1 23:05:45 1996 UTC (30 years ago) by pk
Branches: MAIN
CVS tags: thorpej-setroot
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +2 -1 lines
Reset `sc_async' on device close.

Revision 1.32: download - view: text, markup, annotated - select for diffs
Wed Oct 16 01:12:22 1996 UTC (30 years, 1 month ago) by jtk
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -1 lines
fix compile errors & warnings

Revision 1.31: download - view: text, markup, annotated - select for diffs
Sun Oct 13 01:37:04 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +12 -12 lines
backout kprintf changes

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu Oct 10 22:25:05 1996 UTC (30 years, 1 month ago) by christos
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +13 -13 lines
printf -> kprintf, sprintf -> ksprintf

Revision 1.29: download - view: text, markup, annotated - select for diffs
Sat Sep 7 12:40:53 1996 UTC (30 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +29 -42 lines
Implement poll(2).

Revision 1.28: download - view: text, markup, annotated - select for diffs
Sun Sep 1 23:54:53 1996 UTC (30 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +2 -2 lines
Fix typo.

Revision 1.27: download - view: text, markup, annotated - select for diffs
Sun Sep 1 21:33:43 1996 UTC (30 years, 2 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +59 -44 lines
Add mmap method for audio devices.
XXX This is just a placeholder to avoid updating conf.h again.
Also, clean up some error values.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon May 13 02:26:15 1996 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
CVS tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +1 -5 lines
Remove intr.h for now.  This requires more work.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Mon May 13 01:01:55 1996 UTC (30 years, 6 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +6 -2 lines
Use intr.h on alpha and i386.

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sat Mar 30 22:51:23 1996 UTC (30 years, 7 months ago) by christos
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +4 -13 lines
- Don't use dev_conf.h
- Remove unnecessary prototypes
- Fix ioctl arguments
- Don't use kprintf(...TO_LOG...); directly. This does not set the log
  priority, and uses priority of the previous message. Use log() with %:

Revision 1.23: download - view: text, markup, annotated - select for diffs
Fri Mar 29 00:11:42 1996 UTC (30 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +7 -7 lines
Use %p as appropriate.

Revision 1.22: download - view: text, markup, annotated - select for diffs
Thu Mar 14 19:08:32 1996 UTC (30 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +2 -1 lines
Bring prototypes into scope.

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Mar 7 15:00:07 1996 UTC (30 years, 8 months ago) by christos
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +64 -39 lines
prototypes for ccd audio and ncr5380

Revision 1.20: download - view: text, markup, annotated - select for diffs
Tue Feb 20 11:47:22 1996 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +21 -17 lines
Check for errors while changing gain.

Revision 1.19: download - view: text, markup, annotated - select for diffs
Tue Feb 20 10:00:31 1996 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +16 -1 lines
Trivial (and probably not very good) implementation of SIGIO.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Sat Feb 17 02:29:10 1996 UTC (30 years, 9 months ago) by jtk
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +32 -14 lines
Fix PR#2060 (add AUDIO_PERROR ioctl to query # of playback drops), also
fix semantics of AUDIO_WERROR (now returns a count).

Also repair audio driver back to "real-time mode" where user must
provide data quickly enough for real time audio or silence is played
until user catches up.  Add optional "play all" mode (additional bit in
mode field) to play all samples provided, with silence when needed to
avoid buffer underrun.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Feb 16 02:25:43 1996 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +17 -7 lines
Eliminate sc_silence, and handle output interrupts somewhat differently.
From John Kohl, slightly edited.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Thu Feb 8 03:05:34 1996 UTC (30 years, 9 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +12 -18 lines
Adjust the low and high watermarks.  Based on a suggestion from Lennart
Augustsson.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Feb 5 21:11:10 1996 UTC (30 years, 9 months ago) by scottr
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +6 -2 lines
Don't adjust the number of blocks in the ring buffer if the driver
is currently outputting silence.  Fix from Lennart Augustsson
<augustss@cs.chalmers.se>, closes PR #2010.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Jan 7 06:21:02 1996 UTC (30 years, 10 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +5 -6 lines
Make the block size always a whole number of samples.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Fri Jan 5 13:16:30 1996 UTC (30 years, 10 months ago) by pk
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +3 -1 lines
Avoid zero blocksize (from David Huang; PR#1770).

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Nov 24 23:45:40 1995 UTC (30 years, 11 months ago) by cgd
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +1 -2 lines
delete extra (blank) line in comment block

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jul 19 19:58:16 1995 UTC (31 years, 4 months ago) by brezak
Branches: MAIN
CVS tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -4 lines
GUS audio driver from John Kohl.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Fri Jul 7 01:52:30 1995 UTC (31 years, 4 months ago) by brezak
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +110 -82 lines
Make mode a flag set. Full-dpulex fixes from John Kohl.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jun 4 15:33:50 1995 UTC (31 years, 5 months ago) by brezak
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +2 -2 lines
call hw->setfd with param not ptr to it

Revision 1.8: download - view: text, markup, annotated - select for diffs
Mon May 8 22:01:34 1995 UTC (31 years, 6 months ago) by brezak
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +2 -2 lines
Remove  strings

Revision 1.7: download - view: text, markup, annotated - select for diffs
Mon May 8 17:42:07 1995 UTC (31 years, 6 months ago) by brezak
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -10 lines
Don't call hardware close in mixer_close(). From Rolf Grossmann <grossman@informatik.tu-muenchen.de>

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon May 8 16:06:38 1995 UTC (31 years, 6 months ago) by brezak
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +4 -2 lines
Set mixer type for rec and play level set. PR#1027

Revision 1.5: download - view: text, markup, annotated - select for diffs
Fri May 5 22:36:14 1995 UTC (31 years, 6 months ago) by brezak
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +16 -2 lines
Auto-select open mode when opened half-duplex. From John Kohl. PR#1006

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Apr 24 19:13:52 1995 UTC (31 years, 7 months ago) by pk
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +10 -7 lines
A couple of fixes frm Rolf Grossmann.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Mon Apr 17 23:04:31 1995 UTC (31 years, 7 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +8 -8 lines
Make some functions non-static.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sat Mar 25 00:04:08 1995 UTC (31 years, 8 months ago) by mycroft
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +6 -6 lines
Use void* rather than caddr_t in many places.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Feb 21 01:36:56 1995 UTC (31 years, 9 months ago) by brezak
Branches: MAIN
New audio subsystem

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>