http://bugs.winehq.org/show_bug.cgi?id=28517
--- Comment #22 from Raymond superquad.vortex2@gmail.com 2011-10-06 01:30:41 CDT --- (In reply to comment #18)
Created attachment 36726 [details] winealsa.drv: Don't try to control ALSA's behavior
(In reply to comment #13)
I have doubt about your patch remove snd_pcm_hw_params_set_period_time_near()
this means that you will let alsa-lib to determine the period time, buffer_size
so user have to check /usr/share/alsa/alsa.conf if they are using "hw" as "default"
defaults.pcm.minperiodtime 5000 # in us
Can you elaborate on this? I don't see the problem with letting ALSA determine its period size.
This is because your "default" are using "dmix" but there are sound cards which does not use dmix (e.g. emu10k1, ymfpci, au88x0, cs46xx )
maximum buffer size of pulse plugin , hda-intel and those pcie sound cards are 4Mb Bytes (i.e about 21 seconds @ 44100Hz , but those pci sound cards have less than 0.5 seconds buffer (e.g. 0.37 seconds @ 44100Hz for those sound card with 64bytes )
http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=de606e9c256f5a776c162...
http://git.alsa-project.org/?p=alsa-lib.git;a=commit;h=cd7070bf4b7afcdcd9dbd...
BTW gatAudiofromat() seem wrong since dmix the use S32_LE for hda-intel o
(In reply to comment #14)
Why do you care at all about ALSA's period? It can be as low as 1ms (e.g. with a 8000Hz sample I got 1ms period and 8.192ms buffer).
I have a ymf724f whcih can only update hwptr every 5.333ms intervals
(i.e. snd_pcm_available only change at the boundary of minimum period size/time)
does it meet the requirement of WAVECAPS_SAMPLEACCURATE ?
http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=bd1c9a3abd71554deb...
ALSA: usb: refine delay information with USB frame counter
I don't want to bear 1000 interrupts a second. Wine should ignore ALSA's period for as long as we don't use poll(alsa's_fd) and the buffer is large enough for our periodic feeder. See http://mailman.alsa-project.org/pipermail/alsa-devel/2011-August/042837.html
"the possibility to disable interrupts (period_wakeup) was added to a few drivers; PulseAudio uses this."
Only two or three drivers support this feature (e.g. hda-intel, oxygen)
http://git.alsa-project.org/?p=alsa-kernel.git&a=search&h=c035877c26...
Alternatively and if it matches, Wine should equate its published period with ALSA's, e.g. try to use 10ms like mmdevapi's mixer does. The best in that case would be to sync' ALSA signaling readiness with mmdevapi's event-triggered feeder.