alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
@ 2016-04-22 19:30 Enrico Mioso
  2016-04-24 16:43 ` Enrico Mioso
  0 siblings, 1 reply; 6+ messages in thread
From: Enrico Mioso @ 2016-04-22 19:30 UTC (permalink / raw)
  To: alsa-devel

Hello guys.
The message on the subject comes from my dmesg and is generated by the said module when using mplayer.
(MPlayer SVN-r37379 (C) 2000-2015 MPlayer Team)

Including some devices from my lspci: if you wish to see the integral one, let me know.
00:06.0 Multimedia audio controller: ULi Electronics Inc. M5451 PCI AC-Link Controller Audio Device (rev 02)
 	Subsystem: Hewlett-Packard Company Device 002a
 	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR+ <PERR+ INTx-
 	Latency: 64 (500ns min, 6000ns max)
 	Interrupt: pin A routed to IRQ 5
 	Region 0: I/O ports at 1000 [size=256]
 	Region 1: Memory at d0001000 (32-bit, non-prefetchable) [size=4K]
 	Capabilities: [dc] Power Management version 2
 		Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2+,D3hot+,D3cold+)
 		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
 	Kernel driver in use: snd_ali5451

00:07.0 ISA bridge: ULi Electronics Inc. M1533/M1535/M1543 PCI to ISA Bridge [Aladdin IV/V/V+]
 	Subsystem: ULi Electronics Inc. ALi M1533 Aladdin IV/V ISA Bridge
 	Control: I/O+ Mem+ BusMaster+ SpecCycle+ MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 	Latency: 0
 	Capabilities: [a0] Power Management version 1
 		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
 		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

00:08.0 Modem: ULi Electronics Inc. M5457 AC'97 Modem Controller (prog-if 00 [Generic])
 	Subsystem: Hewlett-Packard Company Device 002a
 	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 	Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 	Interrupt: pin A routed to IRQ 10
 	Region 0: Memory at d0002000 (32-bit, non-prefetchable) [size=4K]
 	Region 1: I/O ports at 1400 [size=256]
 	Capabilities: [40] Power Management version 2
 		Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold+)
 		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-


Thank you.
P.S.: sorry for giving no follow-up to my previous hd-audio thing; thanks.

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

* Re: [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
  2016-04-22 19:30 [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024 Enrico Mioso
@ 2016-04-24 16:43 ` Enrico Mioso
  2016-04-25  8:50   ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Enrico Mioso @ 2016-04-24 16:43 UTC (permalink / raw)
  To: alsa-devel

After using the system for some time, the following is present on my dmesg:
$ dmesg -t | grep -i ali5 | sort | uniq

pnp 00:06: Plug and Play ACPI device, IDs ALI5123 PNP0510 (active)
snd_ali5451 0000:00:06.0: AC'97 1 access is not valid [0xffffffff], removing mixer.
snd_ali5451 0000:00:06.0: AC'97 1 does not respond - RESET
snd_ali5451 0000:00:06.0: ali mixer 1 creating error.
snd_ali5451 0000:00:06.0: enabling device (0005 -> 0007)
snd_ali5451 0000:00:06.0: invalid position: , pos = 16384, buffer size = 16384, period size = 1024
snd_ali5451 0000:00:06.0: invalid position: , pos = 16385, buffer size = 16384, period size = 1024

Thank you very much,
Enrico

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

* Re: [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
  2016-04-24 16:43 ` Enrico Mioso
@ 2016-04-25  8:50   ` Takashi Iwai
       [not found]     ` <alpine.LNX.2.20.1604251646030.13761@localhost.localdomain>
  2016-09-20 19:53     ` Enrico Mioso
  0 siblings, 2 replies; 6+ messages in thread
From: Takashi Iwai @ 2016-04-25  8:50 UTC (permalink / raw)
  To: Enrico Mioso; +Cc: alsa-devel

On Sun, 24 Apr 2016 18:43:11 +0200,
Enrico Mioso wrote:
> 
> After using the system for some time, the following is present on my dmesg:
> $ dmesg -t | grep -i ali5 | sort | uniq
> 
> pnp 00:06: Plug and Play ACPI device, IDs ALI5123 PNP0510 (active)
> snd_ali5451 0000:00:06.0: AC'97 1 access is not valid [0xffffffff], removing mixer.
> snd_ali5451 0000:00:06.0: AC'97 1 does not respond - RESET
> snd_ali5451 0000:00:06.0: ali mixer 1 creating error.
> snd_ali5451 0000:00:06.0: enabling device (0005 -> 0007)
> snd_ali5451 0000:00:06.0: invalid position: , pos = 16384, buffer size = 16384, period size = 1024
> snd_ali5451 0000:00:06.0: invalid position: , pos = 16385, buffer size = 16384, period size = 1024

The kernel warning itself can be fixed by the patch below.
The remaining question is whether this covers all; do the playback and
capture still work well despite of these messages?  Or do you actually
encounter the overrun / underrun?

In anyway, let me know whether the patch works.


thanks,

Takashi

---
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 36470af7eda7..92b819e4f729 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -1408,6 +1408,7 @@ snd_ali_playback_pointer(struct snd_pcm_substream *substream)
 	spin_unlock(&codec->reg_lock);
 	dev_dbg(codec->card->dev, "playback pointer returned cso=%xh.\n", cso);
 
+	cso %= runtime->buffer_size;
 	return cso;
 }
 
@@ -1428,6 +1429,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)
 	cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2));
 	spin_unlock(&codec->reg_lock);
 
+	cso %= runtime->buffer_size;
 	return cso;
 }
 

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

* Re: [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
       [not found]     ` <alpine.LNX.2.20.1604251646030.13761@localhost.localdomain>
@ 2016-04-25 14:54       ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2016-04-25 14:54 UTC (permalink / raw)
  To: Enrico Mioso; +Cc: alsa-devel

On Mon, 25 Apr 2016 16:50:09 +0200,
Enrico Mioso wrote:
> 
> Thank you a lot Takashi.
> 
> there are two problems:
> 1 - The warning doesn't manifest always: in some cases (instances of mplayer?) this warning manifests itself from time to time, some minutes.

Yes, this is likely some XRUN by either hardware boundary condition or
a system load.

> 2 - I think the audio stops a little bit (less of a second I think), then things go ahead. Still I don't think any message is printed by alsa libraries.
> I don't know if this per se indicates there is no overrun, but still my sensation is this.
> But this system isn't exactly "extremely fast": so the audio might stop even for other reasons. I'll recompile the kernel to apply this patch and let you know.
> The timing will be slow, but I will try.

My patch won't improve in this regard, I'm afraid.  The PCM core
already corrects to the position 0 if such an invalid position is
detected, and the patch would do it just implicitly.  But, it's still
interesting to see whether it has any impact on such behavior.


Takashi

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

* Re: [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
  2016-04-25  8:50   ` Takashi Iwai
       [not found]     ` <alpine.LNX.2.20.1604251646030.13761@localhost.localdomain>
@ 2016-09-20 19:53     ` Enrico Mioso
  2016-09-21 12:43       ` Takashi Iwai
  1 sibling, 1 reply; 6+ messages in thread
From: Enrico Mioso @ 2016-09-20 19:53 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Hello.
First of all: thank you for your work and kindness.
It seems your patch solves the problem: the message is not printed in the dmesg; I wasn't able to find other occurrencies of the messages in my dmesg after applying this patch and loading the modified module.
thank you very much for this effort and everything, and sorry for me being late.
You've always been responsive in general, sorry if I didn't in some cases.


On Mon, 25 Apr 2016, Takashi Iwai wrote:

==Date: Mon, 25 Apr 2016 10:50:07
==From: Takashi Iwai <tiwai@suse.de>
==To: Enrico Mioso <mrkiko.rs@gmail.com>
==Cc: alsa-devel@alsa-project.org
==Subject: Re: [alsa-devel] [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: ,
==    pos = 16384, buffer size = 16384, period size = 1024
==
==On Sun, 24 Apr 2016 18:43:11 +0200,
==Enrico Mioso wrote:
==> 
==> After using the system for some time, the following is present on my dmesg:
==> $ dmesg -t | grep -i ali5 | sort | uniq
==> 
==> pnp 00:06: Plug and Play ACPI device, IDs ALI5123 PNP0510 (active)
==> snd_ali5451 0000:00:06.0: AC'97 1 access is not valid [0xffffffff], removing mixer.
==> snd_ali5451 0000:00:06.0: AC'97 1 does not respond - RESET
==> snd_ali5451 0000:00:06.0: ali mixer 1 creating error.
==> snd_ali5451 0000:00:06.0: enabling device (0005 -> 0007)
==> snd_ali5451 0000:00:06.0: invalid position: , pos = 16384, buffer size = 16384, period size = 1024
==> snd_ali5451 0000:00:06.0: invalid position: , pos = 16385, buffer size = 16384, period size = 1024
==
==The kernel warning itself can be fixed by the patch below.
==The remaining question is whether this covers all; do the playback and
==capture still work well despite of these messages?  Or do you actually
==encounter the overrun / underrun?
==
==In anyway, let me know whether the patch works.
==
==
==thanks,
==
==Takashi
==
==---
==diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
==index 36470af7eda7..92b819e4f729 100644
==--- a/sound/pci/ali5451/ali5451.c
==+++ b/sound/pci/ali5451/ali5451.c
==@@ -1408,6 +1408,7 @@ snd_ali_playback_pointer(struct snd_pcm_substream *substream)
== 	spin_unlock(&codec->reg_lock);
== 	dev_dbg(codec->card->dev, "playback pointer returned cso=%xh.\n", cso);
== 
==+	cso %= runtime->buffer_size;
== 	return cso;
== }
== 
==@@ -1428,6 +1429,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)
== 	cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2));
== 	spin_unlock(&codec->reg_lock);
== 
==+	cso %= runtime->buffer_size;
== 	return cso;
== }
== 
==

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

* Re: [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024
  2016-09-20 19:53     ` Enrico Mioso
@ 2016-09-21 12:43       ` Takashi Iwai
  0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2016-09-21 12:43 UTC (permalink / raw)
  To: Enrico Mioso; +Cc: alsa-devel

On Tue, 20 Sep 2016 21:53:45 +0200,
Enrico Mioso wrote:
> 
> Hello.
> First of all: thank you for your work and kindness.
> It seems your patch solves the problem: the message is not printed in the dmesg; I wasn't able to find other occurrencies of the messages in my dmesg after applying this patch and loading the modified module.
> thank you very much for this effort and everything, and sorry for me being late.
> You've always been responsive in general, sorry if I didn't in some cases.

OK, now I queued the fix.  Thanks for testing!


Takashi

> 
> 
> On Mon, 25 Apr 2016, Takashi Iwai wrote:
> 
> ==Date: Mon, 25 Apr 2016 10:50:07
> ==From: Takashi Iwai <tiwai@suse.de>
> ==To: Enrico Mioso <mrkiko.rs@gmail.com>
> ==Cc: alsa-devel@alsa-project.org
> ==Subject: Re: [alsa-devel] [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: ,
> ==    pos = 16384, buffer size = 16384, period size = 1024
> ==
> ==On Sun, 24 Apr 2016 18:43:11 +0200,
> ==Enrico Mioso wrote:
> ==> 
> ==> After using the system for some time, the following is present on my dmesg:
> ==> $ dmesg -t | grep -i ali5 | sort | uniq
> ==> 
> ==> pnp 00:06: Plug and Play ACPI device, IDs ALI5123 PNP0510 (active)
> ==> snd_ali5451 0000:00:06.0: AC'97 1 access is not valid [0xffffffff], removing mixer.
> ==> snd_ali5451 0000:00:06.0: AC'97 1 does not respond - RESET
> ==> snd_ali5451 0000:00:06.0: ali mixer 1 creating error.
> ==> snd_ali5451 0000:00:06.0: enabling device (0005 -> 0007)
> ==> snd_ali5451 0000:00:06.0: invalid position: , pos = 16384, buffer size = 16384, period size = 1024
> ==> snd_ali5451 0000:00:06.0: invalid position: , pos = 16385, buffer size = 16384, period size = 1024
> ==
> ==The kernel warning itself can be fixed by the patch below.
> ==The remaining question is whether this covers all; do the playback and
> ==capture still work well despite of these messages?  Or do you actually
> ==encounter the overrun / underrun?
> ==
> ==In anyway, let me know whether the patch works.
> ==
> ==
> ==thanks,
> ==
> ==Takashi
> ==
> ==---
> ==diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
> ==index 36470af7eda7..92b819e4f729 100644
> ==--- a/sound/pci/ali5451/ali5451.c
> ==+++ b/sound/pci/ali5451/ali5451.c
> ==@@ -1408,6 +1408,7 @@ snd_ali_playback_pointer(struct snd_pcm_substream *substream)
> == 	spin_unlock(&codec->reg_lock);
> == 	dev_dbg(codec->card->dev, "playback pointer returned cso=%xh.\n", cso);
> == 
> ==+	cso %= runtime->buffer_size;
> == 	return cso;
> == }
> == 
> ==@@ -1428,6 +1429,7 @@ static snd_pcm_uframes_t snd_ali_pointer(struct snd_pcm_substream *substream)
> == 	cso = inw(ALI_REG(codec, ALI_CSO_ALPHA_FMS + 2));
> == 	spin_unlock(&codec->reg_lock);
> == 
> ==+	cso %= runtime->buffer_size;
> == 	return cso;
> == }
> == 
> ==
> 

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

end of thread, other threads:[~2016-09-21 12:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-22 19:30 [snd_ali5451] snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024 Enrico Mioso
2016-04-24 16:43 ` Enrico Mioso
2016-04-25  8:50   ` Takashi Iwai
     [not found]     ` <alpine.LNX.2.20.1604251646030.13761@localhost.localdomain>
2016-04-25 14:54       ` Takashi Iwai
2016-09-20 19:53     ` Enrico Mioso
2016-09-21 12:43       ` Takashi Iwai

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).