summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/usb
Commit message (Collapse)AuthorAgeFilesLines
* MFC r282650 and r282651:hselasky2015-06-031-14/+27
| | | | | | | | | | | | | | 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 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 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 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 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 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 r266006 and r266011:hselasky2014-05-211-1/+1
| | | | Fix unload of USB audio kernel module.
* 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
* 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
* 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>
* Add support for mute buttons on USB audio devices andhselasky2013-02-071-18/+28
| | | | | | use the hwvol interface to adjust the mixer settings. MFC after: 1 week
* Add support for buttons on USB audio devices,hselasky2013-02-061-1/+219
| | | | | | | like Volume Up and Volume Down. Reviewed by: mav @ MFC after: 1 week
* Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on ↵sbz2013-01-301-1/+1
| | | | | | | device_method_t arrays Reviewed by: cognet Approved by: cognet
* Reduce stack usage in the USB audio driver by moving some large stackhselasky2012-12-211-292/+282
| | | | | | | | 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
* Add support for various Yamaha keyboards.hselasky2012-12-081-1/+125
| | | | | MFC after: 1 week PR: usb/174254
* Correct buffer size printout.hselasky2012-11-011-10/+4
| | | | MFC after: 1 week
* Increase default volume for FastTracker playback channels.hselasky2012-11-011-1/+4
| | | | MFC after: 1 week
* Fix sysctl free bug in last commit, which eventually leads to a panic.hselasky2012-11-011-14/+188
| | | | | | | | | 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
* Export all mixer nodes into dev.pcm.X.mixer.Y sysctl nodes, hence thehselasky2012-11-011-32/+264
| | | | | | | | | 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
* Implement support for the so-called USB feedback endpoint for USBhselasky2012-10-281-19/+163
| | | | | | | | | | 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
* Make sure the vendor class quirk only matches the vendor specifichselasky2012-10-261-1/+2
| | | | | | | class, else multiple pcm devices can appear on certain USB audio devices. MFC after: 1 week
* Fix USB audio specification compliance by filtering which descriptors canhselasky2012-10-241-11/+17
| | | | | | | | 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
* Implement support for USB Audio v2.0. Remove some redundanthselasky2012-09-172-548/+1445
| | | | | USB audio v1.0 debug data, hence userspace tools like lsusb exist to show this information properly.
* Add required USB AUDIO v2.0 structure definitions.hselasky2012-09-031-1/+394
| | | | PR: misc/171254
* Fix compiler warnings, mostly signed issues,hselasky2012-04-022-17/+15
| | | | | | when USB modules are compiled with WARNS=9. MFC after: 1 weeks
* Avoid creating PCM devices for MIDI adapters.hselasky2012-02-231-11/+19
| | | | MFC after: 3 days
* Use usbd_transfer_unsetup() instead of usbd_transfer_stop() so thathselasky2011-12-141-2/+4
| | | | | | we don't have to worry about locking. MFC after: 1 weeks
* Stop USB audio transfers early so that any audio applicationshselasky2011-12-142-1/+14
| | | | | | | | | | will time out and close opened /dev/dspX.Y device(s), if any. This is a workaround because we cannot unregister PCM devices while the audio character device is in use. Add a missing inclusion guard. MFC after: 1 weeks
* - There's no need to overwrite the default device method with the defaultmarius2011-11-221-2/+5
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+1
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Fix precedence warning when compiling kernel with clang.hselasky2011-09-061-2/+2
| | | | | | Approved by: re (kib) Submitted by: dim MFC after: 1 week
* Restore USB MIDI transmit buffer size to 1Kbyte.hselasky2011-07-141-1/+1
| | | | MFC after: 1 week
* Introduce a quirk for broken USB MIDI hardware instead of limiting performancehselasky2011-07-031-11/+11
| | | | | | in general. MFC after: 1 week
* Fix problem about USB MIDI TX data format, that some devices only accepthselasky2011-07-021-23/+30
| | | | | | | a maximum of 4 bytes (one command) per short terminated USB transfer. Optimise the TX case by sending multiple USB frames. MFC after: 1 week
* - Move all USB device ID arrays into so-called sections,hselasky2011-06-241-0/+9
| | | | | | | | | | | | sorted according to the mode which they support: host, device or dual mode - Add generic tool to extract these data: tools/bus_autoconf Discussed with: imp Suggested by: Robert Millan <rmh@debian.org> PR: misc/157903 MFC after: 14 days
* usb: change to one-pass probing of device driversavg2011-05-181-5/+2
| | | | | | | | | | | | | | | | | | | | | This brings USB bus more in line with how newbus is supposed to be used. Also, because of the two-pass probing the following message was produced by devd in default configuration when almost any USB device was connected: Unknown USB device: vendor <> product <> bus <> This should be fixed now. Note that many USB device drivers pass some information from probe method to attach method via ivars. For this to continue working we rely on the fact that the subr_bus code calls probe method of a winning driver again before calling its attach method in the case where multiple drivers claim to support a device. This is done because device description is set in successful probe methods and we want to get a correct device description from a winning driver. So now this logic is re-used for setting ivars too. Reviewed by: hselasky MFC after: 1 month
* Workaround for broken no-name USB audio devices sold by dealextremehselasky2011-05-091-1/+48
| | | | | | called "3D sound" and the alike. MFC after: 14 days
* Only set the sample rate if the USB audio channel reportshselasky2011-04-201-4/+3
| | | | | | | that it supports the frequency control request. MFC after: 7 days Approved by: thompsa (mentor)
* - Add support for some non-standard USB MIDI devices from Roland, byhselasky2011-02-241-15/+32
| | | | | | | | | means of allowing vendor specific interface class for audio and MIDI devices. - Add new quirks for this. The vendor and product list in OpenBSD's dev/usb/umidi_quirks.c was used as reference. MFC after: 14 days Approved by: thompsa (mentor)
* - Make an enum for all the umidi USB transfers.hselasky2011-02-181-108/+62
| | | | | | | | | | | | - Use the USB stack's builtin clear-stall feature. - Wrap some long lines. - Use memcpy() instead of bcopy(). - Use memset() instead of bzero(). - Tested applications: /usr/ports/audio/fluidsynth MFC after: 7 days Approved by: thompsa (mentor)
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-111-1/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* - fix for USB audio devices which use the 7-byte endpoint descriptor instead ofthompsa2010-06-222-54/+9
| | | | | | | | the 9-byte one. - remove sync-endpoint code, which is currently unused. Reported by: Antun Matanovi Submitted by: Hans Petter Selasky
* Reduce MIDI input buffer size to one USB packet, hence some USB devices don'tthompsa2010-06-221-8/+2
| | | | | | | | properly short terminate their transfers. This fixes a problem where input appears several seconds late. Reported by: Alexander Yerenkow Submitted by: Hans Petter Selasky
OpenPOWER on IntegriCloud