#
259065 |
|
07-Dec-2013 |
gjb |
- Copy stable/10 (r259064) to releng/10.0 as part of the 10.0-RELEASE cycle. - Update __FreeBSD_version [1] - Set branch name to -RC1
[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so start releng/10.0 at '100' so the branch is started with a value ending in zero.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
256281 |
|
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
#
254263 |
|
12-Aug-2013 |
scottl |
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
|
#
197401 |
|
22-Sep-2009 |
marius |
- According to Linux, the ALi M5451 can do 31-bit DMA instead of just 30-bit like the reset of the controllers supported by this driver. Actually ALi M5451 can be setup up to generate 32-bit addresses by setting the 31st bit via the accompanying ISA bridge, which allows it to work in sparc64 machines whose IOMMU require at least 32-bit DMA. Even though other architectures would also benefit from 32-bit DMA, enabling this bit is limited to sparc64 as bus_dma(9) doesn't generally guarantee that a low address of BUS_SPACE_MAXADDR_32BIT results in a buffer in the 32-bit range. - According to Tatsuo YOKOGAWA's ali(4), the the DMA transfer size of ALi M5451 is fixed to 64k and in fact using the default size of 4k - The 4DWAVE DX and NX require the recording buffer to be 8-byte aligned so adjust the bus_dma_tag_create(9) accordingly. - Unlike the rest of the controllers supported by this driver, the ALi M5451 only has 32 hardware channels instead of 64 so limit the loop in tr_intr() accordingly. [1]
Submitted by: yongari [1] Reviewed by: yongari (superset of what is committed) MFC after: 3 days
|
#
193640 |
|
07-Jun-2009 |
ariff |
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.
|
#
173511 |
|
10-Nov-2007 |
ariff |
Limit total playback channels to just 1, for ALi M5451. The reliability of it's multi DAC / playback channels is not that good. Enabling vchans make the bug more visible since playback allocation will look for possible free hardware channels first (i.e: the next DAC, the very first has been consumed by vchan mixer) which in this case has been proven faulty.
Reported / Tested by: Sascha Klauder MFC after: 3 days
|
#
170873 |
|
17-Jun-2007 |
ariff |
Flush remaining malloc() cleanups (M_NOWAIT -> M_WAITOK).
|
#
170521 |
|
10-Jun-2007 |
ariff |
Filter/compress the amount of channel trigger. This should reduce much of lock/unlock contentions within the interrupt handler. Most of these drivers only need PCMTRIG_START or STOP (ABORT).
Discussed with: scottl
|
#
168847 |
|
18-Apr-2007 |
ariff |
sndbuf_alloc() now accept dmaflags argument which will be forwarded to internal bus_dmammem_alloc() for greater flexibility on setting up DMA / page attributes.
|
#
167608 |
|
15-Mar-2007 |
ariff |
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.
|
#
166904 |
|
23-Feb-2007 |
netchild |
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
|
#
142890 |
|
01-Mar-2005 |
imp |
Use BUS_PROBE_DEFAULT in preference to 0 and BUS_PROBE_LOW_PRIORITY in preference to some random negative number to allow other drivers a bite at the apple.
|
#
139749 |
|
05-Jan-2005 |
imp |
Start each of the license/copyright comments with /*-, minor shuffle of lines
|
#
136470 |
|
13-Oct-2004 |
yongari |
Limit DMA address space to 1GB since the trident audio cards can't handle DMA addresses located above 1GB. The LBA(loop begin address) register which holds DMA base address is 32bits register. But the MSB 2bits are used for other purposes. This effectivly limits the DMA address space up to 1GB.
Approved by: jake (mentor) Reviewed by: truckman, matk
|
#
136469 |
|
13-Oct-2004 |
yongari |
Audio drivers failed to detect failure condition and attempted to assign DMA address to the wrong address. It can cause system lockup or other mysterious errors. Since most sound cards requires low DMA address(BUS_SPACE_MAXADDR_24BIT) sndbuf_alloc() would fail when the audio driver is loaded after long running of operations.
Approved by: jake (mentor) Reviewed by: truckman, matk
|
#
132236 |
|
16-Jul-2004 |
tanimura |
Rename the sound device drivers:
- `sound' The generic sound driver, always required.
- `snd_*' Device-dependent drivers, named after the sound module names. Configure accordingly to your hardware.
In addition, rename the `snd_pcm' module to `sound' in order to sync with the driver names.
Suggested by: cg
|
#
128232 |
|
14-Apr-2004 |
green |
The newpcm headers currently #define away INTR_MPSAFE and INTR_TYPE_AV because they bogusly check for defined(INTR_MPSAFE) -- something which never was a #define. Correct the definitions.
This make INTR_TYPE_AV finally get used instead of the lower-priority INTR_TYPE_TTY, so it's quite possible some improvement will be had on sound driver performance. It would also make all the drivers marked INTR_MPSAFE actually run without Giant (which does seem to work for me), but: INTR_MPSAFE HAS BEEN REMOVED FROM EVERY SOUND DRIVER! It needs to be re-added on a case-by-case basis since there is no one who will vouch for which sound drivers, if any, willy actually operate correctly without Giant, since there hasn't been testing because of this bug disabling INTR_MPSAFE.
Found by: "Yuriy Tsibizov" <Yuriy.Tsibizov@gfk.ru>
|
#
127135 |
|
17-Mar-2004 |
njl |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
|
#
126695 |
|
06-Mar-2004 |
matk |
Augment /dev/sndstat with the module names, if applicable.
Approved by: tanimura (mentor)
|
#
119853 |
|
07-Sep-2003 |
cg |
update my email address.
|
#
119690 |
|
02-Sep-2003 |
jhb |
Use PCIR_BAR(x) instead of PCIR_MAPS.
Glanced over by: imp, gibbs Tested by: i386 LINT
|
#
119287 |
|
22-Aug-2003 |
imp |
Prefer new location of pci include files (which have only been in the tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
|
#
117126 |
|
01-Jul-2003 |
scottl |
Mega busdma API commit.
Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour.
sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen.
If anyone gets panics or warnings from dflt_lock() being called, please let me know right away.
Reviewed by: tmm, gibbs
|
#
111183 |
|
20-Feb-2003 |
cognet |
Implement a "sndbuf_getbufaddr" function and use it instead of vtophys().
Reviewed by: orion
|
#
107285 |
|
26-Nov-2002 |
cg |
(hopefully) fix build breakage some people are seeing
Approved by: re
|
#
105308 |
|
17-Oct-2002 |
marcel |
Suppress the uninitialized variable warning on ia64 introduced by the previous commit by initializing i and j. These initializations will normally be eliminated by the compiler.
|
#
105100 |
|
14-Oct-2002 |
cognet |
Fix support for the ALi M5451 (rev 0.2) chip.
Reviewed by: orion, mux Approved by: mux (mentor) MFC after: 1 week
|
#
93816 |
|
04-Apr-2002 |
jhb |
Add lock type arguments to callers of snd_mtxcreate().
|
#
86870 |
|
24-Nov-2001 |
iwasaki |
Add suspend/resume support.
MFC after: 1 week
|
#
84658 |
|
08-Oct-2001 |
cg |
use pcm_getbuffersize()
|
#
82490 |
|
29-Aug-2001 |
greid |
Add support for the Acer Labs M5451 chip.
Submitted by: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
|
#
82363 |
|
26-Aug-2001 |
greid |
Add support for the SiS 7018
PR: 30100 Submitted by: Ada Lim <adal@cse.unsw.edu.au>
|
#
82183 |
|
23-Aug-2001 |
cg |
make the 4dwave nx chip work Submitted by: Philippe Anel <xigh@noos.fr>
|
#
82180 |
|
23-Aug-2001 |
cg |
many changes:
* add new channels to the end of the list so channels used in order of addition
* de-globalise definition of struct snddev_info and provide accessor functions where necessary.
* move the $FreeBSD$ tag in each .c file into a macro and allow the /dev/sndstat handler to display these when set to maximum verbosity to aid debugging.
* allow each device to register its own sndstat handler to reduce the amount of groping sndstat must do in foreign structs.
|
#
78564 |
|
21-Jun-2001 |
greid |
Use the M_ZERO flag to malloc(9)
Reviewed by: cg MFC after: 1 week
|
#
78362 |
|
16-Jun-2001 |
cg |
use a global devclass for all drivers - i'm not entirely sure why this worked before.
mixer, dsp and sndstat are seperate devices - give them their own cdevsws instead of demuxing requests sent to a single cdevsw.
use the si_drv1/si_drv2 fields in dev_t structures for holding information specific to an open instance of mixer/dsp.
nuke /dev/{dsp,dspW,audio}[0-9]* links - this functionality is now provided using cloning.
various locking fixes.
|
#
74763 |
|
24-Mar-2001 |
cg |
mega-commit.
this introduces a new buffering mechanism which results in dramatic simplification of the channel manager.
as several structures have changed, we take the opportunity to move their definitions into the source files where they are used, make them private and de-typedef them.
the sound drivers are updated to use snd_setup_intr instead of bus_setup_intr, and to comply with the de-typedefed structures.
the ac97, mixer and channel layers have been updated with finegrained locking, as have some drivers- not all though. the rest will follow soon.
|
#
71503 |
|
23-Jan-2001 |
cg |
some cosmetics, changed channel setup and revamped irq handling - ignore repeated interrupts
|
#
70325 |
|
24-Dec-2000 |
cg |
fairly substantial rewrite- seperate out play/record code, implement setblocksize, simplify resource allocation
|
#
70291 |
|
23-Dec-2000 |
cg |
update code dealing with snd_dbuf objects to do so using a functional interface
modify chn_setblocksize() to pick a default soft-blocksize appropriate to the sample rate and format in use. it will aim for a power of two size small enough to generate block sizes of at most 20ms. it will also set the hard-blocksize taking into account rate/format conversions in use.
update drivers to implement setblocksize correctly: updated, tested: sb16, emu10k1, maestro, solo updated, untested: ad1816, ess, mss, sb8, csa not updated: ds1, es137x, fm801, neomagic, t4dwave, via82c686
i lack hardware to test: ad1816, csa, fm801, neomagic others will be updated/tested in the next few days.
|
#
70134 |
|
17-Dec-2000 |
cg |
kobjify.
this gives us several benefits, including:
* easier extensibility- new optional methods can be added to ac97/mixer/channel classes without having to fixup every driver.
* forward compatibility for drivers, provided no new mandatory methods are added.
|
#
66012 |
|
17-Sep-2000 |
cg |
fix warnings
|
#
65644 |
|
09-Sep-2000 |
cg |
detach support remove un-needed setdir functions add bus_teardown_intr calls where necessary destroy our dma tags where necessary destroy ac97 before releasing resources
|
#
65340 |
|
01-Sep-2000 |
cg |
change mixer api slightly change channel interface - kobj implementation coming soonish make pcm_makelinks not panic if modular add pcm_unregister()
these changes support newpcm kld unloading, but this is only implemented by ds1.c
|
#
64881 |
|
20-Aug-2000 |
cg |
rework feeder sytem to allow feeders in klds
modify driver capability reporting format to list every audio format seperately- required for above and because we could not previously indicate that mono was unsupported.
there should be no functional impact.
|
#
62483 |
|
03-Jul-2000 |
cg |
add module metadata. this is a hack, sound drivers will eventually present a bus to which pcm, mixer, etc will attach.
|
#
60958 |
|
26-May-2000 |
cg |
handle emulated dma reads
don't try to get sample size from snd_dbuf
|
#
59323 |
|
17-Apr-2000 |
cg |
make drivers start at beginning of buffer when triggered - improves mmap.
not all tested.
not sure about aureal.c or csapcm.c
|
#
58905 |
|
01-Apr-2000 |
cg |
fail in attach if we seem to have no ac97 codec
|
#
58384 |
|
20-Mar-2000 |
cg |
update the ac97 layer: * add a callback for initialising the mixer interface * support ac97 2.1 variable rate audio feature
fix ac97-using drivers for the above
add suspend/resume support for neomagic
|
#
56876 |
|
29-Jan-2000 |
peter |
Tidy up stray or bogus #if NFOO > 0 and #include "foo.h".
|
#
56249 |
|
18-Jan-2000 |
cg |
update ac97 layer to use device_printf when printing messages
|
#
56108 |
|
16-Jan-2000 |
cg |
oops, best play format was set to unsigned 16 bit instead of signed 16 bit stereo. remenant from testing.
|
#
55204 |
|
29-Dec-1999 |
cg |
- latest 2ndbuffer patch - make chn_setdir work for rec on isa cards - note: es1371 does not irq in smp
Submitted by: tanimura
|
#
54459 |
|
12-Dec-1999 |
cg |
increase buffer size, reduce number of channels allocated since we only use 1 at the moment
|
#
54212 |
|
06-Dec-1999 |
peter |
Update for pnp adjustments regarding NPNP.
Also, optimize out a mess of #if's that were duplicating work already done by config(8). For example, if a file is marked as "dev/sound/pci/foo.c optional pcm pci" then it's only added if pcm *and* pci are present, so #if NPCM > 0 and #if NPCI > 0 are totally redundant. A bit more work is still needed.
Discussed with: cg (a few weeks ago)
|
#
53465 |
|
20-Nov-1999 |
cg |
repo-copied to make way for newmidi, this commit updates include paths
|
#
50733 |
|
01-Sep-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
50724 |
|
01-Sep-1999 |
cg |
say hello to newpcm. it is not yet enabled, requiring new pnp code from dfr to compile successfully. further details will be provided in the commit enabling newpcm.
|