#
837cd192 |
|
16-Jan-2024 |
Christos Margiolis <christos@FreeBSD.org> |
sound: remove PCM_KLDSTRING() and fix status strings PCM_KLDSTRING() prints the kernel module associated with a given audio device only when that module is not compiled in. Get rid of PCM_KLDSTRING() altogether and print the driver name (even for modules that are compiled in) instead, as it implies the module as well. While here, convert all status strings to the following dmesg-like format: [<port|mem> <irq>] on <driver> Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D43349
|
#
5aacf339 |
|
18-Aug-2023 |
John Baldwin <jhb@FreeBSD.org> |
sys: Remove SND_DECLARE_FILE Reviewed by: kbowling, imp, emaste Differential Revision: https://reviews.freebsd.org/D41499
|
#
82a265ad |
|
16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: sound driver version Remove /SND_DECLARE_FILE\("\$FreeBSD\$"\);/
|
#
4d846d26 |
|
10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
|
#
2287364e |
|
06-May-2022 |
John Baldwin <jhb@FreeBSD.org> |
Remove pcm_devclass from DRIVER_MODULE invocations.
|
#
92e7c966 |
|
07-Apr-2022 |
John Baldwin <jhb@FreeBSD.org> |
pcm envy24: Remove some dead code and associated unused variables. The dead code was commented out in the initial import and hasn't changed since.
|
#
378503af |
|
01-Sep-2020 |
Mateusz Guzik <mjg@FreeBSD.org> |
sound: clean up empty lines in .c and .h files
|
#
718cf2cc |
|
27-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
sys/dev: further adoption of SPDX licensing ID tags. Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
|
#
da1b038a |
|
17-Mar-2016 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges. On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544
|
#
43cd6160 |
|
18-Feb-2016 |
Justin Hibbits <jhibbits@FreeBSD.org> |
Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any() Since these calls only use default arguments, bus_alloc_resource_any() is the right call. Differential Revision: https://reviews.freebsd.org/D5306
|
#
6455cdfb |
|
15-Jan-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Sound: fix typos in user visible messages etc. Submitted by: Sascha Wildner <saw@online.de> Obtained from: DragonFly MFC after: 3 days
|
#
775fcb6e |
|
03-Nov-2014 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Remove check for obsolete FreeBSD versions PR: 194517 Submitted by: François Tigeot <ftigeot@wolfpond.org>
|
#
86843ea8 |
|
17-Jun-2014 |
John Baldwin <jhb@FreeBSD.org> |
Fix various bugs with freeing static DMA allocations in sound drivers: - Don't compare the DMA map to NULL to determine if bus_dmamap_unload() should be called when releasing a static allocation. Instead, compare the bus address against 0. - Don't assume that the DMA map for static allocations is NULL. Instead, save the value set by bus_dmamem_alloc() so it can later be passed to bus_dmamem_free(). Also, add missing calls to bus_dmamap_unload() in these cases before freeing the buffer. - Use the bus address from the bus_dma callback instead of calling vtophys() on the address allocated by bus_dmamem_alloc(). Reviewed by: kan
|
#
c68534f1 |
|
12-Aug-2013 |
Scott Long <scottl@FreeBSD.org> |
Update PCI drivers to no longer look at the MEMIO-enabled bit in the PCI 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
|
#
6691312c |
|
05-May-2013 |
Alexander Motin <mav@FreeBSD.org> |
Some fixes to snd_envy24ht(4) driver: - 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
|
#
d745c852 |
|
06-Nov-2011 |
Ed Schouten <ed@FreeBSD.org> |
Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. This means that their use is restricted to a single C file.
|
#
a7d5f7eb |
|
19-Oct-2010 |
Jamie Gritton <jamie@FreeBSD.org> |
A new jail(8) with a configuration file, to replace the work currently done by /etc/rc.d/jail.
|
#
577fedb6 |
|
13-Oct-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
Fix a brain-o: wrong case statement semantics. Found with: clang
|
#
b40d3421 |
|
29-Mar-2010 |
Joel Dahl <joel@FreeBSD.org> |
Start copyright notices with /*-
|
#
90da2b28 |
|
07-Jun-2009 |
Ariff Abdullah <ariff@FreeBSD.org> |
Sound Mega-commit. Expect further cleanup until code freeze. 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.
|
#
219c5a5a |
|
20-Apr-2009 |
Stanislav Sedov <stas@FreeBSD.org> |
- Unlock softc mutex on failure. MFC after: 1 week
|
#
3141a8dc |
|
11-Feb-2009 |
Alexander Leidinger <netchild@FreeBSD.org> |
All open fixes and improvements from Konstantin for which users had to use patches so far: + Envy24: - fix: broken init data for M Audio Delta DiO 2496 - add: support for M Audio Delta 44 - add: support for M Audio Delta 1010LT Tested by: Dominique Goncalves, dominique.goncalves at gmail.com - add: support for Terratec EWX 2496 Tested by: Stefan Sperling, stsp at stsp.name - add: support for M Audio Delta 66 Tested by: Richard Bown, richard.bown at blueyonder.co.uk - add: support for M Audio Delta 1010 Tested by: Andrew Reilly, areilly at bigpond.net.au + Envy24HT: - add: support for Terrasoniq TS22PCI - fix: M-Audio Revolution 5.1 sound volume is very low Reported by: Oliver Hartmann, ohartman at zedat.fu-berlin.de Andrey Slusar, anrays at gmail.com Tested by: Andrey Slusar, anrays at gmail.com Rusu Silviu, arol.the at gmail.com - fix: M-Audio Revolution 7.1 sound is distorted and very quiet Reported by: Olev Hannula, hannula at gmail.com Tested by: Olev Hannula, hannula at gmail.com Stanislav Belansky, stanislav at icmail.ru - fix: Terratec PHASE 22 codec is power-off due to wrong init data Reported by: Philipp Ost, pj at smo.de Tested by: Philipp Ost, pj at smo.de + SpicDS: - fix: AK4381 produce hiss sound on 192kHz sample rate - fix: stupid bug with volume control for AK4396 Submitted by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
|
#
d7f03759 |
|
19-Oct-2008 |
Ulf Lilleengen <lulf@FreeBSD.org> |
- Import the HEAD csup code which is the basis for the cvsmode work.
|
#
976b0106 |
|
12-Oct-2007 |
Kevin Lo <kevlo@FreeBSD.org> |
Spelling fix for interupt -> interrupt
|
#
e510f521 |
|
02-Jun-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Use standard pcm_get/setflags() rather than dereferencing softc while enabling SD_F_SOFTPCMVOL or any flags.
|
#
2ba5e1ed |
|
28-May-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
- Enable soft pcm volume flag early to ensure it not being clobbered by the subsequent mix_setdevs() and friends. - Minor style(9) declaration arrangement nit. Requested by: joeld Submitted by: pluknet <pluknet@gmail.com>
|
#
ccb43d8d |
|
27-May-2007 |
Joel Dahl <joel@FreeBSD.org> |
Bring in a bunch of bug fixes and some code to support more chipsets. Neither me nor Ariff have access to any of this hardware, so all tests have been made by Konstantin and Artem. Commit message mostly written by Konstantin. envy24: - Add test code to support rear line-in input on 'Terratec DMX 6fire' audio card. This code is also intended to be used in the future for support of cards, that have I2C-to-GPIO expanders wired between the control line of the audio codec and the Envy24, however such cards are too complex and i can't add that support without hardware sample of such board, i've already tried and failed. envy24ht: - Add support for 'AudioTrak Prodigy HD2'. - Add support for 'AudioTrak Prodigy 7.1 XT'. - Add support for 'ESI Juli@' (Works ok, DAC volume is hard-coded for the time being, so 'mixer vol ...' doesn't work, only 'mixer pcm ...' works). [1] - Fix bug in the init data for M-Audio Revolution 5.1, that results in distorted sound. - Add software volume control (now 'mixer pcm' works, thanks to Ariff). - Add support for more samples rates - 176.4kHz and 192kHz. - Fix problem with the 192kHz samples rate playback when 24.576MHz crystal is used on the board instead of 49.152MHz crystal. spicds: - Add support for Asahi Kasei flagship DAC - AK4396 (used in AudioTrak Prodigy HD2). Submitted by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Tested by: Artem Antonov [1] Reviewed by: ariff
|
#
03756cef |
|
19-May-2007 |
Joel Dahl <joel@FreeBSD.org> |
Turn off the AK452X De-emphasis filter for 44.1KHz. This should fix some sound quality problems. PR: kern/112688 Submitted by: Stefan Ehmann <shoesoft@gmx.net> Reviewed by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Approved by: ariff
|
#
9d2d90cb |
|
19-Apr-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Unbreak module / driver attach breakage. Both snd_envy24 and snd_envy24ht mistakenly rely on wrong snd_spicds version.
|
#
4582b3a1 |
|
15-Mar-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Fix severe out-of-bound mtx "type" pointer, causing WITNESS refcount confusions and panic provided that the following conditions are met: 1) WITNESS is enabled (watch/trace). 2) Using modules, instead of statically linked (Not a strict requirement, but easier to reproduce this way). 3) 2 or more modules share the same mtx type ("sound softc"). - They might share the same name (strcmp() == 0), but it always point to different address. 4) Repetitive kldunload/load on any module that shares the same mtx type (Not a strict requirement, but easier to reproduce this way). Consider module A and module B: - From enroll() - subr_witness.c: * Load module A. Everything seems fine right now. wA-w_refcount == 1 ; wA-w_name = "sound softc" * Load module B. * w->w_name == description will always fail. ("sound softc" from A and B point to different address). * wA->w_refcount > 0 && strcmp(description, wA->w_name) == 0 * enroll() will return wA instead of returning (possibly unique) wB. wA->w_refcount++ , == 2. * Unload module A, mtx_destroy(), wA->w_name become invalid, but wA->w_refcount-- become 1 instead of 0. wA will not be removed from witness list. * Some other places call mtx_init(), iterating witness list, found wA, failed on wA->w_name == description * wA->w_refcount > 0 && strcmp(description, wA->w_name) * Panic on strcmp() since wA->w_name no longer point to valid address. Note that this could happened in other places as well, not just sound (eg. consider lots of drivers that share simmilar MTX_NETWORK_LOCK). Solutions (for sound case): 1) Provide unique mtx type string for each mutex creation (chosen) or 2) Put "sound softc" global variable somewhere and use it.
|
#
55837609 |
|
23-Feb-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
- Revert arguments for several functions to pre bus_get_dma_tag() changes. Each softc contains information about their own device_t, use that instead. - bus_setup_intr() -> snd_setup_intr().
|
#
0b989078 |
|
23-Feb-2007 |
Alexander Leidinger <netchild@FreeBSD.org> |
MFp4 (114068): Use bus_get_dma_tag() to obtain the parent DMA tag to make the drivers a little bit more non-ia32/amd64 friendly. There is no man page for bus_get_dma_tag, so this is modelled after rev. 1.62 of src/sys/dev/sound/pci/es137x.c by marius. Inspired by: commit by marius
|
#
d82080b4 |
|
14-Feb-2007 |
Ariff Abdullah <ariff@FreeBSD.org> |
Fix compilation for statically linked snd_envy24{ht}/spicds. Use explicit struct mtx rather than void pointer. PR: kern/109147
|
#
378e0c5c |
|
17-Dec-2006 |
Ariff Abdullah <ariff@FreeBSD.org> |
Latest updates for Envy24/24HT. Fix various issues with LOR and panic during verbose booting. Submitted by: Konstantin Dimitrov <kosio.dimitrov@gmail.com>
|
#
0971278e |
|
30-Sep-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
Driver for Envy24HT (ICE1724 or VT1724)-based cards like Terratec Aureon 7.1 Space: tested Terratec Aureon 5.1 Sky: tested Terratec PHASE 28: tested Terratec Aureon 7.1 Universe: tested Audiotrak Prodigy 7.1: tested Audiotrak Prodigy 7.1 LT: not tested Terratec PHASE 22: not tested M-Audio Revolution 7.1: not tested M-Audio Revolution 5.1: not tested M-Audio Audiophile 192: tested Submitted by: "Konstantin Dimitrov" <kosio.dimitrov@gmail.com>
|
#
347edd7e |
|
28-Jul-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
- fix memory leak after "kldunload snd_ak452x.ko" - fix "No sound in KDE": The problem is related to the implementation of Envy24(1712) hardware mixer support in the driver. Envy24(1712) has very precise 36bit wide hardware mixer, which is superior that vchans (software sound mixer in the kernel). The driver supports Envy24(1712) hardware mixer, so up to 10 channels (5 stereo pairs) can be playback simultaneously. However, there are problems with the implementation of Envy24(1712) hardware mixer support in the driver, one of them is the problem with "no sound in KDE": When playing back several channels simultaneously and stoping one of the channels, sound starts to stutter and plays at very low speed. Another problem is: Playing back simultaneously more than one 24bit/32bit sound file or 16bit sound file and 24bit/32bit sound file doesn't work as expected. Submitted by: "Konstantin Dimitrov" <kosio.dimitrov@gmail.com>
|
#
ce356b70 |
|
17-Jun-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
- fix compatibility with newer versions of FreeBSD - fix all warnings during compilation - fix obvious bugs - add support for more cards Now supported: - M-Audio Delta Dio 2496 - M-Audio Audiophile 2496 - Terratec DMX 6fire Known bugs (detected by Nokolas and Stefan): - $ kldunload snd_ak452x.ko Warning: memory type ak452x leaked memory on destroy (1 allocations, 64 bytes leaked). - No sound in KDE: Everything works fine at the console but when I load KDE (3.5.3) the sound stutters and plays at less then 1/2 speed. - 'mixer: WRITE_MIXER: Device not configured' The message repeats x times at system startup, x = whatever hw.snd.maxautovchans is set to. (this is because only vol, pcm and line are supported, but the driver shows more than those mixer devices and setting those additional mixers results in this error message) - vchans don't work - 24 bit playback not supported (only 16/32 bit) - after kld(un)loading some times, the card fails to be probed until reboot Datasheets are available from: http://www.nbritton.org/uploads/envy24/ http://www.asahi-kasei.co.jp/akm/en/product/ak4528/ak4528_f01e.pdf http://www.asahi-kasei.co.jp/akm/en/product/ak4528/ekd4528-01.pdf http://www.asahi-kasei.co.jp/akm/en/product/ak4524/ak4524_f03e.pdf http://www.asahi-kasei.co.jp/akm/en/product/ak4524/ekd4524.pdf http://www.wolfson.co.uk/uploads/documents/en/WM8728.pdf http://www.richtech.co.kr/down/richtek/RT9131.pdf http://xkodi.svobodno.com/xkodi/space71.html http://people.freebsd.org/~lofi/envy24.pdf http://people.freebsd.org/~lofi/4524.pdf Submitted by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Tested by: Nikolas Britton <nikolas.britton@gmail.com> Stefan Ehmann <shoesoft@gmx.net>
|
#
12ab72d3 |
|
17-Jun-2006 |
Alexander Leidinger <netchild@FreeBSD.org> |
dd the envy24 driver as is to the tree. It's not connected to the build yet. More commits to follow. I got no response from the author, but since the driver is BSD licensed I don't think he will complain. :-) I got it from http://people.freebsd.org/~lofi/envy24.tar.gz Written by: Katsurajima Naoto <raven@katsurajima.seya.yokohama.jp>
|