[alsa-devel] [patch] snd-pcsp: silent misleading warning
Hello.
Roberto Oppedisano wrote:
I noticed that when I run aplay -D plughw:2,0 /usr/share/sounds/KDE_Logout.wav I get a flood of: [ 417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645)
It turns out that the buffer size you get, is not evenly devided by period size. 18645 % 4661 = 1. That (wrongly) triggers the warning. This may very well be an alsa bug, or may not, but the code in the driver is handling that properly, so there is no need for such a verbose warning.
The attached patch shuts down the warning. Takashi, could you please apply?
At Sat, 17 May 2008 19:50:42 +0400, Stas Sergeev wrote:
Hello.
Roberto Oppedisano wrote:
I noticed that when I run aplay -D plughw:2,0 /usr/share/sounds/KDE_Logout.wav I get a flood of: [ 417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645)
It turns out that the buffer size you get, is not evenly devided by period size. 18645 % 4661 = 1. That (wrongly) triggers the warning. This may very well be an alsa bug, or may not, but the code in the driver is handling that properly, so there is no need for such a verbose warning.
The right fix would be to add a hw_constraint to align the buffer size. The simplest way is to add the following in PCM open callback.
snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS);
Takashi
Hello.
Takashi Iwai wrote:
[ 417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645)
It turns out that the buffer size you get, is not evenly devided by period size. 18645 % 4661 = 1. That (wrongly) triggers the warning. This may very well be an alsa bug, or may not, but the code in the driver is handling that properly, so there is no need for such a verbose warning.
The right fix would be to add a hw_constraint to align the buffer size. The simplest way is to add the following in PCM open callback.
But what does this fix? That's only a warning, the driver itself doesn't care at all. The fix you propose, will need more testing, at least a confirmation from the reporter. I simply thought this can't happen. Now you say its a perfectly sane situation, and then there is nothing to care about, just shut up the warning. No?
At Sun, 18 May 2008 21:32:39 +0400, Stas Sergeev wrote:
Hello.
Takashi Iwai wrote:
[ 417.338143] PCSP: playback_ptr inconsistent (4642 4661 18645)
It turns out that the buffer size you get, is not evenly devided by period size. 18645 % 4661 = 1. That (wrongly) triggers the warning. This may very well be an alsa bug, or may not, but the code in the driver is handling that properly, so there is no need for such a verbose warning.
The right fix would be to add a hw_constraint to align the buffer size. The simplest way is to add the following in PCM open callback.
But what does this fix? That's only a warning, the driver itself doesn't care at all. The fix you propose, will need more testing, at least a confirmation from the reporter. I simply thought this can't happen. Now you say its a perfectly sane situation, and then there is nothing to care about, just shut up the warning. No?
Well, judging from your previous comment, I thought that it's no sane situation for *your* driver. But if the driver doesn't care in practice, your fix should be fine. I'll queue it on my tree.
thanks,
Takashi
Hello.
Takashi Iwai wrote:
Well, judging from your previous comment, I thought that it's no sane situation for *your* driver.
Only by wrongly triggering a warning that was supposed for the different purpose. :)
But if the driver doesn't care in practice, your fix should be fine. I'll queue it on my tree.
Thanks.
participants (2)
-
Stas Sergeev
-
Takashi Iwai