summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
Commit message (Collapse)AuthorAgeFilesLines
...
* Add NVidia MCP89 HDA controller IDs.mav2009-09-091-0/+8
|
* Add Intel 82801JD (one more ICH10) HDA controller ID.mav2009-09-091-2/+4
| | | | Submitted by: yongari
* Improve HDA controller capabilities logging.mav2009-09-023-6/+10
|
* Remove redundant Giant reference. Giant will be droppedalfred2009-08-241-2/+2
| | | | | | | automatically when the mutex argument is NULL. Reported by: Various people Submitted by: hps
* Temporarily revert the new-bus locking for 8.0 release. It will bejhb2009-08-201-2/+0
| | | | | | reintroduced after HEAD is reopened for commits by re@. Approved by: re (kib), attilio
* Make the newbus subsystem Giant free by adding the new newbus sxlock.attilio2009-08-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The newbus lock is responsible for protecting newbus internIal structures, device states and devclass flags. It is necessary to hold it when all such datas are accessed. For the other operations, softc locking should ensure enough protection to avoid races. Newbus lock is automatically held when virtual operations on the device and bus are invoked when loading the driver or when the suspend/resume take place. For other 'spourious' operations trying to access/modify the newbus topology, newbus lock needs to be automatically acquired and dropped. For the moment Giant is also acquired in some key point (modules subsystem) in order to avoid problems before the 8.0 release as module handlers could make assumptions about it. This Giant locking should go just after the release happens. Please keep in mind that the public interface can be expanded in order to provide more support, if there are really necessities at some point and also some bugs could arise as long as the patch needs a bit of further testing. Bump __FreeBSD_version in order to reflect the newbus lock introduction. Reviewed by: ed, hps, jhb, imp, mav, scottl No answer by: ariff, thompsa, yongari Tested by: pho, G. Trematerra <giovanni dot trematerra at gmail dot com>, Brandon Gooch <jamesbrandongooch at gmail dot com> Sponsored by: Yahoo! Incorporated Approved by: re (ksmith)
* USB audio:alfred2009-07-301-38/+40
| | | | | | | | - code factoring patch from "Eygene Ryabinkin" - P4 ID: 166149 Submitted by: hps Approved by: re
* Disable MSI by default for nVidia MCP55 chipset.mav2009-07-141-1/+1
| | | | | | | It is reported to be broken in the same way as MCP51. PR: kern/136429 Approved by: re (kib)
* - Do aggresive saturation on various polynomial interpolators.ariff2009-07-141-93/+98
| | | | | | | | | | This dramatically pushing 99.9% interpolations and quantizations error _below_ -180dB on 32bit dynamic range, resulting extremely high quality conversion. - Use BSPLINE interpolator for filter oversampling factor greater or equal than 64 (log2 6). Approved by: re (kib)
* Isochronous transfers only have 1 frame buffer, but multiplemarcel2009-07-121-1/+1
| | | | | | | frame lengths. The frame buffer is at index 0. Approved by: re (kensmith) Obtained from: HPS
* Rearrange shift operation to increase interpolation accuracy,ariff2009-07-091-60/+60
| | | | | | further reducing conversion artifacts and better worst case SNR. Approved by: re (kib)
* - Increase dynamic range of filter coefficients from 28bit to 30bit.ariff2009-07-051-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This cause dramatic effect in overall precision and conversion quality by pushing down most aliasing artifacts around -180 dB. Spectrogram analysis/comparison: http://people.freebsd.org/~ariff/z_comparison/z_28vs30/ - Guard against possible 64bit overflow during accumulation process by slightly normalize and saturate sample and coefficient multiplication, possible during extreme 32bit downsampling (eg. 380KHz -> 8KHz) with custom preset that require more than ~7000 taps filter (which is overkill). - Add knobs through FEEDER_RATE_PRESETS to set dynamic range of filter coefficients/accumulator and prefered polynomial interpolator: COEFFICIENT_BIT:X (where 1 <= X <= 30, default: 30) ACCUMULATOR_BIT:X (where 32 <= X <=64, default: 58) INTERPOLATOR:I (where I = ZOH, LINEAR, QUADRATIC, HERMITE, BSPLINE, OPT32X, OPT16X, OPT8X, OPT4X, OPT2X) Approved by: re (kib)
* Use the correct mutex in umidi_open()thompsa2009-06-271-4/+4
| | | | | Submitted by: Hans Petter Selasky Approved by: re (kib)
* Change the type of uio_resid member of struct uio from int to ssize_t.kib2009-06-252-6/+6
| | | | | | | | 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)
* Some DMA related changes:mav2009-06-241-33/+35
| | | | | | | - honor parent DMA tag limitations, as man page requires, - allow data buffer to be allocated within full 64bit address range, when support is announced by hardware, - add quirk, disabling 64bit addresses for broken chips, use it for MCP78.
* Slight comment fix.ariff2009-06-241-5/+4
|
* Fix a typeo in the frame len function to unbreak the build, make it shorterthompsa2009-06-231-1/+1
| | | | while I am here.
* - Make struct usb_xfer opaque so that drivers can not access the internalsthompsa2009-06-231-96/+123
| | | | - Reduce the number of headers needed for a usb driver, the common case is just usb.h and usbdi.h
* - Add a way to change filter oversampling factor throughariff2009-06-151-1/+1
| | | | | | | | | | | | | FEEDER_RATE_PRESET "OVERSAMPLING_FACTOR:X .. .." where X = log2(oversampling factor). - Lower down default filter oversampling factor from 128 (log2 = 7) to 32 (log2 = 5), saving worth of 80 Kb. The use of better polynomial interpolator will raise its conversion quality/accuracy to match (or slightly better) with previous settings. - Bump driver version.
* Remap type of polynomial interpolators for better polyphaseariff2009-06-151-5/+3
| | | | | | | | | | | coefficients quality: - Linear interpolator for oversampling factor larger and equal than 4096 (log2 = 12). - Quadratic interpolator for oversampling factor larger and equal than 256 (log2 = 8). Default oversampling factor (128 ~ log2 = 7) will use OPT32X, which provides better accuracy.
* s/usb2_/usb_|usbd_/ on all function names for the USB stack.thompsa2009-06-151-74/+74
|
* Fix type of lowaddr variable.mav2009-06-141-2/+2
|
* Remove custom KOBJMETHOD(), CHANNEL_DECLARE() and MIXER_DECLARE()ariff2009-06-115-55/+11
| | | | | (enabled with SND_DEBUG) that was intended to provoke build failure due to inconsistencies.
* Move machine dependant AFMT_* definition from sound.hariff2009-06-101-30/+0
| | | | to global soundcard.h .
* Fix compile time warning on sparc64, thanks to strict kobj signatures checking.ariff2009-06-081-10/+9
| | | | Noticed by: bz
* Fix powerpc build failure due to strict kobj signatures checking.ariff2009-06-082-6/+6
|
* Fix build on sparc64.ariff2009-06-071-1/+1
| | | | Pointy hat: ariff@
* Bump driver revision (should have bumped it earlier).ariff2009-06-071-1/+1
|
* Sound Mega-commit. Expect further cleanup until code freeze.ariff2009-06-0785-5778/+11014
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For a slightly thorough explaination, please refer to [1] http://people.freebsd.org/~ariff/SOUND_4.TXT.html . Summary of changes includes: 1 Volume Per-Channel (vpc). Provides private / standalone volume control unique per-stream pcm channel without touching master volume / pcm. Applications can directly use SNDCTL_DSP_[GET|SET][PLAY|REC]VOL, or for backwards compatibility, SOUND_MIXER_PCM through the opened dsp device instead of /dev/mixer. Special "bypass" mode is enabled through /dev/mixer which will automatically detect if the adjustment is made through /dev/mixer and forward its request to this private volume controller. Changes to this volume object will not interfere with other channels. Requirements: - SNDCTL_DSP_[GET|SET][PLAY|REC]_VOL are newer ioctls (OSSv4) which require specific application modifications (preferred). - No modifications required for using bypass mode, so applications like mplayer or xmms should work out of the box. Kernel hints: - hint.pcm.%d.vpc (0 = disable vpc). Kernel sysctls: - hw.snd.vpc_mixer_bypass (default: 1). Enable or disable /dev/mixer bypass mode. - hw.snd.vpc_autoreset (default: 1). By default, closing/opening /dev/dsp will reset the volume back to 0 db gain/attenuation. Setting this to 0 will preserve its settings across device closing/opening. - hw.snd.vpc_reset (default: 0). Panic/reset button to reset all volume settings back to 0 db. - hw.snd.vpc_0db (default: 45). 0 db relative to linear mixer value. 2 High quality fixed-point Bandlimited SINC sampling rate converter, based on Julius O'Smith's Digital Audio Resampling - http://ccrma.stanford.edu/~jos/resample/. It includes a filter design script written in awk (the clumsiest joke I've ever written) - 100% 32bit fixed-point, 64bit accumulator. - Possibly among the fastest (if not fastest) of its kind. - Resampling quality is tunable, either runtime or during kernel compilation (FEEDER_RATE_PRESETS). - Quality can be further customized during kernel compilation by defining FEEDER_RATE_PRESETS in /etc/make.conf. Kernel sysctls: - hw.snd.feeder_rate_quality. 0 - Zero-order Hold (ZOH). Fastest, bad quality. 1 - Linear Interpolation (LINEAR). Slightly slower than ZOH, better quality but still does not eliminate aliasing. 2 - (and above) - Sinc Interpolation(SINC). Best quality. SINC quality always start from 2 and above. Rough quality comparisons: - http://people.freebsd.org/~ariff/z_comparison/ 3 Bit-perfect mode. Bypasses all feeder/dsp effects. Pure sound will be directly fed into the hardware. 4 Parametric (compile time) Software Equalizer (Bass/Treble mixer). Can be customized by defining FEEDER_EQ_PRESETS in /etc/make.conf. 5 Transparent/Adaptive Virtual Channel. Now you don't have to disable vchans in order to make digital format pass through. It also makes vchans more dynamic by choosing a better format/rate among all the concurrent streams, which means that dev.pcm.X.play.vchanformat/rate becomes sort of optional. 6 Exclusive Stream, with special open() mode O_EXCL. This will "mute" other concurrent vchan streams and only allow a single channel with O_EXCL set to keep producing sound. Other Changes: * most feeder_* stuffs are compilable in userland. Let's not speculate whether we should go all out for it (save that for FreeBSD 16.0-RELEASE). * kobj signature fixups, thanks to Andriy Gapon <avg@freebsd.org> * pull out channel mixing logic out of vchan.c and create its own feeder_mixer for world justice. * various refactoring here and there, for good or bad. * activation of few more OSSv4 ioctls() (see [1] above). * opt_snd.h for possible compile time configuration: (mostly for debugging purposes, don't try these at home) SND_DEBUG SND_DIAGNOSTIC SND_FEEDER_MULTIFORMAT SND_FEEDER_FULL_MULTIFORMAT SND_FEEDER_RATE_HP SND_PCM_64 SND_OLDSTEREO Manual page updates are on the way. Tested by: joel, Olivier SMEDTS <olivier at gid0 d org>, too many unsung / unnamed heroes.
* revert r162516. We only support 1 or 2 channels per streamthompsa2009-06-041-1/+3
| | | | | | which reflects mono and stereo. Submitted by: Hans Petter Selasky
* Comment out old Realtek ALC883 quirk, that was disabling phantop power onmav2009-06-011-1/+3
| | | | | | | mic inputs. I have no idea what for it was made that time, but now I have several reports that it should be removed to make microphones work. If this quirk is still required for some systems then they should be identified and specified explicitly.
* s/usb2_/usb_/ on all typedefs for the USB stack.thompsa2009-05-291-11/+11
|
* s/usb2_/usb_/ on all C structs for the USB stack.thompsa2009-05-282-66/+66
|
* Provide a workaround for USB devices that do not support mono or stereothompsa2009-05-271-3/+5
| | | | | | | operation by overriding the channel count. Submitted by: Hans Petter Selasky Reported by: MIHIRA Sanpei Yoshiro
* Slightly adjust copyright text.joel2009-05-271-1/+1
| | | | Approved by: Hannu Savolainen <hannu@opensound.com>
* Slightly adjust copyright text.joel2009-05-271-1/+1
| | | | Approved by: luigi
* Separate comments from the license text.joel2009-05-273-3/+9
|
* Fix a few variable renames of usb2_mode outside dev/usb.thompsa2009-05-211-6/+6
|
* Slightly adjust copyright text.joel2009-05-201-1/+1
| | | | Approved by: matk
* Remove license clauses 3 and 4 as per rev. 1.65 of midi.c in NetBSD.joel2009-05-201-7/+0
| | | | Approved by: matk
* Remove license clauses 3 and 4 as per rev. 1.65 of auvia.c in NetBSD.joel2009-05-201-7/+0
|
* Remove license clauses 3 and 4 as per rev. 1.112 of uaudio.c and rev. 1.15 ofjoel2009-05-202-14/+0
| | | | uaudioreg.h in NetBSD.
* Remove license clauses 3 and 4 as per rev. 1.12 of cs4231reg.h in NetBSD.joel2009-05-201-7/+0
|
* Add one more board ID with inverted external amplifier control.mav2009-05-081-0/+1
| | | | PR: kern/121156
* - Unlock softc mutex on failure.stas2009-04-201-8/+15
| | | | MFC after: 1 week
* - Properly unlock mutex on failure in channel_trigger. Before thisstas2009-04-201-8/+15
| | | | | | the function just returned with the mutex held. MFC after: 1 week
* MFp4 //depot/projects/usb@159909thompsa2009-04-051-35/+35
| | | | | | | | | | | | | - make usb2_power_mask_t 16-bit - remove "usb2_config_sub" structure from "usb2_config". To compensate for this "usb2_config" has a new field called "usb_mode" which select for which mode the current xfer entry is active. Options are: a) Device mode only b) Host mode only (default-by-zero) c) Both modes. This change was scripted using the following sed script: "s/\.mh\././g". - the standard packet size table in "usb_transfer.c" is now a function, hence the code for the function uses less memory than the table itself. Submitted by: Hans Petter Selasky
* Add some more logic for AD1986A codec input tracing. Use mic preamplifiermav2009-04-011-5/+42
| | | | | | | | | only for mic-type inputs. This gives better chances to use it. Change default configuration for some AD1986A codec based ASUS boards, use it also for ASUS P5PL2 board. This makes front mic preamplifier working. Tested by: Vadim Frolov <frolov@frolov.ck.ua>
* Fixup relative pointers after channel realloc. It fixes crash on systemsmav2009-03-291-8/+11
| | | | | | | | with several HDA codecs per controller. While I am there, remove some unneeded dereferences. Submitted by: Tor Egge <Tor.Egge@cvsup.no.freebsd.org>
* Remove CD input hack for ALC268 based Acer systems. Latest systems does notmav2009-03-161-5/+7
| | | | | | | | | | | | implement CD input in hardware, while unconditional showing it confuse users. Also it was made in the way that sometimes improper with present driver. Add patch for ALC268 based Acer TM5320 to make headphones jack sensing work. Default configuration defines two separate playback associations, which current driver unable to trace properly due to order they are defined and limited codec uniformity. Submitted by: G. Mirov <g.mirov AT gmail.com>
OpenPOWER on IntegriCloud