From alsa-devel-owner@alsa.jcu.cz  Sun Apr 19 12:06:50 1998
Received: from birgrave.birnet.private (root@dip192-2.hamburg.netsurf.de [194.195.202.192])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id MAA06551
	for <alsa-devel@alsa.jcu.cz>; Sun, 19 Apr 1998 12:06:46 +0200
Received: from birgrave (timj@localhost)
	by birgrave.birnet.private (8.8.5/8.8.5) with internal id MAA08310;
	Sun, 19 Apr 1998 12:03:52 +0200
From: Tim Janik <timj@gtk.org>
Message-Id: <199804191003.MAA08310%timj@gtk.org>
Date: Sun, 19 Apr 1998 12:03:50 +0200 (CEST)
To: Jaroslav Kysela <perex@jcu.cz>
cc: alsa-devel@alsa.jcu.cz
Subject: Re: alsadriver-0.0.12-pre2.patch
In-Reply-To: <Pine.LNX.3.96.980419103842.8499A-100000@entry.jcu.cz>
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 Sun, 19 Apr 1998, Jaroslav Kysela wrote:

> On Sun, 19 Apr 1998, Tim Janik wrote:
> 
> > ok, i've started out a small mixer program along the lines of gusmix,
> > and i encountered a problem. the maximum values for my GUS MAX channels
> > are all different (from each other and from 100), even thought i did
> > 
> >   if (ioctl (mixer_fd,
> >              SND_MIXER_IOCTL_EXACT,
> >              &num ) < 0)
> >     mixer_abort (ERR_IOCTL, "SND_MIXER_IOCTL_EXACT");
> 
> By default and with num == 0 is exact mode disabled and percentual mode is
> enabled. If num != 0 is exact mode enabled and percentual mode is disabled.
> If you don't want use exact mode, don't use EXACT ioctl call or set num to
> zero before this call.

i've already (2 minutes ago) posted the code to the list, please change
line 556 in mixer_init () as follows:

  /* open mixer device, set to EXACT mode
   */
  mixer_device_file = device;
  mixer_fd = open (mixer_device_file, O_RDONLY);
  if (mixer_fd < 0)
    mixer_abort (ERR_OPEN, mixer_device_file);
  if (ioctl (mixer_fd, SND_MIXER_IOCTL_PVERSION, &num) < 0)
    mixer_abort (ERR_IOCTL, "SND_MIXER_IOCTL_PVERSION");
- num = 1;
+ num = 0;
  if (ioctl (mixer_fd,
             SND_MIXER_IOCTL_EXACT,
             &num ) < 0)
    mixer_abort (ERR_IOCTL, "SND_MIXER_IOCTL_EXACT");

then even the values are correct ;)


> 
> Why isn't used ALSA C library as wrapper for interaction with driver? This
> simplest code and allows for future programmers add only to library features
> like remote control etc...

well, that would have required to get familiar with the library and
i wouldn't have finished the first draft this day.
i'd also say it isn't really neccessary to use the extra library indiriction
for such a simple program. anyways i just copied the mixer ioctls
from test/mixer.c, you could have used the library routines in taht place as
well ;)))

> > here is a screenshot showing the *maximum* values for all channels:
> > 
> >     MM       MM       --       MM       --       --       MM       MM
> >    |..|     |..|     |##|     |..|     |..|     |..|     |..|     |..|
> >    |..|     |..|     |##|     |..|     |..|     |..|     |..|     |..|
> >    |..|     |..|     |##|     |..|     |..|     |..|     |..|     |..|
> >    |..|     |..|     |##|     |..|     |..|     |..|     |..|     |..|
> >    |..|     |##|     |##|     |..|     |..|     |..|     |..|     |##|
> >    |..|     |##|     |##|     |..|     |..|     |..|     |..|     |##|
> >    |..|     |##|     |##|     |..|     |..|     |..|     |..|     |##|
> >    |##|     |##|     |##|     |##|     |..|     |##|     |..|     |##|
> >    |##|     |##|     |##|     |##|     |..|     |##|     |..|     |##|
> >    |##|     |##|     |##|     |##|     |##|     |##|     |##|     |##|
> >   31<>31   63<>63   127<>127 31<>31   15<>15   31<>31   15<>15   63<>63
> >   Synth     PCM     PCM 1   Line-In    MIC       CD   <Record-G>Loopback
> > 
> > interestingly all the maximum values are always odd, and "PCM 1" (btw
> > shouldn't the driver report that as "Synth"?) is even *above* 100.
> 
> Ranges are correct for exact mode. Odd values are due to hardware
> limitations. For example for "PCM" is available 6-bits (range 0-63) in
> mixer registers. "Synth" is master for "PCM 1". "Synth" means mixer
> setting for analog mixer output and "PCM 1" is digital volume or GF1
> voices which is used for second PCM device.

ok, thanx.

> > PS.:	this is your mail header that i replied to:
> > 	Date: Thu, 16 Apr 1998 10:58:27 +0200 (MET DST)
> > 	From: Jaroslav Kysela <perex@jcu.cz>
> > 	Reply-To: alsa-devel@jcu.cz
> > 	To: alsa-devel@alsa.jcu.cz
> > 	Subject: Re: alsadriver-0.0.12-pre2.patch
> > 	
> > 	now, which one is correct, alsa-devel@jcu.cz or alsa-devel@alsa.jcu.cz?
> 
> Both E-mails are correct at this time. Hostname alsa.jcu.cz have MX record
> which points to our mail hub for domain jcu.cz. I'll try figure out if I
> can set outgoing address to alsa.jcu.cz in sendmail, too....

should just be a matter of changing the Reply-To: in your mailing list
server.

> 						Jaroslav
> 
> P.S. Looks like mailing lists archives works now at wiw.org. I updated
>      links in ALSA WWW pages to these archives.
> 
> -----
> Jaroslav Kysela <perex@jcu.cz>
> Academic Computer Centre, University of South Bohemia
> Branisovska 31, C. Budejovice, CZ-370 05 Czech Republic
> 
> 

---
ciaoTJ


