Alsa-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [alsa-devel] omap-mcbsp: TX Buffer Overflow
@ 2019-09-06 14:51 Tomas Novotny
  2019-09-07  9:13 ` Ladislav Michl
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Novotny @ 2019-09-06 14:51 UTC (permalink / raw)
  To: linux-omap, alsa-devel

Hi,

we have AM3703 based board similar to BeagleBoard. I'm hitting this error
after upgrade to latest LTS 4.19.71 (upgraded from 4.1):

omap-mcbsp 49022000.mcbsp: TX Buffer Overflow!

This appears during or after playing of short (~2s) ding-dong wav. That error
exists for longer time, because handling of tx buffer overflow irq was
introduced in 2016: 4e85e7776eba ("ASoC: omap-mcbsp: Enable TX/RX under and
overflow interrupts"). I've cherry-picked it to 4.1 and I see the error there also.
The sound seems clear and ok to me, but we are using low quality speaker.

There are two workarounds to get rid of the message:
1) Change 'dma_op_mode' sysfs attribute from 'element' to 'threshold'. I
found that just by coincidence when checking sysfs attributes.
2) Compile kernel with CONFIG_VIDEO_OMAP3=y. Found on Logic PD forum [1].

Does anybody have any idea what's going wrong? Or why these (somehow)
unrelated workarounds help?

Thanks,

Tomas

[1] https://support.logicpd.com/TDGForum/tabid/124/aft/2277/Default.aspx
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] omap-mcbsp: TX Buffer Overflow
  2019-09-06 14:51 [alsa-devel] omap-mcbsp: TX Buffer Overflow Tomas Novotny
@ 2019-09-07  9:13 ` Ladislav Michl
  2019-09-09 16:24   ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Ladislav Michl @ 2019-09-07  9:13 UTC (permalink / raw)
  To: Tomas Novotny; +Cc: alsa-devel, linux-omap

On Fri, Sep 06, 2019 at 04:51:09PM +0200, Tomas Novotny wrote:
> Hi,
> 
> we have AM3703 based board similar to BeagleBoard. I'm hitting this error
> after upgrade to latest LTS 4.19.71 (upgraded from 4.1):
> 
> omap-mcbsp 49022000.mcbsp: TX Buffer Overflow!
> 
> This appears during or after playing of short (~2s) ding-dong wav. That error
> exists for longer time, because handling of tx buffer overflow irq was
> introduced in 2016: 4e85e7776eba ("ASoC: omap-mcbsp: Enable TX/RX under and
> overflow interrupts"). I've cherry-picked it to 4.1 and I see the error there also.
> The sound seems clear and ok to me, but we are using low quality speaker.

Just FYI, for stream capture there's
omap-mcbsp 49022000.mcbsp: RX Buffer Underflow!

As far as I remember all stable kernels we have in production - 4.9.x, 4.14.x and
4.19.x - are affected. IGEPv2 with both DM3730 and OMAP3530 are affected
(headless machines, CONFIG_VIDEO_OMAP3=n).

And DT is probably worth updating:
omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp
omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp

I never motivated myself to dig deeper as catured stream looks pretty normal.

	l.

> There are two workarounds to get rid of the message:
> 1) Change 'dma_op_mode' sysfs attribute from 'element' to 'threshold'. I
> found that just by coincidence when checking sysfs attributes.
> 2) Compile kernel with CONFIG_VIDEO_OMAP3=y. Found on Logic PD forum [1].
> 
> Does anybody have any idea what's going wrong? Or why these (somehow)
> unrelated workarounds help?
> 
> Thanks,
> 
> Tomas
> 
> [1] https://support.logicpd.com/TDGForum/tabid/124/aft/2277/Default.aspx
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [alsa-devel] omap-mcbsp: TX Buffer Overflow
  2019-09-07  9:13 ` Ladislav Michl
@ 2019-09-09 16:24   ` Tony Lindgren
  2019-09-10  8:05     ` Tomas Novotny
  0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2019-09-09 16:24 UTC (permalink / raw)
  To: Ladislav Michl; +Cc: alsa-devel, linux-omap, Tomas Novotny

* Ladislav Michl <ladis@linux-mips.org> [190907 09:14]:
> On Fri, Sep 06, 2019 at 04:51:09PM +0200, Tomas Novotny wrote:
> > Hi,
> > 
> > we have AM3703 based board similar to BeagleBoard. I'm hitting this error
> > after upgrade to latest LTS 4.19.71 (upgraded from 4.1):
> > 
> > omap-mcbsp 49022000.mcbsp: TX Buffer Overflow!
> > 
> > This appears during or after playing of short (~2s) ding-dong wav. That error
> > exists for longer time, because handling of tx buffer overflow irq was
> > introduced in 2016: 4e85e7776eba ("ASoC: omap-mcbsp: Enable TX/RX under and
> > overflow interrupts"). I've cherry-picked it to 4.1 and I see the error there also.
> > The sound seems clear and ok to me, but we are using low quality speaker.
> 
> Just FYI, for stream capture there's
> omap-mcbsp 49022000.mcbsp: RX Buffer Underflow!
> 
> As far as I remember all stable kernels we have in production - 4.9.x, 4.14.x and
> 4.19.x - are affected. IGEPv2 with both DM3730 and OMAP3530 are affected
> (headless machines, CONFIG_VIDEO_OMAP3=n).

Hmm I wonder if this is still related to the SoC idling?
See commit 9834ffd1ecc3 ("ASoC: omap-mcbsp: Add PM QoS support for McBSP
to prevent glitches"), maybe something still needs to be fixed in that
area.

> And DT is probably worth updating:
> omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp
> omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp
> 
> I never motivated myself to dig deeper as catured stream looks pretty normal.

These mean the devices should really have separate nodes
in the dts rather than combining multiple devices into a
single node with multiple reg entries.

The issue with combining multiple devices into a single device
is that flushing posted write with a read back to one register
range will not flush it for the other which can cause mysterious
bugs.

Regards,

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

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

* Re: [alsa-devel] omap-mcbsp: TX Buffer Overflow
  2019-09-09 16:24   ` Tony Lindgren
