Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Apr 2016 18:18:37 +0200
From:      Sylvain Garrigues <sylvain@sylvaingarrigues.com>
To:        Emmanuel Vadot <manu@bidouilliste.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Distorted sound on Raspberry Pi 2
Message-ID:  <84BBFD81-8370-4F3B-A6B3-91462AF88781@sylvaingarrigues.com>
In-Reply-To: <20160409174227.a81234c40856c47a1deb5ada@bidouilliste.com>
References:  <FA4A06C6-0A9A-4697-8C2D-141E1416F252@sylvaingarrigues.com> <CAFHCsPVnLFdC0uOgLfie8QQibi_1b9v9b4mWzz%2B7URuExGSaPA@mail.gmail.com> <0524442A-ABF3-439D-99DE-A10C20FABE40@sylvaingarrigues.com> <20160409174227.a81234c40856c47a1deb5ada@bidouilliste.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sure, if I may help. Just checked the oldest available. The problem was =
already there as of r294499 (January 2016)
=
http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/Fre=
eBSD-11.0-CURRENT-arm-armv6-RPI2-20160121-r294499.img.xz

To reproduce:
# pkg install mpg123 (I also tested with other sound applications so =
I=E2=80=99m not sure it=E2=80=99s userland related)
# sysctl hw.snd.verbose=3D4
# fetch http://www.noiseaddicts.com/samples_1w72b820/4190.mp3    =20
# mpg123 4190.mp3=20

Check dmesg:
=E2=80=A6.
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D124000, =
old=3D124000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D0, =
old=3D0 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D0, =
old=3D0 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D4000, =
old=3D4000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D8000, =
old=3D8000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D12000, =
old=3D12000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D16000, =
old=3D16000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D20000, =
old=3D20000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D24000, =
old=3D24000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
feed_root: (virtual) appending 3128 bytes (count=3D3364 l=3D236 =
feed=3D480)
pcm0: chn_sync(): timeout=3D4 count=3D51 hcount=3D51 resid=3D0 residp=3D0 =
minflush=3D0 ret=3D0
pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D28000, =
old=3D28000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
pcm0: chn_trigger() pcm0:play:dsp0.p0: calling go=3D0xffffffff , =
prev=3D0x00000001
pcm0: chn_trigger() pcm0:virtual:dsp0.vp0: calling go=3D0xffffffff , =
prev=3D0x00000001
pcm0: chn_resizebuf(): PCMDIR_PLAY (hardware) timeout=3D4 =
b[128000/4000/2] bs[8192/4096/2] limit=3D0
pcm0: chn_resizebuf(): PCMDIR_PLAY (virtual) timeout=3D4 b[0/0/0] =
bs[65536/2048/32] limit=3D7526

> Le 9 avr. 2016 =C3=A0 17:42, Emmanuel Vadot <manu@bidouilliste.com> a =
=C3=A9crit :
>=20
>=20
> Hi Sylvain,
>=20
> I don't have a RPI2 so I won't be really useful here but can you test =
the oldest available snapshot please ?
>=20
> Thanks,
>=20
> On Sat, 9 Apr 2016 17:02:14 +0200
> Sylvain Garrigues <sylvain@sylvaingarrigues.com> wrote:
>=20
>> Take for instance the latest snapshot:
>> =
http://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/11.0/Fre=
eBSD-11.0-CURRENT-arm-armv6-RPI2-20160408-r297692.img.xz
>>=20
>> All the pcm0 warnings display continuously when playing any sound.
>>=20
>> Should I file a bug?
>>=20
>>=20
>>=20
>>> Le 9 avr. 2016 =C3=A0 11:06, Svatopluk Kraus <onwahe@gmail.com> a =
=C3=A9crit :
>>>=20
>>> Is it recent problem? If yes, some info about kernel version would =
be
>>> really nice.
>>>=20
>>>=20
>>>=20
>>> On Fri, Apr 8, 2016 at 5:28 PM, Sylvain Garrigues
>>> <sylvain@sylvaingarrigues.com> wrote:
>>>> Hello,
>>>>=20
>>>> I have continuous warnings on my Raspberry PI 2 regarding sound =
when hw.snd.verbose=3D4:
>>>>=20
>>>> ...
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D120000, old=3D120000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D124000, old=3D124000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! hwptr=3D0, =
old=3D0 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D4000, old=3D4000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D8000, old=3D8000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D12000, old=3D12000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D16000, old=3D16000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D16000, old=3D16000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> pcm0: WARNING: PCMDIR_PLAY DMA completion too fast/slow ! =
hwptr=3D20000, old=3D20000 delta=3D0 amt=3D0 ready=3D8192 free=3D119808
>>>> ?
>>>>=20
>>>> The sound is frequently slightly distorted (like every 5s), and I =
am trying to figure out why.
>>>>=20
>>>> To reproduce:
>>>> # sysctl dev.pcm.0.dest=3D1
>>>> # sysctl  hw.snd.verbose=3D4
>>>> # mpg123 anympegfile
>>>>=20
>>>> I still get the warnings on the HDMI output (dev.pcm.0.dest=3D2) =
but the sound is not distorted.
>>>>=20
>>>> Any idea?
>>>>=20
>>>> Best,
>>>> Sylvain.
>>>> _______________________________________________
>>>> freebsd-arm@freebsd.org mailing list
>>>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>>>> To unsubscribe, send any mail to =
"freebsd-arm-unsubscribe@freebsd.org"
>>=20
>> _______________________________________________
>> freebsd-arm@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
>> To unsubscribe, send any mail to =
"freebsd-arm-unsubscribe@freebsd.org"
>=20
> --=20
> Emmanuel Vadot <manu@bidouilliste.com>
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84BBFD81-8370-4F3B-A6B3-91462AF88781>