Commit Graph

22818 Commits

Author SHA1 Message Date
jmcneill
1869ce861e Add pad(4) 2007-11-12 02:22:11 +00:00
jmcneill
b6ed7a1236 Implement volume controls for pseudo audio device. 2007-11-11 19:53:38 +00:00
pooka
96689562e7 * include puffs msgif instead of internal sys header (yea, still not
correct, but at least better)
* minor cleanup
2007-11-11 19:49:11 +00:00
bouyer
d64cd0dda9 Move a delay() inside a loop, so that the 1s delay is really 1s. 2007-11-11 18:03:46 +00:00
jmcneill
23526fe3a9 Add pseudo audio device driver. With this pseudo-device, audio played back
via the standard audio interfaces is redirected back to userland as raw
PCM data on /dev/padN.

One example usage is to stream audio to an AirTunes compatible device using
rtunes (http://www.nazgul.ch/dev_rtunes.html), ie:

	$ rtunes - < /dev/pad0
	$ mpg123 -a /dev/sound1 blah.mp3

Another option is to capture audio output from eg. Real Player, by simply
instructing Real Player to output to /dev/sound1, and running:

	$ cat /dev/pad0 > blah.pcm
2007-11-11 17:37:45 +00:00
pooka
7744bdf5d3 default to no debug 2007-11-11 16:57:36 +00:00
plunky
7cca9485cc convert device printf() usages to aprint_xxxx() 2007-11-11 12:59:02 +00:00
plunky
8658057a5d bluetooth stack now keeps a device_t and passes it to device callbacks,
update bcsp to new reality
2007-11-11 12:54:23 +00:00
plunky
0b799668fb use more device_t and device_xxx() accessors
make bluetooth stack keep device_t instead of softc pointer as
device is not necessarily part of softc, and pass device_t to
driver callbacks. hci_devname is no longer required.
2007-11-10 23:12:22 +00:00
pooka
f2031ea28b Part 2/n of extensive changes to request transport to/from userspace:
Rip the transport code completely out of puffs and generalize it
into an independent module which will be used for multiple purposes
in the future.  This module is called the Pass-to-Userspace
Transporter (known as "putter" among friends).

This is very much work-in-progress and one dependency with puffs
remains: the request framing format.

The device name is still /dev/puffs, but that will change soon.

Users of puffs need the following in their kernel configs now:
pseudo-device   putter
2007-11-10 21:45:04 +00:00
rmind
f499d5e662 Use PRI_BIO for kthreads instead of PINOD. Fixes a missed case of priority
inversion, which caused LFS to fire some assertions.

Reported by Kurt Schreiner on <current-users>.
2007-11-10 18:53:57 +00:00
ad
0f8b0df960 Call ttyflush() with tty_lock held. 2007-11-10 18:29:36 +00:00
ad
d6bd505623 zsstart, zstty_txsoft: don't acquire tty_lock, it's already held. 2007-11-10 18:07:53 +00:00
ad
61eac7ea23 Call ttyoutput/ttstart with tty_lock held. 2007-11-10 18:00:11 +00:00
xtraeme
91551751e7 Add another flag that is set only when the event was enqueued
(and its dictionary created) successfully and use it in the
POWER_EVENT_RECVDICT ioctl to check if the dictionary is ready before
calling prop_dictionary_copyout_ioctl().

This fixes a rare condition when too many events are enqueued and
there wasn't time to create the dictionary, so prop_dictionary_copyout_ioctl()
fails with a NULL pointer dereference.
2007-11-10 09:32:24 +00:00
macallan
f9f695f535 turn the channel lock into a spin mutex at IPL_NONE so it resembles the
simplelock it used to be
With this my macppc boxes no longer deadlock when init sets up serial ports
2007-11-09 20:31:16 +00:00
martti
a43b234985 Added missing newline. 2007-11-09 08:26:47 +00:00
xtraeme
e11006338a Add support for the VMS logical device on nsclpcsio(4) and clean up
the code. This provides 14 voltage sensors in addition to the previous
3 temperature sensors supported in the TMS logical device.

Adapted from OpenBSD, tested by dyoung.
2007-11-09 01:09:47 +00:00
ad
ca6954d465 Use zs_lock_init() to set up the chanstate's lock. 2007-11-09 00:05:38 +00:00
dogcow
c067a1b95c pesky missing semicolons. 2007-11-08 07:53:11 +00:00
oster
5bbb6a856e We need to initialize dk_driver as well. Thanks to Ronald Roskens
for reporting the problem and testing the fix.
2007-11-08 04:10:09 +00:00
garbled
86d671713a Add three new MI functions taken from macppc/autoconf.c:
of_getnode_byname(): Finds a node named X
of_to_uint32_prop(): sets an uint32_t prop_t from an OFW property
of_to_dataprop(): sets a data prop_t from an OFW property

These looked more generally useful, and seemed like something other
OFW-capable machines might want to take advantage of.
2007-11-07 19:26:45 +00:00
macallan
2e65015ca3 add preliminary driver for ATI Rage 128 graphics controllers
So far it supports some acceleration ( copies and rectangle fills ) but
no video mode programming at all.
Known problems:
- tested only on macppc
- matches only one r128 chip out of ca. 30
- character drawing is unaccelerated
- no attempt is made to restore the console when X exits
2007-11-07 19:09:09 +00:00
ad
d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00
joerg
bedc8f14a0 When assigning an IRQ for classic PIC routing to an ACPI link dev,
make sure to update the PCI Interrupt Register of all PCI devices using
it. This fixes interrupt with ACPI and w/o IOAPIC, when the BIOS didn't
route all interrupts correctly.

Reported by sborill@ and by Mathias De Belder in PR 37001, fix tested
by sborill@.
2007-11-07 15:29:15 +00:00
ad
54221c3e0f - Make it compile again.
- Don't call pool_cache_init with a held simplelock.
2007-11-07 14:04:27 +00:00
itohy
cf3882284c more KNF changes 2007-11-07 08:59:03 +00:00
itohy
18f935c281 KNF or make it compile by gcc 2 2007-11-07 08:56:41 +00:00
joerg
75bc145079 When converting mixer values to hardware values, round up. This makes
stepping and restore actually work.
2007-11-07 00:47:18 +00:00
ad
d18c6ca4de Merge from vmlocking:
- pool_cache changes.
- Debugger/procfs locking fixes.
- Other minor changes.
2007-11-07 00:23:13 +00:00
ad
afc64ea58c Use the softint_* API. 2007-11-06 21:51:07 +00:00
ad
3b271ff768 Merge from vmlocking. 2007-11-06 18:02:43 +00:00
kiyohara
2575726a88 The argument of *_intr_establish() is changed to fwohci_flit.
Our ieee1394 coordinates from FreeBSD implementation.
Add fwohci_pci_shutdown() and fwohci_pci_power().
Move __KERNEL_RCSID to ahead.
2007-11-06 15:24:10 +00:00
dogcow
99f2863e95 on NetBSD, cardbus_intr_establish's fifth arg's is a symbol which returns
an int, not a void; change fwohci_intr accordingly.
2007-11-06 12:32:12 +00:00
dogcow
55d73ac843 callout_init has two args. 2007-11-06 12:30:42 +00:00
itohy
6d75b40284 - Reset the bus if a Bus Reset condition is detected to make sure
all devices on the bus are really reset.

- Block interrupts on Bus Reset, and check it periodically until the
  reset is released.  On some 32UDE devices (probably the earlier ones)
  the RST line looks unstable without the termination power and may
  suffer ~continuous Bus Reset interrupts.

- Change number of scatter/gather segments from 16 to 17, to allow
  non-page-aligned 64KB transfer on 4KB/page platforms.
2007-11-06 11:35:35 +00:00
uwe
8531d31a58 Use device_t and device_private(). Convert attach to use aprint_*. 2007-11-06 02:29:19 +00:00
uwe
58197290f3 Use aprint_* 2007-11-06 01:46:02 +00:00
uwe
2b2a00534e Add missing aprint_naive("\n"); in rlphyattach. 2007-11-06 00:58:32 +00:00
xtraeme
f4046a2e1c Missed a struct device -> device_t, found by joerg. 2007-11-05 23:57:32 +00:00
kiyohara
c33e2714c5 + Sync to FreeBSD.
firewire.c Rev.1.101
    firewire.h Rev.1.21
    firewirereg.h Rev.1.50
    fwdev.c Rev.1.52
    fwdma.c Rev.1.9
    fwmem.c Rev.1.34
    fwohci.c Rev.1.93
    fwohcireg.h Rev.1.23
    fwohcivar.h Rev.1.16
    if_fwip.c Rev.1.16
    if_fwipvar.h Rev.1.5
    sbp.c Rev.1.92
+ Cleanup macros in fw_port.h.
+ Fix the occurrence of the error at the resume.  Don't set the buffer again.
2007-11-05 19:08:56 +00:00
macallan
f59f835fa4 don't panic if we're not finding all the properties we need. Just complain
quietly and return.
2007-11-05 16:57:46 +00:00
joerg
08de5799c0 Use the fallback to ACPI SCI as PCI interrupt only as a last resort
if no other entry could be used.
2007-11-05 10:30:44 +00:00
xtraeme
7cd6e1759b - Allocate the envsys_data_t structures dynamically, removing the
max limit.
- Use kmem(9) to allocate the memory.
2007-11-04 13:59:49 +00:00
xtraeme
64a549146f Follow plunky's changes:
- Use CFATTACH_DECL_NEW and remove struct device from the softc.
- Use aprint_*_dev().
- Use aiboost_refresh_sensors() for sme_gtredata.
2007-11-03 23:33:50 +00:00
xtraeme
4fbcc4c832 Remove sysmon_envsys_find() proto, it's defined on sysmon_envsysvar.h. 2007-11-03 23:25:20 +00:00
xtraeme
4e10a84855 - Rename ENVSYS_BATTERY_STATE units to ENVSYS_BATTERY_CAPACITY and
introduce ENVSYS_BATTERY_CHARGE, which is the same than an Indicator and
  it's used to know if the battery is currently charging or discharging.

- Require two sensors at least for SME_CLASS_BATTERY to make the low-power
  condition work: a ENVSYS_BATTERY_CAPACITY plus ENVSYS_BATTERY_CHARGE.

- Simplify sme_event_check_lowpower() and make it check the required
  sensors in the SME_CLASS_ACADAPTER and SME_CLASS_BATTERY classes.
  If the acadapter is not ready, trust the state returned by the battery
  device.

Based on suggestion from joerg@.
2007-11-03 23:05:21 +00:00
markd
7893af1639 Add support for Analog Devices AD1983 codec as found in Dell Optiplex 745. 2007-11-03 20:55:58 +00:00
plunky
faccfc336c 'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
2007-11-03 18:24:00 +00:00
plunky
edb74239aa switch devices to using CFATTACH_DECL_NEW()
softc no longer contains 'struct device' by default
use 'device_t' instead of 'struct device *'
use device_xxx() accessor functions
remove casting of 'xxx_softc *' & 'struct device *'
use aprint_xxx_dev() routines
2007-11-03 17:41:03 +00:00