Commit Graph

8406 Commits

Author SHA1 Message Date
Alexander Motin
d9360bbfc4 Rewrite jack presence detection and implement automatic recording source
selection in snd_hda(4) driver.

Now driver tracks jack presence detection status for every CODEC pin. For
playback associations, when configured, that information, same as before,
can be used to automatically redirect audio to headphones. Also same as
before, these events are used to track digital display connection status
and fetch ELD. Now in addition to that driver uses that information to
automatically switch recording source of the mixer to the connected input.

When there are devices with no jack detection and with one both connected,
last ones will have the precedence. As result, on most laptops after boot
internal microphone should be automatically selected. But if external one
(for example, headset) connected, it will be selected automatically.
When external mic disconnected, internal one will be selected again.

Automatic recording source selection is enabled by default now to make
recording work out of the box without touching mixer. But it can be
disabled or limited only to attach time using hint.pcm.X.rec.autosrc loader
tunables or dev.pcm.X.rec.autosrc sysctls.

MFC after:	2 months
Sponsored by:	iXsystems, Inc.
2012-01-25 20:46:10 +00:00
Warner Losh
c9b36592cc Some minor additions to the list of supported devices... 2012-01-25 04:45:29 +00:00
Stefan Farfeleder
a6fdf2db3c Document the values for hw.snd.default_auto. 2012-01-22 14:04:42 +00:00
Christian Brueffer
24835875f2 Connect VirtIO-related manpages to the build. 2012-01-22 13:51:20 +00:00
Christian Brueffer
28083eaa4d General cleanup.
Prodded by:	grehan
2012-01-22 10:16:24 +00:00
Pyun YongHyeon
d99ecc7db3 Reflect tunable name change made in r230337. 2012-01-19 20:31:29 +00:00
Ed Schouten
5dc6c3a38a Remove remnants of dev_t.
These functions take a `struct cdev *' -- not a dev_t. Inside the
kernel, dev_t has the same use as in userspace, namely to store a device
identifier.

MFC after:	2 weeks
2012-01-19 09:51:07 +00:00
Kevin Lo
1e3b25d918 Add missing MLINKS to INDEX.5 2012-01-19 02:49:21 +00:00
Sean Bruno
247c3295fe Update .Dd date on this man page.
MFC with r230313 and r230316

Caught by: bz
Obtained from:	Yahoo! Inc.
2012-01-18 22:52:02 +00:00
Sean Bruno
b2c4ef7eb1 Update man page to show that ciss(4) now support the P420
MFC with r230313

Caught by:  brueffer
Obtained from:	Yahoo! Inc
MFC after:	2 weeks
2012-01-18 21:27:49 +00:00
Lawrence Stewart
555f396285 Specify the correct section (4 instead of 9) in the h_ertt man page's title and
bump the document date.

MFC after:	3 days
2012-01-18 03:03:21 +00:00
Kevin Lo
1dc8fb4d77 NOOBJ is long time dead
Reviewed by:	kib
2012-01-18 02:29:11 +00:00
Kevin Lo
0ad9a4f449 vfs_object_create() function is obsolete. Use vnode_create_vobject()
to create the backing object.

Reviewed by:	kib
2012-01-18 02:27:09 +00:00
Pyun YongHyeon
ca4bfcbc21 Document dev.bge.%d.msi_disable tunable. 2012-01-17 22:17:11 +00:00
Alexander Motin
7c6b05d280 Major snd_hda driver rewrite:
- Huge old hdac driver was split into three independent pieces: HDA
controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function
driver (hdaa).
 - Support for multichannel recording was added. Now, as specification
defines, driver checks input associations for pins with sequence numbers
14 and 15, and if found (usually) -- works as before, mixing signals
together. If it doesn't, it configures input association as multichannel.
 - Signal tracer was improved to look for cases where several DACs/ADCs in
CODEC can work with the same audio signal. If such case found, driver
registers additional playback/record stream (channel) for the pcm device.
 - New controller streams reservation mechanism was implemented. That
allows to have more pcm devices then streams supported by the controller
(usually 4 in each direction). Now it limits only number of simultaneously
transferred audio streams, that is rarely reachable and properly reported
if happens.
 - Codec pins and GPIO signals configuration was exported via set of
writable sysctls. Another sysctl dev.hdaa.X.reconfig allows to trigger
driver reconfiguration in run-time.
 - Driver now decodes pins location and connector type names. In some cases
it allows to hint user where on the system case connectors, related to the
pcm device, are located. Number of channels supported by pcm device,
reported now (if it is not 2), should also make search easier.
 - Added workaround for digital mic on some Asus laptops/netbooks.

MFC after:	2 months
Sponsored by:	iXsystems, Inc.
2012-01-15 13:21:36 +00:00
Doug Barton
c86072f5a7 Remove documentation for set_rcvar() now that it has been removed. 2012-01-14 21:51:44 +00:00
Gleb Smirnoff
5af5af75aa No need to run buildworld before generate-release.sh. 2012-01-14 18:16:10 +00:00
Ed Schouten
448c12f4ce Regenerate src.conf(5). 2012-01-13 15:43:01 +00:00
Eygene Ryabinkin
0113cca483 rc.d: document 'quiet' prefix and fix dhclient/devd interaction
Document the current semantics of the 'quiet' command prefix
in the rc.subr(8).

Fix dhclient rc.d script: it should not call err() for
non-DHCP-enabled interface when it is called from devd, because the
latter just blindly calls 'service dhclient quietstart' on each "link
up" event.

Since the 'quietstart' will silence the message "Cannot 'start' <foo>.
Set <foo>_enable to YES in /etc/rc.conf or use 'onestart' instead of
'start'." and running dhclient on the non-DHCP-enabled interface is
the same thing as running the service <foo> without <foo>_enable set,
such modification is in sync with the current semantics of the 'quiet'
prefix.

Approved by: glebius
Reviewed by: freebsd-rc list
MFC after:	2 weeks
2012-01-12 06:48:11 +00:00
Alexander V. Chernikov
756e2ef0ff Add setsockopt(2) example to ng_ksocket(4).
While here, fix formatting a bit

Approved by:     kib(mentor)
MFC after:       2 weeks
2012-01-10 12:45:24 +00:00
Ulrich Spörlein
8948622005 Apply Typo-B-Gone 2000 [TM] 2012-01-05 21:43:33 +00:00
Ulrich Spörlein
cabdddae57 Pull up vendor changes to mdoc(7)
This switches us to using -isoC-2011 as the symbol name which is used by
groff and mdocml. It follows the change to 4 digit years as done with
IEEE Std 1003 post-1999.

MFC after:	2 weeks (groff changes only)
2012-01-05 21:36:12 +00:00
Christian Brueffer
b730be7a19 Fix typo.
MFC after:	1 week
2012-01-05 11:16:42 +00:00
Ed Schouten
069a43171f Reimplement <tgmath.h> on top of __generic().
The macro construction used now, is almost identical to the code
provided in C11 proposal N1404. This new version doesn't seem to
introduce any regressions according to the regression test in tools/,
but still seems to malfunction with Clang on certain aspects.

The new code does work successfully with GCC 4.2, 4.6 and 4.7. With 4.7,
it also works when __generic() is implemented on top of _Generic().

Discussed with:	stefanf
2012-01-05 10:46:22 +00:00
Robert Watson
6508f34eb6 Add WITHOUT_CAPSICUM src.conf(5) define, which can be used to compile out
use of Capsicum by userspace applications.

MFC after:	3 weeks
Sponsored by:	Google, Inc.
2012-01-02 21:57:58 +00:00
Ed Schouten
194cef3114 Fix sloppyness in memcchr() man page.
I was considering adding it to libc as well, but last minute I thought
it would be good enough to add it to libkern exclusively. I forgot to
rename the man page and hook it up.
2012-01-01 20:59:42 +00:00
Ed Schouten
a4ec012311 Fix typo; return -> returns. 2012-01-01 20:30:48 +00:00
Ed Schouten
de85bfc508 Introducing memcchr(3).
It seems two of the file system drivers we have in the tree, namely ufs
and ext3, use a function called `skpc()'. The meaning of this function
does not seem to be documented in FreeBSD, but it turns out one needs to
be a VAX programmer to understand what it does.

SPKC is an instruction on the VAX that does the opposite of memchr(). It
searches for the non-equal character. Add a new function called
memcchr() to the tree that has the following advantages over skpc():

- It has a name that makes more sense than skpc(). Just like strcspn()
  matches the complement of strspn(), memcchr() is the complement of
  memchr().

- It is faster than skpc(). Similar to our strlen() in libc, it compares
  entire words, instead of single bytes. It seems that for this routine
  this yields a sixfold performance increase on amd64.

- It has a man page.
2012-01-01 20:26:11 +00:00
Lawrence Stewart
253a3814d4 Revert r228986 until it can be reworked to avoid panicing the kernel when the
same interface is attached multiple times with different DLTs, as is done in
net80211 for example.

Reported by:	adrian
2011-12-31 07:21:28 +00:00
Lawrence Stewart
0f89fc22f3 - Introduce the net.bpf.tscfg sysctl tree and associated code so as to make one
aspect of time stamp configuration per interface rather than per BPF
  descriptor. Prior to this, the order in which BPF devices were opened and the
  per descriptor time stamp configuration settings could cause non-deterministic
  and unintended behaviour with respect to time stamping. With the new scheme, a
  BPF attached interface's tscfg sysctl entry can be set to "default", "none",
  "fast", "normal" or "external". Setting "default" means use the system default
  option (set with the net.bpf.tscfg.default sysctl), "none" means do not
  generate time stamps for tapped packets, "fast" means generate time stamps for
  tapped packets using a hz granularity system clock read, "normal" means
  generate time stamps for tapped packets using a full timecounter granularity
  system clock read and "external" (currently unimplemented) means use the time
  stamp provided with the packet from an underlying source.

- Utilise the recently introduced sysclock_getsnapshot() and
  sysclock_snap2bintime() KPIs to ensure the system clock is only read once per
  packet, regardless of the number of BPF descriptors and time stamp formats
  requested. Use the per BPF attached interface time stamp configuration to
  control if sysclock_getsnapshot() is called and whether the system clock read
  is fast or normal. The per BPF descriptor time stamp configuration is then
  used to control how the system clock snapshot is converted to a bintime by
  sysclock_snap2bintime().

- Remove all FAST related BPF descriptor flag variants. Performing a "fast"
  read of the system clock is now controlled per BPF attached interface using
  the net.bpf.tscfg sysctl tree.

- Update the bpf.4 man page.

Committed on behalf of Julien Ridoux and Darryl Veitch from the University of
Melbourne, Australia, as part of the FreeBSD Foundation funded "Feed-Forward
Clock Synchronization Algorithms" project.

For more information, see http://www.synclab.org/radclock/

In collaboration with:	Julien Ridoux (jridoux at unimelb edu au)
2011-12-30 08:57:58 +00:00
Xin LI
81966bce06 Import the first release of HighPoint RocketRAID 27xx SAS 6Gb/s HBA card
driver.  This driver works for FreeBSD/i386 and FreeBSD/amd64 platforms.

Many thanks to HighPoint for providing this driver.

MFC after:	2 weeks
2011-12-28 23:26:58 +00:00
Ed Schouten
669ab20feb Document restriction on 32-bits and 64-bits datatypes. 2011-12-27 22:14:35 +00:00
Ed Schouten
fd8a33c1d6 Add missing \.
While sorting the MLINKS by name, I forgot to re-add it.
2011-12-27 13:01:10 +00:00
Ed Schouten
4d8a7eab01 Add manual page for atomic operations. 2011-12-27 12:58:54 +00:00
Jaakko Heinonen
c5a0813d43 Follow style(9) more closely in the example. 2011-12-21 17:03:30 +00:00
Alexander Motin
e3bf726bee Add some more cross-references. 2011-12-20 17:44:25 +00:00
Alexander Motin
e0dceef5c2 Fix copy-paste typo. 2011-12-20 17:32:13 +00:00
Alexander Motin
2a6be868ea Add timecounters(4) man page alike to eventtimers(4). 2011-12-20 17:10:34 +00:00
Alexander Motin
8f72e930c1 s/LAPIC/local APIC/ to closer follow Intel documents.
Submitted by:	jhb
2011-12-20 15:19:33 +00:00
Alexander Motin
89affab00c Remove extra "and" left from earlier version. 2011-12-20 14:12:50 +00:00
Gleb Smirnoff
f08535f872 Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
  conditions, for now these are:
  - interface goes down
  - carp(4) has problems with ip_output() or ip6_output()
  - pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
  is actual value added to advskew. The adjustment values for
  particular error conditions are also configurable, and their
  defaults are maximum advskew value, so a single failure bumps
  demotion to maximum. This is for POLA compatibility, and should
  satisfy most users.
- Demotion factor is a writable sysctl, so user can do
  foot shooting, if he desires to.
2011-12-20 13:53:31 +00:00
Alexander Motin
73889c808a Add apic(4) man page, now mostly to cover its event timer functionality. 2011-12-20 13:49:52 +00:00
Alexander Motin
f42acd0f79 Add eventtimers(9) man page, describing related KPIs.
Sponsored by:	iXsystems, Inc.
MFC after:	1 month
2011-12-20 11:40:22 +00:00
John Baldwin
a7f5f7948b Add a TASK_INITIALIZER() macro that can be used to statically
initialize a task structure.

Reviewed by:	gj
MFC after:	2 weeks
2011-12-19 18:55:13 +00:00
Ruslan Ermilov
e9a2004460 Fixed some of markup.
Reviewed by:	jhb
2011-12-17 06:57:35 +00:00
Alexander Motin
9c121fecc2 Some formatting fixes.
Submitted by:	ru
2011-12-16 14:19:46 +00:00
Gleb Smirnoff
08b68b0e4c A major overhaul of the CARP implementation. The ip_carp.c was started
from scratch, copying needed functionality from the old implemenation
on demand, with a thorough review of all code. The main change is that
interface layer has been removed from the CARP. Now redundant addresses
are configured exactly on the interfaces, they run on.

The CARP configuration itself is, as before, configured and read via
SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or
SIOCAIFADDR_IN6 may now be configured to a particular virtual host id,
which makes the prefix redundant.

ifconfig(8) semantics has been changed too: now one doesn't need
to clone carpXX interface, he/she should directly configure a vhid
on a Ethernet interface.

To supply vhid data from the kernel to an application the getifaddrs(8)
function had been changed to pass ifam_data with each address. [1]

The new implementation definitely closes all PRs related to carp(4)
being an interface, and may close several others. It also allows
to run a single redundant IP per interface.

Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for
idea on using ifam_data and for several rounds of reviewing!

PR:		kern/117000, kern/126945, kern/126714, kern/120130, kern/117448
Reviewed by:	bz
Submitted by:	bz [1]
2011-12-16 12:16:56 +00:00
Konstantin Belousov
ec1c1d41b3 Document 'findstack'.
MFC after:	1 week
2011-12-16 11:52:33 +00:00
Navdeep Parhar
733b92779e Many updates to cxgbe(4)
- Device configuration via plain text config file.  Also able to operate
  when not attached to the chip as the master driver.

- Generic "work request" queue that serves as the base for both ctrl and
  ofld tx queues.

- Generic interrupt handler routine that can process any event on any
  kind of ingress queue (via a dispatch table).

- A couple of new driver ioctls.  cxgbetool can now install a firmware
  to the card ("loadfw" command) and can read the card's memory
  ("memdump" and "tcb" commands).

- Lots of assorted information within dev.t4nex.X.misc.*  This is
  primarily for debugging and won't show up in sysctl -a.

- Code to manage the L2 tables on the chip.

- Updates to cxgbe(4) man page to go with the tunables that have changed.

- Updates to the shared code in common/

- Updates to the driver-firmware interface (now at fw 1.4.16.0)

MFC after:	1 month
2011-12-16 02:09:51 +00:00
John Baldwin
fb680e16f4 Add a helper API to allow in-kernel code to map portions of shared memory
objects created by shm_open(2) into the kernel's address space.  This
provides a convenient way for creating shared memory buffers between
userland and the kernel without requiring custom character devices.
2011-12-14 22:22:19 +00:00