public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
From: Halim Sahin <halim.sahin@freenet.de>
To: alsa-devel@alsa-project.org
Subject: Re: a11y: howto reduce latency with alsa's dmix plugin?
Date: Tue, 01 Sep 2009 12:32:27 +0200	[thread overview]
Message-ID: <87fxb7j6pw.fsf@freenet.de> (raw)
In-Reply-To: s5hws4k2f1k.wl%tiwai@suse.de

On Mo, Aug 31 2009, Takashi Iwai wrote:

> At Sun, 23 Aug 2009 09:55:18 +0000 (UTC),
> Halim Sahin wrote:
>> 
>> Hello,
>> Is there a way to reduce latency on audiocard if the dmix plugin is in
>> use?
>> I am asking because there is a strange problem with asistive
>> technologies which are outputing through alsa.
>> E. G. speech-dispatcher takes almost a half sec to stop the
>> speech-synthesizer.
>> If the user navigates quickly through menus, there are simultane outputs
>> at a time.
>> (tested with an usb logitech headset, snd-intel8x0 based card,
>> snd-hda-intel).
>> The same problem can be reproduced by running mplayer with alsa output
>> driver and pressing
>> quickly left/right arrow.
>> You should hear several samples at a time.
>> 
>> Using an sblive card which doesn't use dmix doesn't have such problems.
>> 
>> Using the dmix plugin should audio much faster to avoid this problem.
>
> It's a bit hard to guess.  This could be the difference of PCM drain
> implementation between hw and dmix, but a half second is still too
> long.
>
> Could you prepare a small test case to reproduce the buggy behavior?

Yes that's easy:
The following should be tested with active dmix.
1. login to a textconsole
2. mplayer -ao alsa your_favourite_file
3. Press space during playback.

Result: it takes about an half sec to stop the playback.

The second test would be:
1. login to a console
2. mplayer -ao alsa:device=hw=0,0 your_file
3. press space during playback
Result:
The playback stops without delay

Hope you can help.
Thanks for your response
Kind regards
Halim

>
> thanks,
>
> Takashi

-- 
Halim Sahin
E-Mail:				
halim.sahin (at) t-online.de

  reply	other threads:[~2009-09-01 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-23  9:55 a11y: howto reduce latency with alsa's dmix plugin? Halim Sahin
2009-08-30 16:13 ` really no idea? " Halim Sahin
2009-08-31 15:12 ` Takashi Iwai
2009-09-01 10:32   ` Halim Sahin [this message]
2009-09-01 10:40     ` Takashi Iwai
2009-09-02  8:56       ` Halim Sahin
2009-09-03 22:07         ` Takashi Iwai
2009-09-04  9:09           ` Halim Sahin
2009-09-04  9:32             ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fxb7j6pw.fsf@freenet.de \
    --to=halim.sahin@freenet.de \
    --cc=alsa-devel@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox