mirror of
https://git.freebsd.org/src.git
synced 2026-01-16 23:02:24 +00:00
Revert "sound: Merge chn_intr() with chn_intr_locked()"
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
Some checks are pending
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (push) Waiting to run
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (push) Waiting to run
Cross-build Kernel / amd64 macos-latest (clang-18) (push) Waiting to run
Cross-build Kernel / aarch64 macos-latest (clang-18) (push) Waiting to run
It turns out that snd_uaudio(4) uses sound(4)'s channel lock for its USB
transfer callbacks. I will try to address this at some point, because
this is layering violation, but for now we need to revert the commit, as
it causes a lock recursion panic with USB audio devices.
This reverts commit e254ef87a3.
This commit is contained in:
parent
c8cf5a99f8
commit
5cc34a83e1
2 changed files with 19 additions and 2 deletions
|
|
@ -581,14 +581,30 @@ chn_read(struct pcm_channel *c, struct uio *buf)
|
|||
}
|
||||
|
||||
void
|
||||
chn_intr(struct pcm_channel *c)
|
||||
chn_intr_locked(struct pcm_channel *c)
|
||||
{
|
||||
CHN_LOCK(c);
|
||||
|
||||
CHN_LOCKASSERT(c);
|
||||
|
||||
c->interrupts++;
|
||||
|
||||
if (c->direction == PCMDIR_PLAY)
|
||||
chn_wrintr(c);
|
||||
else
|
||||
chn_rdintr(c);
|
||||
}
|
||||
|
||||
void
|
||||
chn_intr(struct pcm_channel *c)
|
||||
{
|
||||
|
||||
if (CHN_LOCKOWNED(c)) {
|
||||
chn_intr_locked(c);
|
||||
return;
|
||||
}
|
||||
|
||||
CHN_LOCK(c);
|
||||
chn_intr_locked(c);
|
||||
CHN_UNLOCK(c);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -298,6 +298,7 @@ int chn_oss_setorder(struct pcm_channel *, unsigned long long *);
|
|||
int chn_oss_getmask(struct pcm_channel *, uint32_t *);
|
||||
|
||||
void chn_resetbuf(struct pcm_channel *c);
|
||||
void chn_intr_locked(struct pcm_channel *c);
|
||||
void chn_intr(struct pcm_channel *c);
|
||||
int chn_abort(struct pcm_channel *c);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue