History log of /freebsd-current/sys/dev/sound/pci/hda/hdaa.c
Revision Date Author Comments
# c597c557 06-May-2024 Christos Margiolis <christos@FreeBSD.org>

sound: Use nitems() where possible

No functional change intended.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Reviewed by: markj, emaste
Differential Revision: https://reviews.freebsd.org/D45014


# c053a56c 28-Jan-2024 Andriy Gapon <avg@FreeBSD.org>

hdaa_pcmchannel_setup: do not advertise AC3 8+0

The rest of the sound system supports 7+1 maximum and is not aware of 8+0.

I believe that these messages are caused by 8+0:
kernel: feeder_init(0xfffff801f935d680) on feeder_matrix returned 22
kernel: pcm0: feeder_build_matrix(): can't add feeder_matrix


# f7d3d0a4 22-Jan-2024 Christos Margiolis <christos@FreeBSD.org>

sound: use device_set_descf() to set device descriptions

Commit 6b6914c1e21b introduced a printf-like version of
device_set_desc(), so use it to simplify device description setting in
the audio stack.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: dev_submerge.ch, markj
Differential Revision: https://reviews.freebsd.org/D43467


# 837cd192 16-Jan-2024 Christos Margiolis <christos@FreeBSD.org>

sound: remove PCM_KLDSTRING() and fix status strings

PCM_KLDSTRING() prints the kernel module associated with a given audio
device only when that module is not compiled in. Get rid of
PCM_KLDSTRING() altogether and print the driver name (even for modules
that are compiled in) instead, as it implies the module as well.

While here, convert all status strings to the following dmesg-like
format:

[<port|mem> <irq>] on <driver>

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: markj, imp
Differential Revision: https://reviews.freebsd.org/D43349


# 5aacf339 18-Aug-2023 John Baldwin <jhb@FreeBSD.org>

sys: Remove SND_DECLARE_FILE

Reviewed by: kbowling, imp, emaste
Differential Revision: https://reviews.freebsd.org/D41499


# 82a265ad 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: sound driver version

Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/


# 4d846d26 10-May-2023 Warner Losh <imp@FreeBSD.org>

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix


# ac34f366 03-Sep-2022 Gordon Bergling <gbe@FreeBSD.org>

sound(4): Fix a typo in asource code comment

- s/overriden/overridden/

MFC after: 3 days


# 3390adfe 06-May-2022 John Baldwin <jhb@FreeBSD.org>

sound: Remove unused devclass arguments to DRIVER_MODULE.


# 2287364e 06-May-2022 John Baldwin <jhb@FreeBSD.org>

Remove pcm_devclass from DRIVER_MODULE invocations.


# 557627dd 04-Apr-2022 Warner Losh <imp@FreeBSD.org>

hdaa_eld_dump: eliminate write only variable len

Sponsored by: Netflix


# 0ce96176 02-Apr-2022 Gordon Bergling <gbe@FreeBSD.org>

sound(4): Fix a typo in a source code comment

- s/exisitng/existing/

MFC after: 3 days


# 0adb238d 10-Dec-2021 Warner Losh <imp@FreeBSD.org>

hdda: Remove extra topo_unlock

Reported by: Taku YAMAMOTO
Sponsored by: Netflix


# 96e500a3 09-Dec-2021 Warner Losh <imp@FreeBSD.org>

hda: Push giant / newbus topo lock down a layer

Rather than picking up Giant at the start of these sysctl handlers, push
acquiring Giant down a layer to protect walking the children and also
to add/delete children for the reconfigure.

Sponsored by: Netflix
Reviewed by: mav, jhb
Differential Revision: https://reviews.freebsd.org/D33057


# a1581cd7 14-Aug-2021 Gordon Bergling <gbe@FreeBSD.org>

Fix a common typo in source code comments

- s/aligment/alignment/

MFC after: 5 days


# 86d69de8 12-Jul-2021 Xin LI <delphij@FreeBSD.org>

Fix blankspace anomalies, no actual code change.


# ddfc9c4c 22-Jun-2021 Warner Losh <imp@FreeBSD.org>

newbus: Move from bus_child_{pnpinfo,location}_src to bus_child_{pnpinfo,location} with sbuf

Now that the upper layers all go through a layer to tie into these
information functions that translates an sbuf into char * and len. The
current interface suffers issues of what to do in cases of truncation,
etc. Instead, migrate all these functions to using struct sbuf and these
issues go away. The caller is also in charge of any memory allocation
and/or expansion that's needed during this process.

Create a bus_generic_child_{pnpinfo,location} and make it default. It
just returns success. This is for those busses that have no information
for these items. Migrate the now-empty routines to using this as
appropriate.

Document these new interfaces with man pages, and oversight from before.

Reviewed by: jhb, bcr
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29937


# 378503af 01-Sep-2020 Mateusz Guzik <mjg@FreeBSD.org>

sound: clean up empty lines in .c and .h files


# cdf17038 18-Apr-2020 Ed Maste <emaste@FreeBSD.org>

hda: remove hda*_lockowned macros

These are not used anywhere.


# 7029da5c 26-Feb-2020 Pawel Biernacki <kaktus@FreeBSD.org>

Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)

r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.

This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.

Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT

Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718


# fceeeec7 16-Jul-2019 Sean Bruno <sbruno@FreeBSD.org>

I add the ability to accept the default pin widget configuration to help
with various laptops using hdaa(4) sound devices. We don't seem to know
the "correct" configurations for these devices and the defaults are far
superiour, e.g. they work if you don't nuke the default configs.

PR: 200526
Differential Revision: https://reviews.freebsd.org/D17772


# 80a79189 01-Aug-2018 Justin Hibbits <jhibbits@FreeBSD.org>

snd_hda: Synchronize DMA buffers for the control path

Make sure both sides of the DMA buffer memory accesses for the CORB and RIRB
(control buffers) in snd_hda (device and CPU) can see coherent memory. This
is needed on weakly ordered architectures including PowerPC and ARM. Patch
originally by mmel, with small changes.

This does not cover the data path of snd_hda. We don't have sync operations
for in-progress DMA buffers, to sync ranges of a map.

Reviewed By: mmel
Differential Revision: https://reviews.freebsd.org/D16517


# ac2fffa4 21-Jan-2018 Pedro F. Giffuni <pfg@FreeBSD.org>

Revert r327828, r327949, r327953, r328016-r328026, r328041:
Uses of mallocarray(9).

The use of mallocarray(9) has rocketed the required swap to build FreeBSD.
This is likely caused by the allocation size attributes which put extra pressure
on the compiler.

Given that most of these checks are superfluous we have to choose better
where to use mallocarray(9). We still have more uses of mallocarray(9) but
hopefully this is enough to bring swap usage to a reasonable level.

Reported by: wosch
PR: 225197


# 26c1d774 13-Jan-2018 Pedro F. Giffuni <pfg@FreeBSD.org>

dev: make some use of mallocarray(9).

Focus on code where we are doing multiplications within malloc(9). None of
these is likely to overflow, however the change is still useful as some
static checkers can benefit from the allocation attributes we use for
mallocarray.

This initial sweep only covers malloc(9) calls with M_NOWAIT. No good
reason but I started doing the changes before r327796 and at that time it
was convenient to make sure the sorrounding code could handle NULL values.


# 718cf2cc 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

sys/dev: further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.


# 4642c8c5 28-Dec-2016 Michal Meloun <mmel@FreeBSD.org>

Limit number of stripes supported by HDA codec to maximum number
announced by HDA controller.
Incorrectly implermented HDA codec may report support for more stripes
that HDA controller already have. Due to this, always limit number of
enabled stripes by global controller maximum.

Reviewed by: mav
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8922


# 28323add 08-Nov-2016 Bryan Drewery <bdrewery@FreeBSD.org>

Fix improper use of "its".

Sponsored by: Dell EMC Isilon


# 5b81187f 11-May-2016 Conrad Meyer <cem@FreeBSD.org>

snd_hda(4): Don't pass bogus sizeof()s to unused sysctl arg2 parameter (again)

More of the same sort of issue as r299503, just missed some sysctls added in a
different place than the others.

Reported by: Coverity
CIDs: 1007692, 1009677, 1009678
Sponsored by: EMC / Isilon Storage Division


# e6f79ac5 11-May-2016 Conrad Meyer <cem@FreeBSD.org>

snd_hda(4): Don't pass bogus sizeof()s to unused sysctl arg2 parameter

None of the sysctl handlers in hdaa use the arg2 parameter, so just pass zero
instead. Additionally, the sizes being passed in were suspect (size of the
pointer rather than the value).

Reported by: Coverity
CIDs: 1007694, 1009679
Sponsored by: EMC / Isilon Storage Division


# 74b8d63d 10-Apr-2016 Pedro F. Giffuni <pfg@FreeBSD.org>

Cleanup unnecessary semicolons from the kernel.

Found with devel/coccinelle.


# fd90e2ed 22-May-2015 Jung-uk Kim <jkim@FreeBSD.org>

CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten
years for head. However, it is continuously misused as the mpsafe argument
for callout_init(9). Deprecate the flag and clean up callout_init() calls
to make them more consistent.

Differential Revision: https://reviews.freebsd.org/D2613
Reviewed by: jhb
MFC after: 2 weeks


# 8dca9c27 18-May-2015 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix an off-by-one error by adding proper range checks when parsing the
HDA association descriptors. This fixes a crash during device probe
for some HDA PCI devices.

Reported by: David Wolfskill <david@catwhisker.org>
Reviewed by: mav @
MFC after: 1 week


# f0188618 21-Oct-2014 Hans Petter Selasky <hselasky@FreeBSD.org>

Fix multiple incorrect SYSCTL arguments in the kernel:

- Wrong integer type was specified.

- Wrong or missing "access" specifier. The "access" specifier
sometimes included the SYSCTL type, which it should not, except for
procedural SYSCTL nodes.

- Logical OR where binary OR was expected.

- Properly assert the "access" argument passed to all SYSCTL macros,
using the CTASSERT macro. This applies to both static- and dynamically
created SYSCTLs.

- Properly assert the the data type for both static and dynamic
SYSCTLs. In the case of static SYSCTLs we only assert that the data
pointed to by the SYSCTL data pointer has the correct size, hence
there is no easy way to assert types in the C language outside a
C-function.

- Rewrote some code which doesn't pass a constant "access" specifier
when creating dynamic SYSCTL nodes, which is now a requirement.

- Updated "EXAMPLES" section in SYSCTL manual page.

MFC after: 3 days
Sponsored by: Mellanox Technologies


# abe917ad 23-Apr-2014 Marius Strobl <marius@FreeBSD.org>

- Sprinkle const and static as appropriate.
- Convert the remainder of snd_hda(4) to take advantage of nitems().
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after: 3 days


# 6dcf64df 19-Feb-2013 Ulrich Spörlein <uqs@FreeBSD.org>

Fix typo

Submitted by: Matt Burke <mattblists@icritical.com>


# 1ba70629 25-Nov-2012 Alexander Motin <mav@FreeBSD.org>

Fix uninitialized variable reported by gcc, but not clang.


# 8903f19e 25-Nov-2012 Alexander Motin <mav@FreeBSD.org>

Remove extra sbuf_trim() copy/pasted into r243530.


# 7ec13509 25-Nov-2012 Alexander Motin <mav@FreeBSD.org>

On multiple requests, compact HDA driver verbose output by hiding CODEC's
detailed information under the sound debug. To make it easier accessible,
export that information through the set of sysctls like dev.hdaa.X.nidY.
Also tune some output to make it both more compact and informative.


# 6d36c821 16-Nov-2012 Alexander Motin <mav@FreeBSD.org>

Summarize information about connected analog pins and EDID-like data received
from HDMI/DisplayPort devices in form of general connection status and
sound(4)-style channel matrix. Now that information is only reported in
readable form to verbose logs, but potentially could be used by sound(4)
to correctly choose default devices and configure vchans.

Fix rear and side channels swap on analog 7.1 outputs. As soon as there is
a huge mess in industry about naming and using of these channels, duplicate
rear channels of 4 and 5.1 streams to both read and side speakers.


# 401f7c11 29-Oct-2012 Alexander Motin <mav@FreeBSD.org>

Set all pins initial connection status to unknown (2) and then update it
with the real value in regular way if sensing is supported. This fixes
minor inconsistency when playback redirection appeared in undefined state
on boot if headphones were not connected.


# ed228e40 30-Oct-2012 Alexander Motin <mav@FreeBSD.org>

Print card and subsystem IDs in verbose logs to help to identify system.
Hide some less iseful messages under debug.


# db702c59 21-Oct-2012 Eitan Adler <eadler@FreeBSD.org>

remove duplicate semicolons where possible.

Approved by: cperciva
MFC after: 1 week


# 076b76e8 24-Sep-2012 Alexander Motin <mav@FreeBSD.org>

Fix panic caused by wrong pointer dereference, left after pin sense rewrite
at r230551.

Also while there, make sense polling use reported for each node separately
instead of reporting accumulated total status.

Submitted by: Barbara <barbara.freebsd@gmail.com> (1)
MFC after: 3 days


# 52e9cf7d 16-Aug-2012 Alexander Motin <mav@FreeBSD.org>

Fix "speaker" volume control, broken at r230451.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month


# 8684fef0 14-Aug-2012 Alexander Motin <mav@FreeBSD.org>

Fix multichannel input signals tracing on some CODECs like ALC260.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month


# 52ce0de4 02-Jul-2012 Alexander Motin <mav@FreeBSD.org>

Remove 14 not very useful characters " HDA CODEC PCM" from HDA pcm device
names to shorten them. PulseAudio reported to have problems with names
longer then 63 chars and at least in XMMS long names are inconvinient.

Reported by: hselasky
MFC after: 3 days


# 742963ff 30-Mar-2012 Alexander Motin <mav@FreeBSD.org>

Reenable unsolicited responses on CODEC if hdaa_sense_init() called again.
This fixes jack connection events handling after suspend/resume.

PR: kern/166382
MFC after: 1 week


# f4cb8238 28-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Fix HBR enabling condition. cchs is from 0 to 7, not from 1 to 8.


# c0e199f6 25-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Press some more info into the PCM device name:
- add "+HP" in case of headphones redirection;
- add device type for analog devices, if all pins have the same.

As result now it may look like "Analog 5.1+HP/2.0" or "Front Analog Mic".
I hope it will be more useful than long and confusing.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 7599ae77 25-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Oops, fix the loader tunable name added in r230551.


# d9360bbf 25-Jan-2012 Alexander Motin <mav@FreeBSD.org>

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.


# bf318c6a 24-Jan-2012 Alexander Motin <mav@FreeBSD.org>

In addition to r230511, allow 8 channel AC3 formats.


# 53b95d17 24-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Enable High Bit Rate (HBR) Encoded Packet Type (EPT), if supported
(HDMI and HBR bits set) and needed (AC3 format used with 8 channels).
This should allow DTS-HD/TrueHD pass-through with rates above 6.144Mbps.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# e0f1c0d7 24-Jan-2012 Alexander Motin <mav@FreeBSD.org>

HDMI and DisplayPort support can coexist in HDA CODEC.
Report "HDMI/DP" in PCM device name if both supported.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 4f240903 23-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Realtek CODECs declare support for 32bit samples on S/PDIF input/output
widgets. I am not sure if S/PDIF supports 32bit samples, but my Marantz
SR4001 doesn't, producing only single clicks on playback start/stop.
Because HDA controller requires 32bit alignment for all samples above 16bit,
we can't handle this situation in regular way and have to set 32bit format
in sound(4) for anything above 16bit. To workaround the problem, prefer
to setup hardware to use 24/20bit samples when 32bit format requested. Add
dev.pcm.X.play.32bit and dev.pcm.X.rec.32bit sysctls to control what format
really use for 32bit samples.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 66126826 22-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Increase snd_hda(4) default maximal buffer size from 16K to 64K and
maximal from 64K to 256K.

We usually don't need 750 sound interrupts per second (1.3ms latency)
when playing 192K/24/8 stream. 187 should be better. On usual 48K/16/2
it is just enough for hw.snd.latency=9 at hw.snd.latency_profile=1 with
23 and 6 interrupts per second.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.


# 3d741b14 22-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Complete rewrite of the snd_hda(4) volume control.

Previous code was relatively dumb. During CODEC probe it was tracing signals
and statically binding amplifier controls to the OSS mixer controls. To set
volume it just set all bound amplifier controls proportionally to mixer
level, not looking on their hierarchy and amplification levels/offsets.

New code is much smarter. It also traces signals during probe, but mostly
to find out possible amplification control rages in dB for each specific
signal. To set volume it retraces each affected signal again and sets
amplifiers controls recursively to reach desired amplification level in dB.
It would be nice to export values in dB to user, but unluckily our OSS mixer
API is too simple for that.

As result of this change:
- cascaded amplifiers will work together to reach maximal precision.
If some input has 0/+40dB preamplifier with 10dB step and -10/+10dB mixer
with 1dB step after it, new code will use both to provide 0/+40dB control
with 1dB step! We could even get -10/+50dB range there, but that is
intentionally blocked for now.
- different channels of multichannel associations on non-uniform CODECs
such as VIA VT1708S will have the same volume, not looking that control
ranges are different. It was not good when fronts were 12dB louder.
- for multiplexed recording, when we can record from only one source at
a time, we can now use recording amplifier controls to set different
volume levels for different inputs if they have no own controls of they
are less precise. If recording source change, amplifiers will be
reconfigured.

To improve out-of-the-box behavior, ignore default volume levels set by
sound(4) and use own, more reasonable: +20dB for mics, -10dB for analog
output volume and 0dB for the rest of controls. sound(4) defaults of 75%
mean absolutely random things for different controls of different CODECs
because of very different control ranges.
Together with further planned automatic recording source selection this
should allow users to get fine playback and recording without touching
mixer first.
Note that existing users should delete /var/db/mixer*-state and reboot
or trigger CODEC reconfiguration to get new default values.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 6fa8e691 18-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Two 192/24/8 playback streams overflow single mandatory output line (SDO)
of HDA bus. Handle that from two directions:
- Add support for "striping" (using several SDO lines), if supported.
- Account HDA bus utilization and return error on new stream allocation
attempt if remaining bandwidth is unsifficient.

Most of HDA controllers have one SDO line with 46Mbps output bandwidth.
NVIDIA GF210 has 2 lines - 92Mbps. NVIDIA GF520 has 4 lines - 184Mbps!

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 88addcbe 18-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Improve HDMI/DisplayPort audio support in snd_hda(4):

- Enable and handle unsolicited responses from digital display pins,
reporting connection and EDID-Like Data (ELD) validity status changes.
- Fetch ELD data, describing connected digital display device audio
capabilities. These data not really used at the moment (user is not
denied to use audio formats not supported by the device), only printed to
verbose logs. But they are useful for debugging. The fact that ELD was
received tells that HDMI link was established and video driver enabled
HDMI audio passthrough. Some old chips may not return ELD, so lack of it
is not necessary a problem.
- Add some more points to CODEC configuration sequence:
- For converter widgets, supporting more then two channels (HDMI/DP
converter widgets support 8), set number of channels to handle.
- For digital display pins (HDMI/DP) fill audio infoframe, reporting
connected device about number of channels and speakers allocation.
- For digital display pins (HDMI/DP) set mapping between channels seen
by software and channels transferred via HDMI/DisplayPort.
- Allow more audio formats, not used for analog connections because of
stereo pairs orientation, but easily applicable to HDMI/DisplayPort: 2.1,
3.0, 3.1, 4.1, 5.0, 6.0, 6.1, 7.0. That list may be filtered later using
info from ELD.
- Disable MSI interrupts for NVIDIA HDA controllers before GT520.

At this point I can successfully play audio over HDMI from NVIDIA GT210
and GT520 cards with nvidia-driver-290.10 driver to Marantz SR4001
receiver in 2.0, 2.1, 3.0, 4.0, 4.1, 5.0 and 5.1 PCM formats at 44, 48,
88 and 96KHz at 16 and 24 bits, same as do AC3/DTS passthrough.
6.0, 6.1, 7.0 and 7.1 PCM formats are not working for me, but I think
it is because of receiver age.

MFC after: 2 months
Sponsored by: iXsystems, Inc.


# 20332cc2 15-Jan-2012 Alexander Motin <mav@FreeBSD.org>

Add check to avoid assertion panic on duplicate stop.

Reported by: Yuri Pankov <yuri.pankov@gmail.com>
MFC after: 2 months


# 7c6b05d2 15-Jan-2012 Alexander Motin <mav@FreeBSD.org>

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.