The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.79 / (download) - annotate - [select for diffs], Mon Sep 7 03:36:11 2020 UTC (7 weeks, 1 day ago) by isaki
Branch: MAIN
CVS Tags: HEAD
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored)

Fix misspellings in comment.

Revision 1.78 / (download) - annotate - [select for diffs], Sun Aug 23 04:20:01 2020 UTC (2 months ago) by isaki
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored)

Improve debug messages.

Revision 1.77 / (download) - annotate - [select for diffs], Sun Aug 23 04:14:57 2020 UTC (2 months ago) by isaki
Branch: MAIN
Changes since 1.76: +6 -5 lines
Diff to previous 1.76 (colored)

Improve and update comments.

Revision 1.76 / (download) - annotate - [select for diffs], Sun Aug 23 04:07:23 2020 UTC (2 months ago) by isaki
Branch: MAIN
Changes since 1.75: +8 -6 lines
Diff to previous 1.75 (colored)

Style fixes.

Revision 1.28.2.16 / (download) - annotate - [select for diffs], Sun Jun 7 19:04:00 2020 UTC (4 months, 2 weeks ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-1-RELEASE
Changes since 1.28.2.15: +27 -5 lines
Diff to previous 1.28.2.15 (colored) to branchpoint 1.28 (colored) next main 1.29 (colored)

Pull up following revision(s) (requested by isaki in ticket #950):

	sys/dev/audio/audio.c: revision 1.71
	sys/dev/audio/audio.c: revision 1.73
	sys/dev/audio/audio.c: revision 1.74
	sys/dev/audio/audio.c: revision 1.75
	sys/dev/audio/audiovar.h: revision 1.12

audio: Fix logic for resuming when the device is in use.

audio_[r/p]mixer_start should never be called when the device is
marked busy.

Resolves a panic on resume when audio is playing, PR kern/55301

audio: remove comment that is no longer valid

audio: Only restart recording mixer on resume if it's already been started

Fix suspend/resume.
- Revert temporary usage of sc_[pr]busy during suspend.  These indicate
  whether the mixer needs to be restarted or not.
- Avoid timeout error when about to suspend.

Revision 1.75 / (download) - annotate - [select for diffs], Fri May 29 03:09:14 2020 UTC (4 months, 4 weeks ago) by isaki
Branch: MAIN
Changes since 1.74: +29 -4 lines
Diff to previous 1.74 (colored)

Fix suspend/resume.
- Revert temporary usage of sc_[pr]busy during suspend.  These indicate
  whether the mixer needs to be restarted or not.
- Avoid timeout error when about to suspend.

Revision 1.74 / (download) - annotate - [select for diffs], Tue May 26 15:20:16 2020 UTC (5 months ago) by nia
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored)

audio: Only restart recording mixer on resume if it's already been started

Revision 1.73 / (download) - annotate - [select for diffs], Tue May 26 11:43:00 2020 UTC (5 months ago) by nia
Branch: MAIN
Changes since 1.72: +2 -3 lines
Diff to previous 1.72 (colored)

audio: remove comment that is no longer valid

Revision 1.72 / (download) - annotate - [select for diffs], Tue May 26 10:12:12 2020 UTC (5 months ago) by nia
Branch: MAIN
Changes since 1.71: +12 -8 lines
Diff to previous 1.71 (colored)

audio: Restore compat with Solaris for 8-bit LINEAR.

It's always signed, unless it's LINEAR8.

PR kern/55175

Revision 1.71 / (download) - annotate - [select for diffs], Tue May 26 10:07:29 2020 UTC (5 months ago) by nia
Branch: MAIN
Changes since 1.70: +4 -6 lines
Diff to previous 1.70 (colored)

audio: Fix logic for resuming when the device is in use.

audio_[r/p]mixer_start should never be called when the device is
marked busy.

Resolves a panic on resume when audio is playing, PR kern/55301

Revision 1.70 / (download) - annotate - [select for diffs], Sat May 23 23:42:42 2020 UTC (5 months ago) by ad
Branch: MAIN
Changes since 1.69: +6 -6 lines
Diff to previous 1.69 (colored)

Move proc_lock into the data segment.  It was dynamically allocated because
at the time we had mutex_obj_alloc() but not __cacheline_aligned.

Revision 1.28.2.15 / (download) - annotate - [select for diffs], Mon May 18 18:12:24 2020 UTC (5 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.28.2.14: +24 -2 lines
Diff to previous 1.28.2.14 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #911):

	sys/dev/audio/audiodef.h: revision 1.13
	sys/dev/audio/audiodef.h: revision 1.14
	sys/arch/sparc/include/param.h: revision 1.74
	sys/arch/evbarm/conf/GENERIC64: revision 1.148
	sys/arch/sh3/include/param.h: revision 1.25
	sys/arch/evbarm/conf/GENERIC: revision 1.75
	sys/arch/m68k/include/param.h: revision 1.23
	sys/arch/amd64/conf/GENERIC: revision 1.564
	sys/arch/hppa/include/param.h: revision 1.27
	sys/dev/audio/audio.c: revision 1.68
	sys/arch/vax/include/param.h: revision 1.63
	sys/dev/audio/audio.c: revision 1.69

Reduce default AUDIO_BLK_MS from 40msec to 10msec on all platform except m68k
(m68k uses 40msec default as before).  And remove the option from GENERIC.

- It's not good idea to set such parameter in individual GENERICs.
- 4msec is (probably no problem for most modern real hardware but)
  too aggressive to be default.
- 10msec is too severe for antique machines but it's hard to draw a line.

Set AUDIO_BLK_MS 40 msec on other old(slow) architectures not only m68k.

Thanks tsutsui@ for comment about architecture choice.
And move it from audiodef.h to audio.c as suggested by joerg@.


Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used.

Otherwise the default value (currently 10 msec) defined in audio.c will
be used.  This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block.  Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).

But please don't be eager to make the default value shorter.
<machine/param.h> was discussed in source-changes-d.  It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this.  Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html

Revision 1.28.2.14 / (download) - annotate - [select for diffs], Mon May 18 18:05:34 2020 UTC (5 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.28.2.13: +30 -12 lines
Diff to previous 1.28.2.13 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #910):

	sys/dev/audio/audio.c: revision 1.49
	sys/dev/audio/audio.c: revision 1.61
	sys/dev/audio/audio.c: revision 1.66
	sys/dev/audio/audio.c: revision 1.67

Move #if DIAGNOSTIC..#endif to correct place.
It should ignore stray interrupts regardless of DIAGNOSTIC.

Improve an error message about round_blocksize.

Improve diagnostic messages.

Improve the blocksize notation.
The blocksize is expressed in bytes, and the millisecond notation
is supplementary information to make it easier to understand.

Revision 1.28.2.13 / (download) - annotate - [select for diffs], Mon May 18 18:02:23 2020 UTC (5 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.28.2.12: +30 -14 lines
Diff to previous 1.28.2.12 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #909):

	sys/dev/audio/audio.c: revision 1.65

Fix to start recording immediately when open() with READ mode is
called (unless pause).
- Opening /dev/audio always initializes pause with false.  Therefore
  it always starts recording.
- Opening /dev/sound inherites pause from the sticky parameter.
  Therefore whether /dev/sound starts recording or not depends on the
  sticky pause parameter.

This fixes two problems:
- Opening /dev/audio didn't start recording after merging isaki-audio2.
- Opening /dev/sound didn't start recording regardless of the sticky
  pause, probably since long time ago (at least netbsd-7).

Revision 1.69 / (download) - annotate - [select for diffs], Fri May 1 08:21:27 2020 UTC (5 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.68: +12 -25 lines
Diff to previous 1.68 (colored)

Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used.
Otherwise the default value (currently 10 msec) defined in audio.c will
be used.  This mechanism is for very old ports which cannot satisfactorily
handle 10 msec block.  Currently hppa, m68k, sh3, sparc(!64) and vax are.

For port maintainers, if general models in your port cannot satisfactorily
handle 10 msec block, please consider to define your suitable longer period
(40 msec would be a good first choice).
But please don't be eager to make the default value shorter.

<machine/param.h> was discussed in source-changes-d.  It's better than
ifdef storm, or adding 60+ new header files in every arch/*/include/
directories for this.  Thanks mrg@, ad@, and everyone.
http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html

Revision 1.28.2.12 / (download) - annotate - [select for diffs], Thu Apr 30 16:05:18 2020 UTC (5 months, 4 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.11: +319 -268 lines
Diff to previous 1.28.2.11 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #877):

	sys/dev/audio/audio.c: revision 1.55
	sys/dev/audio/audio.c: revision 1.41
	sys/dev/audio/audio.c: revision 1.48
	sys/dev/audio/audiovar.h: revision 1.7
	sys/dev/audio/audio.c: revision 1.63 (via patch)
	sys/dev/audio/audiovar.h: revision 1.11
	sys/dev/audio/audio.c: revision 1.64

Simplify async_mixer handling.
- It makes FIOASYNC code in mixer_ioctl() symmetric.
- For readability, mixer_async_{add,remove}() should take pid argument
  though pid is always curproc.

hw_if->query_format is already mandatory method.  Drop null checks.

Improve error handling around audio_hw_probe().
It was difficult to return multiple errors.

Split sc_lock and sc_exlock.

Most (probably all) malloc/free (or routines which may sleep) now can be
called without holding mutex.
Pointed out by riastradh@.

Fix/Update comments about allocm/freem.

Revision 1.28.2.11 / (download) - annotate - [select for diffs], Thu Apr 30 15:43:30 2020 UTC (5 months, 4 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.10: +132 -85 lines
Diff to previous 1.28.2.10 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #876):

	sys/dev/audio/audio.c: revision 1.60
	sys/dev/audio/audio.c: revision 1.62

Fix wrong parameter displayed in debug messages.

Restore backward compatibility with netbsd-7 audio.

For sticky parameters (encoding, precision, channels, sample_rate and pause):
 - AUDIO_SETINFO for nonexistent track updates sticky parameters.
 - AUDIO_GETINFO for nonexistent track reads sticky parameters.

For blocksize, hiwat, lowat and {play.record}.buffer_size:
 - AUDIO_SETINFO for nonexistent track does nothing.
 - AUDIO_GETINFO for nonexistent track returns dummy non-zero values.

Nonexistent track is a playback track on O_RDONLY descriptor for example,
or both tracks on /dev/audioctl.

Revision 1.28.2.10 / (download) - annotate - [select for diffs], Thu Apr 30 15:40:50 2020 UTC (5 months, 4 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.9: +28 -6 lines
Diff to previous 1.28.2.9 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #875):

	sys/dev/audio/audio.c: revision 1.59
	share/man/man4/audio.4: revision 1.102
	share/man/man4/audio.4: revision 1.103
	sys/dev/audio/audio.c: revision 1.43

Limit the number of channels that userland apps can set (by AUDIO_SETINFO)
to the number of channels supported by the hardware or less, if the hardware
supports multi channels.
- On monaural or stereo hardware, userland apps can always set 1ch or 2ch.
  The kernel (audio layer) can convert mono-stereo each other.
- On 3ch (2.1ch) hardware, for example, userland apps can set 1, 2, or 3ch,
  but not 4ch or more.

This allows userland apps to know actual number of channels supported by
the hardware in the same way as before.

PR kern/54973.


Reinitialize the sticky parameters whenever the hardware format is changed.

When the number of the hardware channels becomes less than the number of
channels that sticky parameters remember, subsequent open("/dev/sound") will
fail without this treatment.  This is for rev 1.43.


Add description about channel limitation introduced in audio.c 1.43.
PR kern/54973.

Remove trailing whitespace.

Revision 1.68 / (download) - annotate - [select for diffs], Wed Apr 29 03:58:27 2020 UTC (5 months, 4 weeks ago) by isaki
Branch: MAIN
Changes since 1.67: +37 -2 lines
Diff to previous 1.67 (colored)

Set AUDIO_BLK_MS 40 msec on other old(slow) architectures not only m68k.
Thanks tsutsui@ for comment about architecture choice.
And move it from audiodef.h to audio.c as suggested by joerg@.

Revision 1.16.2.4 / (download) - annotate - [select for diffs], Tue Apr 21 18:42:15 2020 UTC (6 months ago) by martin
Branch: phil-wifi
Changes since 1.16.2.3: +17 -4 lines
Diff to previous 1.16.2.3 (colored) next main 1.17 (colored)

Sync with HEAD

Revision 1.65.2.1 / (download) - annotate - [select for diffs], Mon Apr 20 11:29:03 2020 UTC (6 months, 1 week ago) by bouyer
Branch: bouyer-xenpvh
Changes since 1.65: +19 -6 lines
Diff to previous 1.65 (colored) next main 1.66 (colored)

Sync with HEAD

Revision 1.67 / (download) - annotate - [select for diffs], Sun Apr 19 03:52:22 2020 UTC (6 months, 1 week ago) by isaki
Branch: MAIN
CVS Tags: phil-wifi-20200421, bouyer-xenpvh-base2, bouyer-xenpvh-base1
Changes since 1.66: +13 -4 lines
Diff to previous 1.66 (colored)

Improve the blocksize notation.
The blocksize is expressed in bytes, and the millisecond notation
is supplementary information to make it easier to understand.

Revision 1.66 / (download) - annotate - [select for diffs], Fri Apr 17 07:48:35 2020 UTC (6 months, 1 week ago) by isaki
Branch: MAIN
Changes since 1.65: +8 -4 lines
Diff to previous 1.65 (colored)

Improve diagnostic messages.

Revision 1.16.2.3 / (download) - annotate - [select for diffs], Mon Apr 13 08:04:18 2020 UTC (6 months, 2 weeks ago) by martin
Branch: phil-wifi
Changes since 1.16.2.2: +1108 -853 lines
Diff to previous 1.16.2.2 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.65 / (download) - annotate - [select for diffs], Thu Mar 26 13:32:03 2020 UTC (7 months ago) by isaki
Branch: MAIN
CVS Tags: phil-wifi-20200411, phil-wifi-20200406, bouyer-xenpvh-base
Branch point for: bouyer-xenpvh
Changes since 1.64: +30 -14 lines
Diff to previous 1.64 (colored)

Fix to start recording immediately when open() with READ mode is
called (unless pause).
- Opening /dev/audio always initializes pause with false.  Therefore
  it always starts recording.
- Opening /dev/sound inherites pause from the sticky parameter.
  Therefore whether /dev/sound starts recording or not depends on the
  sticky pause parameter.
This fixes two problems:
- Opening /dev/audio didn't start recording after merging isaki-audio2.
- Opening /dev/sound didn't start recording regardless of the sticky
  pause, probably since long time ago (at least netbsd-7).

Revision 1.28.2.9 / (download) - annotate - [select for diffs], Sat Mar 21 15:47:00 2020 UTC (7 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.28.2.8: +252 -104 lines
Diff to previous 1.28.2.8 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #794):

	sys/dev/audio/audiodef.h: revision 1.10
	sys/dev/audio/audio.c: revision 1.56 (via patch)
	sys/dev/audio/audio.c: revision 1.57
	sys/dev/audio/audiovar.h: revision 1.8
	sys/dev/audio/audio.c: revision 1.38

Remove obsoleted comment.

Prevent a race between audiodetach and fileops methods using psref(9).
Fix PR kern/54427.
Thank you so much riastradh@

Release memories on audiobellclose.
It's rest of the last commit.

Revision 1.28.2.8 / (download) - annotate - [select for diffs], Sat Mar 21 15:41:18 2020 UTC (7 months, 1 week ago) by martin
Branch: netbsd-9
Changes since 1.28.2.7: +81 -61 lines
Diff to previous 1.28.2.7 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #793):

	sys/dev/audio/audio.c: revision 1.42
	sys/dev/audio/audio.c: revision 1.47
	sys/dev/audio/audiodef.h: revision 1.9

Remove incorrect KASSERT(!mutex_owned()).
Pointed out by riastradh@.

Improve KASSERT messages.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Mar 7 06:27:19 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.63: +6 -11 lines
Diff to previous 1.63 (colored)

Fix/Update comments about allocm/freem.

Revision 1.63 / (download) - annotate - [select for diffs], Sat Mar 7 06:25:57 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.62: +207 -142 lines
Diff to previous 1.62 (colored)

Split sc_lock and sc_exlock.
Most (probably all) malloc/free (or routines which may sleep) now can be
called without holding mutex.
Pointed out by riastradh@.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Mar 4 14:19:41 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.61: +132 -89 lines
Diff to previous 1.61 (colored)

Restore backward compatibility with netbsd-7 audio.
For sticky parameters (encoding, precision, channels, sample_rate and pause):
 - AUDIO_SETINFO for nonexistent track updates sticky parameters.
 - AUDIO_GETINFO for nonexistent track reads sticky parameters.
For blocksize, hiwat, lowat and {play.record}.buffer_size:
 - AUDIO_SETINFO for nonexistent track does nothing.
 - AUDIO_GETINFO for nonexistent track returns dummy non-zero values.
Nonexistent track is a playback track on O_RDONLY descriptor for example,
or both tracks on /dev/audioctl.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Mar 1 07:42:07 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
CVS Tags: is-mlppp-base, is-mlppp
Changes since 1.60: +9 -4 lines
Diff to previous 1.60 (colored)

Improve an error message about round_blocksize.

Revision 1.60 / (download) - annotate - [select for diffs], Sun Mar 1 07:40:03 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.59: +14 -10 lines
Diff to previous 1.59 (colored)

Fix wrong parameter displayed in debug messages.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Mar 1 07:35:33 2020 UTC (7 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.58: +14 -2 lines
Diff to previous 1.58 (colored)

Reinitialize the sticky parameters whenever the hardware format is changed.
When the number of the hardware channels becomes less than the number of
channels that sticky parameters remember, subsequent open("/dev/sound") will
fail without this treatment.  This is for rev 1.43.

Revision 1.37.2.2 / (download) - annotate - [select for diffs], Sat Feb 29 20:19:07 2020 UTC (7 months, 4 weeks ago) by ad
Branch: ad-namecache
Changes since 1.37.2.1: +443 -301 lines
Diff to previous 1.37.2.1 (colored) to branchpoint 1.37 (colored) next main 1.38 (colored)

Sync with head.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Feb 29 09:38:10 2020 UTC (7 months, 4 weeks ago) by isaki
Branch: MAIN
CVS Tags: ad-namecache-base3
Changes since 1.57: +5 -5 lines
Diff to previous 1.57 (colored)

Minor fix.  audio_prinfo.pause is u_char, not bool.

Revision 1.57 / (download) - annotate - [select for diffs], Sat Feb 29 07:13:37 2020 UTC (7 months, 4 weeks ago) by isaki
Branch: MAIN
Changes since 1.56: +7 -2 lines
Diff to previous 1.56 (colored)

Release memories on audiobellclose.
It's rest of the last commit.

Revision 1.56 / (download) - annotate - [select for diffs], Sun Feb 23 07:17:01 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.55: +248 -100 lines
Diff to previous 1.55 (colored)

Prevent a race between audiodetach and fileops methods using psref(9).
Fix PR kern/54427.
Thank you so much riastradh@

Revision 1.55 / (download) - annotate - [select for diffs], Sun Feb 23 04:24:56 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.54: +44 -76 lines
Diff to previous 1.54 (colored)

Improve error handling around audio_hw_probe().
It was difficult to return multiple errors.

Revision 1.54 / (download) - annotate - [select for diffs], Sun Feb 23 04:02:46 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.53: +27 -17 lines
Diff to previous 1.53 (colored)

Make start_input/halt_input optional if the driver has no recording,
make start_output/halt_output optional if the driver has no playback.
And remove such never called functions.

Revision 1.53 / (download) - annotate - [select for diffs], Sat Feb 22 19:49:11 2020 UTC (8 months ago) by chs
Branch: MAIN
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

remove some unnecessary includes of internal UVM headers.

Revision 1.52 / (download) - annotate - [select for diffs], Sat Feb 22 08:15:09 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.51: +3 -5 lines
Diff to previous 1.51 (colored)

Make calling get_props() lockless.
get_props() of all MD drivers now can be called without sc_lock.

Revision 1.51 / (download) - annotate - [select for diffs], Sat Feb 22 08:03:19 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.50: +4 -4 lines
Diff to previous 1.50 (colored)

On audio_[pr]mixer_halt(), it's better to reset parameters in intr_lock.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Feb 22 08:01:59 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.49: +6 -4 lines
Diff to previous 1.49 (colored)

Add KASSERTs.  audio_[pr]mixer_start() need exlock.

Revision 1.49 / (download) - annotate - [select for diffs], Sat Feb 22 07:59:47 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.48: +6 -6 lines
Diff to previous 1.48 (colored)

Move #if DIAGNOSTIC..#endif to correct place.
It should ignore stray interrupts regardless of DIAGNOSTIC.

Revision 1.48 / (download) - annotate - [select for diffs], Sat Feb 22 07:09:18 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.47: +7 -26 lines
Diff to previous 1.47 (colored)

hw_if->query_format is already mandatory method.  Drop null checks.

Revision 1.47 / (download) - annotate - [select for diffs], Sat Feb 22 06:58:39 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.46: +58 -42 lines
Diff to previous 1.46 (colored)

Improve KASSERT messages.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Feb 22 06:36:07 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.45: +8 -6 lines
Diff to previous 1.45 (colored)

Change two aprint_error_dev() to device_printf() (and improve messages).
This is also called from other than boot.

Revision 1.45 / (download) - annotate - [select for diffs], Sat Feb 22 06:28:10 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.44: +4 -5 lines
Diff to previous 1.44 (colored)

const-ify.  These arguments are no longer written back.

Revision 1.44 / (download) - annotate - [select for diffs], Sat Feb 22 06:22:46 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.43: +5 -6 lines
Diff to previous 1.43 (colored)

Fix/Update comments.

Revision 1.43 / (download) - annotate - [select for diffs], Sat Feb 22 05:51:39 2020 UTC (8 months ago) by isaki
Branch: MAIN
Changes since 1.42: +16 -6 lines
Diff to previous 1.42 (colored)

Limit the number of channels that userland apps can set (by AUDIO_SETINFO)
to the number of channels supported by the hardware or less, if the hardware
supports multi channels.
- On monaural or stereo hardware, userland apps can always set 1ch or 2ch.
  The kernel (audio layer) can convert mono-stereo each other.
- On 3ch (2.1ch) hardware, for example, userland apps can set 1, 2, or 3ch,
  but not 4ch or more.
This allows userland apps to know actual number of channels supported by
the hardware in the same way as before.
PR kern/54973.

Revision 1.42 / (download) - annotate - [select for diffs], Sat Feb 15 02:47:00 2020 UTC (8 months, 1 week ago) by isaki
Branch: MAIN
Changes since 1.41: +25 -21 lines
Diff to previous 1.41 (colored)

Remove incorrect KASSERT(!mutex_owned()).
Pointed out by riastradh@.

Revision 1.28.2.7 / (download) - annotate - [select for diffs], Tue Jan 21 11:19:19 2020 UTC (9 months ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RELEASE, netbsd-9-0-RC2
Changes since 1.28.2.6: +17 -7 lines
Diff to previous 1.28.2.6 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #620):

	sys/dev/audio/audio.c: revision 1.39

Fix an resource leak on audiobell close.
audioclose() freed audio_file_t structure, but only audiobellclose
didn't pass there.  I change that all of freeing audio_file_t is done
by each *_close().

Revision 1.28.2.6 / (download) - annotate - [select for diffs], Tue Jan 21 11:17:58 2020 UTC (9 months ago) by martin
Branch: netbsd-9
Changes since 1.28.2.5: +3 -3 lines
Diff to previous 1.28.2.5 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #619):

	sys/dev/audio/audio.c: revision 1.37

Move mutex_exit() correct place to protect sc_async_mixer.
Thanks maxv@!

Revision 1.37.2.1 / (download) - annotate - [select for diffs], Fri Jan 17 21:47:30 2020 UTC (9 months, 1 week ago) by ad
Branch: ad-namecache
Changes since 1.37: +83 -44 lines
Diff to previous 1.37 (colored)

Sync with head.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Jan 11 04:53:10 2020 UTC (9 months, 2 weeks ago) by isaki
Branch: MAIN
CVS Tags: ad-namecache-base2, ad-namecache-base1
Changes since 1.40: +68 -26 lines
Diff to previous 1.40 (colored)

Simplify async_mixer handling.
- It makes FIOASYNC code in mixer_ioctl() symmetric.
- For readability, mixer_async_{add,remove}() should take pid argument
  though pid is always curproc.

Revision 1.40 / (download) - annotate - [select for diffs], Sat Jan 11 04:06:13 2020 UTC (9 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.39: +2 -10 lines
Diff to previous 1.39 (colored)

Remove old debug #ifdefs.

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jan 8 13:30:15 2020 UTC (9 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.38: +17 -7 lines
Diff to previous 1.38 (colored)

Fix an resource leak on audiobell close.
audioclose() freed audio_file_t structure, but only audiobellclose
didn't pass there.  I change that all of freeing audio_file_t is done
by each *_close().

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jan 8 13:05:02 2020 UTC (9 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.37: +2 -7 lines
Diff to previous 1.37 (colored)

Remove obsoleted comment.

Revision 1.37 / (download) - annotate - [select for diffs], Wed Jan 8 08:10:15 2020 UTC (9 months, 2 weeks ago) by isaki
Branch: MAIN
CVS Tags: ad-namecache-base
Branch point for: ad-namecache
Changes since 1.36: +3 -3 lines
Diff to previous 1.36 (colored)

Move mutex_exit() correct place to protect sc_async_mixer.
Thanks maxv@!

Revision 1.28.2.5 / (download) - annotate - [select for diffs], Thu Jan 2 09:18:15 2020 UTC (9 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.4: +16 -74 lines
Diff to previous 1.28.2.4 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #593):

	sys/dev/audio/audio.c: revision 1.34
	sys/dev/audio/audio.c: revision 1.35

Use M_WAITOK instead of M_NOWAIT.
These allocations don't require NOWAIT constraints.

Will fix PR kern/54796.

 -

Improve and simplify around audio_realloc().

Revision 1.36 / (download) - annotate - [select for diffs], Fri Dec 27 09:45:26 2019 UTC (10 months ago) by msaitoh
Branch: MAIN
Changes since 1.35: +3 -3 lines
Diff to previous 1.35 (colored)

s/sucess/success/ in comment.

Revision 1.35 / (download) - annotate - [select for diffs], Thu Dec 26 11:27:03 2019 UTC (10 months ago) by isaki
Branch: MAIN
Changes since 1.34: +16 -74 lines
Diff to previous 1.34 (colored)

Improve and simplify around audio_realloc().

Revision 1.34 / (download) - annotate - [select for diffs], Thu Dec 26 11:24:55 2019 UTC (10 months ago) by isaki
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

Use M_WAITOK instead of M_NOWAIT.
These allocations don't require NOWAIT constraints.
Will fix PR kern/54796.

Revision 1.28.2.4 / (download) - annotate - [select for diffs], Tue Nov 19 12:58:29 2019 UTC (11 months, 1 week ago) by martin
Branch: netbsd-9
CVS Tags: netbsd-9-0-RC1
Changes since 1.28.2.3: +3 -3 lines
Diff to previous 1.28.2.3 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #448):

	sys/dev/audio/audio.c: revision 1.33

Fix a wrong calculation of recording ring buffer.  Reported on
http://mail-index.netbsd.org/current-users/2019/11/04/msg036976.html

Revision 1.33 / (download) - annotate - [select for diffs], Wed Nov 6 13:37:27 2019 UTC (11 months, 3 weeks ago) by isaki
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.32: +3 -3 lines
Diff to previous 1.32 (colored)

Fix a wrong calculation of recording ring buffer.  Reported on
http://mail-index.netbsd.org/current-users/2019/11/04/msg036976.html

Revision 1.32 / (download) - annotate - [select for diffs], Fri Oct 18 04:09:02 2019 UTC (12 months, 1 week ago) by msaitoh
Branch: MAIN
Changes since 1.31: +3 -3 lines
Diff to previous 1.31 (colored)

 s/initalize/initialize/ in comment or printf message.

Revision 1.28.2.3 / (download) - annotate - [select for diffs], Sun Oct 6 11:02:32 2019 UTC (12 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.2: +5 -5 lines
Diff to previous 1.28.2.2 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #286):

	sys/dev/audio/audio.c: revision 1.31

Tune some debug message level.
These messages are important for debugging hardware driver.

Revision 1.28.2.2 / (download) - annotate - [select for diffs], Sun Oct 6 11:00:15 2019 UTC (12 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28.2.1: +36 -12 lines
Diff to previous 1.28.2.1 (colored) to branchpoint 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #285):

	sys/dev/audio/audiovar.h: revision 1.5
	sys/dev/audio/audio.c: revision 1.30

Fix lock assertion on async I/O mode.
psignal() must be called without any spin locks.
Thanks maxv@!

Revision 1.28.2.1 / (download) - annotate - [select for diffs], Sun Oct 6 10:58:14 2019 UTC (12 months, 3 weeks ago) by martin
Branch: netbsd-9
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

Pull up following revision(s) (requested by isaki in ticket #284):

	sys/dev/audio/audio.c: revision 1.29

Add missing mutex, we were hitting a KASSERT.

Revision 1.31 / (download) - annotate - [select for diffs], Fri Sep 6 06:44:45 2019 UTC (13 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored)

Tune some debug message level.
These messages are important for debugging hardware driver.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Aug 29 13:01:07 2019 UTC (13 months, 4 weeks ago) by isaki
Branch: MAIN
Changes since 1.29: +36 -12 lines
Diff to previous 1.29 (colored)

Fix lock assertion on async I/O mode.
psignal() must be called without any spin locks.
Thanks maxv@!

Revision 1.29 / (download) - annotate - [select for diffs], Fri Aug 23 09:41:26 2019 UTC (14 months ago) by maxv
Branch: MAIN
Changes since 1.28: +4 -2 lines
Diff to previous 1.28 (colored)

Add missing mutex, we were hitting a KASSERT.

Revision 1.28 / (download) - annotate - [select for diffs], Wed Jul 10 13:26:47 2019 UTC (15 months, 2 weeks ago) by isaki
Branch: MAIN
CVS Tags: netbsd-9-base
Branch point for: netbsd-9
Changes since 1.27: +4 -10 lines
Diff to previous 1.27 (colored)

Use kmem_alloc/free() instead of old kern_malloc/free().

Revision 1.27 / (download) - annotate - [select for diffs], Wed Jul 10 13:17:57 2019 UTC (15 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.26: +5 -6 lines
Diff to previous 1.26 (colored)

Fix freem() argument.  The 3rd argument is bufsize, not direction...

Revision 1.26 / (download) - annotate - [select for diffs], Sun Jul 7 06:29:14 2019 UTC (15 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.25: +14 -8 lines
Diff to previous 1.25 (colored)

Avoid memory reallocation on SET_FORMAT.

Revision 1.25 / (download) - annotate - [select for diffs], Sun Jul 7 06:14:21 2019 UTC (15 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.24: +10 -9 lines
Diff to previous 1.24 (colored)

Rearrange some KASSERT and debug messages, to sync with others.

Revision 1.24 / (download) - annotate - [select for diffs], Sun Jul 7 06:06:46 2019 UTC (15 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.23: +12 -13 lines
Diff to previous 1.23 (colored)

Fix to evaluate the validity of this track at earlier on audio_read().
It fixes a panic on read() against descriptor opened as O_RDWR on the
half duplex device.

Revision 1.23 / (download) - annotate - [select for diffs], Sat Jul 6 12:58:58 2019 UTC (15 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.22: +81 -50 lines
Diff to previous 1.22 (colored)

Implement auto recovery of the mixing volume.

Revision 1.22 / (download) - annotate - [select for diffs], Wed Jun 26 07:47:25 2019 UTC (16 months ago) by isaki
Branch: MAIN
Changes since 1.21: +4 -5 lines
Diff to previous 1.21 (colored)

Improve debug message and remove duplicated one.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Jun 26 06:57:45 2019 UTC (16 months ago) by isaki
Branch: MAIN
Changes since 1.20: +38 -40 lines
Diff to previous 1.20 (colored)

Improve audiobell (and interfaces with audio).
- Generate pseudo sine wave if possible.  It may improve timbre.
  If it cannot represent a sine wave, it falls back to a triangular
  wave or a rectangular wave.
- Volume adjustment.
- Calculate playback frequency based on mixer frequency.
  Now audiobellopen() initializes playback parameters other than
  sample_rate, and new audiobellsetrate() sets sample_rate.

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 25 13:07:48 2019 UTC (16 months ago) by isaki
Branch: MAIN
Changes since 1.19: +11 -44 lines
Diff to previous 1.19 (colored)

Put the lowered mixing volume back when all playback tracks are closed.
TODO: about long life descriptor.

Revision 1.19 / (download) - annotate - [select for diffs], Sun Jun 23 01:46:56 2019 UTC (16 months ago) by isaki
Branch: MAIN
Changes since 1.18: +5 -2 lines
Diff to previous 1.18 (colored)

Restore sysctl_teardown which was unintentionally dropped.

Revision 1.18 / (download) - annotate - [select for diffs], Wed Jun 19 12:49:49 2019 UTC (16 months, 1 week ago) by isaki
Branch: MAIN
Changes since 1.17: +3 -20 lines
Diff to previous 1.17 (colored)

Don't wait until a block is filled.
This improves that short sound breaks.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Jun 12 13:53:25 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.16: +5 -2 lines
Diff to previous 1.16 (colored)

Fill silence if the last block of the first track is not filled.

Revision 1.16.2.2 / (download) - annotate - [select for diffs], Mon Jun 10 22:07:06 2019 UTC (16 months, 2 weeks ago) by christos
Branch: phil-wifi
Changes since 1.16.2.1: +8515 -0 lines
Diff to previous 1.16.2.1 (colored)

Sync with HEAD

Revision 1.16.2.1, Mon Jun 10 13:49:39 2019 UTC (16 months, 2 weeks ago) by christos
Branch: phil-wifi
Changes since 1.16: +0 -8498 lines
FILE REMOVED

file audio.c was added on branch phil-wifi on 2019-06-10 22:07:06 +0000

Revision 1.16 / (download) - annotate - [select for diffs], Mon Jun 10 13:49:39 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
Branch point for: phil-wifi
Changes since 1.15: +33 -27 lines
Diff to previous 1.15 (colored)

Use AUDIO_SCALEDOWN() macro rather than seemingly strange ifdefs.
Discussed on source-changes-d.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Jun 10 13:28:08 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.14: +6 -6 lines
Diff to previous 1.14 (colored)

Add missing newline to some error messages.

Revision 1.14 / (download) - annotate - [select for diffs], Mon Jun 10 13:12:51 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.13: +17 -40 lines
Diff to previous 1.13 (colored)

Call get_props() once at attach.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Jun 8 08:20:10 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.12: +31 -19 lines
Diff to previous 1.12 (colored)

Improve checking and displaying property.
- Full/half duplex and independentness are valid only on bidirectional
  device.
- MMAP is no longer hardware driver's property.

Revision 1.12 / (download) - annotate - [select for diffs], Sat Jun 8 08:02:37 2019 UTC (16 months, 2 weeks ago) by isaki
Branch: MAIN
Changes since 1.11: +2 -10 lines
Diff to previous 1.11 (colored)

Clean get_props().
- Make get_props() return AUDIO_PROP_{PLAYBACK,CAPTURE} properly.
  This eliminates need for audio.c to take care of such (old)
  drivers which don't return both of PLAYBACK and CAPTURE.
- All get_props() doesn't need to return AUDIO_PROP_MMAP.
  It is handled in the audio layer now.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Jun 6 13:08:30 2019 UTC (16 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.10: +2 -7 lines
Diff to previous 1.10 (colored)

Revert rev1.7.
Don't take care of incorrect drivers.  They should be fixed.
PR kern/54264.  OK'ed by nakayama@-san.

Revision 1.10 / (download) - annotate - [select for diffs], Sat May 25 02:42:03 2019 UTC (17 months ago) by isaki
Branch: MAIN
Changes since 1.9: +3 -3 lines
Diff to previous 1.9 (colored)

Fix typo in comment.

Revision 1.9 / (download) - annotate - [select for diffs], Thu May 23 12:20:27 2019 UTC (17 months ago) by isaki
Branch: MAIN
Changes since 1.8: +15 -125 lines
Diff to previous 1.8 (colored)

Remove unnecessary file lock.
It has been introduced to prevent multiple syscalls entering
simultaneously.  But it's completely unnecessary.
It fixes firefox problem in PR kern/54177.

Revision 1.8 / (download) - annotate - [select for diffs], Tue May 21 12:52:57 2019 UTC (17 months, 1 week ago) by isaki
Branch: MAIN
Changes since 1.7: +16 -16 lines
Diff to previous 1.7 (colored)

Adjust debug message.  Inspired from PR kern/54177.

Revision 1.7 / (download) - annotate - [select for diffs], Mon May 13 08:50:25 2019 UTC (17 months, 2 weeks ago) by nakayama
Branch: MAIN
Changes since 1.6: +7 -2 lines
Diff to previous 1.6 (colored)

audio_open:
On full duplex hardware, the flags passed to hw_if->open() is always
(FREAD | FWRITE).  But some devices (e.g. uaudio) check its
capabilities at open(), so unidirection devices like USB speakers
always return EACCES.

Avoid open() failure on such devices by checking the capabilities of
the device and changing the flags passed to hw_if->open().

Revision 1.6 / (download) - annotate - [select for diffs], Mon May 13 07:53:56 2019 UTC (17 months, 2 weeks ago) by nakayama
Branch: MAIN
Changes since 1.5: +4 -3 lines
Diff to previous 1.5 (colored)

sysctl "multiuser" type is CTLTYPE_BOOL, so use bool instead of int.

Revision 1.5 / (download) - annotate - [select for diffs], Mon May 13 04:11:04 2019 UTC (17 months, 2 weeks ago) by nakayama
Branch: MAIN
Changes since 1.4: +12 -6 lines
Diff to previous 1.4 (colored)

audio_hw_probe:
Return error if both play and record probes failed.

Avoid audio is disabled on devices with only play like USB speakers.

Revision 1.4 / (download) - annotate - [select for diffs], Mon May 13 04:09:35 2019 UTC (17 months, 2 weeks ago) by nakayama
Branch: MAIN
Changes since 1.3: +13 -4 lines
Diff to previous 1.3 (colored)

audioattach:
Output the cause of the audio device disabled along with the error code.

Revision 1.3 / (download) - annotate - [select for diffs], Sat May 11 03:26:43 2019 UTC (17 months, 2 weeks ago) by maya
Branch: MAIN
Changes since 1.2: +3 -3 lines
Diff to previous 1.2 (colored)

Don't use a confusing GCC extension. NFC

Revision 1.2 / (download) - annotate - [select for diffs], Wed May 8 13:40:17 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: MAIN
Changes since 1.1: +8605 -0 lines
Diff to previous 1.1 (colored)

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.1.2.9 / (download) - annotate - [select for diffs], Sun May 5 02:20:36 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.8: +40 -4 lines
Diff to previous 1.1.2.8 (colored) next main 1.2 (colored)

Revive multiuser control.

Revision 1.1.2.8 / (download) - annotate - [select for diffs], Sat May 4 07:41:50 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.7: +7 -9 lines
Diff to previous 1.1.2.7 (colored)

Improve comments.

Revision 1.1.2.7 / (download) - annotate - [select for diffs], Sat May 4 07:20:09 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.6: +4 -4 lines
Diff to previous 1.1.2.6 (colored)

Move dev/audio_if.h -> dev/audio/audio_if.h

Revision 1.1.2.6 / (download) - annotate - [select for diffs], Sat May 4 04:13:23 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.5: +2 -5 lines
Diff to previous 1.1.2.5 (colored)

Remove obsoleted methods in audio_hw_if.
- drain: is handled in audio upper layer now.
- mappage: is handled in audio upper layer now.
- setfd: no one uses and it's meaningless now.

Revision 1.1.2.5 / (download) - annotate - [select for diffs], Fri May 3 06:29:05 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.4: +3 -3 lines
Diff to previous 1.1.2.4 (colored)

Remove dev/audiovar.h.  It already have been just a link to
dev/audio/audiovar.h in this branch.

Revision 1.1.2.4 / (download) - annotate - [select for diffs], Fri May 3 05:15:33 2019 UTC (17 months, 3 weeks ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.3: +22 -207 lines
Diff to previous 1.1.2.3 (colored)

Remove query_encoding and set_params interfaces from audio_hw_if
and remove related backward compatible routines.
All drivers were converted to use new query_format/set_format.

Revision 1.1.2.3 / (download) - annotate - [select for diffs], Sat Apr 27 12:05:28 2019 UTC (18 months ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.2: +54 -2 lines
Diff to previous 1.1.2.2 (colored)

Add audio_indexof_format().  It finds index matches with specified
audio_param_t from array of audio_format_t.
Formerly, it was auconv_set_converter() that convert userland
params to the hardware native (linear) format and such conversion
is unnecessary in audio2.  But some drivers have gotten index from
this format array using auconv_set_converter().  This function is
an alternative to such usage.

Revision 1.1.2.2 / (download) - annotate - [select for diffs], Wed Apr 24 12:14:56 2019 UTC (18 months ago) by isaki
Branch: isaki-audio2
Changes since 1.1.2.1: +25 -9 lines
Diff to previous 1.1.2.1 (colored)

Accept if bufsize returned from round_buffersize() is a multiple of
blksize.

Revision 1.1.2.1 / (download) - annotate - [select for diffs], Sun Apr 21 04:28:59 2019 UTC (18 months, 1 week ago) by isaki
Branch: isaki-audio2
Changes since 1.1: +8691 -0 lines
Diff to previous 1.1 (colored)

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.1, Sun Apr 21 04:28:59 2019 UTC (18 months, 1 week ago) by isaki
Branch: MAIN
Branch point for: isaki-audio2
FILE REMOVED

file audio.c was initially added on branch isaki-audio2.

This form allows you to request diff's 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.




CVSweb <webmaster@jp.NetBSD.org>