linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
@ 2008-03-14 23:33 Bob Tracy
  2008-04-01 18:07 ` [alsa-devel] " Tyson Whitehead
  0 siblings, 1 reply; 36+ messages in thread
From: Bob Tracy @ 2008-03-14 23:33 UTC (permalink / raw)
  To: twhitehe
  Cc: ALSA devel, Michael Cree, Krzysztof Helt, Takashi Iwai,
	Rene Herman, linux-kernel, Ivan Kokshaysky, linux-alpha,
	Bob Tracy

rct wrote:
> Rene Herman wrote:
> > Okay, and applying the attached just makes your sound completely dead in the 
> > water?
> > (patch to remove es1888_init from a Miata build omitted)
> 
> I'll try a build with the old OSS "sb" driver, and if that works ok, we
> may be able to do away with es1888_init() on the Miata.  Tyson -- I
> think you have a Miata if I'm remembering correctly: can you confirm
> these observations?

Quick followup: OSS "sb" driver works fine without es1888_init().

-- 
------------------------------------------------------------------------
Bob Tracy          |  "I was a beta tester for dirt.  They never did
rct@frus.com       |   get all the bugs out." - Steve McGrew on /.
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
@ 2008-03-29  6:42 Bob Tracy
  2008-03-29 12:09 ` [alsa-devel] " Rene Herman
  0 siblings, 1 reply; 36+ messages in thread
From: Bob Tracy @ 2008-03-29  6:42 UTC (permalink / raw)
  To: Tyson Whitehead
  Cc: ALSA devel, Michael Cree, Krzysztof Helt, Takashi Iwai,
	Rene Herman, linux-kernel, Ivan Kokshaysky, linux-alpha

Ok...  I'm back.  Replies to the long queue of messages will be sent as
I have time to try the various patches.

