From alsa-devel-owner@alsa.jcu.cz  Wed Oct  7 01:14:20 1998
Received: from rdaneel.dyn.ml.org (res-1097.usc.edu [128.125.245.177])
	by marvin.jcu.cz (8.9.1a/8.9.1) with ESMTP id BAA15437
	for <alsa-devel@jcu.cz>; Wed, 7 Oct 1998 01:13:10 +0200
Received: from localhost (brion@localhost)
	by rdaneel.dyn.ml.org (8.8.7/8.8.7) with ESMTP id QAA14328
	for <alsa-devel@jcu.cz>; Tue, 6 Oct 1998 16:13:08 -0700
Date: Tue, 6 Oct 1998 16:13:08 -0700 (PDT)
From: Brion Vibber <brion@pobox.com>
To: alsa-devel@jcu.cz
Subject: Re: XAmixer 0.1.7
In-Reply-To: <Pine.LNX.4.05.9810061049120.16257-100000@screech.cs.alfred.edu>
Message-ID: <Pine.LNX.4.03.9810061551460.14255-100000@rdaneel.dyn.ml.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Reply-To: alsa-devel@alsa.jcu.cz
Sender: alsa-devel-owner@alsa.jcu.cz
Precedence: list

On Tue, 6 Oct 1998, Christopher T. Lansdown wrote:

> Brion,
> 	I've looked through your patch.  I haven't applied it as it made
> me think of some bigger changes.  I am thinking that XAmixer should be
> changed to this interface:
> 1 tab per mixer.
> This the label would be:
> [Card|Chip] #n
> Where n = mixer device number.

Sounds good to me.

> This would make things a little more complicated, and require some fairly
> major rewriting, but it seems like the right way to do things.  I don't
> know if it would be better to do this re-writing now, or assume that the
> majority of people only have one mixing device per sound card, stabalize
> the current version (mostly fix the handling of mono channels), release a
> stable version, and then re-work things in the next development version.
> What do you think?

I'd say it's more important to get the mono stuff working just now, but I
don't think it'd be all that hard to make multiple mixers per card work.

> 	I've implemented your patch for the name, the configuration option
> will come when I add config files, which will be after stabalising the
> current version.

Spiff!

> 	Basically, what implementing the page\mixer would take is
> renaming the struct Card with Mixer, and changing that array.  It will be
> a lot of work, but it should be the right way to go.

Shouldn't take too much work... A search and replace will handle changing
the struct names, as for the rest you should only need to make changes in
cinit.c, primarily adding another for(;;) loop in init_cards() to iterate
through the mixers for each card.

It'd probably be easier to start card[] (or mixer[] I guess it should be)
at the size of one mixer struct and bump it up with a realloc() each time
you find another device, or you could count the mixers up first, and then
allocate the array in one chunk.

For the naming, just do something like:

  sprintf(card[i].name, "%s (%d%d)", <card_or_mixer_info>.name, i, j);

if you want to keep the same numbering scheme as the devices. (What about
if there are more than 10 cards? Does it go into hex or something?) Or, a
scheme of your choosing could be used, as long as one can determine which
device one is messing with from it.

>  I don't think that
> there is a need to keep card information, the name of the parent card can
> be stored in the mixer struct.  What do you think?

Agreed, all we need is enough to put a label on the tab.

-- brion vibber (brion@pobox.com)


