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.
- 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.
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.
- 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.
- 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!
- 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().
- 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.
- 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.
- 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()?
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.
- 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.
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.
- XXX Name conflicts. audio2 replaces set_params with set_format
and audio_dai already have had its own set_format.
I named newly introduced one audio_dai_mi_set_format for now.
- The sample rate seems to be determined by peripherals so
move uda1341_formats[] structure from ic/uda1341.c to audio_mini2440.c.
- XXX Resetting the device in open() (and close()) might be harmful
but I don't know details about what does this reset do.