24.10.2014 00:08, Andrew Eikum wrote: > On Thu, Oct 23, 2014 at 10:57:18PM +0530, Arun Raghavan wrote: >> On 23 October 2014 22:46, Alexander E. Patrakov <patrakov at gmail.com> wrote: >>> 22.10.2014 22:21, I wrote: >>>> >>>> Of course, this only applies to ALSA devices that can't use tsched, as >>>> well as to OSS on more exotic platforms. >>>> >>>> This is needed for compatibility with Wine games that use DirectSound8 >>>> on distributions such as Arch Linux who don't accept the unofficial >>>> winepulse patch. The reason is that Wine DirectSound8 emulation requests >>>> a period of 10 ms and expects it to work for the purposes of timing. And >>>> in fact, it cannot know (via ALSA API) that it is not going to work! >>> >>> >>> I hereby withdraw the patch, as on IRC I see that Arun said: >>> >>> """ >>> I'm not too happy with changing that. It would affect CPU on systems that >>> don't care about Wine. >>> and I really really don't want to work around bad clients in PA. (despite >>> the fact that I am also bitten by this bug) >>> ... >>> Want to start a BrokenClients page? >>> """ >>> > > It's true that Wine's audio doesn't get much work these days, though > in my defense :) it's a time issue, not a willingness issue. > > I have spent literally weeks trying to understand and work around the > timing issues that cause problems with USB devices accessed with the > PulseAudio ALSA plugin. I plan to continue working on it, but business > priorities lay elsewhere at the moment and I've already spent loads of > time on it. > >>> (note: due to the "cannot know" reason, I still disagree that it is a >>> client-side problem) >> >> I've not looked at the Wine code for this, but I wonder if we can >> guess this by looking at the minreq/tlength values that are returned. >> > > I'd love to work with an ALSA/PA expert to come up with a solution, > either by fixing Wine or coming up with a new ALSA API to provide the > info we need. > > I have a patch in-hand which improves the current driver > significantly, but it isn't enough to fix the USB devices problem. If > someone wants to review the winealsa driver with the patch applied and > discuss solutions, let me know. I'd love to get this problem solved. If you send me the patch, I promise to have a look at it. But, see my other reply why there cannot be a full solution within the ALSA API. -- Alexander E. Patrakov