<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/speaker, branch releng/12.4</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=releng%2F12.4'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2022-07-29T18:43:14Z</updated>
<entry>
<title>Adjust playinit() definition to avoid clang 15 warning</title>
<updated>2022-07-29T18:43:14Z</updated>
<author>
<name>Dimitry Andric</name>
<email>dim@FreeBSD.org</email>
</author>
<published>2022-07-26T11:43:46Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b925f05b128808371e2d0879c0b42e110cb066e9'/>
<id>urn:sha1:b925f05b128808371e2d0879c0b42e110cb066e9</id>
<content type='text'>
With clang 15, the following -Werror warning is produced:

    sys/dev/speaker/spkr.c:182:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    playinit()
            ^
             void

This is because playinit() is declared with a (void) argument list, but
defined with an empty argument list. Make the definition match the
declaration.

MFC after:	3 days

(cherry picked from commit 57c46916e145581807333bc06a08e9532721bd8f)
</content>
</entry>
<entry>
<title>Remove register keyword from sys/ and ANSIfy prototypes</title>
<updated>2017-05-17T00:34:34Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2017-05-17T00:34:34Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3e85b721d653d65a5b6ff655ed1551113f0e0d5b'/>
<id>urn:sha1:3e85b721d653d65a5b6ff655ed1551113f0e0d5b</id>
<content type='text'>
A long long time ago the register keyword told the compiler to store
the corresponding variable in a CPU register, but it is not relevant
for any compiler used in the FreeBSD world today.

ANSIfy related prototypes while here.

Reviewed by:	cem, jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D10193
</content>
</entry>
<entry>
<title>sys/dev: use our nitems() macro when it is avaliable through param.h.</title>
<updated>2016-04-19T23:37:24Z</updated>
<author>
<name>Pedro F. Giffuni</name>
<email>pfg@FreeBSD.org</email>
</author>
<published>2016-04-19T23:37:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=73a1170a8c41cb848f17cc0a8839e9dcee3d126e'/>
<id>urn:sha1:73a1170a8c41cb848f17cc0a8839e9dcee3d126e</id>
<content type='text'>
No functional change, only trivial cases are done in this sweep,
Drivers that can get further enhancements will be done independently.

Discussed in:	freebsd-current
</content>
</entry>
<entry>
<title>Do not define bool/true/false if the symbols already exist.</title>
<updated>2011-12-12T18:43:24Z</updated>
<author>
<name>Matthew D Fleming</name>
<email>mdf@FreeBSD.org</email>
</author>
<published>2011-12-12T18:43:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=103af58f59c0cb69f1872cbebeb4213d4020e4b9'/>
<id>urn:sha1:103af58f59c0cb69f1872cbebeb4213d4020e4b9</id>
<content type='text'>
MFC after:	2 weeks
Sponsored by:	Isilon Systems, LLC
</content>
</entry>
<entry>
<title>Change the type of uio_resid member of struct uio from int to ssize_t.</title>
<updated>2009-06-25T18:46:30Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2009-06-25T18:46:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9f80ce043db0c82b6f341ab58bb8b840c0dfd69e'/>
<id>urn:sha1:9f80ce043db0c82b6f341ab58bb8b840c0dfd69e</id>
<content type='text'>
Note that this does not actually enable full-range i/o requests for
64 architectures, and is done now to update KBI only.

Tested by:	pho
Reviewed by:	jhb, bde (as part of the review of the bigger patch)
</content>
</entry>
<entry>
<title>Remove unneeded checks of device unit number from speaker(4).</title>
<updated>2009-01-25T09:20:59Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2009-01-25T09:20:59Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8d456252aa78001624aba124b269801a30128116'/>
<id>urn:sha1:8d456252aa78001624aba124b269801a30128116</id>
<content type='text'>
Calls on the cdev can only be made on existing devices. This means we
don't have to check the value of dev2unit().
</content>
</entry>
<entry>
<title>Replace all calls to minor() with dev2unit().</title>
<updated>2008-09-27T08:51:18Z</updated>
<author>
<name>Ed Schouten</name>
<email>ed@FreeBSD.org</email>
</author>
<published>2008-09-27T08:51:18Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6bfa9a2d66dd0e00182017d6741d44e54d0b2cca'/>
<id>urn:sha1:6bfa9a2d66dd0e00182017d6741d44e54d0b2cca</id>
<content type='text'>
After I removed all the unit2minor()/minor2unit() calls from the kernel
yesterday, I realised calling minor() everywhere is quite confusing.
Character devices now only have the ability to store a unit number, not
a minor number. Remove the confusion by using dev2unit() everywhere.

This commit could also be considered as a bug fix. A lot of drivers call
minor(), while they should actually be calling dev2unit(). In -CURRENT
this isn't a problem, but it turns out we never had any problem reports
related to that issue in the past. I suspect not many people connect
more than 256 pieces of the same hardware.

Reviewed by:	kib
</content>
</entry>
<entry>
<title>Move speaker a lot closer to style(9)</title>
<updated>2008-05-15T01:22:48Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2008-05-15T01:22:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=338c585e38c1bb047f6febb2ce98c78e0cc02788'/>
<id>urn:sha1:338c585e38c1bb047f6febb2ce98c78e0cc02788</id>
<content type='text'>
Submitted by:	Martin Voros &lt;martin_voros@yahoo.com&gt;
</content>
</entry>
<entry>
<title>Make speaker a pseudo device driver instead of attaching to a PnP id.</title>
<updated>2008-03-26T21:33:41Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2008-03-26T21:33:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=93f5134aaf829826dbcbea457bfeb27389761854'/>
<id>urn:sha1:93f5134aaf829826dbcbea457bfeb27389761854</id>
<content type='text'>
If somebody cleaned this code up to proper style(9), it could become
a great educational starting point for aspiring kernel hackers.
</content>
</entry>
<entry>
<title>The "free-lance" timer in the i8254 is only used for the speaker</title>
<updated>2008-03-26T20:09:21Z</updated>
<author>
<name>Poul-Henning Kamp</name>
<email>phk@FreeBSD.org</email>
</author>
<published>2008-03-26T20:09:21Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e46598588587b4897f6604489364f83fffd4d033'/>
<id>urn:sha1:e46598588587b4897f6604489364f83fffd4d033</id>
<content type='text'>
these days, so de-generalize the acquire_timer/release_timer api
to just deal with speakers.

The new (optional) MD functions are:
	timer_spkr_acquire()
	timer_spkr_release()
and
	timer_spkr_setfreq()

the last of which configures the timer to generate a tone of a given
frequency, in Hz instead of 1/1193182th of seconds.

Drop entirely timer2 on pc98, it is not used anywhere at all.

Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if
they exist, and do nothing otherwise.

Remove prototypes and empty acquire-/release-timer() and sysbeep()
functions from the non-beeping archs.

This eliminate the need for the speaker driver to know about
i8254frequency at all.  In theory this makes the speaker driver MI,
contingent on the timer_spkr_*() functions existing but the driver
does not know this yet and still attaches to the ISA bus.

Syscons is more tricky, in one function, sc_tone(), it knows the hz
and things are just fine.

In the other function, sc_bell() it seems to get the period from
the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode
the 1193182 and leave it at that.  It's probably not important.

Change a few other sysbeep() uses which obviously knew that the
argument was in terms of i8254 frequency, and leave alone those
that look like people thought sysbeep() took frequency in hertz.

This eliminates the knowledge of i8254_freq from all but the actual
clock.c code and the prof_machdep.c on amd64 and i386, where I think
it would be smart to ask for help from the timecounters anyway [TBD].
</content>
</entry>
</feed>
