All of lore.kernel.org
 help / color / mirror / Atom feed
* volume always 0 ?!?
@ 2003-03-23 23:54 Giuliano Pochini
  2003-03-25  9:27 ` Giuliano Pochini
  0 siblings, 1 reply; 2+ messages in thread
From: Giuliano Pochini @ 2003-03-23 23:54 UTC (permalink / raw)
  To: alsa-devel


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-03-25  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-23 23:54 volume always 0 ?!? Giuliano Pochini
2003-03-25  9:27 ` Giuliano Pochini

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.