summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
Commit message (Collapse)AuthorAgeFilesLines
* MFC r289888:avatar2015-11-171-4/+8
| | | | | | | - Plugging a memory leak when malloc() failed during initialisation; - Plugging another memory leak inside the destructor. Reviewed by: matk
* MFC r286887: Using the error return code documented in the comment.avatar2015-09-011-1/+1
| | | | | | | | Though there is no direct midi_uninit() caller amongst existing drivers at this moment, a quick experiment indicates that EBUSY gives users more precise error message once drivers start to honour this result. For example, emu_midi_detach() should check the result of mpu401_uninit() and block module unloading if there is any MIDI I/O in progress.
* MFC r286886: Fixing typo as well as improving readability of a few comments.avatar2015-08-261-6/+11
|
* MFC r282650 and r282651:hselasky2015-06-035-113/+119
| | | | | | | | | | | | | | Extend the maximum number of allowed PCM channels in a PCM stream to 127 and decrease the maximum number of sub-channels to 1. These definitions are only used inside the kernel and can be changed later if more than one sub-channel is desired. This has been done to allow so-called USB audio rack modules to work with FreeBSD. Add support for more than 8 audio channels per PCM stream for USB audio class compliant devices under FreeBSD. Tested using 16 recording and 16 playback audio channels simultaneously. Bump the FreeBSD version to force recompiling all external modules.
* MFC r283064:hselasky2015-05-271-1/+1
| | | | | | 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.
* MFC r282017:hselasky2015-05-211-3/+10
| | | | | | Allow DSP basename cloning to be disabled or enabled at boot and runtime. This is useful when implementing OSS sound stacks in userspace via libcuse for example.
* MFC r282652:hselasky2015-05-211-3/+13
| | | | | Ensure the USB audio driver doesn't attach twice on the same USB device by grabbing all the USB audio device interfaces.
* MFC r281544:rpaulo2015-04-254-0/+16
| | | | | | | | snd_hda: add support for the Lenovo X1 20BS model. This requires a patch to redirect the output to a separate DAC when the headphones are used. While there, add device strings for Intel Broadwell HDA controllers and Realtek ALC292 codecs.
* MFC r280322 and r280429:hselasky2015-03-253-129/+282
| | | | | | | | | | | | | | | | | | | | | The synchronisation value returned by the so-called feedback endpoint appears to be too inaccurate that it can be used to synchronize the playback data stream. If there is a recording endpoint associated with the playback endpoint, use that instead. That means if the isochronous OUT endpoint is asynchronus the USB audio driver will automatically start recording, if possible, to get exact information about the needed sample rate adjustments. In no recording endpoint is present, no rate adaption will be done. While at it fix an issue where the hardware buffer pointers don't get reset at the first device PCM trigger. Make some variables 32-bit to avoid problems with multithreading. Use the feedback value from the synchronization endpoint as fallback when there is no recording channel. PR: 198444
* MFC r278503:hselasky2015-02-131-42/+54
| | | | | | | | Revert r274918 and make a better solution. Poll the synchronisation endpoint less frequently to make the sample rate adjustment more accurate. This should resolve problems with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik.
* MFC r275101:mav2014-12-032-0/+2
| | | | Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
* MFC r274918:hselasky2014-12-011-2/+13
| | | | | | | | | Don't use the synchronization endpoint unless referenced by the isochronous endpoint descriptor used for the data transfers, hence the synchronization feature might not be supposed to be supported [yet]. This makes seamless playback synced with the USB HOST clock work with the DN32-USB module for Midas audio systems and possibly other similar products from Klark Teknik.
* MFC r263710, r273377, r273378, r273423 and r273455:hselasky2014-10-271-1/+1
| | | | | | | - De-vnet hash sizes and hash masks. - Fix multiple issues related to arguments passed to SYSCTL macros. Sponsored by: Mellanox Technologies
* MFC r272254:hselasky2014-10-022-22/+45
| | | | | | | | Instead of creating the full range of possible ports, try to figure out the actual number of so-called "embedded jacks" which are present when a USB MIDI device is attaching. Approved by: re, gjb
* MFC r271218:hselasky2014-09-101-2/+2
| | | | | | Update mixer description for FastTrackPro. Approved by: re, marius
* MFC r269228:mav2014-09-061-0/+13
| | | | | | | Add support for SOUND_MIXER_INFO IOCTL, used by gstreamer. Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com> Approved by: re (marius)
* MFC r270134:hselasky2014-08-271-13/+2
| | | | | | | | | | Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual sample size. According to the USB audio frame format specification from USB.org, the value in the "bBitResolution" field can be less than the actual sample size, depending on the actual hardware, and should not be used for this computation. PR: 192755
* MFC r268584:markj2014-08-052-1/+3
| | | | Add a headphone redirection quirk for the Lenovo G580.
* MFC: r266793, r266799, r266808marius2014-06-041-7/+8
| | | | | | | | | | | - Fix compilation with PAE support enabled by merging r233362 and, thus, doing away with the unnecessary uint8_t pointer casting. physical addresses. - Nuke the unused softc of emujoy(4). - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Sponsored by: Bally Wulff Games & Entertainment GmbH
* MFC r266006 and r266011:hselasky2014-05-211-1/+1
| | | | Fix unload of USB audio kernel module.
* MFC: r264832marius2014-04-263-41/+33
| | | | | | | - 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: r264831marius2014-04-262-1/+9
| | | | Add quirk to configure headphones redirection on Intel DH87RL boards.
* MFC r263159:hselasky2014-03-221-0/+19
| | | | | Workaround for USB MIDI adapters which use non-supported values of wMaxPacketSize for BULK endpoints.
* MFC r263155:hselasky2014-03-221-1/+5
| | | | | | Add support for more sample rates to USB audio driver. PR: usb/171254
* MFC r261507:hselasky2014-02-122-0/+12
| | | | | | | Add more quirks for making builtin audio speakers work with more MacBookPro's. Only tested with MacBookPro 9,2. Obtained from: Linux
* MFC r258779,r258780,r258787,r258822:eadler2014-02-041-1/+1
| | | | | | | | | | | | | 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. Similar to the (1 << 31) case it is not defined to do (2 << 30). 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.
* MFC r258168, r258170:mav2014-01-053-0/+20
| | | | Add some more Intel HDA controller and CODEC IDs.
* MFC r260112:dim2014-01-041-0/+6
| | | | In sys/dev/sound/pci/maestro.c, #if 0 two unused static functions.
* Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCIscottl2013-08-1220-128/+23
| | | | | | | | | | | | | | | | | 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
* snd_ds1(4): Fix order of arguments for stereo/16bit modeuqs2013-07-251-1/+1
| | | | | | | | | | 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
* Add quirk to configure headphones redirection on ASUS UX31A laptop.mav2013-07-082-0/+8
| | | | MFC after: 3 days
* Update snd quirks for T520, T420, X220.sbruno2013-05-191-0/+10
| | | | | | | | | | | | | 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
* Don't clear stall at first time use of USB MIDI endpoints.hselasky2013-05-181-5/+4
| | | | | | | | | 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
* Fix issue with "Logitech Webcam C525":hselasky2013-05-181-0/+27
| | | | | | | | | | 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
* Some fixes to snd_envy24ht(4) driver:mav2013-05-052-32/+13
| | | | | | | | | | - 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
* Fix for duplicate sample rate detection after recent patches.hselasky2013-04-241-6/+13
|
* Fix the USB audio feedback endpoint algorithm. There should nothselasky2013-04-241-4/+0
| | | | | | be any need to bias the returned value. Reported by: Craig Leres <leres@ee.lbl.gov>
* Fix playback for Focusrite Scarlett 2i2 USB recording interface.hselasky2013-04-241-0/+4
| | | | Submitted by: Ed Maste, emaste @
* Add support for runtime switching of sample rate forhselasky2013-04-231-250/+431
| | | | | | | USB audio devices. Previously the highest sample rate was unconditionally selected. Requested by: Craig Leres <leres@ee.lbl.gov>
* - Correct mispellings of word andgabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* - Corrrect mispellings of word usefulgabor2013-04-171-1/+1
| | | | Submitted by: Christoph Mallon <christoph.mallon@gmx.de> (via private mail)
* Add Subsystem ID field to the quirk table. Use it to identify Mac Pro 1,1,mav2013-03-271-26/+33
| | | | | | | | 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:
* Hide version string under verbose.joel2013-03-161-2/+6
| | | | Approved by: mav
* Add quirk for Lenovo T530 headphone redirection.delphij2013-03-132-1/+3
| | | | MFC after: 2 weeks
* More Lenovo headphones redirection quirks: Lenovo T430, Lenovo T430S.glebius2013-03-122-1/+5
| | | | | Submitted by: Sergey Nasonov <snasonov bcc.ru>, T430 Submitted by: Johannes Dieterich <dieterich.joh gmail.com>, T430S
* MFCattilio2013-03-083-1/+27
|\
| * Add quirks to enable headphones redirection on number of Lenovoglebius2013-03-072-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Plug a memory leak.glebius2013-03-071-1/+5
| | | | | | | | | | Reviewed by: mav Sponsored by: Nginx, Inc.
| * Add quirk to enable headphones redirection on Lenovo X220.mav2013-03-042-0/+8
| | | | | | | | | | PR: kern/174876 MFC after: 1 week
* | Switch vm_object lock to be a rwlock.attilio2013-02-201-0/+2
|/ | | | | | | | * VM_OBJECT_LOCK and VM_OBJECT_UNLOCK are mapped to write operations * VM_OBJECT_SLEEP() is introduced as a general purpose primitve to get a sleep operation using a VM_OBJECT_LOCK() as protection * The approach must bear with vm_pager.h namespace pollution so many files require including directly rwlock.h
OpenPOWER on IntegriCloud