Tyson Whitehead wrote:
> Takashi Iwai wrote:
> > ---
> > 
> > diff -r 82e6201fc907 sound/isa/es18xx.c
> > --- a/sound/isa/es18xx.c	Mon Mar 17 14:36:24 2008 +0100
> > +++ b/sound/isa/es18xx.c	Mon Mar 17 17:32:59 2008 +0100
> > @@ -765,9 +765,10 @@ static irqreturn_t snd_es18xx_interrupt(
> >  		/* Read Interrupt status */
> >  		status = snd_es18xx_mixer_read(chip, 0x7f) >> 4;
> >  	}
> > -#if 0
> > -	else {
> > -		status = 0;
> > +
> > +#ifdef CONFIG_ALPHA
> > +	if (!(status & (AUDIO1_IRQ | AUDIO2_IRQ))) {
> > +		/* status = 0; */
> >  		if (inb(chip->port + 0x0C) & 0x01)
> >  			status |= AUDIO1_IRQ;
> >  		if (snd_es18xx_mixer_read(chip, 0x7A) & 0x80)
> > @@ -777,7 +778,6 @@ static irqreturn_t snd_es18xx_interrupt(
> >  			status |= HWV_IRQ;
> >  	}
> >  #endif
> > -
> >  	/* Audio 1 & Audio 2 */
> >          if (status & AUDIO2_IRQ) {
> >                  if (chip->active & DAC2)
> 
> This looks like it should accomplish the same thing (assuming not bits 
> get set in status on the initial attempt to read it), without affecting 
> other platforms and possible the alpha if anyone has a card that just 
> works for whatever reason.  A better patch all around.  : )

Unfortunately, this does nothing to fix the ES1888 on my system.  Same
broken behavior as described previously.  I'll try something else in
the queue later today after I get some sleep...

-- 
------------------------------------------------------------------------
Bob Tracy          |  "I was a beta tester for dirt.  They never did
rct@frus.com       |   get all the bugs out." - Steve McGrew on /.
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
@ 2008-03-17 22:00 Rene Herman
  2008-03-18  3:24 ` [alsa-devel] " Bob Tracy
  2008-03-30 22:09 ` Bob Tracy
  0 siblings, 2 replies; 36+ messages in thread
From: Rene Herman @ 2008-03-17 22:00 UTC (permalink / raw)
  To: Bob Tracy
  Cc: ALSA devel, Michael Cree, Krzysztof Helt, Takashi Iwai,
	linux-kernel, Ivan Kokshaysky, linux-alpha

[-- Attachment #1: Type: text/plain, Size: 1449 bytes --]

On 13-03-08 05:24, Bob Tracy wrote:

> Rene Herman wrote:
>> Okay, and applying the attached just makes your sound completely dead in the 
>> water?
>> (patch to delete es1888_init function)
> 
> Oddly enough, the patch had no effect whatsoever (at least with the
> ALSA drivers: I didn't try building a kernel with the OSS "sb" driver).
> Just to make sure I wasn't "benefiting" from initialization inherited
> from a prior boot, I even powered-down the machine for 30 seconds
> before booting on the new kernel.  snd-sb8 still works, and snd-es18xx
> is still broken (in exactly the same way as before).

Okay, thought I'd stare at this thing a bit -- there's no specific 1888 
documentation available it seems but I did notice something in the 1878 
datasheet which might mean something. The docs says that bits 0-1 are don't 
care for DMA but don't for IRQ, so could it possibly be as simple as the 
attached?

1878 sheet doesn't document register 0x7f, it seems...

Assuming it's not just this, this thing is going to require quite a bit of 
trial and error and without the hardware this will be troublesome. I expect 
this is not it, since the arch init code also doesn't care about bit 0 when 
setting that same register for IRQ 5.

If this is not it -- I'd try s/0x50/0x10/ in that line, even completely 
commenting out the IRQ setting line (with the arch code built in) and just 
generally frolic around 'till something blows up...

Rene.


[-- Attachment #2: es18xx_trial_and_error.diff --]
[-- Type: text/plain, Size: 1273 bytes --]

diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 90498e4..71d1b96 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1449,16 +1449,16 @@ static int __devinit snd_es18xx_initialize(struct snd_es18xx *chip)
 		switch (chip->irq) {
 		case 2:
 		case 9:
-			irqmask = 0;
+			irqmask = 0x0;
 			break;
 		case 5:
-			irqmask = 1;
+			irqmask = 0x5;
 			break;
 		case 7:
-			irqmask = 2;
+			irqmask = 0xa;
 			break;
 		case 10:
-			irqmask = 3;
+			irqmask = 0xf;
 			break;
 		default:
 			snd_printk(KERN_ERR "invalid irq %d\n", chip->irq);
@@ -1497,7 +1497,7 @@ static int __devinit snd_es18xx_initialize(struct snd_es18xx *chip)
 		}
 
 		/* Enable and set Audio 1 IRQ */
-		snd_es18xx_write(chip, 0xB1, 0x50 | (irqmask << 2));
+		snd_es18xx_write(chip, 0xB1, 0x50 | irqmask);
 		/* Enable and set Audio 1 DMA */
 		snd_es18xx_write(chip, 0xB2, 0x50 | (dma1mask << 2));
 		/* Set Audio 2 DMA */
@@ -1513,7 +1513,9 @@ static int __devinit snd_es18xx_initialize(struct snd_es18xx *chip)
 			   FM enabled */
 			snd_es18xx_mixer_write(chip, 0x40, 0x43 | (chip->mpu_port & 0xf0) >> 1);
 		}
+#if 0
 		snd_es18xx_mixer_write(chip, 0x7f, ((irqmask + 1) << 1) | 0x01);
+#endif
 	}
 	if (chip->caps & ES18XX_NEW_RATE) {
 		/* Change behaviour of register A1

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
  2008-03-12 20:31   ` [alsa-devel] " Bob Tracy
@ 2008-03-12 21:12 Rene Herman
  2008-03-14 13:13 ` [alsa-devel] " Bob Tracy
  -1 siblings, 1 reply; 36+ messages in thread
From: Rene Herman @ 2008-03-12 21:12 UTC (permalink / raw)
  To: Bob Tracy
  Cc: ALSA devel, Michael Cree, Krzysztof Helt, Takashi Iwai,
	linux-kernel, Ivan Kokshaysky, linux-alpha

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On 12-03-08 21:31, Bob Tracy wrote:

> Here is the requested list of CONFIG_ALPHA_* items for the
> 2.6.25-rc4+iommu_patch kernel with support for snd-es18xx and snd-sb8:
> 
> CONFIG_ALPHA=y
> CONFIG_ALPHA_MIATA=y
> CONFIG_ALPHA_EV5=y
> CONFIG_ALPHA_CIA=y
> CONFIG_ALPHA_EV56=y
> CONFIG_ALPHA_PYXIS=y
> CONFIG_ALPHA_SRM=y
> CONFIG_ALPHA_LEGACY_START_ADDRESS=y
> 
>>From arch/alpha/kernel/Makefile, obj-${CONFIG_ALPHA_MIATA} adds es1888.o
> as a built-in object, so yes, it's built-in.

Okay, and applying the attached just makes your sound completely dead in the 
water?

> I never noticed the init support for the ES1888 chip before...  The code
> appears to set up DMA channel 1, but does not mention anything about the
> second 16-bit DMA channel.

Indeed. It seems to init it as an sb8...

Rene.


[-- Attachment #2: alpha_miata_no_es1888.diff --]
[-- Type: text/plain, Size: 1002 bytes --]

diff --git a/arch/alpha/kernel/Makefile b/arch/alpha/kernel/Makefile
index dccf052..f53a3a2 100644
--- a/arch/alpha/kernel/Makefile
+++ b/arch/alpha/kernel/Makefile
@@ -77,7 +77,7 @@ obj-$(CONFIG_ALPHA_EIGER)	+= sys_eiger.o irq_i8259.o
 obj-$(CONFIG_ALPHA_JENSEN)	+= sys_jensen.o pci-noop.o irq_i8259.o
 obj-$(CONFIG_ALPHA_MARVEL)	+= sys_marvel.o 
 obj-$(CONFIG_ALPHA_MIATA)	+= sys_miata.o irq_pyxis.o irq_i8259.o \
-				   es1888.o smc37c669.o
+				   smc37c669.o
 obj-$(CONFIG_ALPHA_MIKASA)	+= sys_mikasa.o irq_i8259.o irq_srm.o
 obj-$(CONFIG_ALPHA_NAUTILUS)	+= sys_nautilus.o irq_i8259.o irq_srm.o
 obj-$(CONFIG_ALPHA_NORITAKE)	+= sys_noritake.o irq_i8259.o
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c
index 910b43c..5601d7e 100644
--- a/arch/alpha/kernel/sys_miata.c
+++ b/arch/alpha/kernel/sys_miata.c
@@ -236,7 +236,6 @@ miata_init_pci(void)
 {
 	cia_init_pci();
 	SMC669_Init(0); /* it might be a GL (fails harmlessly if not) */
-	es1888_init();
 }
 
 static void

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply related	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
  2008-03-11 20:00 ` [alsa-devel] " Michael Cree
@ 2008-03-12 14:40 Bob Tracy
  2008-03-12 19:34 ` Rene Herman
  1 sibling, 1 reply; 36+ messages in thread
From: Bob Tracy @ 2008-03-12 14:40 UTC (permalink / raw)
  To: Michael Cree
  Cc: ALSA devel, Krzysztof Helt, Takashi Iwai, Rene Herman,
	linux-kernel, Ivan Kokshaysky, linux-alpha, Bob Tracy

Well, I built a 2.6.22 kernel last night, and in tests this morning
there's no difference relative to the ALSA behavior seen in 2.6.25-rc4.
Since the question came up (or was strongly implied), I took the time to
check the status of IRQ 5 in /proc/interrupts, and while it shows up as
assigned to the sound card, no interrupts are being seen/processed by
the es18xx driver.  When I remove the snd-es18xx module and install the
snd-sb8 module with the same parameters (other than there's no second
DMA channel), the /proc/interrupts counter for IRQ 5 increments as
expected when playing sound files.

At this point I'm pretty sure the es18xx issue isn't a regression: it's
"just" a bug that has been around since I first loaded 2.6.X on my
Alpha.

-- 
------------------------------------------------------------------------
Bob Tracy          |  "I was a beta tester for dirt.  They never did
rct@frus.com       |   get all the bugs out." - Steve McGrew on /.
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
  2008-03-11 15:17   ` Rene Herman
@ 2008-03-11 18:08 Bob Tracy
  2008-03-11 20:00 ` [alsa-devel] " Michael Cree
  -1 siblings, 1 reply; 36+ messages in thread
From: Bob Tracy @ 2008-03-11 18:08 UTC (permalink / raw)
  To: Rene Herman
  Cc: ALSA devel, Michael Cree, Krzysztof Helt, Takashi Iwai,
	linux-kernel, Ivan Kokshaysky, linux-alpha, Bob Tracy

Rene Herman wrote:
> This is behaviour consistent with the IRQ being dead ...
>
> I suppose it used to work and I suppose the behaviour 
> you are describing above is 100% repeatable?

I can't tell you exactly *when* it used to work, or even *if* it did
with 2.6 kernels.  I'll try to explain...

Sometime back in the 2.6.14 to 2.6.16 timeframe there was an issue with
the ALSA driver not recognizing interrupts (causing looping).  Tyson
Whitehead had put together a patch for the interrupt problem that worked
for him, but not for me or Michael.  One workaround back then was using
the snd-sb8 driver that supports only one DMA channel (half-duplex
operation) anyway: that was a reliable workaround, and may be what I'm
remembering for the "it used to work" case.  I can't find any reliable
evidence that I've *ever* been able to use the ES1888 with its proper
driver under ALSA with 2.6 kernels.  As far as Tyson's patch, I know
he reported it upstream to the ALSA developers, but I saw no followup
communication from either Tyson or the developers.

> Given that you can use aplay -- probably no difference with "aplay -M" ?

I'll give it a shot.

> To get to the bottom of this we might need to get a specific failed version 
> (for readers, it's not been verified that this is a regression since 2.6.24) 
> but we can try to get lucky first.

I'm beginning to think this is *not* a regression, but merely a long-
standing ALSA issue that was never addressed.  I would be fine with
reclassifying this as an ALSA bug and dropping linux-kernel from the
discussion.

> Okay. (tests) seem to at least confirm it's not the 16-bit DMA.

As far as how to proceed from here, I'm certain things were broken in
2.6.1[4-6].  I could try various later releases between .16 and .24 to
see if snd-es18xx worked for any of those, but I think the answer will
be "no."  I think a useful test would be to see if "snd-sb8" works in
2.6.25-rcX, which would at least narrow things down a bit.

-- 
------------------------------------------------------------------------
Bob Tracy          |  "I was a beta tester for dirt.  They never did
rct@frus.com       |   get all the bugs out." - Steve McGrew on /.
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
  2008-03-10 22:22       ` Bob Tracy
@ 2008-03-10 22:33 Rene Herman
  2008-03-11 14:07 ` [alsa-devel] " Bob Tracy
  -1 siblings, 1 reply; 36+ messages in thread
From: Rene Herman @ 2008-03-10 22:33 UTC (permalink / raw)
  To: Bob Tracy
  Cc: ALSA devel, Michael Cree, Takashi Iwai, linux-kernel,
	Ivan Kokshaysky, linux-alpha

On 10-03-08 23:22, Bob Tracy wrote:

> Rene Herman wrote:

>> Bob? How short are "short" wav files by the way?
> 
> The one I was using for testing is 50,272 bytes. A slightly longer file 
> that exhibits "more exotic" looping behavior is 97,898 bytes (just a bit 
> over 6 seconds of audio). I'll send you the shorter file under separate 
> cover.

Thanks. No problems here, using either the ALSA or OSS interfaces. Have been 
busy switching cards -- I have no hardware that can use anything other than 
DMA 0, 1 or 3. First test is to see if it's ALSA or just the OSS emulation 
though...

Rene.

^ permalink raw reply	[flat|nested] 36+ messages in thread
* Re: [regression] 2.6.25-rc4 snd-es18xx broken on Alpha
@ 2008-03-10 16:21 Bob Tracy
  2008-03-10 16:56 ` Rene Herman
  0 siblings, 1 reply; 36+ messages in thread
From: Bob Tracy @ 2008-03-10 16:21 UTC (permalink / raw)
  To: Rene Herman
  Cc: Michael Cree, Bob Tracy, Ivan Kokshaysky, linux-kernel,
	linux-alpha, ALSA devel

Rene Herman wrote:
> > Bob Tracy wrote:
> 
> >> Supposedly with the ES1888, dma1 is for capture, dma2 is for playback. 
> >> dma2 == 5 is a 16-bit channel, yes?  That could explain much...
> 
> It is, but what would it explain? You're only having playback problems, right?

dma2 is for playback, I'm having playback problems, dma2 == 5 is a
a 16-bit channel, and 16-bit DMA is an issue with the es18xx driver
(according to the comment near the top of the file).

> Can it be forced to use dma2=0 (an 8-bit channel, and the usual capture 
> channel on es18xx)? However, that might not be the issue anyway:

I'll try a few things like dma2 == dma1, and setting dma2 to an 8-bit
channel, but I think the various configuration parameters are hard-wired
on the Alpha (not PnP).

> This sounds very suspiciously like a difference with playing through the 
> native ALSA interface and the OSS emulaion. Could you and/or Bob confirm 
> that sox is using the OSS emulation and not ALSA natively?
> 
> I could very well imagine the ALSA OSS emulation being broken on Alpha. I 
> doubt any of teh developers has an Alpha. And if aplay works correctly this 
> seems very likely.

I'll see if I can verify whether it's a native ALSA vs. OSS emulation
issue.

The local version of sox (Debian 12.7.9-1) contains a library dependency
on libasound.so.2, and a "strings" on the binary yields "ALSA_0.9.0rc4"
as well as several ALSA error message strings.  However, output by
default goes to /dev/dsp (major 14, minor 3), which is definitely OSS.

-- 
------------------------------------------------------------------------
Bob Tracy          |  "I was a beta tester for dirt.  They never did
rct@frus.com       |   get all the bugs out." - Steve McGrew on /.
------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2008-04-01 21:02 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 23:33 [regression] 2.6.25-rc4 snd-es18xx broken on Alpha Bob Tracy
2008-04-01 18:07 ` [alsa-devel] " Tyson Whitehead
2008-04-01 18:29   ` Rene Herman
2008-04-01 18:31   ` Rene Herman
2008-04-01 18:34   ` Rene Herman
2008-04-01 19:07     ` Rene Herman
2008-04-01 20:32       ` Bob Tracy
2008-04-01 20:26   ` [alsa-devel] " Bob Tracy
2008-04-01 21:02     ` Michael Cree
  -- strict thread matches above, loose matches on Subject: below --
2008-03-29  6:42 Bob Tracy
2008-03-29 12:09 ` [alsa-devel] " Rene Herman
2008-03-30 16:14   ` Ivan Kokshaysky
2008-03-30 20:24   ` Bob Tracy
2008-03-17 22:00 Rene Herman
2008-03-18  3:24 ` [alsa-devel] " Bob Tracy
2008-03-18  3:54   ` Michael Cree
2008-03-23 10:40     ` Michael Cree
2008-03-24 18:15       ` Rene Herman
2008-03-24 23:56         ` Michael Cree
2008-03-25  0:29           ` [alsa-devel] " Rene Herman
2008-03-25  1:22             ` Michael Cree
2008-03-25  2:22               ` Rene Herman
2008-03-30  9:13                 ` [alsa-devel] " Michael Cree
2008-03-25  2:46             ` Rene Herman
2008-03-30 21:07             ` Bob Tracy
2008-03-30 21:11               ` Michael Cree
2008-03-30 22:09 ` Bob Tracy
2008-03-12 21:12 Rene Herman
2008-03-14 13:13 ` [alsa-devel] " Bob Tracy
2008-03-15  1:18   ` Tyson Whitehead
2008-03-17 22:04     ` Rene Herman
2008-03-18 13:55       ` Tyson Whitehead
2008-03-12 14:40 Bob Tracy
2008-03-12 19:34 ` Rene Herman
2008-03-12 20:31   ` [alsa-devel] " Bob Tracy
2008-03-12 22:48   ` Rafael J. Wysocki
2008-03-11 18:08 Bob Tracy
2008-03-11 20:00 ` [alsa-devel] " Michael Cree
2008-03-11 20:34   ` Bob Tracy
2008-03-23  9:48   ` Michael Cree
2008-03-10 22:33 Rene Herman
2008-03-11 14:07 ` [alsa-devel] " Bob Tracy
2008-03-11 15:17   ` Rene Herman
2008-03-10 16:21 Bob Tracy
2008-03-10 16:56 ` Rene Herman
2008-03-10 17:14   ` Takashi Iwai
2008-03-10 19:29     ` [alsa-devel] " Rene Herman
2008-03-10 22:22       ` Bob Tracy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).