@ 2019-09-10  8:05     ` Tomas Novotny
  0 siblings, 0 replies; 4+ messages in thread
From: Tomas Novotny @ 2019-09-10  8:05 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap, Ladislav Michl, alsa-devel

Hi Tony,

On Mon, 9 Sep 2019 09:24:07 -0700
Tony Lindgren <tony@atomide.com> wrote:

> * Ladislav Michl <ladis@linux-mips.org> [190907 09:14]:
> > On Fri, Sep 06, 2019 at 04:51:09PM +0200, Tomas Novotny wrote:  
> > > Hi,
> > > 
> > > we have AM3703 based board similar to BeagleBoard. I'm hitting this error
> > > after upgrade to latest LTS 4.19.71 (upgraded from 4.1):
> > > 
> > > omap-mcbsp 49022000.mcbsp: TX Buffer Overflow!
> > > 
> > > This appears during or after playing of short (~2s) ding-dong wav. That error
> > > exists for longer time, because handling of tx buffer overflow irq was
> > > introduced in 2016: 4e85e7776eba ("ASoC: omap-mcbsp: Enable TX/RX under and
> > > overflow interrupts"). I've cherry-picked it to 4.1 and I see the error there also.
> > > The sound seems clear and ok to me, but we are using low quality speaker.  
> > 
> > Just FYI, for stream capture there's
> > omap-mcbsp 49022000.mcbsp: RX Buffer Underflow!
> > 
> > As far as I remember all stable kernels we have in production - 4.9.x, 4.14.x and
> > 4.19.x - are affected. IGEPv2 with both DM3730 and OMAP3530 are affected
> > (headless machines, CONFIG_VIDEO_OMAP3=n).  
> 
> Hmm I wonder if this is still related to the SoC idling?
> See commit 9834ffd1ecc3 ("ASoC: omap-mcbsp: Add PM QoS support for McBSP
> to prevent glitches"), maybe something still needs to be fixed in that
> area.

I also found the cpuidle information somewhere, but CPU_IDLE=n (and let PM=y)
didn't help me. I'm speaking just for playback. I can do some better test if
you want.

Thanks,

Tomas

> > And DT is probably worth updating:
> > omap_hwmod: mcbsp2_sidetone using broken dt data from mcbsp
> > omap_hwmod: mcbsp3_sidetone using broken dt data from mcbsp
> > 
> > I never motivated myself to dig deeper as catured stream looks pretty normal.  
> 
> These mean the devices should really have separate nodes
> in the dts rather than combining multiple devices into a
> single node with multiple reg entries.
> 
> The issue with combining multiple devices into a single device
> is that flushing posted write with a read back to one register
> range will not flush it for the other which can cause mysterious
> bugs.
> 
> Regards,
> 
> Tony
> 
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06 14:51 [alsa-devel] omap-mcbsp: TX Buffer Overflow Tomas Novotny
2019-09-07  9:13 ` Ladislav Michl
2019-09-09 16:24   ` Tony Lindgren
2019-09-10  8:05     ` Tomas Novotny

Alsa-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/alsa-devel/0 alsa-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 alsa-devel alsa-devel/ https://lore.kernel.org/alsa-devel \
		alsa-devel@alsa-project.org alsa-devel@archiver.kernel.org
	public-inbox-index alsa-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.alsa-project.alsa-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox