All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Re: smart and automatic use of dmix and dsnoop - feature suggestion.
Date: Mon, 17 Nov 2003 21:58:54 +0000	[thread overview]
Message-ID: <3FB9449E.3030904@superbug.demon.co.uk> (raw)
In-Reply-To: <200311172128.34259.pwk.linuxfan@gmx.de>

Hi,

Just a general comment on dmix/dsnoop.
1) It is not bug free yet. I have an application that fails when one 
tries to use it. (xine.sf.net). I have not had time to establish why 
yet. E.g. xine using "front" device, output's stereo sounding perfectly. 
I note down the buffer and period sizes and rate and sample format being 
used for "front" and set "dmix" to use the same via the alsa.conf file.
But playing with "dmix" causes the sound to stutter, as though only 
every second period is being played, with zero samples in between.
When I get a moment I will investigate further the exact cause. 
Initially I thought it was a buffer/period size problem, but I have 
checked that, and that is not the problem. The next TODO test I will do 
will be testing the snd_pcm_delay() returned from the dmix device, and 
compare it's accuracy with "front".

2) For smart dmix/dsnoop to be really user friendly, we will need a 
version of it that works in full duplex. I.E. Multiple applications able 
to record the same stream as well as play to it at the same time.

3) If one application wishes to play to "surround51" and a different 
application wishes to play to "front", dmix will have to be clever 
enought to mix the two.

4) If one application wishes to play to "front" and a different 
application wishes to play to "rear", the mixer should be able to mix to 
get 4 output channels.

5) I think that this sound mixing problem might be better served by 
sound servers like jack.

6) software mixing is ok, but software resampling is not a good idea to 
do in alsa-lib, because a) It cannot do good quality resamplings because 
t is trying to keep latency low. b) A audio/video application could do 
resampling better because it could do it at the decoding stages, before 
latency and audio/video sync is a problem.

7) For mixing, each open of the alsa multi-open device should have it's 
own volume control per open, and not just the hardware backend volume 
controls. The application could easily control their own volume, without 
effecting other application's volume.

Summary: -
An application should be able to use device names like "rear", "front", 
"surround51" and then have a separate control to tell alsa whether it is 
allowed to do resampling or not. Then at least the more advanced 
application could decide for itself whether to use alsa-lib's low 
quality resampler, or implement it's own multi-tap interpolation filter.
For a video/audio application like xine.sf.net, being able to open the 
alsa device in such a way to ensure we know where the sound will be 
routed(which speakers sound will come from) is useful.

Cheers
James



-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

  reply	other threads:[~2003-11-17 21:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-14  1:43 smart and automatic use of dmix and dsnoop - feature suggestion Peter Kirk
2003-11-14 12:21 ` Paul Davis
2003-11-14 13:01   ` Peter Kirk
2003-11-14 13:20     ` Takashi Iwai
2003-11-14 15:11       ` Mark Hubbard
2003-11-14 15:31         ` Takashi Iwai
2003-11-15  2:46           ` Peter Kirk
2003-11-17  1:37           ` Mark Hubbard
2003-11-17  9:56             ` Frank Barknecht
2003-11-17 10:32             ` Takashi Iwai
     [not found]               ` <200311171434.50285.pwk.linuxfan@gmx.de>
2003-11-17 14:33                 ` Takashi Iwai
2003-11-17 17:16                   ` Mark Hubbard
2003-11-17 18:23                     ` Peter Kirk
2003-11-17 18:50                       ` Jaroslav Kysela
2003-11-17 19:08                         ` Peter Kirk
2003-11-17 19:36                           ` Paul Davis
2003-11-17 20:05                             ` Jaroslav Kysela
2003-11-17 20:28                               ` Peter Kirk
2003-11-17 21:58                                 ` James Courtier-Dutton [this message]
2003-11-18  5:51                                   ` Peter Kirk
2003-11-18  7:30                                     ` Paul Davis
2003-11-17 20:32                               ` Paul Davis
2003-11-17 18:18                   ` Peter Kirk
2003-11-17 18:49                     ` Takashi Iwai
2003-11-17 19:16                       ` Peter Kirk
2003-11-17 19:40                         ` Paul Davis
2003-11-17 19:48                           ` Peter Kirk
2003-11-17 20:34                             ` Paul Davis
2003-11-17 20:04                       ` Florian Schmidt
2003-11-17 18:30               ` Peter Kirk

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=3FB9449E.3030904@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /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 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.