From: Takashi Iwai Subject: Re: Re: Volume Peak display Date: Wed, 22 Jun 2005 16:37:20 +0200 Message-ID: References: <1064034672.10497.7.camel@localhost> <1064414023.1630.11.camel@localhost> <42B7D919.8020400@netvigator.com> <42B973D9.3090001@netvigator.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <42B973D9.3090001@netvigator.com> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Raymond Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 22 Jun 2005 22:21:13 +0800, Raymond wrote: > > Takashi Iwai wrote: > > At Tue, 21 Jun 2005 17:08:41 +0800, > > Raymond wrote: > > > >>static snd_kcontrol_new_t vortex_levels_kcontrol __devinitdata = { > >> .iface = SNDRV_CTL_ELEM_IFACE_MIXER, > >> .name = "EQ Peaks", > >> .access = SNDRV_CTL_ELEM_ACCESS_READ | SNDRV_CTL_ELEM_ACCESS_VOLATILE, > >> .info = snd_vortex_peaks_info, > >> .get = snd_vortex_peaks_get, > >>}; > >> > >>Refer to Alien's png > >> > >>http://article.gmane.org/gmane.linux.alsa.devel/23112 > >> > >>There are 4 sliders marked as "EQ peaks" in alsamixer (1.0.9a) , the > >>first two are stereo and the last two are mono. > >> > >>The 4 EQ peaks sliders in alsamixer can be adjusted and it is strange > >>that alsamixer do not get "segfault" when ".put" has not been > >>implemented in au88x0. > > > > > > It shouldn't segfault but be simply ignored. > > > > > # amixer cget numid=12 numid=12,iface=MIXER,name='EQ Peaks' > ; type=INTEGER,access=r----,values=20,min=0,max=32767,step=0 > : values=1,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,1,0,0 > > # amixer cset numid=12 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 > amixer: Control default element write error: Operation not permitted So it's even better than ignoring :) > > > >>The following error only appear with compile with option --with-debug=full > >> > >>Vortex: init.... <3>ALSA control.c:325: control 3:0:0:Playback PCM > >>advanced processing:0 is already present > >>done. > >> > >>It seem that this HRTF kcontrols with 6 values cannot be created. > >> > >>Does it mean that kcontrols ( not enumerated ) cannot contains more than > >>2 values ? > > > > > > They can. The above split of channels is just a matter of mixer > > abstraction layer and alsamixer. In the control API level, everyhing > > is fine. > > > > The first HRTF kcontrol fail in snd_ctl_add() (there are 16 HRTF > controls and each contain 6 values). > > Is the error cause by numid or duplicate name ? Yes. (More exactly, this is not numid but the name. The numid is assigned first after the addition to the card.) If you want to use the same name string, then give different "index" values to distinct with each other. Instead of creating each control with a diffeent index value, you can create a single control with multiple instances by passing a positive kcontrol_new_t.count value. This will create only a single control but it's handled as if multiple control instances from outside. The get/put/info callbacks should check the given instance offset via snd_ctl_get_ioff() (defined in control.h). This is used in emu10k1, trident, etc. Takashi ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click