Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Paul Davis <paul@linuxaudiosystems.com>
Cc: Dan Tihelka <dtihelka@kky.zcu.cz>, alsa-devel@lists.sourceforge.net
Subject: Re: Build-in mixer
Date: Wed, 15 Oct 2003 16:19:57 +0200	[thread overview]
Message-ID: <s5hy8vminw2.wl@alsa2.suse.de> (raw)
In-Reply-To: <200310151240.h9FCeluU021976@oud>

[-- Attachment #1: Type: text/plain, Size: 1607 bytes --]

At Wed, 15 Oct 2003 08:40:47 -0400,
Paul Davis wrote:
> 
> >Well, i am not author of this program actually. It is xmms plugin 
> >allowing  to use ALSA for sound output (alsa-xmms-0.9). I only wanted to 
> >modify it, to be able to use dmix. I see, that it is out of my abilities 
> >:-(  and, so i will have to conctact the author of it and ask him to 
> >correct it. It is pitty, because it will take time (if they ever do it). 
> >I thought, that ALSA interface is not dependent on way, how it is opened 
> >(because the same code with "hw:0:0" instead of "default" worked 
> >perfectly) or did not i comprehend anything?. I would like to 
> >understant, why opening "hw:0:0" works and only replacing it by 
> >"default" does not. It seems to mee very dificult for developpers....
> 
> it would have helped enormously if you had stated that you were
> talking about alsa-xmms up front. its a known and important piece of
> code, and one that someone here is much more likely to fix than (sorry
> to say) your own pet project.
> 
> takashi or jaroslav - does using dmix involve any threads? could the
> alsa-xmms plugin be making calls to some xmms error code from a
> non-GUI thread?

it's not related with threads, but it invokes a fork for a server
process (a main control only, doesn't do mixing stuffs).
it looks like there is something wrong with this together with xmms.
i've seen that Xlib got a spurious async.
magically enough, the attached patch seems to fix.

Jaroslav, what is the reason of the second fork?  to daemonize?

hmm, i still got many underruns.  something broken atm...


Takashi

[-- Attachment #2: pcm-dmix-fix.dif --]
[-- Type: application/octet-stream, Size: 665 bytes --]

Index: alsa-lib/src/pcm/pcm_direct.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm_direct.c,v
retrieving revision 1.5
diff -u -r1.5 pcm_direct.c
--- alsa-lib/src/pcm/pcm_direct.c	8 Sep 2003 11:23:46 -0000	1.5
+++ alsa-lib/src/pcm/pcm_direct.c	15 Oct 2003 14:03:00 -0000
@@ -313,12 +313,12 @@
 		close(dmix->server_fd);
 		return ret;
 	} else if (ret == 0) {
-		ret = fork();
-		if (ret == 0)
+		//ret = fork();
+		//if (ret == 0)
 			server_job(dmix);
 		exit(EXIT_SUCCESS);
 	} else {
-		waitpid(ret, NULL, 0);
+		//waitpid(ret, NULL, 0);
 	}
 	dmix->server_pid = ret;
 	dmix->server = 1;

  reply	other threads:[~2003-10-15 14:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-08  8:24 Build-in mixer Dan Tihelka
2003-10-08 11:24 ` Paul Davis
2003-10-08 12:04   ` Takashi Iwai
2003-10-10  8:41     ` Dan Tihelka
2003-10-11 15:33     ` Daniel Tihelka
2003-10-12 16:44       ` Frank Barknecht
2003-10-14  7:39         ` Dan Tihelka
2003-10-14 11:34           ` Paul Davis
2003-10-15  9:15             ` Dan Tihelka
2003-10-15 11:24               ` Paul Davis
2003-10-15 12:10                 ` Dan Tihelka
2003-10-15 12:40                   ` Paul Davis
2003-10-15 14:19                     ` Takashi Iwai [this message]
2003-10-15 14:53                       ` Paul Davis
2003-10-15 15:01                         ` Takashi Iwai
2003-10-15 15:31                           ` Takashi Iwai
2003-10-17  7:41                           ` Jaroslav Kysela
2003-10-17 11:13                             ` Takashi Iwai
2003-10-17  7:31                       ` Jaroslav Kysela
2003-10-17  7:28                     ` Jaroslav Kysela
2003-10-13 12:13       ` Clemens Ladisch

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=s5hy8vminw2.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=dtihelka@kky.zcu.cz \
    --cc=paul@linuxaudiosystems.com \
    /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