2006-02-23 20:53:25

by Pavel Machek

[permalink] [raw]
Subject: es1371 sound problems

Hi!

After problems with SB Live!, I tried getting another PCI card:

0000:03:03.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev
02)

no luck :-(. Now, this is quite a strange machine (dual core), but
does anyone have any clues? I tried OSS driver, and it did not work,
so I went back to ALSA:

Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04
08:57:20 2006 UTC).
input: PS/2 Generic Mouse as /class/input/input3
reset at 0x220 failed!!!
es18xx: [0x220] ESS chip not found
reset at 0x240 failed!!!
es18xx: [0x240] ESS chip not found
reset at 0x260 failed!!!
es18xx: [0x260] ESS chip not found
reset at 0x280 failed!!!
es18xx: [0x280] ESS chip not found
ACPI: PCI Interrupt 0000:03:02.1[A] -> GSI 18 (level, low) -> IRQ 17
acpi_bus-0201 [11] bus_set_power : Device is not power
manageable
ACPI: PCI Interrupt 0000:03:03.0[A] -> GSI 19 (level, low) -> IRQ 19
es1371: codec read timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
codec write timeout at 0x3014 [0x40000000]
codec write timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
es1371: codec read timeout at 0x3014 [0x40000000]
AC'97 0 access is not valid [0x0], removing mixer.
acpi_bus-0201 [11] bus_set_power : Device is not power
manageable
ACPI: PCI interrupt for device 0000:03:03.0 disabled
ENS1371: probe of 0000:03:03.0 failed with error -5
ALSA device list:
#1: Brooktree Bt878 at 0xd0001000, irq 17
oprofile: using timer interrupt.

Pavel

--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...


2006-02-24 11:22:44

by Takashi Iwai

[permalink] [raw]
Subject: Re: es1371 sound problems

At Thu, 23 Feb 2006 21:53:09 +0100,
Pavel Machek wrote:
>
> Hi!
>
> After problems with SB Live!, I tried getting another PCI card:
>
> 0000:03:03.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev
> 02)
>
> no luck :-(. Now, this is quite a strange machine (dual core), but
> does anyone have any clues? I tried OSS driver, and it did not work,
> so I went back to ALSA:
>
> Advanced Linux Sound Architecture Driver Version 1.0.11rc2 (Wed Jan 04
> 08:57:20 2006 UTC).
> input: PS/2 Generic Mouse as /class/input/input3
> reset at 0x220 failed!!!
> es18xx: [0x220] ESS chip not found
> reset at 0x240 failed!!!
> es18xx: [0x240] ESS chip not found
> reset at 0x260 failed!!!
> es18xx: [0x260] ESS chip not found
> reset at 0x280 failed!!!
> es18xx: [0x280] ESS chip not found
> ACPI: PCI Interrupt 0000:03:02.1[A] -> GSI 18 (level, low) -> IRQ 17
> acpi_bus-0201 [11] bus_set_power : Device is not power
> manageable
> ACPI: PCI Interrupt 0000:03:03.0[A] -> GSI 19 (level, low) -> IRQ 19
> es1371: codec read timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]
> codec write timeout at 0x3014 [0x40000000]
> codec write timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]
> es1371: codec read timeout at 0x3014 [0x40000000]

I've seen similar messages in some reports but haven't figured out the
cause yet.

To be sure, could you check the patch below, making the wait time in
codec acceessor longer?
Also, try to build ens1371 driver as a module.


Takashi


diff -u -r1.93 ens1370.c
--- linux/sound/pci/ens1370.c 16 Jan 2006 16:40:05 -0000 1.93
+++ linux/sound/pci/ens1370.c 24 Feb 2006 11:20:03 -0000
@@ -612,7 +612,7 @@
unsigned int t, x;

mutex_lock(&ensoniq->src_mutex);
- for (t = 0; t < POLL_COUNT; t++) {
+ for (t = 0; t < 50; t++) {
if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
/* save the current state for latter */
x = snd_es1371_wait_src_ready(ensoniq);
@@ -639,6 +639,7 @@
mutex_unlock(&ensoniq->src_mutex);
return;
}
+ msleep(1);
}
mutex_unlock(&ensoniq->src_mutex);
snd_printk(KERN_ERR "codec write timeout at 0x%lx [0x%x]\n",
@@ -653,7 +654,7 @@

__again:
mutex_lock(&ensoniq->src_mutex);
- for (t = 0; t < POLL_COUNT; t++) {
+ for (t = 0; t < 50; t++) {
if (!(inl(ES_REG(ensoniq, 1371_CODEC)) & ES_1371_CODEC_WIP)) {
/* save the current state for latter */
x = snd_es1371_wait_src_ready(ensoniq);
@@ -699,6 +700,7 @@
}
goto __again;
}
+ msleep(1);
}
mutex_unlock(&ensoniq->src_mutex);
snd_printk(KERN_ERR "es1371: codec read timeout at 0x%lx [0x%x]\n",

2006-02-24 16:16:48

by Pavel Machek

[permalink] [raw]
Subject: Re: es1371 sound problems

Hi!

> I've seen similar messages in some reports but haven't figured out the
> cause yet.
>
> To be sure, could you check the patch below, making the wait time in
> codec acceessor longer?
> Also, try to build ens1371 driver as a module.

Tried that... only msleep() hunks did apply, but that should be only
more conservative, AFAICT. It took looong time to boot (my fault,
should have used 50, not 0xa000 or how much is that), but same result
as before. I tried loading it as a module, but same problem :-(.

Pavel

--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...

2006-02-24 23:46:17

by Pavel Machek

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

On So 25-02-06 00:40:50, Pavel Machek wrote:
> Hi!
>
> > > I've seen similar messages in some reports but haven't figured out the
> > > cause yet.
> > >
> > > To be sure, could you check the patch below, making the wait time in
> > > codec acceessor longer?
> > > Also, try to build ens1371 driver as a module.
> >
> > Tried that... only msleep() hunks did apply, but that should be only
> > more conservative, AFAICT. It took looong time to boot (my fault,
> > should have used 50, not 0xa000 or how much is that), but same result
> > as before. I tried loading it as a module, but same problem :-(.
>
> I guess my machine is cursed. emu10k does not work -- produces no
> sound. ens1371 does not work -- is not initialized. usb sound card --
> produces no sound.
>
> Now, I tried to break the curse by connecting usb sound card to
> another machine... but guess what, still no sound. Connected to second
> machine:
>
> root@amd:~# cat /proc/asound/cards
> 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> root@amd:~#
>
> (usb soundcard clicks when I launch mpg123, but that's it.)

Heh, and I guess I have an added bonus. When I unplugged usb soundcard
while mpg123 was running....

[2:49] Decoding of hymna_tmou.mp3 finished.
Unable to handle kernel paging request at virtual address 6b6b6c6b
printing eip:
*pde = 00000000
Oops: 0002 [#1]
PREEMPT SMP
Modules linked in:
CPU: 0
EIP: 0060:[<c016c335>] Not tainted VLI
EFLAGS: 00010246 (2.6.16-rc4-g32e117c5-dirty #222)
EIP is at __fput+0xc5/0x190
eax: 6b6b6c6b ebx: 6b6b6b6b ecx: 00000001 edx: f726a000
esi: f722c440 edi: f704ee10 ebp: f727036c esp: f726bf8c
ds: 007b es: 007b ss: 0068
Process mpg123 (pid: 1685, threadinfo=f726a000 task=f707a540)
Stack: <0>00000000 c1cf2be0 f722c440 00000000 f7c036cc f726a000 c01693a7 00000003
00000003 08056c28 ffffffff c0103139 00000003 00000000 b7f60ff4 08056c28
ffffffff bfbd1f70 00000006 0000007b c010007b 00000006 b7eef707 00000073
Call Trace:
[<c01693a7>] filp_close+0x47/0x90
[<c0103139>] syscall_call+0x7/0xb
Code: 85 a9 00 00 00 8b 46 10 85 c0 74 42 8b 18 85 db 74 3c b8 01 00 00 00 e8 1a 3a fb ff e8 a5 e0 0f
00 c1 e0 07 8d 84 18 00 01 00 00 <ff> 08 83 3b 02 0f 84 a5 00 00 00 b8 01 00 00 00 e8 36 3a fb ff
<6>note: mpg123[1685] exited with preempt_count 1
Segmentation fault
pavel@amd:~/incoming$

Should I get covox-soundcard-on-paralel-port to break the curse or what?

Pavel

--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...

2006-02-25 00:06:27

by Pavel Machek

[permalink] [raw]
Subject: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

Hi!

> > I've seen similar messages in some reports but haven't figured out the
> > cause yet.
> >
> > To be sure, could you check the patch below, making the wait time in
> > codec acceessor longer?
> > Also, try to build ens1371 driver as a module.
>
> Tried that... only msleep() hunks did apply, but that should be only
> more conservative, AFAICT. It took looong time to boot (my fault,
> should have used 50, not 0xa000 or how much is that), but same result
> as before. I tried loading it as a module, but same problem :-(.

I guess my machine is cursed. emu10k does not work -- produces no
sound. ens1371 does not work -- is not initialized. usb sound card --
produces no sound.

Now, I tried to break the curse by connecting usb sound card to
another machine... but guess what, still no sound. Connected to second
machine:

root@amd:~# cat /proc/asound/cards
0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
root@amd:~#

(usb soundcard clicks when I launch mpg123, but that's it.)

Any ideas?
Pavel
--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...

2006-02-25 00:20:32

by Benjamin LaHaise

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

On Sat, Feb 25, 2006 at 12:40:50AM +0100, Pavel Machek wrote:
> 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> root@amd:~#
>
> (usb soundcard clicks when I launch mpg123, but that's it.)
>
> Any ideas?

I had problems with the ac97 driver and newer kernels until toggling Mute
on the headphone sense channel. Alsa has too many bells and whistles that
need to be properly incanted for machines to emit sound. Just try futzing
with the channels in alsamixer. Otoh, that's a good way to end up with a
config that doesn't work, too...

-ben
--
"Ladies and gentlemen, I'm sorry to interrupt, but the police are here
and they've asked us to stop the party." Don't Email: <[email protected]>.

2006-02-25 00:29:44

by Randy Dunlap

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

On Fri, 24 Feb 2006, Benjamin LaHaise wrote:

> On Sat, Feb 25, 2006 at 12:40:50AM +0100, Pavel Machek wrote:
> > 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> > Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> > 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> > USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> > root@amd:~#
> >
> > (usb soundcard clicks when I launch mpg123, but that's it.)
> >
> > Any ideas?
>
> I had problems with the ac97 driver and newer kernels until toggling Mute
> on the headphone sense channel. Alsa has too many bells and whistles that
> need to be properly incanted for machines to emit sound. Just try futzing
> with the channels in alsamixer. Otoh, that's a good way to end up with a
> config that doesn't work, too...

There are also a few machines that have microphone in/headphone out
switched/swapped. There was a ALSA patch around for that. :(

--
~Randy

2006-02-25 00:48:53

by Pavel Machek

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

On P? 24-02-06 19:14:59, Benjamin LaHaise wrote:
> On Sat, Feb 25, 2006 at 12:40:50AM +0100, Pavel Machek wrote:
> > 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> > Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> > 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> > USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> > root@amd:~#
> >
> > (usb soundcard clicks when I launch mpg123, but that's it.)
> >
> > Any ideas?
>
> I had problems with the ac97 driver and newer kernels until toggling Mute
> on the headphone sense channel. Alsa has too many bells and whistles that
> need to be properly incanted for machines to emit sound. Just try futzing
> with the channels in alsamixer. Otoh, that's a good way to end up with a
> config that doesn't work, too...

Could we get some alsa-produce-sound script? On emu10k, there's 30+
options in mixer to set, and default setting is useless :-(.
Pavel
--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...

2006-02-25 02:12:31

by Andrew Morton

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

Pavel Machek <[email protected]> wrote:
>
> Hi!
>
> > > I've seen similar messages in some reports but haven't figured out the
> > > cause yet.
> > >
> > > To be sure, could you check the patch below, making the wait time in
> > > codec acceessor longer?
> > > Also, try to build ens1371 driver as a module.
> >
> > Tried that... only msleep() hunks did apply, but that should be only
> > more conservative, AFAICT. It took looong time to boot (my fault,
> > should have used 50, not 0xa000 or how much is that), but same result
> > as before. I tried loading it as a module, but same problem :-(.
>
> I guess my machine is cursed. emu10k does not work -- produces no
> sound. ens1371 does not work -- is not initialized. usb sound card --
> produces no sound.
>
> Now, I tried to break the curse by connecting usb sound card to
> another machine... but guess what, still no sound. Connected to second
> machine:
>
> root@amd:~# cat /proc/asound/cards
> 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> root@amd:~#
>
> (usb soundcard clicks when I launch mpg123, but that's it.)
>
> Any ideas?

Maybe you went deaf?


Are any of the above regressions, or has it always been like that?

2006-02-25 11:35:54

by Pavel Machek

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

Hi!

> > Now, I tried to break the curse by connecting usb sound card to
> > another machine... but guess what, still no sound. Connected to second
> > machine:
> >
> > root@amd:~# cat /proc/asound/cards
> > 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> > Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> > 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> > USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> > root@amd:~#
> >
> > (usb soundcard clicks when I launch mpg123, but that's it.)
> >
> > Any ideas?
>
> Maybe you went deaf?

Heh :-), it more looks like ALSA went mute. That, or I got very good
at reading words from people's faces. [Actually, not, "ICH4 - Intel
82801DB-ICH4" still works okay.]

> Are any of the above regressions, or has it always been like that?

I have not tested those cards in *very* long time, so I don't think it
should be counted as regressions.
Pavel

--
Web maintainer for suspend.sf.net (http://www.sf.net/projects/suspend) wanted...

2006-02-27 11:10:20

by Takashi Iwai

[permalink] [raw]
Subject: Re: My machine is cursed: no sound. Help! [was Re: es1371 sound problems]

At Sat, 25 Feb 2006 01:48:33 +0100,
Pavel Machek wrote:
>
> On P? 24-02-06 19:14:59, Benjamin LaHaise wrote:
> > On Sat, Feb 25, 2006 at 12:40:50AM +0100, Pavel Machek wrote:
> > > 0 [I82801DBICH4 ]: ICH4 - Intel 82801DB-ICH4
> > > Intel 82801DB-ICH4 with AD1981B at 0xc0000c00, irq 5
> > > 1 [U0x4fa0x4201 ]: USB-Audio - USB Device 0x4fa:0x4201
> > > USB Device 0x4fa:0x4201 at usb-0000:00:1d.1-2, full speed
> > > root@amd:~#
> > >
> > > (usb soundcard clicks when I launch mpg123, but that's it.)
> > >
> > > Any ideas?
> >
> > I had problems with the ac97 driver and newer kernels until toggling Mute
> > on the headphone sense channel. Alsa has too many bells and whistles that
> > need to be properly incanted for machines to emit sound. Just try futzing
> > with the channels in alsamixer. Otoh, that's a good way to end up with a
> > config that doesn't work, too...
>
> Could we get some alsa-produce-sound script? On emu10k, there's 30+
> options in mixer to set, and default setting is useless :-(.

In the case of SUSE, you can call "set_default_volume -f".
But better to clear the old sound status once before this. i.e.
- unload sound modules
- remove /etc/asound.state
- reload the modules


Takashi