aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/sound
Commit message (Collapse)AuthorAgeFilesLines
* sound: Move sndstat out of pcm/Christos Margiolis2026-01-021-1/+2
| | | | | | | | | Needed by follow-up patches that will add sndstat support for midi/ Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D54140
* snd_dummy: Initial MIDI supportChristos Margiolis2026-01-021-1/+1
| | | | | | | | | | Because testing the midi/ code of sound(4) requires a physical MIDI device, add some basic MIDI support to snd_dummy(4) so that we can test patches to midi/ easier. Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D54127
* modules: Simplify some expressionsWarner Losh2025-10-102-3/+1
| | | | | | | When we only use SYSDIR once or twice, expand it and don't define it. Minor other consistency changes. Sponsored by: Netflix
* snd_hda: Fix a sporadic panic during kldunloadTijl Coosemans2025-09-041-2/+2
| | | | | | | | | | | | | | | The interrupt handler releases the device lock in hdaa_stream_intr to avoid a lock order reversal. This allows child devices to be detached and destroyed and then the interrupt handler panics. Let hdac_detach take down the interrupt handler before detaching child devices and order hdac_driver so hdac_detach is called first. Remove duplicate hdac_if.h from the module Makefile. PR: 286385 Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D50393
* sound: Retire midisynthChristos Margiolis2025-07-061-2/+2
| | | | | | | Unused code since we retired the sequencer. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50609
* sound: Retire the MIDI sequencerChristos Margiolis2025-07-061-1/+1
| | | | | | | | | | The in-kernel MIDI sequencer is not used anymore, since this is done by userland applications nowadays. It also contains bugs, and we are not exactly sure how it works, or if it worked properly in the first place. Sponsored by: The FreeBSD Foundation Reviewed by: vishwin, markj Differential Revision: https://reviews.freebsd.org/D50605
* sound: Merge ac97 and ac97_patchChristos Margiolis2024-12-021-1/+1
| | | | | | | | | No functional change intended. Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D47732
* Revert "nvme: Separate total failures from I/O failures"Warner Losh2024-08-162-16/+0
| | | | | | | | | All kinds of crazy stuff was mixed into this commit. Revert it and do it again. This reverts commit d5507f9e436698ac17dc5ace7ef58493988a9b04. Sponsored by: Netflix
* nvme: Separate total failures from I/O failuresWarner Losh2024-08-162-0/+16
| | | | | | | | | When it's a I/O failure, we can still send admin commands. Separate out the admin failures and flag them as such so that we can still send admin commands on half-failed drives. Fixes: 9229b3105d88 (nvme: Fail passthrough commands right away in failed state) Sponsored by: Netflix
* sound: Implement dummy driverChristos Margiolis2024-07-272-0/+8
| | | | | | | Sponsored by: The FreeBSD Foundation MFC after: 2 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45967
* Remove residual blank line at start of MakefileWarner Losh2024-07-1530-30/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* snd_hdsp(4): RME HDSP 9632 and HDSP 9652 sound card driver.Florian Walpen2024-05-092-1/+8
| | | | | | | | | | | | | | | | | | | | | | | Add a sound(4) bridge device driver for the RME HDSP 9632 and HDSP 9652 sound cards. These cards require a nowadays rare PCI 32bit (not PCIe) slot, but still see use due to their value and wealth of features. The HDSP 9632 is mostly comparable to the newer HDSPe AIO, while the HDSP 9652 is similar to the HDSPe RayDAT. These HDSPe PCIe cards are supported by the snd_hdspe(4) driver which was taken as a starting point for development of snd_hdsp(4). Implementation is kept separately due to substantial differences in hardware configuration and to allow easy removal in case PCI 32bit support would be phased out in the future. The snd_hdsp(4) kernel module is not enabled by default, and can be loaded at runtime with kldload(8) or during boot via loader.conf(5). Basic operation was tested with both cards, not including all optional cable connectors and expansion boards. Features should be roughly on par with the snd_hdspe(4) supported cards. Reviewed by: christos, br Differential Revision: https://reviews.freebsd.org/D45112
* sound: Retire unit.*Christos Margiolis2024-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The unit.* code is largely obsolete and imposes limits that are no longer needed nowadays. - Capping the maximum allowed soundcards in a given machine. By default, the limit is 512 (snd_max_u() in unit.c), and the maximum possible is 2048 (SND_UNIT_UMAX in unit.h). It can also be tuned through the hw.snd.maxunit loader(8) tunable. Even though these limits are large enough that they should never cause problems, there is no need for this limit to exist in the first place. - Capping the available device/channel types. By default, this is 32 (snd_max_d() in unit.c). However, these types are pre-defined in pcm/sound.h (see SND_DEV_*), so the cap is unnecessary when we know that their number is constant. - Capping the number of channels per-device. By default, the limit 1024 (snd_max_c() in unit.c). This is probably the most problematic of the limits mentioned, because this limit can never be reached, as the maximum is hard-capped at either hw.snd.maxautovchans (16 by default), or SND_MAXHWCHAN and SND_MAXVCHANS. These limtits are encoded in masks (see SND_U_MASK, SND_D_MASK, SND_C_MASK in unit.h) and are used to construct a bitfield of the form [dsp_unit, type, channel_unit] in snd_mkunit() which is assigned to pcm_channel->unit. This patch gets rid of everything unit.*-related and makes a slightly different use of the "unit" field to only contain the channel unit number. The channel type is stored in a new pcm_channel->type field, and the DSP unit number need not be stored at all, since we can fetch it from device_get_unit(pcm_channel->dev). This change has the effect that we no longer need to impose caps on the number of soundcards, device/channel types and per-device channels. As a result the code is noticeably simplified and more readable. Apart from the fact that the hw.snd.maxunit loader(8) tunable is also retired as a side-effect of this patch, sound(4)'s behavior remains the same. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D44912
* sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)Christos Margiolis2024-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the snd_clone framework creates device nodes on-demand for every channel, through the dsp_clone() callback, and is responsible for routing audio to the appropriate channel(s). This patch gets rid of the whole snd_clone framework (including any related sysctls) and instead uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and audio routing. This results in a significant reduction in code size as well as complexity. Behavior that is preserved: - hw.snd.basename_clone. - Exclusive access of an audio device (i.e VCHANs disabled). - Multiple processes can read from/write to the device. - A device can only be opened as many times as the maximum allowed channel number (see SND_MAXHWCHAN in pcm/sound.h). - OSSv4 compatibility aliases are preserved. Behavior changes: Only one /dev/dspX device node is created (on attach) for each audio device, as opposed to the current /dev/dspX.Y devices created by snd_clone. According to the sound(4) man page, devices are not meant to be opened through /dev/dspX.Y anyway, so it is best if we do not create device nodes for them in the first place. As a result of this, modify dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of /dev/dspX.Y. Sponsored by: The FreeBSD Foundation MFC after: 2 months Reviewed by: dev_submerge.ch, bapt, markj Differential Revision: https://reviews.freebsd.org/D44411
* Revert "sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)"Christos Margiolis2024-04-051-1/+1
| | | | | | | This reverts commit dc831e93bad63f9faea09f1806a7733a40bff316. After several reports in the mailing lists, this commit breaks pulseaudio. Revert until the issue is resolved.
* sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)Christos Margiolis2024-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the snd_clone framework creates device nodes on-demand for every channel, through the dsp_clone() callback, and is responsible for routing audio to the appropriate channel(s). This patch gets rid of the whole snd_clone framework (including any related sysctls) and instead uses DEVFS_CDEVPRIV(9) to handle device opening, channel allocation and audio routing. This results in a significant reduction in code size as well as complexity. Behavior that is preserved: - hw.snd.basename_clone. - Exclusive access of an audio device (i.e VCHANs disabled). - Multiple processes can read from/write to the device. - A device can only be opened as many times as the maximum allowed channel number (see SND_MAXHWCHAN in pcm/sound.h). - OSSv4 compatibility aliases are preserved. Behavior changes: Only one /dev/dspX device node is created (on attach) for each audio device, as opposed to the current /dev/dspX.Y devices created by snd_clone. According to the sound(4) man page, devices are not meant to be opened through /dev/dspX.Y anyway, so it is best if we do not create device nodes for them in the first place. As a result of this, modify dsp_oss_audioinfo() to print /dev/dspX in the "ai->devnode", instead of /dev/dspX.Y. Sponsored by: The FreeBSD Foundation MFC after: 2 months Reviewed by: dev_submerge.ch, markj Differential Revision: https://reviews.freebsd.org/D44411
* sys: Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-1631-31/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Retire ISA sound card DMA supportEd Maste2022-09-151-20/+0
| | | | | | | | | | As all ISA sound card drivers have been removed sndbuf_dma no longer serves any purpose. Reviewed by: mav Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34671
* Retire snd_sbc ISA sound card driverEd Maste2022-06-214-30/+1
| | | | | | | | | | | | | | | | | | | | | | | | Along with the snd_sb8 and snd_sb16 drivers. They supported ISA Creative Sound Blaster and compatible sound cards. Note that isa/sb.h is not removed, as it is still used by some PCI sound card drivers. ISA sound card drivers are deprecated as discussed on the current[1] and stable[2] mailing lists. Deprecation notices were added in e39ec8933be4 and MFCd to stable branches. Driver removals are being committed individually so that specific drivers can be restored if necessary (either in FreeBSD or by downstream projects). [1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html [2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html Reviewed by: mav Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34671
* Retire snd_mss ISA sound card driverEd Maste2022-06-212-10/+1
| | | | | | | | | | | | | | | | | | | | The snd_mss driver supported Microsoft Sound System sound cards. ISA sound card drivers are deprecated as discussed on the current[1] and stable[2] mailing lists. Deprecation notices were added in e39ec8933be4 and MFCd to stable branches. Driver removals are being committed individually so that specific drivers can be restored if necessary (either in FreeBSD or by downstream projects). [1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html [2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html Reviewed by: mav Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: Thttps://reviews.freebsd.org/D34671
* Retire snd_ess ISA sound card driverEd Maste2022-06-212-10/+1
| | | | | | | | | | | | | | | | | | | | snd_ess supported sound cards using the ESS 18xx chipset. ISA sound card drivers are deprecated as discussed on the current[1] and stable[2] mailing lists. Deprecation notices were added in e39ec8933be4 and MFCd to stable branches. Driver removals are being committed individually so that specific drivers can be restored if necessary (either in FreeBSD or by downstream projects). [1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html [2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html Reviewed by: mav Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34671
* Retire snd_ad1816 ISA sound card driverEd Maste2022-06-212-10/+1
| | | | | | | | | | | | | | | | | | | | | snd_ad1816 supported ISA sound cards based on the Analog Devices AD1816A "SoundPort® Controller". ISA sound card drivers are deprecated as discussed on the current[1] and stable[2] mailing lists. Deprecation notices were added in e39ec8933be4 and MFCd to stable branches. Driver removals are being committed individually so that specific drivers can be restored if necessary (either in FreeBSD or by downstream projects). [1] https://lists.freebsd.org/archives/freebsd-current/2022-March/001680.html [2] https://lists.freebsd.org/archives/freebsd-stable/2022-March/000585.html Reviewed by: mav Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D34671
* Retire broken snd_ds1 and snd_maestro driversEd Maste2022-03-193-21/+2
| | | | | | | | | | | In 2012 joel@ reported[1] that these were not functional, and they do not appear to have been fixed since. [1] https://lists.freebsd.org/pipermail/freebsd-multimedia/2012-January/012751.html Reported by: joel Relnotes: Yes Sponsored by: The FreeBSD Foundation
* Fix some modules to export more used symbolsKonstantin Belousov2021-11-182-0/+4
| | | | | | | | | and remove non-present symbols that are now reported by kmod_syms.awk. Reviewed by: emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32878
* Remove sparc64 kernel supportWarner Losh2020-02-032-16/+0
| | | | | | | | | Remove all sparc64 specific files Remove all sparc64 ifdefs Removee indireeect sparc64 ifdefs Notes: svn path=/head/; revision=357455
* Revert r338423, reapplying r338422, which did get approval butGlen Barber2018-09-011-2/+2
| | | | | | | | | | | | communication lines got crossed. Apologies to avatar@ for the confusion. Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338424
* Revert r338422, which was did not get official approval from re@.Glen Barber2018-09-011-2/+2
| | | | | | | | Approved by: re (implicit) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=338423
* Adding support for CS46xx MIDI output. With this patch, users canTai-hwa Liang2018-09-011-2/+2
| | | | | | | | | | | | | | play the MIDI files through /dev/sequencer device with tools like playmidi. The audio output will go through the external MIDI device such like wavetable synthesis card. Reviewed by: matk (a long time ago), kib Approved by: re (kib) Tested with: Terratec SiXPack 5.1+ + Yamaha DB50XG MFC after: 4 weeks Notes: svn path=/head/; revision=338422
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-0437-40/+38
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* Remove pc98 support completely.Yoshihiro Takahashi2017-01-281-2/+1
| | | | | | | | | I thank all developers and contributors for pc98. Relnotes: yes Notes: svn path=/head/; revision=312910
* Retire the '@' symlink. It isn't really needed and causes moreWarner Losh2014-11-061-22/+12
| | | | | | | | | | | | problems than it solves. SYSDIR is already defined almost always and can be used instead. Working around the one case where it isn't is much easier than working around the fact that @ may not exist in 18 other places. Differential Revision: https://reviews.freebsd.org/D1100 Notes: svn path=/head/; revision=274184
* Remove dependence on source tree options. Move all kernel moduleWarner Losh2014-08-111-1/+2
| | | | | | | | | | | | | | | | | | | | | options into kern.opts.mk and change all the places where we use src.opts.mk to pull in the options. Conditionally define SYSDIR and use SYSDIR/conf/kern.opts.mk instead of a CURDIR path. Replace all instances of CURDIR/../../etc with STSDIR, but only in the affected files. As a special compatibility hack, include bsd.owm.mk at the top of kern.opts.mk to allow the bare build of sys/modules to work on older systems. If the defaults ever change between 9.x, 10.x and current for these options, however, you'll wind up with the host OS' defaults rather than the -current defaults. This hack will be removed when we no longer need to support this build scenario. Reviewed by: jhb Differential Revision: https://phabric.freebsd.org/D529 Notes: svn path=/head/; revision=269812
* Remove ia64.Marcel Moolenaar2014-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=268351
* Re-enable -Werror for these modules. It is already enabled for the sameJohn Baldwin2014-06-091-1/+0
| | | | | | | files when built as part of a kernel. Notes: svn path=/head/; revision=267297
* Change the USB audio kernel module linking order, so that the USBHans Petter Selasky2014-05-141-1/+1
| | | | | | | | | | | | audio device driver is detached first and not its children. This fixes a panic in some cases when unloading "snd_uaudio" while a USB device is plugged. The linking order affects the order in which the module dependencies are registered. MFC after: 1 week Notes: svn path=/head/; revision=266006
* Invert platform check.Hans Petter Selasky2014-05-091-2/+2
| | | | | | | | Suggested by: imp @ MFC after: 2 weeks Notes: svn path=/head/; revision=265780
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* Build the kernel sound module without ISA DMA support for ARM and MIPSHans Petter Selasky2014-05-051-1/+2
| | | | | | | | | | | platforms, because these platforms do not implement the ISA DMA API. Else the sound modules cannot be loaded when running these platforms. MFC after: 2 weeks Notes: svn path=/head/; revision=265359
* The onyx codec works also as module, so add it.Andreas Tobler2014-01-131-1/+1
| | | | | | | MFC after: 1 month Notes: svn path=/head/; revision=260607
* Clean some 'svn:executable' properties in the tree.Pedro F. Giffuni2013-01-261-0/+0
| | | | | | | | Submitted by: Christoph Mallon MFC after: 3 days Notes: svn path=/head/; revision=245952
* Add driver for the RME HDSPe AIO/RayDAT sound cards -- snd_hdspe(4).Alexander Motin2012-03-012-2/+11
| | | | | | | | | | Cards are expensive and so rare, so leave the driver as module. Submitted by: Ruslan Bukin <br@bsdpad.com> MFC after: 2 weeks Notes: svn path=/head/; revision=232337
* Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disableRobert Millan2012-02-041-2/+13
| | | | | | | | | | | | | | kernel modules that include binary-only code. More fine-grained control is provided via MK_SOURCELESS_HOST (for native code that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode). Reviewed by: julian, delphij, freebsd-arch Approved by: kib (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=230972
* Remove leftovers from previous commits.Joel Dahl2012-02-022-4/+2
| | | | | | | Approved by: jhb Notes: svn path=/head/; revision=230915
* Cleanup some sound headers that don't need to be in the modules makefiles.Pedro F. Giffuni2012-02-023-3/+1
| | | | | | | | Approved by: jhb (mentor) MFC after: 1 week Notes: svn path=/head/; revision=230898
* Replace GPLd headers from the Maestro3 driver with BSD licensedPedro F. Giffuni2012-01-201-0/+1
| | | | | | | | | | | | | | | | | | | | versions derived from /usr/ports/audio/oss. The particular headers used were taken from the attic/drv/oss_allegro directory and are mostly identical to the previous files. The Maestro3 driver is now free from the GPL. NOTE: due to lack of testers this driver is being considered for deprecation and removal. PR: kern/153920 Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=230401
* Major snd_hda driver rewrite:Alexander Motin2012-01-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Huge old hdac driver was split into three independent pieces: HDA controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function driver (hdaa). - Support for multichannel recording was added. Now, as specification defines, driver checks input associations for pins with sequence numbers 14 and 15, and if found (usually) -- works as before, mixing signals together. If it doesn't, it configures input association as multichannel. - Signal tracer was improved to look for cases where several DACs/ADCs in CODEC can work with the same audio signal. If such case found, driver registers additional playback/record stream (channel) for the pcm device. - New controller streams reservation mechanism was implemented. That allows to have more pcm devices then streams supported by the controller (usually 4 in each direction). Now it limits only number of simultaneously transferred audio streams, that is rarely reachable and properly reported if happens. - Codec pins and GPIO signals configuration was exported via set of writable sysctls. Another sysctl dev.hdaa.X.reconfig allows to trigger driver reconfiguration in run-time. - Driver now decodes pins location and connector type names. In some cases it allows to hint user where on the system case connectors, related to the pcm device, are located. Number of channels supported by pcm device, reported now (if it is not 2), should also make search easier. - Added workaround for digital mic on some Asus laptops/netbooks. MFC after: 2 months Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=230130
* Replace GPL'd headers in the emu10kx snd driver code.Pedro F. Giffuni2012-01-111-24/+1
| | | | | | | | | | | | | | | | | This uses the emuxkireg.h already used in the emu10k1 snd driver. Special thanks go to Alexander Motin as he was able to find some errors and reverse engineer some wrong values in the emuxkireg header. The emu10kx driver is now free from the GPL. PR: 153901 Tested by: mav, joel Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=229981
* Replace a GPL'd header in the emu10k1 snd driver code.Pedro F. Giffuni2012-01-031-9/+1
| | | | | | | | | | | | | | This brings in the emuxkireg.h from NetBSD (dev/pci) which is used for the same purpose but is smaller. The emu10k1 is now free from the GPL. PR: 153901 Obtained from: NetBSD Approved by: core (mentor implicit) MFC after: 2 weeks Notes: svn path=/head/; revision=229430
* MFtbemd: use MACHINE_CPUARCHWarner Losh2010-09-131-1/+1
| | | | Notes: svn path=/head/; revision=212523
* MFtbemd:Warner Losh2010-08-231-2/+2
| | | | | | | | | | | | Use MACHINE_CPUARCH in preference to MACHINE_ARCH. The former is the source code location of the machine, the latter the binary output. In general, we want to use MACHINE_CPUARCH instead of MACHINE_ARCH unless we're tesitng for a specific target. The isn't even moot for i386/amd64 where there's momemntum towards a MACHINE_CPUARCH == x86, although a specific cleanup for that likely would be needed... Notes: svn path=/head/; revision=211690