From mboxrd@z Thu Jan 1 00:00:00 1970 From: Raymond Subject: Re: Volume Peak display Date: Wed, 22 Jun 2005 22:21:13 +0800 Message-ID: <42B973D9.3090001@netvigator.com> References: <1064034672.10497.7.camel@localhost> <1064414023.1630.11.camel@localhost> <42B7D919.8020400@netvigator.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: 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: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org 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 > >>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 ? int snd_ctl_add(snd_card_t * card, snd_kcontrol_t * kcontrol) { snd_ctl_elem_id_t id; unsigned int idx; snd_runtime_check(card != NULL && kcontrol != NULL, return -EINVAL); snd_assert(kcontrol->info != NULL, return -EINVAL); id = kcontrol->id; down_write(&card->controls_rwsem); if (snd_ctl_find_id(card, &id)) { up_write(&card->controls_rwsem); snd_ctl_free_one(kcontrol); snd_printd(KERN_ERR "control %i:%i:%i:%s:%i is already present\n", id.iface, id.device, id.subdevice, id.name, id.index); return -EBUSY; } ------------------------------------------------------- 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