* [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for SMP kernels (against 2.4.8+Rui)
@ 2001-08-11 19:11 Daniel T. Chen
2001-08-11 22:25 ` [Emu10k1-devel] " Daniel Bertrand
0 siblings, 1 reply; 5+ messages in thread
From: Daniel T. Chen @ 2001-08-11 19:11 UTC (permalink / raw)
To: linux-kernel; +Cc: emu10k1-devel
[-- Attachment #1: Type: TEXT/PLAIN, Size: 153 bytes --]
I've rediffed Juha's patch against 2.4.8+Rui's patch.
---
Dan Chen crimsun@email.unc.edu
GPG key: www.cs.unc.edu/~chenda/pubkey.gpg.asc
[-- Attachment #2: ac3-smp-fix.diff --]
[-- Type: TEXT/PLAIN, Size: 2974 bytes --]
diff -uNr linux-2.4.8-rui/drivers/sound/emu10k1/audio.c linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/audio.c
--- linux-2.4.8-rui/drivers/sound/emu10k1/audio.c Sat Aug 11 14:46:37 2001
+++ linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/audio.c Sat Aug 11 14:49:47 2001
@@ -1246,8 +1246,11 @@
spin_lock_irqsave(&woinst->lock, flags);
- if (woinst->format.passthrough && card->pt.state != PT_STATE_INACTIVE)
+ if (woinst->format.passthrough && card->pt.state != PT_STATE_INACTIVE) {
+ spin_lock(&card->pt.lock);
emu10k1_pt_stop(card);
+ spin_unlock(&card->pt.lock);
+ }
if (woinst->state & WAVE_STATE_OPEN) {
if (woinst->state & WAVE_STATE_STARTED) {
diff -uNr linux-2.4.8-rui/drivers/sound/emu10k1/efxmgr.c linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/efxmgr.c
--- linux-2.4.8-rui/drivers/sound/emu10k1/efxmgr.c Sat Aug 11 14:46:37 2001
+++ linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/efxmgr.c Sat Aug 11 14:51:20 2001
@@ -197,15 +197,15 @@
u32 bc;
bc = sblive_readptr(card, GPR_BASE + card->pt.intr_gpr, 0);
if (bc != 0) {
- spin_lock_irqsave(&card->lock, flags);
+ DPD(3, "pt interrupt, bc = %d\n", bc);
+ spin_lock_irqsave(&card->pt.lock, flags);
card->pt.blocks_played = bc;
if (card->pt.blocks_played >= card->pt.blocks_copied) {
DPF(1, "buffer underrun in passthrough playback\n");
emu10k1_pt_stop(card);
}
wake_up_interruptible(&card->pt.wait);
- spin_unlock_irqrestore(&card->lock, flags);
- DPD(3, "pt interrupt, bc = %d\n", bc);
+ spin_unlock_irqrestore(&card->pt.lock, flags);
}
}
}
diff -uNr linux-2.4.8-rui/drivers/sound/emu10k1/main.c linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/main.c
--- linux-2.4.8-rui/drivers/sound/emu10k1/main.c Sat Aug 11 14:47:27 2001
+++ linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/main.c Sat Aug 11 14:51:55 2001
@@ -775,6 +775,7 @@
card->pt.intr_gpr_name = "count";
card->pt.enable_gpr_name = "enable";
card->pt.pos_gpr_name = "ptr";
+ spin_lock_init(&card->pt.lock);
init_waitqueue_head(&card->pt.wait);
/* tmp = sblive_readfn0(card, HCFG);
diff -uNr linux-2.4.8-rui/drivers/sound/emu10k1/passthrough.c linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/passthrough.c
--- linux-2.4.8-rui/drivers/sound/emu10k1/passthrough.c Sat Aug 11 14:46:37 2001
+++ linux-2.4.8-rui-ac3_smp_fix/drivers/sound/emu10k1/passthrough.c Sat Aug 11 14:53:30 2001
@@ -209,9 +209,7 @@
{
struct pt_data *pt = &card->pt;
int i;
- unsigned long flags;
- spin_lock_irqsave(&card->pt.lock, flags);
if (pt->state != PT_STATE_INACTIVE) {
DPF(2, "digital pass-through stopped\n");
sblive_writeptr(card, GPR_BASE + pt->enable_gpr, 0, 0);
@@ -222,7 +220,6 @@
pt->state = PT_STATE_INACTIVE;
kfree(pt->buf);
}
- spin_unlock_irqrestore(&card->pt.lock, flags);
}
void emu10k1_pt_waveout_update(struct emu10k1_wavedevice *wave_dev)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for SMP kernels (against 2.4.8+Rui)
2001-08-11 19:11 [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for SMP kernels (against 2.4.8+Rui) Daniel T. Chen
@ 2001-08-11 22:25 ` Daniel Bertrand
2001-08-11 23:29 ` [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Bertrand @ 2001-08-11 22:25 UTC (permalink / raw)
To: Daniel T. Chen; +Cc: linux-kernel, emu10k1-devel
Hi,
For non-ac97 volume controls to work, the following needs to be added to
ac97_codec.c (or else the codec gets reset as the module tries to write a
volume to 0x00):
--- ac97_codec.c-orig Sat Aug 11 15:13:20 2001
+++ ac97_codec.c Sat Aug 11 15:17:15 2001
@@ -299,6 +299,9 @@
int scale;
struct ac97_mixer_hw *mh = &ac97_hw[oss_channel];
+ if (!mh->offset)
+ return;
+
#ifdef DEBUG
printk("ac97_codec: wrote OSS mixer %2d (%s ac97 register 0x%02x), "
"left vol:%2d, right vol:%2d:",
On Sat, 11 Aug 2001, Daniel T. Chen wrote:
> I've rediffed Juha's patch against 2.4.8+Rui's patch.
>
> ---
> Dan Chen crimsun@email.unc.edu
> GPG key: www.cs.unc.edu/~chenda/pubkey.gpg.asc
>
--
Daniel Bertrand
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for
2001-08-11 22:25 ` [Emu10k1-devel] " Daniel Bertrand
@ 2001-08-11 23:29 ` Alan Cox
2001-08-11 23:53 ` Daniel Bertrand
0 siblings, 1 reply; 5+ messages in thread
From: Alan Cox @ 2001-08-11 23:29 UTC (permalink / raw)
To: Daniel Bertrand; +Cc: Daniel T. Chen, linux-kernel, emu10k1-devel
> For non-ac97 volume controls to work, the following needs to be added to
> ac97_codec.c (or else the codec gets reset as the module tries to write a
> volume to 0x00):
I disagree. If you have a non ac97 codec you shouldnt be calling into
ac97_codec.c in the first place
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for
2001-08-11 23:29 ` [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for Alan Cox
@ 2001-08-11 23:53 ` Daniel Bertrand
2001-08-12 0:18 ` Alan Cox
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Bertrand @ 2001-08-11 23:53 UTC (permalink / raw)
To: Alan Cox; +Cc: Daniel T. Chen, linux-kernel, emu10k1-devel
Hi,
We have ac97 volumes _and_ other volumes handle with emu10k1 code. We want
to use the ac97_codec functions for it's OSS mixer handling for both
(storing volumes values, handling queries, etc). Those simple 2 lines
allow us to do that. Else, we have to intercept everything and write our
own functions to handle it.
On Sun, 12 Aug 2001, Alan Cox wrote:
> > For non-ac97 volume controls to work, the following needs to be added to
> > ac97_codec.c (or else the codec gets reset as the module tries to write a
> > volume to 0x00):
>
> I disagree. If you have a non ac97 codec you shouldnt be calling into
> ac97_codec.c in the first place
>
--
Daniel Bertrand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for
2001-08-11 23:53 ` Daniel Bertrand
@ 2001-08-12 0:18 ` Alan Cox
0 siblings, 0 replies; 5+ messages in thread
From: Alan Cox @ 2001-08-12 0:18 UTC (permalink / raw)
To: Daniel Bertrand; +Cc: Alan Cox, Daniel T. Chen, linux-kernel, emu10k1-devel
> We have ac97 volumes _and_ other volumes handle with emu10k1 code. We want
> to use the ac97_codec functions for it's OSS mixer handling for both
> (storing volumes values, handling queries, etc). Those simple 2 lines
> allow us to do that. Else, we have to intercept everything and write our
> own functions to handle it.
That is fine by me.
There are really two ways we approach this
1. You add two methods for volume control into your code
2. We make ac97_codec into audio_codec and we add things to the
codec_ops structure for volume and mixer control.
For 2.4 #1 seems a lot easier
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-08-12 0:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-11 19:11 [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for SMP kernels (against 2.4.8+Rui) Daniel T. Chen
2001-08-11 22:25 ` [Emu10k1-devel] " Daniel Bertrand
2001-08-11 23:29 ` [Emu10k1-devel] [PATCH] EMU10K1: Juha Rjola's AC3 Passthrough for Alan Cox
2001-08-11 23:53 ` Daniel Bertrand
2001-08-12 0:18 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®