From: Takashi Iwai Subject: Re: Mixer improvements Date: Mon, 12 Sep 2005 14:57:35 +0200 Message-ID: References: <43241A35.8080903@superbug.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII 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: Jaroslav Kysela Cc: James Courtier-Dutton , alsa-devel List-Id: alsa-devel@alsa-project.org At Mon, 12 Sep 2005 14:44:21 +0200 (CEST), Jaroslav wrote: > > On Mon, 12 Sep 2005, Takashi Iwai wrote: > > > > 1) Unsigned integer index to percent <-> dB function. > > > 2) Integer for Analog or Digital path. This will indicate which side of > > > 3) Link information. > > > 4) Alternatively, we could implement this in alsa-lib, and just add > > I agree that 1 is the main required extension. 2 and 3 are optional in my > eyes. Agreed. 2 and 3 don't have to be generic. Such information is anyway driver/codec-specific and won't help the usability unless it's cooked well for easy-to-eat. (In other word, it's fine to provide 2 and 3 as long as the support code in alsa-lib handles them.) > > Moreover, we should be careful to handle the value <-> dB conversion. > > The dB isn't integer in general, and defining the fixed resolution is > > no generic solution. > > It's signed integer - fixed float resolution (* 100) in my implementation. > I think that it's enough for our purpose. Ah, OK. > > Adding a dB info into the driver would be required for the USB and HDA > > stuff, at least, since they can (or need) retrieve such information from > > the hardware directly. Meanwhile, others are basically given statically > > - e.g. a simple table look-up for each ac97 codec. This isn't > > necessarily in the kernel code at all. > > I agree, the alsa-lib should have a database containing this static > information. Also, I think that this information does not belong to the > universal control API at all. We need to decide, if we need another > midlevel module providing this information, or in my eyes, better way > might be to use the hwdep device and pass this information to the user > space. The alsa-lib modules driving the specific hardware will parse this > information and do own things with it. Perhaps, we can pass simple text > from the driver to user space. In this way, the procfs or devfs might be > used. You mean sysfs? :) I feel it's easier to stick with the control device because the information is indeed tightly bound to control elements. I'm just against modifying the existing snd_ctl_elem_info. Takashi ------------------------------------------------------- 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