summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
Commit message (Collapse)AuthorAgeFilesLines
* Fix compilation for statically linked snd_envy24{ht}/spicds. Use explicitariff2007-02-143-3/+3
| | | | | | struct mtx rather than void pointer. PR: kern/109147
* Orion originally wrote and added these files in 2002/2003, so with hisjoel2007-02-042-2/+4
| | | | | | | | | approval, change the copyright statement to point at him instead of "FreeBSD, Inc". Encouraged by: rwatson Reviewed by: imp Discussed with and approved by: orion
* Remove dead email address.joel2007-02-023-3/+3
| | | | Requested by: luigi
* Clean up the BSD license to match the preferred license injoel2007-02-026-17/+13
| | | | | | | /usr/share/examples/etc/bsd-style-copyright. I've fixed a few minor wording and formatting differences. Approved by: luigi, Hannu Savolainen <hannu@opensound.com>
* Add a standard BSD license to these files.joel2007-02-022-5/+52
| | | | | Discussed with: rwatson Approved by: luigi
* Fix huge memory leak within sound buffer (during channel destruction,ariff2007-02-012-0/+13
| | | | | | | | | | | | buffer resizing, etc.) that was here since eon. Free all (unmanaged) allocated buffer through sndbuf_destroy() in case we forgot to call sndbuf_free(). For a managed buffer (mostly hw specific managed buffer), either provide CHANNEL_FREE() method with appropriate return value to invoke semi-automatic sndbuf_free() or simply do it on their own. If everything is failed, sndbuf_destroy() will come to the rescue as a final measure. MFC after: 3 days
* Fix apparent memory leak (during vchan destruction) that was hereariff2007-02-011-0/+1
| | | | since eon.
* Put #ifndef... after the license.joel2007-01-311-2/+3
| | | | Approved by: ariff
* s/WHETHERIN/WHETHER IN/ & s/THEPOSSIBILITY/THE POSSIBILITY/ in thejoel2007-01-311-2/+2
| | | | | | license text. Approved by: imp
* Clean up the BSD license to match the preferred license injoel2007-01-2810-138/+160
| | | | | | | | /usr/share/examples/etc/bsd-style-copyright. I've fixed a few minor wording and formatting differences. Approved by: matk, Hannu Savolainen <hannu@opensound.com> Reviewed by: imp
* Add speaker control for HP xw4300. This hardware doesn't respond toariff2007-01-281-2/+17
| | | | | | | | | | | | unsolicited pin sense event and need manual control to turn off speaker volume while attaching headphone. Tested by: Ingeborg Hellemo <Ingeborg.Hellemo@cc.uit.no> Disable global Acer + ALC883 headphone automute settings since there are few models that does not respect this and causing broken behaviour. Reported/Tested by: Pavel Argentov <argentoff@rtelekom.ru>
* Rearrange locking order to avoid LOR (cat /dev/midistat).ariff2007-01-271-3/+9
| | | | Reported by: rodrigc
* Massive inlining cleanups/removal to make it survive on WARNS=2.ariff2007-01-271-92/+90
|
* Reduce maximum DMA segments from 128 to 64. We don't need more than that.ariff2007-01-271-1/+1
|
* Total DMA segments should include total number of record channel(s).ariff2007-01-261-1/+1
|
* Fix forever broken ua_chan_setblocksize() uninitialized return valueariff2007-01-261-7/+13
| | | | which causing divide by zero panic in other places (notably chn_sync()).
* Sync uaudio_sndstat_prepare_pcm() output with sndstat_prepare_pcm() to getariff2007-01-261-4/+12
| | | | simmilar (debugging) output.
* Change the remainder of the drivers for DMA'ing devices enabled in themarius2007-01-212-2/+3
| | | | | | | | sparc64 GENERIC and the sound device drivers known working on sparc64 to use bus_get_dma_tag() to obtain the parent DMA tag so we can get rid of the sparc64_root_dma_tag kludge eventually. Except for ath(4), sk(4), stge(4) and ti(4) these changes are runtime tested (unless I booted up the wrong kernels again...).
* - Probe the CS4231 in USIII machines.marius2007-01-181-6/+4
| | | | | | - Remove unused variables. [1] Reported by: Coverity Prevent (CID 700, 701) [1]
* Fix typo in a comment.joel2007-01-161-1/+1
|
* Fix headphone/speaker automute for [1] Acer Aspire 5050 and [2] MSI MS-1034ariff2007-01-131-0/+27
| | | | | | | | | | | laptops. Tested by: [1] Lion G. <liontanker@hotmail.com> [2] Pietro Cerutti <pietro.cerutti@gmail.com> Specialized mixer initialization for STAC9221, much like STAC9220. Tested by: Devon H. O'Dell
* Fixes module build with DEB(x) defined to x.netchild2007-01-061-1/+1
| | | | Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Sync with NetBSD:netchild2007-01-061-1/+8
| | | | | | | | | | | | | | | | | | revision 1.98 is NOT merged, because FreeBSD does not support this syntax. revision 1.99 is NOT merged, "const poisoning" part is not applicable to FreeBSD. There is no variable shadowing, GCC can't find this one (but there are others) revision 1.100 is NOT merged, because it was null patch (no changes) revision 1.101 is NOT merged, there is no BIT() macro in FreeBSD revision 1.102 is merged revision 1.103 is partially merged. There is no ai.ifaceh in FreeBSD revision 1.104 is NOT merged revision 1.105 is merged revision 1.106 is not merged, because of rev. 1.107 revision 1.107 is a backuout of 1.106 Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Extend the emu10kx driver. With the words of the author:netchild2007-01-063-63/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---snip--- New features: 1. Optional multichannel recording (32 channels on Live!, 64 channels on Audigy). All channels are 16bit/48000Hz/mono, format is fixed. Half of them are copied from sound output, another half can be used to record any data from DSP. What should be recorded is hardcoded in DSP code. In this version it records dummy data, but can be used to record all DSP inputs, for example.. Because there are no support of more-than-stereo sound streams multichannell stream is presented as one 32(64)*48000 Hz 16bit mono stream. Channel map: SB Live! (4.0/5.1) offset (words) substream 0x00 Front L 0x01 Front R 0x02 Digital Front L 0x03 Digital Front R 0x04 Digital Center 0x05 Digital Sub 0x06 Headphones L 0x07 Headphones R 0x08 Rear L 0x09 Rear R 0x0A ADC (multi-rate recording) L 0x0B ADC (multi-rate recording) R 0x0C unused 0x0D unused 0x0E unused 0x0F unused 0x10 Analog Center (Live! 5.1) / dummy (Live! 4.0) 0x11 Analog Sub (Live! 5.1) / dummy (Live! 4.0) 0x12..-0x1F dummy Audigy / Audigy 2 / Audigy 2 Value / Audigy 4 offset (words) substream 0x00 Digital Front L 0x01 Digital Front R 0x02 Digital Center 0x03 Digital Sub 0x04 Digital Side L (7.1 cards) / Headphones L (5.1 cards) 0x05 Digital Side R (7.1 cards) / Headphones R (5.1 cards) 0x06 Digital Rear L 0x07 Digital Rear R 0x08 Front L 0x09 Front R 0x0A Center 0x0B Sub 0x0C Side L 0x0D Side R 0x0E Rear L 0x0F Rear R 0x10 output to AC97 input L (muted) 0x11 output to AC97 input R (muted) 0x12 unused 0x13 unused 0x14 unused 0x15 unused 0x16 ADC (multi-rate recording) L 0x17 ADC (multi-rate recording) R 0x18 unused 0x19 unused 0x1A unused 0x1B unused 0x1C unused 0x1D unused 0x1E unused 0x1F unused 0x20..0x3F dummy Fixes: 1. Do not assign negative values to variables used to index emu_cards array. This array was never accessed when index is negative, but Alexander (netchild@) told me that Coverity does not like it. After this change emu_cards[0] should never be used to identify valid sound card. 2. Fix off-by-one errors in interrupt manager. Add more checks there. 3. Fixes to sound buffering code now allows driver to use large playback buffers. 4. Fix memory allocation bug when multichannel recording is not enabled. 5. Fix interrupt timeout when recording with low bitrate (8kHz). Hardware: 1. Add one more known Audigy ZS card to list. Add two cards with PCI IDs betwen old known cards and new one. Other changes: 1. Do not use ALL CAPS in messages. Incomplete code: 1. Automute S/PDIF when S/PDIF signal is lost. Tested on i386 only, gcc 3.4.6 & gcc41/gcc42 (syntax only). ---snip--- This commits enables a little bit of debugging output when the driver is loaded as a module. I did a cross-build test for amd64. The code has some style issues, this will be addressed later. The multichannel recording part is some work in progress to allow playing around with it until the generic sound code is better able to handle multichannel streams. This is supposed to fix CID: 171187 Found by: Coverity Prevent Submitted by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru>
* Fix headphone/speaker automute for Toshiba Satellite Pro U200.ariff2007-01-041-1/+10
| | | | Reported/Tested by: keramida
* Fix distorted sound on Intel Desktop Board D101GGC (ATI SB450/ALC861).ariff2006-12-221-10/+7
| | | | | | | Turn on ALC861 quirk as default since it seems affecting all hardwares with the same codec. Reported/Tested by: Darryl Yeoh <drl@MyBSD.org.my>
* Fix distorted sound on Fujitsu Siemens AMILO Pa 1510.ariff2006-12-191-1/+7
| | | | Reported/Tested by: infofarmer
* Latest updates for Envy24/24HT. Fix various issues with LOR and panicariff2006-12-173-29/+72
| | | | | | during verbose booting. Submitted by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
* Add codec id for [1] Realtek ALC888 and [2] Sigmatel STAC9227ariff2006-12-171-0/+4
| | | | | Found/Tested by: [1] luigi [2] Jean-Baptiste Quenot <jbq@caraldi.com>
* Add support for Nvidia Nforce MCP04 AC97 controller.ariff2006-12-171-0/+3
| | | | | PR: kern/106829 Submitted by: Frédéric Petit <fredantispam@free.fr>
* Miscellaneous fixups and quirks for ASUS A7M, LG LW20 andariff2006-12-161-5/+36
| | | | HP NX6325 laptops.
* Fix compilation using gcc 4.1.ariff2006-12-151-1/+1
| | | | Submitted by: dougb
* Fix distorted sound on ASUS P1-AH2 caused by accumulated input / output.ariff2006-12-111-0/+10
| | | | Reported/Tested by: Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp>
* Fix AD1986A (and possibily other codecs too) microphone issues.ariff2006-12-101-3/+38
| | | | Tested by: xride (using skype, xanalyser, etc. ; play/record)
* - Fix headphone/speakers automute on Lenovo 3000 N100.ariff2006-12-091-47/+74
| | | | | | | Tested by: xride - GPIO commit cleanups and fixes for possible breakage during previous commit.
* Don't try to workaround broken apps (if any). If this still the case,ariff2006-12-071-16/+1
| | | | lets fix the broken apps instead.
* Remove comment that is no longer relevant since previousariff2006-12-071-7/+0
| | | | buffering fix.
* Add support for Apple Intel/Mac.ariff2006-12-021-10/+48
| | | | | | | | | | - Playback and headphone/speaker automute works. - Recording untested due to me being deaf doing back-and-forth remote debugging. Free Macbook donation is highly appreciated :) Tested by: Dennis Pielken <mips128@gmx.net>
* Add inverted amplifier sense quirk for HP Compaq nx4300.ariff2006-12-011-0/+1
| | | | | | PR: kern/106104 Submitted by: Shun-ichi Kobayashi <koba@mbox.kudpc.kyoto-u.ac.jp> MFC after: 3 days
* Fix support for Medion MD MD95257 (GPIO2 quirk).ariff2006-11-291-7/+12
| | | | Reported by: Chris Tophe <cohika@gmail.com>
* - LNV -> LENOVOariff2006-11-271-4/+10
| | | | | | - Fix support for Samsung Q1 UltraMobile PC (inverted EAPD). Reported by: benno
* Welcome to Once-a-year Sound Mega-Commit. Enjoy numerous updates and fixesariff2006-11-2627-2642/+5579
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in every sense. General ------- - Multichannel safe, endian safe, format safe * Large part of critical pcm filters such as vchan.c, feeder_rate.c, feeder_volume.c, feeder_fmt.c and feeder.c has been rewritten so that using them does not cause the pcm data to be converted to 16bit little endian. * Macrosses for accessing pcm data safely are defined within sound.h in the form of PCM_READ_* / PCM_WRITE_* * Currently, most of them are probably limited for mono/stereo handling, but the future addition of true multichannel will be much easier. - Low latency operation * Well, this require lot more works to do not just within sound driver, but we're heading towards right direction. Buffer/block sizing within channel.c is rewritten to calculate precise allocation for various combination of sample/data/rate size. As a result, applying correct SNDCTL_DSP_POLICY value will achive expected latency behaviour simmilar to what commercial 4front driver do. * Signal handling fix. ctrl+c of "cat /dev/zero > /dev/dsp" does not result long delay. * Eliminate sound truncation if the sound data is too small. DIY: 1) Download / extract http://people.freebsd.org/~ariff/lowlatency/shortfiles.tar.gz 2) Do a comparison between "cat state*.au > /dev/dsp" and "for x in state*.au ; do cat $x > /dev/dsp ; done" - there should be no "perceivable" differences. Double close for PR kern/31445. CAVEAT: Low latency come with (unbearable) price especially for poorly written applications. Applications that trying to act smarter by requesting (wrong) blocksize/blockcount will suffer the most. Fixup samples/patches can be found at: http://people.freebsd.org/~ariff/ports/ - Switch minimum/maximum sampling rate limit to "1" and "2016000" (48k * 42) due to closer compatibility with 4front driver. Discussed with: marcus@ (long time ago?) - All driver specific sysctls in the form of "hw.snd.pcm%d.*" have been moved to their own dev sysctl nodes, notably: hw.snd.pcm%d.vchans -> dev.pcm.%d.vchans Bump __FreeBSD_version. Driver specific --------------- - Ditto for sysctls. - snd_atiixp, snd_es137x, snd_via8233, snd_hda * Numerous cleanups and fixes. * _EXPERIMENTAL_ polling mode support using simple callout_* mechanisme. This was intended for pure debugging and latency measurement, but proven good enough in few unexpected and rare cases (such as problematic shared IRQ with GIANT devices - USB). Polling can be enabled/disabled through dev.pcm.0.polling. Disabled by default. - snd_ich * Fix possible overflow during speed calibration. Delay final initialization (pcm_setstatus) after calibration finished. PR: kern/100169 Tested by: Kevin Overman <oberman@es.net> * Inverted EAPD for few Nec VersaPro. PR: kern/104715 Submitted by: KAWATA Masahiko <kawata@mta.biglobe.ne.jp> Thanks to various people, notably Joel Dahl, Yuriy Tsibizov, Kevin Oberman, those at #freebsd-azalia @ freenode and others for testing. Joel Dahl will do the manpage update.
* MFP4 (109713):netchild2006-11-261-0/+3
| | | | | | | | Add OSS_GETVERSION ioctl for compatibility. Some ports expect this and fail to compile on -current ATM. Submitted by: ryanb
* MFP4:netchild2006-10-281-2/+2
| | | | | | | | | | Rename MAX_SAMPLE_RATES macro to OSS_MAX_SAMPLE_RATES. The old macro clashed with those used in other applications and libaries (ex: RtAudio). 4Front responded by updating their spec, so we will follow suit. Submitted by: ryanb Noticed by: pointyhat/kris
* - Inverted EAPD quirk for ASUS A8Jc.ariff2006-10-161-17/+17
| | | | | | | - Take the literal meaning of eapdbtl, but do the inversion during write. Tested by: Chung-liang Wei <idreamer@gmail.com>
* Wrap debug printfs into SEQ_DEBUG() to avoid kernel messages clutterariff2006-10-151-19/+19
| | | | during module unload.
* - Fix support for ASUS U5F laptop. This laptop (and possibly others)ariff2006-10-121-3/+23
| | | | | | | | need a special inverted EAPD quirk. - Add "eapdinv" config for future testing purposes. Tested by: Yuriy Tsibizov <Yuriy.Tsibizov@gfk.ru> #freebsd-azalia @ irc.freenode.net
* Fix support for IBM/Lenovo Thinkcentre M52 series. Its vendorid / 0x1014ariff2006-10-121-16/+44
| | | | | | accidentally match with HP vendorid / 0x103c. Reported by: Robert Noland <rnoland@2hip.net>
* Added few more pci ids for Intel, ATI, NVidia, VIA and SiS.ariff2006-10-081-2/+30
|
* Remove unnecessary test case. (As written, that branch will nevernetchild2006-10-081-2/+0
| | | | | | | | be followed.) Submitted by: ryanb Found with: Coverity Prevent CID: 239860
OpenPOWER on IntegriCloud