History log of /freebsd/sys/dev/sound/pcm/dsp.c (Results 251 – 275 of 324)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/4.10.0_cvs, release/4.10.0
# 466f31e5 28-Feb-2004 Don Lewis <truckman@FreeBSD.org>

Lock channels only as necessary in dsp_ioctl(), and only lock one
channel at a time unless it is actually necessary to lock both.
This avoids problems with lock order reversal and malloc() calls
with

Lock channels only as necessary in dsp_ioctl(), and only lock one
channel at a time unless it is actually necessary to lock both.
This avoids problems with lock order reversal and malloc() calls
with a mutex held when lower level code unlocks a channel, calls malloc(),
and relocks the channel. This also avoids the cost of some unnecessary
locking and unlocking.

Tested by: matk

show more ...


Revision tags: release/5.2.1_cvs, release/5.2.1
# dc08ffec 21-Feb-2004 Poul-Henning Kamp <phk@FreeBSD.org>

Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT fl

Device megapatch 4/6:

Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.

show more ...


# 12e524a2 28-Jan-2004 Don Lewis <truckman@FreeBSD.org>

Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change KASSERT() in feed_vchan16() into an explicit test and call to
panic() so that the buffer overflow just beyond this point is always
caught, even when the code is not compiled with INVARIANTS.

Change chn_setblocksize() buffer reallocation code to attempt to avoid
the feed_vchan16() buffer overflow by attempting to always keep the
bufsoft buffer at least as large as the bufhard buffer.

Print a diagnositic message
Danger! %s bufsoft size increasing from %d to %d after CHANNEL_SETBLOCKSIZE()
if our best attempts fail. If feed_vchan16() were to be called by
the interrupt handler while locks are dropped in chn_setblocksize()
to increase the size bufsoft to match the size of bufhard, the panic()
code in feed_vchan16() will be triggered. If the diagnostic message
is printed, it is a warning that a panic is possible if the system
were to see events in an "unlucky" order.

Change the locking code to avoid the need for MTX_RECURSIVE mutexes.

Add the MTX_DUPOK option to the channel mutexes and change the locking
sequence to always lock the parent channel before its children to avoid
the possibility of deadlock.

Actually implement locking assertions for the channel mutexes and fix
the problems found by the resulting assertion violations.

Clean up the locking code in dsp_ioctl().

Allocate the channel buffers using the malloc() M_WAITOK option instead
of M_NOWAIT so that buffer allocation won't fail. Drop locks across
the malloc() calls.

Add/modify KASSERTS() in attempt to detect problems early.

Abuse layering by adding a pointer to the snd_dbuf structure that points
back to the pcm_channel that owns it. This allows sndbuf_resize() to do
proper locking without having to change the its API, which is used by
the hardware drivers.

Don't dereference a NULL pointer when setting hw.snd.maxautovchans
if a hardware driver is not loaded. Noticed by Ryan Sommers
<ryans at gamersimpact.com>.

Tested by: Stefan Ehmann <shoesoft AT gmx.net>
Tested by: matk (Mathew Kanner)
Tested by: Gordon Bergling <gbergling AT 0xfce3.net>

show more ...


# e7245381 25-Jan-2004 Mathew Kanner <matk@FreeBSD.org>

Fix a panic in dsp_clone when trying to access a sound
device that doesn't exists. I'm using my discretion and
committing without mentor approval since Seigo is away.

Noticed by: Maxime Henrion <mu

Fix a panic in dsp_clone when trying to access a sound
device that doesn't exists. I'm using my discretion and
committing without mentor approval since Seigo is away.

Noticed by: Maxime Henrion <mux@freebsd.org>

show more ...


# 222d2384 20-Jan-2004 Mathew Kanner <matk@FreeBSD.org>

Reduce latency when using the SNDCTL_DSP_RESET ioctl by calling
chn_resetbuf().

Submited by: Pyun YongHyeon <yongari@kt-is.co.kr>
Approved by: tanimura (mentor)


# 5ee30e27 20-Jan-2004 Mathew Kanner <matk@FreeBSD.org>

Fix a panic when kldloading a sound driver. Do this by replacing the
link-list of dev_t's with named variables. Remove used code.

Approved by: tanimura (mentor)


# 45550658 17-Jan-2004 Poul-Henning Kamp <phk@FreeBSD.org>

As previously announced: discontinue use of makedev() call in soundcode.

This takes us a lot closer to refcounting dev_t.

This patch originally by cg@ with a few minor changes by me.

It is largel

As previously announced: discontinue use of makedev() call in soundcode.

This takes us a lot closer to refcounting dev_t.

This patch originally by cg@ with a few minor changes by me.

It is largely untested, but has been HEADSUP'ed twice, so presumably
people have not found any issues with it.

Submitted by: cg@

show more ...


Revision tags: release/5.2.0_cvs, release/5.2.0
# 42c3555c 11-Nov-2003 Scott Long <scottl@FreeBSD.org>

Fix sound LOR problems:

dsp_open: rearrange to only hold one lock at a time

dsp_close: ditto

mixer_hwvol_init: delete locking, the only consumer seems to
be the ess driver and it only call it a cr

Fix sound LOR problems:

dsp_open: rearrange to only hold one lock at a time

dsp_close: ditto

mixer_hwvol_init: delete locking, the only consumer seems to
be the ess driver and it only call it a creation time, I
think the device will be stable across the sleepable malloc.

cmi interrupt routine: Release locks while caller chn_intr,
either this or do what emu10k1 does which is have no locks
at in the interrupt handler.

Submitted by: mat@cnd.mcgill.ca

show more ...


Revision tags: release/4.9.0_cvs, release/4.9.0
# 3f225978 07-Sep-2003 Cameron Grant <cg@FreeBSD.org>

update my email address.


# b9c6d8cd 15-Aug-2003 Cameron Grant <cg@FreeBSD.org>

modify comments


# f1e875be 26-Jun-2003 Matthew N. Dodd <mdodd@FreeBSD.org>

Set a lower bound on fragment size rather than returning a failure
when the user specifies a maximum fragment size < 2.

This is the behavior that Linux provides and fixes the problem I've
observed i

Set a lower bound on fragment size rather than returning a failure
when the user specifies a maximum fragment size < 2.

This is the behavior that Linux provides and fixes the problem I've
observed in Tribes2 where sounds effects are delayed by 1/2 a second.

show more ...


Revision tags: release/5.1.0_cvs, release/5.1.0
# 4f3204ef 01-May-2003 Orion Hodson <orion@FreeBSD.org>

Fix lock order reversal when opening device and chn_reset fails.

Submitted by: Jan-Espen Pettersen <sigsegv@leakingmemory.org>
Tested by: Georg Funk <georgfunk@web.de>


Revision tags: release/4.8.0_cvs, release/4.8.0
# 227f9a1c 25-Mar-2003 Jake Burkholder <jake@FreeBSD.org>

- Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
with PAE.
- Use this to represent physical addresses

- Add vm_paddr_t, a physical address type. This is required for systems
where physical addresses larger than virtual addresses, such as i386s
with PAE.
- Use this to represent physical addresses in the MI vm system and in the
i386 pmap code. This also changes the paddr parameter to d_mmap_t.
- Fix printf formats to handle physical addresses >4G in the i386 memory
detection code, and due to kvtop returning vm_paddr_t instead of u_long.

Note that this is a name change only; vm_paddr_t is still the same as
vm_offset_t on all currently supported platforms.

Sponsored by: DARPA, Network Associates Laboratories
Discussed with: re, phk (cdevsw change)

show more ...


# 7ac40f5f 03-Mar-2003 Poul-Henning Kamp <phk@FreeBSD.org>

Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is au

Gigacommit to improve device-driver source compatibility between
branches:

Initialize struct cdevsw using C99 sparse initializtion and remove
all initializations to default values.

This patch is automatically generated and has been tested by compiling
LINT with all the fields in struct cdevsw in reverse order on alpha,
sparc64 and i386.

Approved by: re(scottl)

show more ...


# 07159f9c 25-Feb-2003 Maxime Henrion <mux@FreeBSD.org>

Cleanup of the d_mmap_t interface.

- Get rid of the useless atop() / pmap_phys_address() detour. The
device mmap handlers must now give back the physical address
without atop()'ing it.
- Don't

Cleanup of the d_mmap_t interface.

