Commit Graph

267084 Commits

Author SHA1 Message Date
isaki 143c9b6052 Add WARNS flag. (It was left at my local in previous commit..) 2019-05-08 12:48:01 +00:00
isaki abe659d37a Good bye stream_filter. 2019-05-08 11:57:52 +00:00
isaki 5edd13df26 Remove commented out old filters. 2019-05-08 11:56:09 +00:00
isaki 601792dc1b Fix paths and flags.
- aurateconv is gone.  mulaw is a part of audio inseparably.
2019-05-07 15:01:50 +00:00
isaki 9814526609 Revive clonify.
XXX should clean code more.
2019-05-06 13:40:03 +00:00
isaki a6ae682fa8 Remove encoding conversions on recording.
These are handled in the upper layer now.
2019-05-05 05:59:40 +00:00
isaki a34ae31c48 Remove sc_encodings. (I forgot it) 2019-05-05 03:11:28 +00:00
isaki fcbef9e007 Remove obsoleted au{,rate,vol}conv and mulaw attributes.
audio provides the equivalent of them inseparably.
2019-05-05 02:31:39 +00:00
isaki 4daf264c44 Revive multiuser control. 2019-05-05 02:20:36 +00:00
isaki ec7ff23009 Remove unnecessary __diagused (which was imported in this branch). 2019-05-05 02:01:34 +00:00
isaki 1609f5068c Fix typos (made in this branch). 2019-05-05 01:57:06 +00:00
isaki 16d4a1647e Correct precision.
Tested by naru@.  Thanks.
2019-05-04 12:03:03 +00:00
isaki e2ddf616fb Improve comments. 2019-05-04 07:41:50 +00:00
isaki 4eac595939 Move dev/audio_if.h -> dev/audio/audio_if.h 2019-05-04 07:20:07 +00:00
isaki c7274afbda Move dev/audio_dai.h -> dev/audio/audio_dai.h 2019-05-04 06:35:15 +00:00
isaki de545e4b95 Move dev/audiobell* -> dev/audio/audiobell*. 2019-05-04 06:13:46 +00:00
isaki 47f46f2da8 Remove simple flags that indicate whether the device is opened.
These are handled in the upper layer now.
2019-05-04 04:51:20 +00:00
isaki e7692005ee Remove sc_status flag. Such flag that indicates whether the device
is opened is handled in the upper layer now.  And it also fixes that
was not able to call commit_setting() before open() since netbsd-8.
2019-05-04 04:44:03 +00:00
isaki ce2cf6c7de 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.
2019-05-04 04:13:23 +00:00
macallan a5a4b3f1bf moar registers
( so I don't forget to commit this along with the actual newport changes... )
2019-05-04 00:40:07 +00:00
isaki 40b17eab05 Remove dev/audiovar.h. It already have been just a link to
dev/audio/audiovar.h in this branch.
2019-05-03 06:29:05 +00:00
isaki 407dd09c73 Remove unnecessary header file. 2019-05-03 06:19:42 +00:00
isaki f30023ed72 Remove dev/auconv.[ch].
Now it is handled in dev/audio/audio.c and dev/audio/linear.c.
Remove dev/mulaw.h.
 It already have been just a link to dev/audio/mulaw.h in this
 branch.
2019-05-03 05:43:46 +00:00
isaki 743ca23421 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.
2019-05-03 05:15:33 +00:00
isaki 29fd46914d Adapt to audio2.
- audio2 limits the lowest frequency.
- Remove unused sc_encodings.
- In audio2, round_buffersize(RECORD) will not be called if the
  driver does not support recording.
2019-05-03 04:15:23 +00:00
isaki c19419052c Adapt sbdsp to audio2.
- Use new query_format/set_format interfaces.
  The formats are created from sb[pr]modes tables.
- Drop INDEPENDENT property for models proir to SB_16.
2019-05-03 03:00:33 +00:00
isaki 3de17700af set_params -> set_format in comment. 2019-05-01 13:45:52 +00:00
isaki efcb657e90 Don't release sc_lock and sc_intr_lock in trigger_{input,output}.
In the past, sc_lock was IPL_SCHED and (probably) it had conflicted
with usb subroutines.  But at some point, sc_lock has changed to use
IPL_SOFTUSB so such problems should been gone.
2019-05-01 13:09:33 +00:00
isaki a136733325 Adapt to audio2.
- Remove obsoleted or empty methods.
- Remove AUFMT_VALIDATE()/INVALIDATE().  At first, this flag is
  set/cleared but no one in the driver seems to refer at least now.
  And second, don't use such flag for other purpose.  If you need
  to do such thing, use .driver_data instead.
2019-05-01 12:42:14 +00:00
isaki fc6731edf6 Adapt dbri to audio2.
- Add some mutex_enter/exit.
- Remove DBRI_BIG_BUFFER option.  Such big buffer will not necessary
  in audio2.
Thank you, macallan@.
2019-05-01 12:18:59 +00:00
isaki 7fe7bb1332 Use __nothing macro. 2019-05-01 09:41:50 +00:00
isaki 790bf62cbb Reimplement emuxki driver.
- Use single voice per playback and per recording.
- Use fixed format, 2ch/48kHz, to simplify.
- Fix several problems in previous driver.
  And now it works even on alpha!
The driver is written by Y.Sugahara.  Thanks!
2019-05-01 06:34:46 +00:00
isaki dfb8ff21e8 Adapt to audio2.
- XXX New set_format is not implemented at this point.
  This implementation can not adapt to audio2 (and it also has not
  worked since netbsd-8).
  The driver supports multiple hardware stream which is named 'voice'.
  This voice was allocated at open() and was deallocated at close().
  However, in order to support mixing, some interfaces such as
  set_params() (or set_format in audio2) has to be called before open().
2019-05-01 06:03:14 +00:00
isaki de23211d99 More adapt to audio2.
- Use set_format.
- Remove an empty method.
- XXX DAC1 and secondary audio device support should be removed.
  Now mixing two (or more) sources is done by audio layer.
2019-04-30 06:05:02 +00:00
isaki f97b65217e Adapt to audio2. 2019-04-29 09:32:07 +00:00
isaki 93d792beb2 Adapt to audio2.
- Drop INDEPENDENT property.  Both play and rec seems to share the
  sample rate (however, they require different calculations?).
- XXX It's better to modify frequency list more strictly.
- Remove obsoleted and empty methods.
2019-04-29 09:30:18 +00:00
isaki b3c09b3fa6 Adapt to audio2.
- XXX In audio2, number of blocks must be 3 or greater, so
  modify round_blocksize() to return bufsize / 4.
- XXX Doesn't neo_trigger_input() need to subtract ssz from
  buffer end like trigger_output()?
2019-04-28 07:48:15 +00:00
isaki 1415e0d339 Adapt to audio2. 2019-04-28 07:01:45 +00:00
isaki 7e0c089a46 Adapt to audio2.
- Searching nearest frequency is unnecessary in audio2.
2019-04-28 06:36:50 +00:00
isaki a63d6c228b Don't release sc_lock on eso_halt_{input,output}.
halt_* is called with sc_lock && sc_intr_lock held.  This lock order
is first sc_lock and then sc_intr_lock.  So unlocking sc_lock with
sc_intr_lock held is wrong operation.  And cv_wait(sc_intr_lock) will
work even with sc_lock held.
2019-04-28 05:07:00 +00:00
isaki 572b6477c0 Adapt to audio2.
- Select a few typical frequencies which doesn't have rounding error
  instead of whole range.
2019-04-28 04:45:34 +00:00
isaki d2250ce84c Adapt to audio2.
- Recording seems a bit tricky so I left it untouched.
  (It should work on audio2 as well if it works on -current/-8.)
2019-04-28 03:33:26 +00:00
isaki 48922dff00 Adapt to audio2.
- Fix wrong round_blocksize() calculation. ~0x20 -> -0x20.
2019-04-28 03:00:21 +00:00
isaki 1ce6377c76 Adapt to audio2. 2019-04-28 02:15:32 +00:00
isaki 4a126a35a9 Correct debug message in previous commit. 2019-04-28 02:07:42 +00:00
isaki c38095c363 Adapt to audio2.
- auvia_set_params_sub is also renamed because caller auvia_set_params
  is renamed to auvia_set_format.
2019-04-27 13:52:55 +00:00
isaki cee2bd7e7c More adapt to audio2.
- Shrink autri_formats[].  HW actually supports frequencies other
  than 48kHz but they may include (ignorable) rounding error in
  thier calculation.  So accept only 48kHz.  It's enough.
- Remove obsoleted and empty methods.
2019-04-27 13:44:32 +00:00
isaki 7062b8ad08 Adapt to audio2.
Tested on sparc64 by macallan@.  Thank you.
2019-04-27 13:25:33 +00:00
isaki 22a95675bf Adapt to audio2.
- Move auixp_formats' definition from header to source.
- Make compilable even with DEBUG_AUIXP.
2019-04-27 13:10:03 +00:00
isaki d2a5d3c31c Adapt to audio2. 2019-04-27 12:57:54 +00:00