All of lore.kernel.org
 help / color / mirror / Atom feed
* period/buffer bug on pmac ?
@ 2004-11-11 21:17 danny
  2004-11-13 11:35 ` danny
  2004-11-15 16:53 ` Clemens Ladisch
  0 siblings, 2 replies; 6+ messages in thread
From: danny @ 2004-11-11 21:17 UTC (permalink / raw)
  To: alsa-devel


In the process of fixing up the alsa output plugin of bmp a bit I've come 
upon a weird problem. The mp3s I was playing played to fast, with a 
audible click each few millisecond. This seemed to only happen when the 
period size was not a power of 2 (the output plugin used to set 
period_time). I've now calculated the period_size myself from the rate and 
set it to the nearest power of 2. Which seems to work fine, except in the 
case that the mp3 i play is not your regular 441000 kbs encoded, but for 
instance 32000. 

No error occurs on setting the rate (and it gets set at 
32000, although I doubt that the card, a pmac snapper, can do this) It 
seems that period size and buffersize get downscaled with a factor 
441000/32000. And the weird screwed up sound occurs again with these mp3s. 
The strangest thing is that although snd_pcm_params_get_* returns, 
for instance, 32000, 5944 and 763 for rate, buffersize and periodsize 
respectively, a cat /proc/asound/card0/pcm0p/sub0/hw_params tells me that 
actually the rate is 44100 and buffer 8192 and period 1015 (I also checked 
on my x86 with sblive, but there the proc entry says that the rate is 
32000, so I assume that card can downsample in hardware?).

Is this a bug in the driver or normal behaviour? If it is the last, how 
should I set the periodsize to something that both corresponds with the 
users preferenced sample time and with the fact that it apparently, has to 
be a power of 2?

danny







-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click

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

end of thread, other threads:[~2004-11-17 11:45 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-11 21:17 period/buffer bug on pmac ? danny
2004-11-13 11:35 ` danny
2004-11-15 16:53 ` Clemens Ladisch
2004-11-16  9:57   ` Giuliano Pochini
2004-11-16 18:37   ` danny
2004-11-17 11:45     ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.