Link [ NetBSD | NetBSD OpenGrok source search | PR fulltext-search | Summary of daily snapshot builds | history of daily build result | pkgsrc commit viewer ]


   
        usage: [branch:branch] [user:user] [path@revision] keyword [... [-excludekeyword [...]]] (e.g. branch:MAIN sys/arch/arm, if_wm.c@1.234 )




switch to index mode

recent branches: MAIN (4h)  netbsd-8 (5d)  netbsd-10 (5d)  netbsd-9 (11d)  thorpej-ifq (175d)  thorpej-altq-separation (178d) 

2024-05-10 02:50:15 UTC Now

2024-04-20 05:38:40 UTC MAIN commitmail json YAML

Fix typo in comment.

(isaki)

2024-03-21 12:33:21 UTC MAIN commitmail json YAML

Ensure that the number of bus_dma segments doesn't exceed VirtIO queue size.
This fixes reproducible panics when the host's VirtIO queue size is too small,
less than or equal to VIRTIO_NET_TX_MAXNSEGS(=16).
PR kern/58049.

(isaki)

2024-03-09 11:55:59 UTC MAIN commitmail json YAML

Fix a null dereference (on attach failure).
During cleanup, setup_queue may be called even before vsc->sc_vqs is assigned.

(isaki)

2024-03-09 11:16:31 UTC MAIN commitmail json YAML

Fix a null dereference.
free_interrupts may be called even when sc_ih has not been assigned yet.

(isaki)

2024-03-09 11:04:22 UTC MAIN commitmail json YAML

Modify a confused expression in ld_virtio_attach().
VIRTIO_BLK_MIN_SEGMENTS should be the total number of non-data segments,
so I rename it to VIRTIO_BLK_CTRL_SEGMENTS.
PR kern/57981.

(isaki)

2024-03-05 11:19:30 UTC MAIN commitmail json YAML

Fix two problems that the time runs late on virt68k.
- The time between the time the alarm occurred and the time read by
  TIME_* register in the next interrupt handler was not accumulated.
- With the one-shot timer method, once the host time prolongs, the
  guest time will never be able to catch up with the host time again.
New one does:
- The driver maintains its (guest's) time (as sc_alarm_time) and always
  set the next alarm sc_interval_ns after the previous alarm.
- gfrtc_set_alarm() takes an absolute time instead of a relative time
  as the argument.
PR kern/57980.  Confirmed on QEMU.

(isaki)

2024-02-12 02:28:28 UTC MAIN commitmail json YAML

Fix typo in error message.

(isaki)

2024-02-10 02:25:15 UTC MAIN commitmail json YAML

Split KASSERT(A && B) into KASSERT(A); KASSERT(B).

(isaki)

2024-01-18 12:07:51 UTC MAIN commitmail json YAML

Set TT0 register to recognize the I/O space even on the 68030 case.

http://mail-index.netbsd.org/port-m68k/2024/01/17/msg000870.html

(isaki)

2024-01-07 07:58:35 UTC MAIN commitmail json YAML

2024-01-06 05:31:20 UTC MAIN commitmail json YAML

x68k: Make _delay() argument to microseconds.
'<< 8' is just a magnification factor and should not be visible
from the outside.

(isaki)

2024-01-06 05:24:34 UTC MAIN commitmail json YAML

Remove a duplicated extern declaration.

(isaki)

2024-01-06 05:16:57 UTC MAIN commitmail json YAML

2023-12-31 03:19:22 UTC MAIN commitmail json YAML

ne(4): Write CR0 properly.
Writing 0b000 to RD2-0 in CR0 appears harmless, but it is "not allowed"
by the RTL8019AS (and several NE2000 derived) datasheets.

(isaki)

2023-11-19 03:58:15 UTC MAIN commitmail json YAML

m68k: Remove an unused variable since rev 1.1.
Detected by clang15 (nono emulator has imported and used this FPE).

(isaki)

2023-04-29 03:36:55 UTC MAIN commitmail json YAML

White space fix.

(isaki)

2023-04-29 03:17:30 UTC MAIN commitmail json YAML

m68k: Support TT(Transparent Translation) for 020/030 buserror handler.
This avoids a panic when trying badaddr() against to an address where
bus error occurs in the TT region.  Only luna68k and news68k use TT.
Discussed on port-m68k.

(isaki)

2023-01-11 09:35:06 UTC MAIN commitmail json YAML

Add udivdi3/umoddi3 (and ashldi3) that were required by recent UFS change.
This increases xxboot_ufs from about 4.5KB to 5.5KB (The upper limit is 8KB).
Thanks tsutsui@ for advices.

(isaki)

2022-09-25 11:28:40 UTC MAIN commitmail json YAML

lunafb: Improve drawing performance using VRAM ROP features.
- Drawing a character on 4bpp normally needs 4 times writes, but by using
  VRAM ROP actively, it can be reduced to write only once.
  The same goes for copyrows.  If the whole row consists of only two colors
  (one foreground and one background), it can be copied by reading once and
  writing once, regardless of the number of planes.  Only if the row consists
  of more than two colors, it will be copied plane by plane.
- On 8bpp board, it acts as 4bpp (16 colors).
- On 4bpp board on the real LUNA-I(68030/20MHz), monochrome scroll is about
  4 times faster even without asm.  Using asm improves it by additional 5%
  (asm is enabled by default).
- By tsutsui@-san's report, even color scroll is about about 2 times faster
  on his 8bpp board on the real LUNA-II(68040).
This was first developped by Y.Sugahara back in late 2019, and was modified
a lot by me in 2022.
http://mail-index.netbsd.org/port-luna68k/2022/09/23/msg000072.html

(isaki)

2022-09-25 11:22:36 UTC MAIN commitmail json YAML

Cosmetic changes.  Fix a typo in comment.

(isaki)

2022-08-13 07:22:41 UTC MAIN commitmail json YAML

audiotest: Add two tests for AUDIO_SETINFO after mmap.
These tests affect only standalone test, not atf.

(isaki)

2022-08-13 07:19:16 UTC MAIN commitmail json YAML

audiotest: Fix typo in comments.

(isaki)

2022-08-13 07:14:40 UTC MAIN commitmail json YAML

audiotest: Separate mmap_len test by parameters.
This change affects only standalone test, not atf.

(isaki)

2022-08-13 06:47:41 UTC MAIN commitmail json YAML

audio: Rework about usrbuf allocation.
- Allocate the usrbuf from kmem(9) instead of uvm(9).  The usrbuf has used
  uvm(9), in case mmap(2) might be issued later.  However, despite the most
  apps don't use mmap(2), allocating (and reallocating) uvm(9) every time
  would be expensive.  In addition, uvm(9) for recording usrbuf was totally
  pointless now.
- For playback, the usrbuf memory will be allocated in pages.  Because the
  usrbuf for playback is mostly near 64KB for backward compatibility.
  This will reduce reallocation especially from the initial ulaw to the most
  commonly used format like slinear16/2ch/48kHz.
- When mmap(2) is called, it will replace the playback usrbuf from kmem(9) to
  uvm(9).
- Prohibit changing playback format once mmap(2) is called.
  It follows netbsd-7.
- For recording, the usrbuf memory will be allocated in the requested size
  every time as before.  Because the usrbuf for recording is only one block
  and is enough small to the page in the most case.
Inspired by PR kern/56947.

(isaki)

2022-07-16 04:55:35 UTC MAIN commitmail json YAML

The system should halt if the powerdown fails.
On X680x0 hardware, front power button is an alternate switch.
If the power button is left on, the power will not turn off.
In addition, with this change, power_switch_is_off in powsw.c is
no longer necessary.

(isaki)

2022-07-16 04:49:07 UTC MAIN commitmail json YAML

2022-06-25 08:19:01 UTC MAIN commitmail json YAML

Fix build without EXTENDED_MEMORY.

(isaki)

2022-06-23 12:32:22 UTC MAIN commitmail json YAML

x68k/stand: Merge {sd,cd}strategy and {sd,cd}close respectively.
For sd and cd devs, only open differs and the rest is the same.
No functional changes intended.
Suggested by tsutsui@ at port-x68k.

(isaki)

2022-06-21 12:45:46 UTC MAIN commitmail json YAML

x68k/stand: Bump boot's version.  Fix blocksize parameter passes to SCSI IOCS.

(isaki)

2022-06-21 12:43:57 UTC MAIN commitmail json YAML

x68k/stand: Correct blocksize in case of CD.
- Fix calculation of the blocksize passes to SCSI IOCS.
- Use three kind of sector size (blocksize) properly; media's sector size,
  DEV_BSIZE from xxstrategy, and Human68k's sector size.
By this change,
- For 512 bytes/sector HDD, no changes are intended.
- For CD, corrects the blocksize (%d5) passes to SCSI IOCS.
  It has worked previously though the blocksize was incorrect.  Now it
  works with correct blocksize.
- As a secondary effect, 256 or 1024 bytes/sector media may work but not
  well tested.
Reviewed by tsutsui@ at port-x68k.

(isaki)

2022-06-21 12:20:43 UTC MAIN commitmail json YAML

x68k/stand: Correct a condition expression.
- start is LBA but dblk is relative from this partition.
- The first term was wrong.  It should be '(x & 0x1fffff) == x', but
  it's more simple to use numerical comparison.
There would have been no impact.

(isaki)

2022-04-23 11:44:01 UTC MAIN commitmail json YAML

audio(4): Fix a typo in comment.  Remove several old comments.

(isaki)

2022-04-23 11:30:57 UTC MAIN commitmail json YAML

audio(4): Clean up about audio_realloc().
- audio_realloc() never returns NULL, so there is no need to check it.
- audio_free() is no point in this case.

(isaki)

2022-04-23 07:55:07 UTC MAIN commitmail json YAML

audio(4): Remove no longer used counters.
These were used at very early phase of development.

(isaki)

2022-04-23 07:47:42 UTC MAIN commitmail json YAML

tests: Add tests for AUDIO_GET[IO]OFFS ioctls.
- AUDIO_GETIOFFS_one_{RDONLY,RDWR,WRONLY}
- AUDIO_GETOOFFS_one_{RDONLY,RDWR,WRONLY}
- AUDIO_GETOOFFS_wrap_{RDONLY,RDWR,WRONLY}
- AUDIO_GETOOFFS_flush_{RDONLY,RDWR,WRONLY}
- AUDIO_GETOOFFS_set_{RDONLY,RDWR,WRONLY}

(isaki)

2022-04-23 07:43:16 UTC MAIN commitmail json YAML

audio(4): Restore(implement) AUDIO_GETIOFFS ioctl.

(isaki)

2022-04-23 06:17:59 UTC MAIN commitmail json YAML

audio(4): Fix an (unintended) minor behavior on AUDIO_FLUSH.
On NetBSD7, when AUDIO_FLUSH was issued, .offset of AUDIO_GETOOFFS was
reinitialized (to one block ahead from zero) or unchanged depend on
whether the user encoding is hardware native or not (probably).
I don't believe that it's intended or we need to maintain it.
Now, AUDIO_FLUSH always clears the offset to zero.

(isaki)

2022-04-20 07:11:14 UTC MAIN commitmail json YAML

audio(4): Rework AUDIO_GETOOFFS.
- Count .samples/.deltablks in blocks.  It makes .deltablks integer wrap
  around safe.
- Remove suspicious one block offset from .offset.  I added the offset
  because it was observed so on NetBSD7.  But according to manpage, it
  should not be.  And it looks fine without the offset.
- Related to that, remove a comment in AUDIO_WSEEK.
  Limit the user-visible buffer to usrbuf only.

(isaki)

2022-04-20 06:05:22 UTC MAIN commitmail json YAML

audio(4): Make recording buffer more robust.
Previously, main buffer in recording track was usrbuf, which is the closest
buffer to the userland.  Because, this buffer arrangement was symmetrical
with the playback track, and had affinity with the past implementation.
However, in the current implementation, read(2) (from user application)
takes recorded block out from inputbuf, which is the closest buffer to
rmixer, to usrbuf.  So it was not good way to use the usrbuf as main buffer.
Now, usrbuf in recording track holds only fragment bytes in order to
transfer to the userland, and main buffer in recording track is the inputbuf,
the closest to rmixer.

Buffer size of the inputbuf is also modified.  Previously, it was less than
64KB or at least 4 blocks.  This had affinity with playback track and the
past implementation.  But this was not appropriate for both formats with
too large frames or too small frames.  In large frames (for example,
192kHz/12ch), 184KB buffer would be allocated but it corresponds to only
40msec.  In opposite, in small frames (for example, 8000Hz/1ch), 64KB
buffer would be allocated and it corresponds to 4.1 seconds.  But for such
machines that have 8000Hz/1ch device, in-kernel 64KB memory would probably
be expensive.
Now, inputbuf will always be allocated 16(NBLKIN) blocks, regardless of its
hardware format.  It corresponds to 160msec on modern archs (if blk_ms=10),
or 640msec on antique archs (if blk_ms=40).

(isaki)

2022-04-20 04:41:29 UTC MAIN commitmail json YAML

audio(4): Make debug messages better in audio_ioctl() and mixier_ioctl().
Divide by case.  Reduce to one line if possible.

(isaki)

2022-03-26 06:49:27 UTC MAIN commitmail json YAML

Add terminology comments.

(isaki)

2022-03-26 06:43:36 UTC MAIN commitmail json YAML

2022-03-26 06:41:12 UTC MAIN commitmail json YAML

Remove a dead code in audio_track_record().

(isaki)

2022-03-26 06:36:06 UTC MAIN commitmail json YAML

Clarify the assertion in audio_rmixer_process().
By previous commit (r1.116), the assersion no longer fires even without
this modification.  But the condition was a bit inaccurate.
There is no need to check the data length must be aligned to blocks here
(though it also should be aligned now).  What we should check here is that
the tail must be aligned.

(isaki)

2022-03-26 06:27:32 UTC MAIN commitmail json YAML

Fix conditions that audio_read() calls audio_track_record().
audio_track_record() must be called when usrbuf has at least one free block.

I hope that this will fix the panic reported in PR kern/56644.
When an user process specifies the hardware format as its recording format
(i.e., there is no track conversions), if the user process read(2) a small
amount of data and the rmixer_process then runs, depending on the conditions,
the panic may happen.  I have never reproduced it because it's difficult to
do intentionally.

Thanks Y.Sugahara and riastradh@ for help and comments.

(isaki)

2022-02-04 06:16:03 UTC MAIN commitmail json YAML

Add missing -m68020-60 option.  This makes xxboot_ustarfs work even on 68060.
Problem reported by Makoto Kamada.  Confirmed on XEiJ (68060 mode).

(isaki)

2021-08-07 03:28:42 UTC MAIN commitmail json YAML

x68k now uses KAUTH_MACHDEP_UNMANAGEDMEM.

(isaki)

2021-08-06 04:21:56 UTC MAIN commitmail json YAML

Fix broken mm_md_physacc().
- Fix access to main memory and extended memory.
  This makes /dev/mem work again.
- Introduce kauth(9) to access unmanaged memory area.
  Now you can read/write the internal I/O space via /dev/mem when
  securelevel = -1.
Thanks ryo@, tsutsui@ for advices and reviews.

(isaki)

2021-07-21 06:18:32 UTC MAIN commitmail json YAML

Add AUDIO_SETINFO_gain_balance test.
The test checks whether AUDIO_SETINFO can change the gain and the balance
at the same time (if MD driver has the capability).  See PR kern/56308.

(isaki)

2021-07-21 06:14:58 UTC MAIN commitmail json YAML

AUDIO_SETINFO: fix a bug that the gain and the balance could not be set
at the same time.  Fix PR kern/56308.

(isaki)

2021-04-10 04:10:21 UTC MAIN commitmail json YAML

Fix a wrong description in previous.
MD drivers can support 20 or 24 bits formats even under current MI layer's
constraints.
http://mail-index.netbsd.org/source-changes-d/2021/03/12/msg013255.html

(isaki)

2021-04-03 04:10:30 UTC MAIN commitmail json YAML

Rework about the rest note in speaker(4).
- Obsolete the sc_rest callback.  The rest note operation can be done by
  the common spkr layer.  This also fixes PR kern/56060.
  This work-in-progress patch was left in my local tree for years. :(
- Improve calculations of tone and rest length.

(isaki)

2021-04-03 03:21:53 UTC MAIN commitmail json YAML

Improve SPKRDEBUG code.
- Replace wrong aprint_debug_dev() with device_printf().
  By this, it no longer need to print dev_t.
- Improve some messages.

(isaki)

2021-03-28 07:42:06 UTC MAIN commitmail json YAML

Update documents.
- query_format has been mandatory (since at least Feb 2020).
- set_params has been replaced to set_format (since May 2019).

(isaki)

2021-03-20 04:56:52 UTC MAIN commitmail json YAML

Fix and improve the buffer length calculation to avoid zero length
even if blk_ms is small.
This fixes PR kern/56059.

(isaki)

2021-03-08 14:37:55 UTC MAIN commitmail json YAML

Remove incorrect byte and word conversions from fpu_explode.
The correct operation here is arithmetic right shift, but nobody calls it.

(isaki)

2021-02-17 12:37:33 UTC MAIN commitmail json YAML

Attach this only if the parent device has playback capability.

(isaki)

2021-02-15 13:39:18 UTC MAIN commitmail json YAML

Fix my copy-and-paste bug in rev1.160.
This fixes recording sample dropout.

(isaki)

2021-02-14 03:41:13 UTC MAIN commitmail json YAML

Add missing curlwp_bindx() corresponding to curlwp_bind().
Pointed out by riastradh@.

(isaki)

2021-02-09 12:39:28 UTC MAIN commitmail json YAML

Update function name in a comment.

(isaki)

2021-02-09 12:36:34 UTC MAIN commitmail json YAML

Protect also audioopen() and audiobellopen() from audiodetach() with
psref(9), as well as others(audioread, audiowrite, etc..).
- Rename audio_file_enter to audio_sc_acquire_fromfile, audio_file_exit
  to audio_sc_release, for clarify.  These are the reference counter for
  this sc.
- Introduce audio_sc_acquire_foropen for audio{,bell}open.
- audio_open needs to examine sc_dying again before inserting it into
  sc_files, in order to keep sc_files consistency.
The race between audiodetach and audioopen is pointed out by riastradh@.
Thank you for many advices.

(isaki)

2021-02-09 05:53:14 UTC MAIN commitmail json YAML

Change the lock conditions to call audio_unlink().
This can remove a different copy of audio_exlock_enter() in audio_unlink()
and can use normal one.  Also, in audiodetach(), this can set the exlock
at more natual order (before calling audio_unlink()).
No noticeable functional changes are intended.
Thanks for comments, riastradh@.

(isaki)

2021-02-06 13:02:28 UTC MAIN commitmail json YAML

Remove an extra mutex_spin_exit() in error path.
This is a part of rev 1.38.

(isaki)

2021-02-06 12:59:13 UTC MAIN commitmail json YAML

Remove an extra mutex_spin_exit() in yds_resume().
This one has been moved to before yds_init() in rev 1.59.

(isaki)

2021-02-06 12:55:34 UTC MAIN commitmail json YAML

Add a missing mutex_spin_exit().

(isaki)

2021-02-06 12:53:37 UTC MAIN commitmail json YAML

Fix "locking against myself".
halt_{input,output} will be called with sc_intr_lock held.

(isaki)

2021-02-06 12:50:04 UTC MAIN commitmail json YAML

2021-02-06 09:45:17 UTC MAIN commitmail json YAML

Hold sc_intr_lock in open()/close().
vtbl->{lock,unlock} (in fact ac97_{lock,unlock}) don't seem to need
releasing an interrupt lock.
Confirmed on auich.

(isaki)

2021-02-06 09:27:35 UTC MAIN commitmail json YAML

Remove sc_active flag.  sc_[pr]intr can be used instead of it.

(isaki)

2021-02-06 09:15:11 UTC MAIN commitmail json YAML

Remove something like counters.
- Counting {open,close} is done by the MI audio layer.
- trigger_* is not called again between trigger_* and halt_*.

(isaki)

2021-02-06 09:14:03 UTC MAIN commitmail json YAML

Remove sc_open flag.
Counting {open,close} is done by the MI audio layer.

(isaki)

2021-02-06 07:20:36 UTC MAIN commitmail json YAML

Calling halt_{input,output} is done by the MI audio layer if necessary.

(isaki)

2021-02-06 07:16:54 UTC MAIN commitmail json YAML

Calling halt_{input,output} is done by the MI audio layer if necessary.

(isaki)

2021-02-06 07:16:18 UTC MAIN commitmail json YAML

Calling halt_{input,output} is done by the MI audio layer if necessary.

(isaki)

2021-02-06 06:15:13 UTC MAIN commitmail json YAML

Add a description to close().
> Before call to this, halt_input and halt_output are called if necessary.

(isaki)

2021-02-06 05:15:03 UTC MAIN commitmail json YAML

Remove debug messages which are no longer necessary.

(isaki)

2021-02-04 15:08:45 UTC MAIN commitmail json YAML

Simplify harmony_speed_bits().
It no longer needs to write back the speed value.

(isaki)

2021-02-04 15:06:11 UTC MAIN commitmail json YAML

Fix my mistakes in rev1.6.
- I had to merge the channel bit and the speed bits.
  Reported by macallan@.
- I also fix my indent, while I'm here.

(isaki)

2021-02-03 15:13:49 UTC MAIN commitmail json YAML

Fix locking against myself.
trigger_output will be called with sc_intr_lock held.
>From source code review, not tested.

(isaki)

2021-02-03 14:44:32 UTC MAIN commitmail json YAML

Remove code no longer used.
The code that used sc->{halt_input,halt_output} function pointer
was removed in 2004. (see cs428x.c rev 1.7)

(isaki)

2021-02-03 14:22:21 UTC MAIN commitmail json YAML

Remove a comment no longer correct.
Because halt_output is no longer called from an interrupt context,
but that does not mean it's better to put this back to halt_output.

(isaki)

2021-01-15 05:34:49 UTC MAIN commitmail json YAML

Improve error messages.
- prefix MD device name if it's considered to be related to the MD driver.
- revise some messages.

(isaki)

2021-01-15 04:09:28 UTC MAIN commitmail json YAML

Change (harmless) zero-length debug messages.
sys/modules is compiled with -Wzero-length-format and this
makes sys/modules compilable even if AUDIO_DEBUG is defined.

(isaki)

2020-12-13 05:47:09 UTC MAIN commitmail json YAML

Revise comments.

(isaki)

2020-12-13 05:44:09 UTC MAIN commitmail json YAML

Fix a return value of audiopoll().
fo_poll is expected to return revents rather than errno on error.

(isaki)

2020-12-13 05:29:20 UTC MAIN commitmail json YAML

Avoid a dead lock in audiodetach, since rev 1.63.
audio_unlink() must be called without exlock held (and
audio_mixer_destroy() must be called with exlock held).
This makes unplugging during playing/recording work (again).
Reported by Julian Coleman on current-users:
http://mail-index.netbsd.org/current-users/2020/12/10/msg040050.html

(isaki)

2020-12-13 05:21:12 UTC MAIN commitmail json YAML

Add missing newline.

(isaki)

2020-12-09 05:48:56 UTC MAIN commitmail json YAML

Remove an old description.
This behavior was modified in sys/dev/audio/audio.c rev 1.65 (Mar. 2020).

(isaki)

2020-12-09 04:30:39 UTC MAIN commitmail json YAML

Rewrite error handling on audio_open().
This also fixes a few resource leaks on error case.

(isaki)

2020-12-09 04:24:08 UTC MAIN commitmail json YAML

Fix that audio_open() didn't halt the recording mixer correctly
if fd_allocfile() failed, since rev 1.65.
Will fix PR kern/55848.

(isaki)

2020-09-13 04:14:49 UTC MAIN commitmail json YAML

Support audio descriptor for fstat(1).
sys/dev/audio/*.h: export only what we need for fstat.

(isaki)

2020-09-12 06:09:17 UTC MAIN commitmail json YAML

Improve slinear16-to-mulaw conversion calculation.
It's about 2~3 times faster on my amd64 and x68k(68030).

(isaki)

2020-09-12 05:19:16 UTC MAIN commitmail json YAML

Improve am7930 family drivers to share more code.
audioamd(4) on sparc, vsaudio(4) on vax, and bba(4) are.
- Remove complex and useless callbacks: onopen, onclose, and
  indirect_{read,write}.  This makes audioamd and vsaudio almost the same.
- Remove (already disabled) assembly fast interrupt path from audioamd(4).
  cf. http://mail-index.netbsd.org/source-changes/2009/12/19/msg004585.html
- Use trigger_* method rather than start_* method.  It's more suitable.
vsaudio(4) was tested by naru@, bba(4) was tested by tsutsui@.

(isaki)

2020-09-07 03:36:11 UTC MAIN commitmail json YAML

Fix misspellings in comment.

(isaki)

2020-08-29 03:24:31 UTC MAIN commitmail json YAML

Fix white space and indent.

(isaki)

2020-08-26 12:59:28 UTC MAIN commitmail json YAML

Fix misuse of device_private().  sc_dev is device_t.

(isaki)

2020-08-23 04:20:01 UTC MAIN commitmail json YAML

Improve debug messages.

(isaki)

2020-08-23 04:14:57 UTC MAIN commitmail json YAML

Improve and update comments.

(isaki)

2020-08-23 04:07:23 UTC MAIN commitmail json YAML

2020-08-22 10:12:29 UTC MAIN commitmail json YAML

Minor improvement.
add/addx is faster and the size remains the same.

(isaki)

2020-08-22 10:05:04 UTC MAIN commitmail json YAML

2020-08-22 05:09:02 UTC MAIN commitmail json YAML

Fix register order.  %d0 is higher and %d1 is lower.
This would have rarely affected.

(isaki)

2020-08-16 07:25:51 UTC MAIN commitmail json YAML

Update and fix.
All primary bootloaders can recognize Human68k partition table.

(isaki)

2020-08-16 07:03:45 UTC MAIN commitmail json YAML

2020-08-16 06:43:44 UTC MAIN commitmail json YAML

Overhaul xxboot.  And merge floppy boot, taken from boot_ustar.
- Rewrite boot.S completely.
  boot.S now supports boot from SCSI HD/CD and floppy.
- Use IOCS call to identify the floppy format, instead of chkfmt.s which
  accesses hardware directly.
- Import print_hex() debug function from boot_ufs.
- Import a feature that displays initial registers (for debug) from boot_ufs,
  and restore it (this in boot_ufs has been broken).
- Add size optimized alternatives for some libkern routines.
- Stop linking libsa to prevent to link unexpected objects.
- Bump version to 2.0.

(isaki)

2020-08-14 03:54:46 UTC MAIN commitmail json YAML

Reduce binary size as possible.  These reduce filesize about 20 words.
- Use word alignment (rather than longword alignment) for text/data section.
- Use short reference.  In the bootloader, all symbols can be expressed in
  short.

(isaki)

2020-08-14 03:43:28 UTC MAIN commitmail json YAML

2020-08-14 03:40:48 UTC MAIN commitmail json YAML

2020-08-14 03:34:22 UTC MAIN commitmail json YAML

2020-08-14 03:29:23 UTC MAIN commitmail json YAML

2020-08-14 03:25:39 UTC MAIN commitmail json YAML

- Restore display of first_kbyte.  This is helpful for development.
- Check the filesize of resulting file instead of section sizes.
  If there is a gap between sections, the filesize may be exceeded even
  though the section total is not exceeded.  Of course that doesn't
  usually happen but I've experienced this during development.

(isaki)

2020-08-14 02:51:48 UTC MAIN commitmail json YAML

Make compilable even with XXBOOT_DEBUG.

(isaki)

2020-07-03 12:39:54 UTC MAIN commitmail json YAML

Fix an argument passes to auixp_intr().
This is rest of rev 1.39 (split device_t/softc) in 2012.
Problem reported and tested by Riccardo Mottola.

(isaki)

2020-05-29 03:09:14 UTC MAIN commitmail json YAML

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.

(isaki)

2020-05-01 08:21:27 UTC MAIN commitmail json YAML

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

(isaki)

2020-05-01 05:45:57 UTC MAIN commitmail json YAML

Fix two tests.
- kqueue_mode_{RDONLY,RDWR}_READ: Fix expected value.
  This is rest of rev1.9.
- AUDIO_SETINFO_params_simul: Fix condition.
  This happens on full-duplex, not bi-directional.
These affect only standalone test, not atf.

(isaki)

2020-04-29 03:58:27 UTC MAIN commitmail json YAML

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@.

(isaki)

2020-04-19 08:18:19 UTC MAIN commitmail json YAML

2020-04-19 04:13:10 UTC MAIN commitmail json YAML

Make round_blocksize satisfy all of
- restrictions that existed before merging isaki-audio2 branch.
- better support for 6 channels hardware.
- audio layer's requirement.
This may help PR kern/54474.

(isaki)

2020-04-19 03:52:22 UTC MAIN commitmail json YAML

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

(isaki)

2020-04-17 07:48:35 UTC MAIN commitmail json YAML

Improve diagnostic messages.

(isaki)

2020-03-28 08:35:37 UTC MAIN commitmail json YAML

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.

(isaki)

2020-03-28 04:55:08 UTC MAIN commitmail json YAML

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

(isaki)

2020-03-28 04:21:58 UTC MAIN commitmail json YAML

Revert 1.96, 1.97 and 1.100.  (no response from nia@)
These changes are not correct nor notable unresolvable problem.
If you find any problems, please send a report before changing manpage.

(isaki)

2020-03-26 13:43:10 UTC MAIN commitmail json YAML

Add tests for poll(POLLIN) before read().
This affects only standalone test, not atf.

(isaki)

2020-03-26 13:37:44 UTC MAIN commitmail json YAML

Sync with sys/dev/audio/audio.c rev1.65.
> Fix to start recording immediately when open() with READ mode is called.
This affects only standalone test, not atf.

(isaki)

2020-03-26 13:32:03 UTC MAIN commitmail json YAML

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).

(isaki)

2020-03-25 13:07:04 UTC MAIN commitmail json YAML

Use exact match to search testname.
This didn't affect test results.

(isaki)

2020-03-07 06:27:19 UTC MAIN commitmail json YAML

Fix/Update comments about allocm/freem.

(isaki)

2020-03-07 06:25:57 UTC MAIN commitmail json YAML

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@.

(isaki)

2020-03-04 14:20:44 UTC MAIN commitmail json YAML

Sync with sys/dev/audio/audio.c rev1.62.
> Restore backward compatibility with netbsd-7 audio.

(isaki)

2020-03-04 14:19:41 UTC MAIN commitmail json YAML

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.

(isaki)

2020-03-02 04:25:08 UTC MAIN commitmail json YAML

Re-add -lrumpdev dropped in the previous commit.

(isaki)

2020-03-01 07:42:08 UTC MAIN commitmail json YAML

Improve an error message about round_blocksize.

(isaki)

2020-03-01 07:40:04 UTC MAIN commitmail json YAML

Fix wrong parameter displayed in debug messages.

(isaki)

2020-03-01 07:35:33 UTC MAIN commitmail json YAML

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.

(isaki)

2020-02-29 09:38:10 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-29 07:13:37 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-29 06:34:30 UTC MAIN commitmail json YAML

round_blocksize must return a multiple of the framesize
even if 6 channels mode.
I believe that keeping "good alignment" is just a wish, not constraint.

(isaki)

2020-02-29 06:25:33 UTC MAIN commitmail json YAML

round_blocksize must return a multiple of the framesize.
It's not divisible when blk=GCSCAUDI_PRD_SIZE_MAX and channels=4.

(isaki)

2020-02-29 06:06:29 UTC MAIN commitmail json YAML

round_blocksize must return a multiple of the framesize
even if passed blocksize is greater than the upper limit.

(isaki)

2020-02-29 06:03:55 UTC MAIN commitmail json YAML

round_blocksize must return a multiple of the framesize.
aucc(4) supports 3 channels mode.

(isaki)

2020-02-29 05:51:11 UTC MAIN commitmail json YAML

2020-02-29 05:39:03 UTC MAIN commitmail json YAML

Describe about (existing) constraints on round_blocksize().

(isaki)

2020-02-28 13:31:03 UTC MAIN commitmail json YAML

Drop 512 bytes limit on auvia_round_blocksize().
This fixes attach on 6 channels device.
PR kern/55017.

(isaki)

2020-02-23 07:17:01 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-23 04:24:56 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-23 04:02:46 UTC MAIN commitmail json YAML

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.

(isaki)

2020-02-22 08:15:09 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 08:03:19 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 08:01:59 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 07:59:47 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 07:09:18 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 06:58:40 UTC MAIN commitmail json YAML

2020-02-22 06:36:07 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 06:28:10 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-22 06:22:46 UTC MAIN commitmail json YAML

Fix/Update comments.

(isaki)

2020-02-22 05:53:19 UTC MAIN commitmail json YAML

Update AUDIO_SETINFO_channels test.
The kernel limits the number of channels that userland apps can set to
the number of channels supported by the hardware or less.

(isaki)

2020-02-22 05:51:39 UTC MAIN commitmail json YAML

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.

(isaki)

2020-02-18 12:11:27 UTC MAIN commitmail json YAML

Add tests.
AUDIO_SETINFO_channels
AUDIO_SETINFO_sample_rate
AUDIO_SETINFO_sample_rate_0

(isaki)

2020-02-15 03:04:45 UTC MAIN commitmail json YAML

Enumerating probably always starts from sc->sc_startnode.

(isaki)

2020-02-15 02:47:00 UTC MAIN commitmail json YAML

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

(isaki)

2020-02-14 13:20:48 UTC MAIN commitmail json YAML

Improve around {audioctl_,}open_multiuser.
- Make multiuser bool and remove newval.
- try_audioctl_open_multiuser() doesn't need multiuser argument.

(isaki)

2020-02-11 07:03:16 UTC MAIN commitmail json YAML

Add ATF tests for audio(4).

    91 passed test cases
    0 failed test cases.
    0 expected failed test cases.
    62 skipped test cases.

There are many skipped tests, because the test itself supports full-
duplex, half-duplex and uni-directional devices but pad(4) used in ATF
tests is uni-directional device.

(isaki)

2020-02-01 08:08:15 UTC MAIN commitmail json YAML

Make it output 68000 binary.
CFLAGS already has -m68000 but AFLAGS didn't.

This change makes it proceed to next stage1 even if MPU is 68000.
All stage1 bootloader displays an error message if MPU is 68000.

(isaki)

2020-01-28 12:02:02 UTC MAIN commitmail json YAML

Set heap area explicitly.
Until the load address was moved, the heap was placed at _end (it's default)
and it was large space.  After moving, this default space was too small.

(isaki)

2020-01-28 11:57:22 UTC MAIN commitmail json YAML

Revert placing .bss right after .data, and make .bss fixed at 0x5000.
.bss placed right after .data was overwritten when first 1KB loads full
.text+.data.

(isaki)

2020-01-28 11:52:21 UTC MAIN commitmail json YAML

Use __bss_start rather than edata to point the beginning of .bss.
Currently the .bss is placed right after .data.  In that case, edata
points to the beginning of .bss so that there is no visible changes at
least currently.

(isaki)

2020-01-18 07:25:12 UTC MAIN commitmail json YAML

2020-01-18 07:09:32 UTC MAIN commitmail json YAML

Make .bss follows .data to detect size restriction easier.
Previously, if text+data exceeds the restricted size, it will conflict
with manually fixed .bss area and ldscript makes it an error.
By this change, ASSERT() can detect it.

(isaki)

2020-01-18 06:44:23 UTC MAIN commitmail json YAML

2020-01-18 06:34:30 UTC MAIN commitmail json YAML

Change primary bootloader's load address from 0x0f0000 to 0x003000.
- Moving addresses closer eliminates bunch of this linker errors:
    in function `entry0':
    relocation truncated to fit: R_68K_16 against `edata'+ffffffffffff8000
    :
- By this change, harmful -noinhibit-exec option can also be removed.
  Finally, we can break the builds when assemble error occurs!
- Load address of secondary is 0x6000, so that this change limits
  text+data+bss 12KB or less.  Current actual size is 5~7KB.
  I think it should be fine.
- cd9660 can have up to 30KB text+data in its bootarea.  Even in this
  case, this change limits text+data+bss 12KB or less (currently, it's
  about 6KB).  However, I take breaking the builds on errors rather than
  future size limitation.
There is no user visible changes or interface changes.

(isaki)

2020-01-18 06:03:03 UTC MAIN commitmail json YAML

2020-01-18 06:00:04 UTC MAIN commitmail json YAML

Check whether MPU >= 68020.
Because current secondary bootloader assumes that.
This will display a reasonable error message instead of "Error occurs,
please reset" (IPL message) when you try sysinst*.fs on X68000.

XXX secondary bootloader (/boot) should not assume mpu regardless of
whether primary bootloader has checked mpu. (?)

(isaki)

2020-01-18 05:56:51 UTC MAIN commitmail json YAML

2020-01-18 05:48:31 UTC MAIN commitmail json YAML

2020-01-18 05:46:26 UTC MAIN commitmail json YAML

Add 0x prefix when defining variables, not when using it.
This was necessary for bc(1) but it's no longer necessary.

(isaki)

2020-01-18 05:41:49 UTC MAIN commitmail json YAML

2020-01-18 05:07:34 UTC MAIN commitmail json YAML

Initialize the screen in all primary bootloaders.
- Some IPL (or boot selector) don't do it, but current secondary bootloader
  expects the screen to be initialized to display logo.
  To keep messages (like version signature) displayed by primary bootloader,
  this initialization should be done early in all primary bootloaders.
- For boot_ustar.S, relocates some registers to save bootinfo (%d0).
- Bumps version.

Confirmed on X68030+060turbo and my X68030.  This problem was found on
X68030+060turbo at NetBSD booth in OSC 2011 Hiroshima (8+ years ago).

(isaki)

2020-01-18 04:42:29 UTC MAIN commitmail json YAML

Add a document about this directory.
Reviewed by tsutsui@ on port-x68k.

(isaki)

2020-01-16 13:37:27 UTC MAIN commitmail json YAML

Use .org directive to fix disklabel location instead of hand calculation.
If the code size before disklabel is less, zero is filled automatically.
If the code size before disklabel is exceeded, assembler stops with error.
Note that this changes a padding word in the current output binary from
a NOP instruction to zero but there are no functional changes.

(isaki)

2020-01-16 13:15:47 UTC MAIN commitmail json YAML

Rewrite limit check using cross-build tools.
This eliminates use of hosts tr(1) and bc(1).
(But I'm going to remove this again soon due to other reason)

(isaki)

2020-01-16 12:54:16 UTC MAIN commitmail json YAML

Remove .else part of .if OBJECT_FMT == ELF.
All similar parts in other Makefiles are removed in 2010.

(isaki)

2020-01-14 04:00:41 UTC MAIN commitmail json YAML

Clean up.
- B_KEYINP is no longer called from C.
- B_COLOR is no longer used.

(isaki)

2020-01-14 03:48:10 UTC MAIN commitmail json YAML

consio_init() should be done before printf().

(isaki)

2020-01-13 03:34:05 UTC MAIN commitmail json YAML

2020-01-12 13:51:12 UTC MAIN commitmail json YAML

2020-01-11 04:53:10 UTC MAIN commitmail json YAML

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.

(isaki)

2020-01-11 04:06:13 UTC MAIN commitmail json YAML

2020-01-08 13:30:16 UTC MAIN commitmail json YAML

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().

(isaki)

2020-01-08 13:05:02 UTC MAIN commitmail json YAML

Remove obsoleted comment.

(isaki)

2020-01-08 08:10:15 UTC MAIN commitmail json YAML

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

(isaki)

2019-12-28 12:34:35 UTC MAIN commitmail json YAML

Remove a pointless MSGBUFSIZE definition.
The same operation is already done in <m68k/param.h>.
luna68k is not imported yet in 1997 but see also:
http://mail-index.netbsd.org/source-changes/1997/09/20/0021.html

(isaki)

2019-12-28 11:42:18 UTC MAIN commitmail json YAML

Bump MSGBUFSIZE (2 * NBPG).
Since timestamp was introduced, it was too small to store full dmesg
of one boot.
And putting this behind of #include <m68k/param.h> had no effect.
This was fixed on many arch in 1997 but x68k was not...
http://mail-index.netbsd.org/source-changes/1997/09/20/0021.html

(isaki)

2019-12-26 11:27:03 UTC MAIN commitmail json YAML

Improve and simplify around audio_realloc().

(isaki)

2019-12-26 11:24:55 UTC MAIN commitmail json YAML

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

(isaki)

2019-12-10 06:25:50 UTC MAIN commitmail json YAML

2019-11-28 05:07:27 UTC MAIN commitmail json YAML

2019-11-13 07:52:25 UTC MAIN commitmail json YAML

Add some audio drivers in SEE ALSO.

(isaki)

2019-11-06 13:37:28 UTC MAIN commitmail json YAML

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

(isaki)