Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Raymond <rayau@netvigator.com>
To: alsa-devel@lists.sourceforge.net
Subject: Re: Volume per voices [Feature Request]
Date: Sat, 13 Aug 2005 11:59:08 +0800	[thread overview]
Message-ID: <42FD700C.9010603@netvigator.com> (raw)
In-Reply-To: <s5hzms5c0v6.wl%tiwai@suse.de>

Takashi Iwai wrote:
> At Thu, 28 Jul 2005 19:51:16 +0200 (CEST),
> Giuliano Pochini wrote:
> 
>>>>In my driver we have A analog channels and D digital channels. The
>>>>driver registers a "PCM Playback Volume" control as an array of
>>>>A+D integers, where each element is the gain (-128..+6) of each
>>>>channel, but they don't map directly to the PCM channels because
>>>>the driver exports analog and digital channels as two separate
>>>>devices (this feature can be removed easily). So pcmvol[0..A-1]
>>>>controls the volume of hw:0,0 and pcmvol[A..A+D-1] controls the
>>>>volume of hw:0,1. Furthermore, the user can open hw:0,0,x to
>>>>address the xth channel.
>>>
>>>As far as I can see, no driver actually uses the subdevice (substream)
>>>field for PCM substreams; probably because this would require a
>>>separate control for each substream instead of using an array.
>>
>>My case is even more compicated because one ctl controls the volume of two
>>devices. A callback that gets snd_pcm_substream_t* and returns {int numid,
>>firstindex, lastindex} or sort of would make things much simpler wrt hw
>>controls. In case there are both hw volume and softvol, which has
>>priority ? :)
> 
> 
> Returning a list of controls would be simplest as the lowlevel API.
> The higher level API decides which control to use, for example,  while
> h/w specific apps can use the lowlevel API to get certain controls
> directly.
> 
> 

For those controls with SNDRV_CTL_ELEM_IFACE_PCM , ctl->id.device and 
ctl->id.subdevice.

Is it feasible to have a function which return snd_pcm_substream_t* of 
the PCM substream with parameters (snd_kcontrol_t *kcontrol, int device 
,int subdevice)  ?

The topology which the hardware mixers are connected depends on the 
number of channels (mono,stereo,quad,..) of the PCM substream




-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

  reply	other threads:[~2005-08-13  3:59 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-22 14:46 maximum voices/channels Cesar Hernandez
2005-07-25 13:02 ` Volume per voices Dino
2005-07-25 14:22   ` Clemens Ladisch
2005-07-25 14:49     ` Dino Puller
2005-07-25 15:02       ` Clemens Ladisch
2005-07-26  9:49         ` Volume per voices [Feature Request] Dino Puller
2005-07-27  7:47           ` Giuliano Pochini
2005-07-27  8:17             ` Clemens Ladisch
2005-07-27  8:23               ` Jaroslav Kysela
2005-07-27  8:30                 ` Takashi Iwai
2005-07-27  9:00                   ` Takashi Iwai
2005-07-27 15:21                     ` Clemens Ladisch
2005-07-27 15:40                       ` Takashi Iwai
2005-07-28  7:25                         ` Clemens Ladisch
2005-08-01 15:04                           ` Takashi Iwai
2005-08-01 15:29                             ` Clemens Ladisch
2005-08-01 16:10                               ` Takashi Iwai
2005-08-02 14:13                                 ` Clemens Ladisch
2005-08-02 15:51                                   ` Takashi Iwai
2005-08-02 16:00                                     ` Lee Revell
2005-08-02 16:48                                       ` Takashi Iwai
2005-07-27 16:16                       ` Giuliano Pochini
2005-07-28  7:42                         ` Clemens Ladisch
2005-07-28  8:32                           ` Jaroslav Kysela
2005-07-28  8:39                             ` Takashi Iwai
2005-07-28  8:48                               ` Clemens Ladisch
2005-07-28  8:56                               ` Jaroslav Kysela
2005-07-28  8:39                             ` Dino
2005-07-29 12:05                               ` Raymond
2005-07-28 17:51                           ` Giuliano Pochini
2005-07-29 11:23                             ` Takashi Iwai
2005-08-13  3:59                               ` Raymond [this message]
2005-07-28  7:31                       ` Raymond
2005-07-28  7:57                         ` Clemens Ladisch
2005-07-28 10:59                           ` [Openvortex-dev] " Maarten Vanraes
     [not found]                             ` <21ed1c37050728045725f76ac@mail.gmail.com>
2005-07-28 14:29                               ` Alien
2005-08-12 14:57                           ` Raymond
2005-08-13 11:58                             ` Jaroslav Kysela
2005-07-28  8:34                         ` Jaroslav Kysela
2005-07-31 16:37                           ` Raymond
2005-08-01  9:22                             ` Takashi Iwai
2005-08-05 10:23                               ` Raymond
2005-08-05 10:51                                 ` Takashi Iwai
2005-08-29  2:28                               ` Raymond
2005-08-29 21:04                                 ` Manuel Jander
2005-07-28  8:09                       ` Jaroslav Kysela
2005-07-27  8:34             ` Dino
2005-07-27  8:34             ` Dino
2005-07-27  8:32     ` Volume per voices Takashi Iwai
2005-07-25 13:07 ` maximum voices/channels Clemens Ladisch
2005-07-25 13:08 ` Jaroslav Kysela

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=42FD700C.9010603@netvigator.com \
    --to=rayau@netvigator.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox