Commit Graph

1515 Commits

Author SHA1 Message Date
Mark Johnston
05929f8bd0 Add a headphone redirection quirk for the Lenovo G580.
MFC after:	1 week
2014-07-13 10:31:29 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Hans Petter Selasky
af3b2549c4 Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
Glen Barber
37a107a407 Revert r267961, r267973:
These changes prevent sysctl(8) from returning proper output,
such as:

 1) no output from sysctl(8)
 2) erroneously returning ENOMEM with tools like truss(1)
    or uname(1)
 truss: can not get etype: Cannot allocate memory
2014-06-27 22:05:21 +00:00
Hans Petter Selasky
3da1cf1e88 Extend the meaning of the CTLFLAG_TUN flag to automatically check if
there is an environment variable which shall initialize the SYSCTL
during early boot. This works for all SYSCTL types both statically and
dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
be used in the case a tunable sysctl has a custom initialisation
function allowing the sysctl to still be marked as a tunable. The
kernel SYSCTL API is mostly the same, with a few exceptions for some
special operations like iterating childrens of a static/extern SYSCTL
node. This operation should probably be made into a factored out
common macro, hence some device drivers use this. The reason for
changing the SYSCTL API was the need for a SYSCTL parent OID pointer
and not only the SYSCTL parent OID list pointer in order to quickly
generate the sysctl path. The motivation behind this patch is to avoid
parameter loading cludges inside the OFED driver subsystem. Instead of
adding special code to the OFED driver subsystem to post-load tunables
into dynamically created sysctls, we generalize this in the kernel.

Other changes:
- Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
to "hw.pcic.intr_mask".
- Removed redundant TUNABLE statements throughout the kernel.
- Some minor code rewrites in connection to removing not needed
TUNABLE statements.
- Added a missing SYSCTL_DECL().
- Wrapped two very long lines.
- Avoid malloc()/free() inside sysctl string handling, in case it is
called to initialize a sysctl from a tunable, hence malloc()/free() is
not ready when sysctls from the sysctl dataset are registered.
- Bumped FreeBSD version to indicate SYSCTL API change.

MFC after:	2 weeks
Sponsored by:	Mellanox Technologies
2014-06-27 16:33:43 +00:00
Alexander Kabaev
8cf27a3330 Restore the check for non-NULL dmatag in sndbuf_free.
The sound drivers that use own buffer management can use sndbuf_setup
and not do any busdma allocation, so the driver will end up with the
managed buffer but no valid dma map and tag for it. Avoid calling
bus_dmamem_free in such cases.

Reported by: ache
Missed in review by: kan
2014-06-23 03:45:39 +00:00
John Baldwin
86843ea8de Fix various bugs with freeing static DMA allocations in sound drivers:
- Don't compare the DMA map to NULL to determine if bus_dmamap_unload()
  should be called when releasing a static allocation.  Instead, compare
  the bus address against 0.
- Don't assume that the DMA map for static allocations is NULL.  Instead,
  save the value set by bus_dmamem_alloc() so it can later be passed to
  bus_dmamem_free().  Also, add missing calls to bus_dmamap_unload() in
  these cases before freeing the buffer.
- Use the bus address from the bus_dma callback instead of calling
  vtophys() on the address allocated by bus_dmamem_alloc().

Reviewed by:	kan
2014-06-17 16:07:57 +00:00
Marius Strobl
bdec45e2bc Actually, just merge r233362 and do away with the unnecessary uint8_t
pointer casting altogether.
2014-05-28 14:26:46 +00:00
Marius Strobl
50253ed99d Commit the right version of r266793. 2014-05-28 12:32:07 +00:00
Marius Strobl
3ac1248373 - Fix compilation with PAE support enabled by improving the casting of
physical addresses.
- Nuke the unused softc of emujoy(4).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

MFC after:	3 days
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-05-28 09:01:35 +00:00
Hans Petter Selasky
af26e3dfe7 Make sure the USB audio driver is loaded last. This is important when
built as part of a kernel module to prevent panics when the USB audio
driver kernel module is unloaded.

Suggested by:	marius @
MFC after:	1 week
2014-05-14 11:25:59 +00:00
Marius Strobl
abe917ad4c - 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
2014-04-23 19:32:50 +00:00
Marius Strobl
d98052c4a2 Add quirk to configure headphones redirection on Intel DH87RL boards.
MFC after:	3 days
2014-04-23 19:25:59 +00:00
Hans Petter Selasky
e91fe3a904 Workaround for USB MIDI adapters which use non-supported values of
wMaxPacketSize for BULK endpoints.

MFC after:	1 week
2014-03-14 08:42:30 +00:00
Hans Petter Selasky
2c2752d351 Add support for more sample rates to USB audio driver.
Submitted by:	Shunsuke Suganuma <3226388001@jcom.home.ne.jp>
PR:		usb/171254
MFC after:	1 week
2014-03-14 07:11:33 +00:00
Eitan Adler
b7d6c6b5e1 pcm(4): Permit non-root users to change default unit
Discussed with:	mav
2014-02-17 15:33:21 +00:00
Hans Petter Selasky
42cb359e6e Use system macro instead of own hand-rolled one. 2014-02-05 08:29:24 +00:00
Hans Petter Selasky
6b97b1b3fe Add more quirks for making builtin audio speakers work with more
MacBookPro's. Only tested with MacBookPro 9,2.

Obtained from:	Linux
MFC after:	1 week
2014-02-05 08:27:02 +00:00
Dimitry Andric
bff60cf827 In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.
MFC after:	3 days
2013-12-30 22:17:33 +00:00
Eitan Adler
7a22215c53 Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this
shifts into the sign bit.  Instead use (1U << 31) which gets the
expected result.

This fix is not ideal as it assumes a 32 bit int, but does fix the issue
for most cases.

A similar change was made in OpenBSD.

Discussed with:	-arch, rdivacky
Reviewed by:	cperciva
2013-11-30 22:17:27 +00:00
Alexander Motin
c9b3a5a00b Add some more Intel HDA controller IDs and rename HDMI CODEC to Haswell. 2013-11-15 13:55:55 +00:00
Alexander Motin
667b72800a Add ID for Intel Lynx Point HDMI CODEC.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
2013-11-15 13:12:53 +00:00
Scott Long
c68534f1d5 Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI
command register.  The lazy BAR allocation code in FreeBSD sometimes
disables this bit when it detects a range conflict, and will re-enable
it on demand when a driver allocates the BAR.  Thus, the bit is no longer
a reliable indication of capability, and should not be checked.  This
results in the elimination of a lot of code from drivers, and also gives
the opportunity to simplify a lot of drivers to use a helper API to set
the busmaster enable bit.

This changes fixes some recent reports of disk controllers and their
associated drives/enclosures disappearing during boot.

Submitted by:	jhb
Reviewed by:	jfv, marius, achadd, achim
MFC after:	1 day
2013-08-12 23:30:01 +00:00
Ulrich Spörlein
9c8a649226 snd_ds1(4): Fix order of arguments for stereo/16bit mode
This function is called 4 times in this file, with swapped parameter
ordering. Fix the function definition instead of all the call sites.
16bit/stereo or 8bit/mono playback is unaffected and was probably
working fine before, this should fix 16bit/mono and 8bit/stereo
playback.

Found by:	Coverity Scan, CID 1006688
2013-07-25 09:29:48 +00:00
Alexander Motin
fff11ae8af Add quirk to configure headphones redirection on ASUS UX31A laptop.
MFC after:	3 days
2013-07-08 15:28:09 +00:00
Sean Bruno
156860b2b3 Update snd quirks for T520, T420, X220.
Group onboard mic and headphone mic jack together.  Creates association that
will switch between microphone inputs depending on the state of the headphone
jack being connected to a live mic.

Fixes onboard mic not working at all on T520.

Tested on T520, T420.
Suspect X220 needs this too, untested on.

MFC after:	1 month
2013-05-19 01:45:29 +00:00
Hans Petter Selasky
e5359a3bba Don't clear stall at first time use of USB MIDI endpoints.
Most likely some non-USB compliant devices will choke on it
sooner or later. Clear stall is strictly speaking not needed.
If the first MIDI command sent or transmitted is lost, this
is not a big problem for us.

MFC after:	1 week
2013-05-18 07:16:20 +00:00
Hans Petter Selasky
33da3daa40 Fix issue with "Logitech Webcam C525":
Set a valid alternate interface setting
when enumerating USB audio devices else
the device mentioned will not work like
expected.

PR:		usb/178722
MFC after:	1 week
2013-05-18 07:03:06 +00:00
Alexander Motin
6691312c46 Some fixes to snd_envy24ht(4) driver:
- Allow DMA addresses anywhere in the lower 4GB; Envy24HT has a 32-bit DMA
engine, not 28-bit like Envy24.
 - Mark interrupt handler as MPSAFE, seems to be correctly synchronized.

PR:		kern/152378
Submitted by:	Jason Harmening <jason.harmening@gmail.com>
MFC after:	1 month
2013-05-05 19:09:34 +00:00
Hans Petter Selasky
ffae621edd Fix for duplicate sample rate detection after recent patches. 2013-04-24 16:52:03 +00:00
Hans Petter Selasky
bf02c706c7 Fix the USB audio feedback endpoint algorithm. There should not
be any need to bias the returned value.

Reported by:	Craig Leres <leres@ee.lbl.gov>
2013-04-24 16:22:53 +00:00
Hans Petter Selasky
9b2842ba0b Fix playback for Focusrite Scarlett 2i2 USB recording interface.
Submitted by:	Ed Maste, emaste @
2013-04-24 06:05:33 +00:00
Hans Petter Selasky
455a367f95 Add support for runtime switching of sample rate for
USB audio devices. Previously the highest sample
rate was unconditionally selected.

Requested by:	Craig Leres <leres@ee.lbl.gov>
2013-04-23 10:48:14 +00:00
Gabor Kovesdan
84a17a97ce - Correct mispellings of word and
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:48:46 +00:00
Gabor Kovesdan
8fb3bbe770 - Corrrect mispellings of word useful
Submitted by:	Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
2013-04-17 11:45:15 +00:00
Alexander Motin
7019329c1a Add Subsystem ID field to the quirk table. Use it to identify Mac Pro 1,1,
which requires OVREF to be set to get proper playback volume, but which has
all zeroes in HDA controller subdevice IDs on PCI.

MFC after:	1 month
Sponsored by:
2013-03-27 07:30:08 +00:00
Joel Dahl
0ac77cbf8f Hide version string under verbose.
Approved by:	mav
2013-03-16 17:57:00 +00:00
Xin LI
b4cd804a96 Add quirk for Lenovo T530 headphone redirection.
MFC after:	2 weeks
2013-03-13 20:35:51 +00:00
Gleb Smirnoff
aa4dd0f23f More Lenovo headphones redirection quirks: Lenovo T430, Lenovo T430S.
Submitted by:	Sergey Nasonov <snasonov bcc.ru>, T430
Submitted by:	Johannes Dieterich <dieterich.joh gmail.com>, T430S
2013-03-12 08:45:42 +00:00
Attilio Rao
89f6b8632c Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
  - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
  - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
  - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
  - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
    (in order to avoid visibility of implementation details)
  - The read-mode operations are added:
    VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
    VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
  sys/mutex.h in consumers directly to cater its inlining functions
  using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
  consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
  the compat layer because the name clash between FreeBSD and solaris
  versions must be avoided.
  At this purpose zfs redefines the vm_object locking functions
  directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit.  Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by:	EMC / Isilon storage division
Reviewed by:	jeff
Reviewed by:	pjd (ZFS specific review)
Discussed with:	alc
Tested by:	pho
2013-03-09 02:32:23 +00:00
Gleb Smirnoff
2112695c03 Add quirks to enable headphones redirection on number of Lenovo
laptops, namely X1, X1 Carbon, T420, T520.

PR:		misc/176656
Submitted by:	Hiren Panchasar <hiren.panchasara gmail.com>
Tested by:	glebius, X1 Carbon
Tested by:	osa, X1
Tested by:	Hiren Panchasar, T420
Tested by:	sbruno, T520
Reviewed by:	mav
Sponsored by:	Nginx, Inc.
2013-03-07 08:00:04 +00:00
Gleb Smirnoff
a95940fd46 Plug a memory leak.
Reviewed by:	mav
Sponsored by:	Nginx, Inc.
2013-03-07 07:54:50 +00:00
Alexander Motin
32ea29e2eb Add quirk to enable headphones redirection on Lenovo X220.
PR:		kern/174876
MFC after:	1 week
2013-03-04 21:20:13 +00:00
Ulrich Spörlein
6dcf64df00 Fix typo
Submitted by:	Matt Burke <mattblists@icritical.com>
2013-02-19 10:25:51 +00:00
Hans Petter Selasky
2ba0f36139 Add support for mute buttons on USB audio devices and
use the hwvol interface to adjust the mixer settings.

MFC after:	1 week
2013-02-07 08:20:03 +00:00
Hans Petter Selasky
76b7121294 Add support for buttons on USB audio devices,
like Volume Up and Volume Down.

Reviewed by:	mav @
MFC after:	1 week
2013-02-06 17:43:05 +00:00
Sofian Brabez
61bfd86762 Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays
Reviewed by:	cognet
Approved by:	cognet
2013-01-30 18:01:20 +00:00
Jack F Vogel
9e81697fdf Add Intel Lynx Point PCH HD Audio Device IDs 2013-01-02 21:56:58 +00:00
Hans Petter Selasky
f7e62ad092 Reduce stack usage in the USB audio driver by moving some large stack
elements to the USB audio softc structure. This fixes a double CPU
fault when attaching USB audio devices in 10-current for i386 at
least.

MFC after:	1 week
2012-12-21 21:41:23 +00:00
Alexander Motin
ae84f236a9 Add quirks for AD1984A codec and Lenovo X300 laptop.
PR:		kern/148741
MFC after:	2 weeks
2012-12-12 11:44:20 +00:00
Hans Petter Selasky
46f0b27a61 Add support for various Yamaha keyboards.
MFC after:	1 week
PR:		usb/174254
2012-12-08 09:58:11 +00:00
Eitan Adler
dec3a11b26 Add a few more translations from IDs to model name.
Submitted by:	"4721@hushmail.com" <4721@hushmail.com>
Approved by:	cperciva (implicit)
MFC after:	2 weeks
2012-12-02 18:41:22 +00:00
Eitan Adler
bff5138029 Add support for hdmi hda codec onboard nvidia gt 440 graphics card
PR:		kern/174059
Submitted by:	"4721@hushmail.com" <4721@hushmail.com>
Approved by:	cperciva (implicit)
MFC after:	2 weeks
2012-12-02 17:54:52 +00:00
Alexander Motin
1ba706292c Fix uninitialized variable reported by gcc, but not clang. 2012-11-26 02:04:11 +00:00
Alexander Motin
8903f19ef0 Remove extra sbuf_trim() copy/pasted into r243530. 2012-11-26 01:54:00 +00:00
Alexander Motin
7ec13509e9 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.
2012-11-25 20:06:01 +00:00
Alexander Motin
418cc71b52 Remove "clone manager: " message from verbose dmesg. It is pointless to
print values that are statically hardcoded few lines above that.
2012-11-23 15:31:00 +00:00
Alexander Motin
4754395cac Move sndbuf_setmap() output about buffer addresses from the general verbose
output to sound verbose output, where all other sndbuf messages live.
2012-11-23 13:43:51 +00:00
Alexander Motin
6d36c821ad 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.
2012-11-17 06:33:13 +00:00
Alexander Motin
1fc2a61440 For some more completeness add matrixes for 3.1 and 7.0 channel setups. 2012-11-16 07:05:57 +00:00
Kevin Lo
0f5e7edc14 Fix typo; s/ouput/output 2012-11-07 07:00:59 +00:00
Hans Petter Selasky
d3e08ca9f0 Correct buffer size printout.
MFC after:	1 week
2012-11-01 20:58:55 +00:00
Hans Petter Selasky
58e8ac5c34 Increase default volume for FastTracker playback channels.
MFC after:	1 week
2012-11-01 20:43:23 +00:00
Hans Petter Selasky
ff4d595304 Fix sysctl free bug in last commit, which eventually leads to a panic.
Add software mixer table for FastTrack Ultra.
Only set volume controls which are valid at startup for standard
USB audio devices, so that settings like treble and bass use
the reset defaults.

MFC after:	1 week
2012-11-01 20:09:48 +00:00
Hans Petter Selasky
902514f628 Export all mixer nodes into dev.pcm.X.mixer.Y sysctl nodes, hence the
PCM API doesn't support showing all the knobs. Make sure all the USB audio
mixer nodes are freed at detach. Before this patch USB audio would leak
some memory at detach. Print out buffer sizes in number of samples at attach.
Fix setting of volume controls when the number of channels is greater than two.

MFC after:	1 week
2012-11-01 16:54:26 +00:00
Hans Petter Selasky
3f5171b17f Add missing inclusion guard. 2012-11-01 16:39:01 +00:00
Alexander Motin
3049555773 ASUS EeePC 1001px has strange variant of ALC269 CODEC, that mutes speaker
if unused in that configuration mixer at NID 15 is muted.  Probably CODEC
incorrectly reports its internal connections.  Hide that muter from the
driver to avoid muting and make built-in speaker work.

There are several different CODECs sharing this ID and I have not enough
information about them and the bug to implement more universal solution.

Tested by:	Big Yuuta <init.py@gmail.com>
MFC after:	2 weeks
2012-10-31 22:11:51 +00:00
Alexander Motin
401f7c11ff 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.
2012-10-30 12:44:30 +00:00
Alexander Motin
ed228e403f Print card and subsystem IDs in verbose logs to help to identify system.
Hide some less iseful messages under debug.
2012-10-30 10:59:42 +00:00
Hans Petter Selasky
b4380da796 Implement support for the so-called USB feedback endpoint for USB
audio devices. This endpoint gives clues to the USB host about the
actual data rate on asynchronous endpoints and makes the more
expensive USB audio devices usable under FreeBSD.
The Linux USB audio driver was used as reference for the
automagic shift of the received value.

MFC after:	1 week
2012-10-28 14:37:17 +00:00
Hans Petter Selasky
76eaf53752 Make sure the vendor class quirk only matches the vendor specific
class, else multiple pcm devices can appear on certain USB audio
devices.

MFC after:	1 week
2012-10-26 12:41:01 +00:00
Hans Petter Selasky
1234097efb Fix USB audio specification compliance by filtering which descriptors can
appear on which interface. This fixes detection of some USB audio adapters.
Also increase the channel limit for FULL speed devices to 4 channels.

Tested by:	gavin
MFC after:	1 week
2012-10-24 08:00:01 +00:00
Eitan Adler
2da1951583 Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.

This is a subset of 241856 (which was reverted)

Reviewed by:	des
Approved by:	cperciva (implicit)
MFC after:	1 week
2012-10-22 22:29:48 +00:00
Eitan Adler
a8de37b024 This isn't functionally identical. In some cases a hint to disable
unit 0 would in fact disable all units.

This reverts r241856

Approved by: cperciva (implicit)
2012-10-22 13:06:09 +00:00
Eitan Adler
76b7512247 Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.

Reviewed by:	des
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:41:14 +00:00
Eitan Adler
db702c59cf remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
Alexander Motin
675dce071a Cast vendor-specific spell on VIA VT1818S codecs alike to VT1708S to
make analog input loopback and dual-stream playback work by enabling
signal mixing by nid 22, as it should be according to info returned by
the CODEC.  Otherwise pin nid 28 receives only signal from DAC nid 16.

PR:		kern/169124
MFC after:	1 week
2012-10-09 17:06:31 +00:00
Kevin Lo
b5db12bfb5 Free result of device_get_children(9). 2012-09-30 09:21:10 +00:00
Alexander Motin
076b76e871 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
2012-09-24 08:23:05 +00:00
Hans Petter Selasky
e2524b2ec9 Implement support for USB Audio v2.0. Remove some redundant
USB audio v1.0 debug data, hence userspace tools like lsusb
exist to show this information properly.
2012-09-17 15:43:57 +00:00
Hans Petter Selasky
aead9631e7 Add required USB AUDIO v2.0 structure definitions.
PR:	misc/171254
2012-09-03 19:17:25 +00:00
Alexander Motin
7d0ec9dd3f Add bunch of ATI HDMI HDA controller IDs.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2012-08-30 15:47:20 +00:00
Andreas Tobler
9c3fbfbd6a Add a new sound driver for PowerMacs, found here on my Quad G5.
It allows simple playback and volume control like the other Mac drivers,
not more.
2012-08-19 19:40:33 +00:00
Alexander Motin
52e9cf7de5 Fix "speaker" volume control, broken at r230451.
Reported and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after:	1 month
2012-08-16 07:43:15 +00:00
Alexander Motin
8684fef07d Fix multichannel input signals tracing on some CODECs like ALC260.
Reported and tested by:	Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after:	1 month
2012-08-14 14:07:34 +00:00
Andreas Tobler
6e8fcacda4 Fix typo in comment. 2012-08-14 05:16:35 +00:00
Alexander Motin
52ce0de418 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
2012-07-02 20:25:50 +00:00
Alexander Motin
3c461fd01b Restore GPIO config quirks handling, lost during last big refactoring.
Tested by:	hselasky
MFC after:	3 days
2012-07-02 18:35:08 +00:00
Gleb Smirnoff
35d393bf63 - Call bus_generic_attach() at end of hdspe_attach().
- Use own devclass_t in DRIVER_MODULE().

This fixes operation of hdspe(4) when built as loadable module.

Submitted by:	Ruslan Bukin <br bsdpad.com>
2012-07-02 07:39:55 +00:00
Peter Holm
85f6230a1d Added D_TRACKCLOSE to sndstat_cdevsw to fix the situation when
another process is in open() or stat() for the device node, then
close() from the owning process does not result in cdevsw close
method call. This fixes the pemanent "Device busy" seen.

Changed the sndstat_lock from mutex to sx.  This allows to extend
the region covered by the lock, to include the uiomove() call in
sndstat_read() and bufptr increment. This fixes the "panic:
sbuf_put_byte called with finished or corrupt sbuf" seen.

In collaboration with:	kib
MFC after:	1 week
2012-05-02 19:32:11 +00:00
Hans Petter Selasky
6d917491f5 Fix compiler warnings, mostly signed issues,
when USB modules are compiled with WARNS=9.

MFC after:	1 weeks
2012-04-02 10:50:42 +00:00
Alexander Motin
742963ff31 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
2012-03-30 08:33:08 +00:00
Alexander Motin
16b8ad6420 Stop HDA controller polling callout on suspend and reset it on resume.
PR:		kern/166382
MFC after:	1 week
2012-03-28 13:28:09 +00:00
John Baldwin
d02a6470bf Don't cast a bus address to a uint8_t pointer just to add an offset to
it.  Instead, add the offset directly to the bus address.
2012-03-23 12:34:39 +00:00
Alexander Motin
e4afd792df Add driver for the RME HDSPe AIO/RayDAT sound cards -- snd_hdspe(4).
Cards are expensive and so rare, so leave the driver as module.

Submitted by:	Ruslan Bukin <br@bsdpad.com>
MFC after:	2 weeks
2012-03-01 13:10:18 +00:00
Hans Petter Selasky
9b5da8166e Avoid creating PCM devices for MIDI adapters.
MFC after:	3 days
2012-02-23 07:56:19 +00:00
Alexander Motin
5525b53de5 Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

MFC after:	3 days
2012-02-14 09:19:30 +00:00
Ed Schouten
7870adb640 Remove direct access to si_name.
Code should just use the devtoname() function to obtain the name of a
character device. Also add const keywords to pieces of code that need it
to build properly.

MFC after:	2 weeks
2012-02-10 12:35:57 +00:00
Alexander Motin
2345f2a366 Remove extra semicolon.
Submitted by:	emaste
2012-02-05 16:41:06 +00:00
Pedro F. Giffuni
7106ed257d Use new OSS-based BSD-licensed header for cs sound driver.
The cs driver requires a table with firmware values. An
alternative firmware is available in a similar Open Sound
System driver. This is actually a partial revert of
Revision 77504.

Special thanks to joel@ for patiently testing several
replacement attempts.

The csa driver and the complete sound system are now free
of the GPL.

Tested by:	joel
Approved by:	jhb (mentor)
MFC after:	3 weeks
2012-02-01 21:38:01 +00:00