- Get rid of the useless atop() / pmap_phys_address() detour. The
device mmap handlers must now give back the physical address
without atop()'ing it.
- Don't borrow the physical address of the mapping in the returned
int. Now we properly pass a vm_offset_t * and expect it to be
filled by the mmap handler when the mapping was successful. The
mmap handler must now return 0 when successful, any other value
is considered as an error. Previously, returning -1 was the only
way to fail. This change thus accidentally fixes some devices
which were bogusly returning errno constants which would have been
considered as addresses by the device pager.
- Garbage collect the poorly named pmap_phys_address() now that it's
no longer used.
- Convert all the d_mmap_t consumers to the new API.

I'm still not sure wheter we need a __FreeBSD_version bump for this,
since and we didn't guarantee API/ABI stability until 5.1-RELEASE.

Discussed with: alc, phk, jake
Reviewed by: peter
Compile-tested on: LINT (i386), GENERIC (alpha and sparc64)
Runtime-tested on: i386

show more ...


# d00d7d5c 11-Feb-2003 Brian Feldman <green@FreeBSD.org>

Sound devices were being leaked by dsp_open() not actually releasing the
channels it allocates if chn_reset() on them resulted in failure.
ARROW'D!


Revision tags: release/5.0.0_cvs, release/5.0.0
# a8be3e63 05-Jan-2003 Brian Feldman <green@FreeBSD.org>

Fix the duplicate unlock of the pcm read channel in certain cases.

Reviewed by: cg


Revision tags: release/4.7.0_cvs
# 47d5a0f3 28-Aug-2002 Orion Hodson <orion@FreeBSD.org>

Marginally simplify dsp_open error handling by adding an early test to
determine liklihood of opening device in requested directions. Makes for
simpler error handling and change should close kern/35

Marginally simplify dsp_open error handling by adding an early test to
determine liklihood of opening device in requested directions. Makes for
simpler error handling and change should close kern/35004.

PR: kern/35004.

show more ...


# 22967090 20-Aug-2002 Orion Hodson <orion@FreeBSD.org>

Back out last commit. Needs slightly more subtle handling.


# 42e67fd3 18-Aug-2002 Orion Hodson <orion@FreeBSD.org>

Apply reference counting patch. Fixes problem of two applications
opening the device, eg one read only and one write only, and the
reference count being non-zero when both exit rendering device
perm

Apply reference counting patch. Fixes problem of two applications
opening the device, eg one read only and one write only, and the
reference count being non-zero when both exit rendering device
permanently busy.

PR: kern/35004
Submitted by: Bill Wells
MFC after: 3 days

show more ...


Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs, release/4.5.0_cvs, release/4.4.0_cvs
# 436c9b65 25-Jan-2002 Scott Long <scottl@FreeBSD.org>

Fix code that had rotted behind debugging macros.

Approved by: cg (in principle)
MFC after: 2 weeks


# 095159ec 23-Jan-2002 Cameron Grant <cg@FreeBSD.org>

add more error checking to open of /dev/dsp* and /dev/audio* - if the
default format for the chosen subdevice cannot be obtained return an error
instead of returning success with an indeteterminate f

add more error checking to open of /dev/dsp* and /dev/audio* - if the
default format for the chosen subdevice cannot be obtained return an error
instead of returning success with an indeteterminate format selected.

note that this should never happen once the feederchain builder works for
recording.

show more ...


# 1c72c53f 23-Jan-2002 Cameron Grant <cg@FreeBSD.org>

don't allow mmap beyond the end of the buffer

Submitted by: Philippe Anel <philippe.anel@noos.fr> (partially)


# 16a33022 24-Oct-2001 Cameron Grant <cg@FreeBSD.org>

fix SNDCTL_DSP_GETISPACE behaviour


# 5c25132a 14-Sep-2001 George C A Reid <greid@FreeBSD.org>

- Correctly increment the channel refcount in dsp_open() such that it is
no longer possible to unload the driver module while sound is playing
(which resulted in a panic).
- Fix a similar problem

- Correctly increment the channel refcount in dsp_open() such that it is
no longer possible to unload the driver module while sound is playing
(which resulted in a panic).
- Fix a similar problem with the sndstat device that I found while looking
at the above.
- Append a newline character to error messages in pcm_unregister()

Reviewed by: cg
MFC after: 10 days

show more ...


1...<<111213