From alsa-devel-owner@alsa.jcu.cz  Sun Apr 19 07:21:40 1998
Received: from birgrave.birnet.private (root@dip197-2.hamburg.netsurf.de [194.195.202.197])
	by marvin.jcu.cz (8.8.8/8.8.8) with ESMTP id HAA12119
	for <alsa-devel@alsa.jcu.cz>; Sun, 19 Apr 1998 07:21:28 +0200
Received: from birgrave (timj@localhost)
	by birgrave.birnet.private (8.8.5/8.8.5) with internal id GAA04909;
	Sun, 19 Apr 1998 06:21:22 +0200
From: Tim Janik <timj@gtk.org>
Message-Id: <199804190421.GAA04909%timj@gtk.org>
Date: Sun, 19 Apr 1998 06:21:21 +0200 (CEST)
To: alsa-devel@alsa.jcu.cz
cc: Jaroslav Kysela <perex@jcu.cz>
Subject: Re: alsadriver-0.0.12-pre2.patch
In-Reply-To: <Pine.LNX.3.96.980416105801.21004E-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 Thu, 16 Apr 1998, Jaroslav Kysela wrote:

> It's true. Currently are only two ways how unmute channels:
> 
> 1) use Mixer program from alsa-utils package (anyone is interrested to
>    write a little better command line mixer for ALSA project?)
> 2) edit output from cat /proc/sound/0/mixer0 (remove lmute and rmute
>    words) and write result again to /proc/sound/0/mixer0
> 
> If you using some OSS/Lite compatible program, you can't with it change
> mute settings.

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");

in the initialization code and

  snd_mixer_channel_t cdata = { 0 };
  [...]
  cdata.channel = channel_index;
  if (ioctl (mixer_fd,
             SND_MIXER_IOCTL_CHANNEL_READ,
             &cdata) < 0)
    mixer_abort (ERR_IOCTL, "SND_MIXER_IOCTL_CHANNEL_READ");
  cdata.flags &= ~SND_MIXER_FLG_DECIBEL;

prior to

    if (ioctl (mixer_fd,
               SND_MIXER_IOCTL_CHANNEL_WRITE,
               &cdata) < 0)
      mixer_abort (ERR_IOCTL, "SND_MIXER_IOCTL_CHANNEL_WRITE");

any ideas?

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.


> 
> 					Jaroslav
> 

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?

---
ciaoTJ





