All of lore.kernel.org
 help / color / mirror / Atom feed
From: Giuliano Pochini <pochini@shiny.it>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Subject: volume always 0 ?!?
Date: 23 Mar 2003 23:54:13 +0000	[thread overview]
Message-ID: <1048463664.4150.46.camel@Jay> (raw)


setvolume control callback always get uc->value.integer.value[x]==0. Any
ideas ?


Bye.



---------------------------------------------------------
[Giu@Jay Giu]$ amixer 
Simple mixer control 'PCM',0
  Capabilities: pvolume
  Playback channels: Front Left - Front Right
  Limits: Playback -32768 - 1536
  Front Left: Playback 0 [96%]
  Front Right: Playback 0 [96%]




static int Echo_volume_info(snd_kcontrol_t *kcontrol,
snd_ctl_elem_info_t *uinfo) {
  uinfo->type=SNDRV_CTL_ELEM_TYPE_INTEGER;
  uinfo->count=2;
  uinfo->value.integer.min=ECHOGAIN_MINOUT;
  uinfo->value.integer.max=ECHOGAIN_MAXOUT;
  return(0);
}

static int Echo_setvolume(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t
*ucontrol) {
struct EchoChip *chip;

  printk("setvol %ld %ld\n",
         ucontrol->value.integer.value[0],
         ucontrol->value.integer.value[1]);
}


static snd_kcontrol_new_t pcmout_volume_control __devinitdata = {
  .name="PCM Playback Volume",
  .index=0,
  .iface=SNDRV_CTL_ELEM_IFACE_MIXER,
  .access=SNDRV_CTL_ELEM_ACCESS_READWRITE,
  .info=Echo_volume_info,
  .get=Echo_setvolume,
  .put=Echo_getvolume,
};





-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en

             reply	other threads:[~2003-03-23 23:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-23 23:54 Giuliano Pochini [this message]
2003-03-25  9:27 ` volume always 0 ?!? Giuliano Pochini

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=1048463664.4150.46.camel@Jay \
    --to=pochini@shiny.it \
    --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.