From: Takashi Iwai Subject: Re: Re: How to access vendor specific AC97 codec register ? Date: Thu, 20 Apr 2006 17:58:26 +0200 Message-ID: References: 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: alasinski Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Thu, 20 Apr 2006 11:34:22 -0400, alasinski wrote: > > Thx Takashi, > > since I'm not being well frased in ALSA terminology I need some guidance: > - what "accessor" is ? I meant in a general sense. The method to access to the hardware. > - Is it part of the driver or asoundlib ? As written, in driver. > - what ALSA files, calls are involved ? Depends on your hardware. > - where can I find some explanation on it ? In the source code. > - do you have a sample that implements other (similar ?) accessor ? It should be just like other mixer elements accessing to ac97 registers. Takashi > cheers > -al > > "Takashi Iwai" wrote in message > news:s5hbquwb7f0.wl%tiwai@suse.de... > > At Thu, 20 Apr 2006 11:05:38 -0400, > > alasinski wrote: > >> > >> Hi, > >> > >> I need to do IO specific operation from UCB1400 on Snapper Arm board. > >> This > >> has to be done from C code as it is part of a larger project. All what I > >> need is to be able to read and write content of the few vendor specific > >> AC97 > >> codec registers: 0x5A,0x5C. I'm not interested with any other ALSA > >> functionality. > >> > >> I have ALSA installed and running with simple programs that can > >> successfully > >> open controller with snd_ctl_open () and list available control elements. > >> This is basically J.C.Georgas sample I found. I can read content of all > >> AC97 > >> registers by cat /proc/asound/card0/codec97#/ac97#0-0+regs. That assures > >> me > >> that all driver and lib parts are working. All what I need is to write a > >> simple piece of code .... > >> > >> However, I spent 2 days reading through ALSA back and forth and I find > >> this > >> task very daunting to say at least. For one things I was not able to find > >> an > >> architecture document explaining how parts of ALSA work, to be able to > >> find > >> some sort of direction. There are samples dedicated to solving some of a > >> problems, unfortunately not my problem. Man pages and reference are only > >> little more then code browsing. Tutorials explain in brief what I don't > >> need > >> to know. In summary: typical situation when you are tasked with something > >> that is off main stream. > >> > >> I have an inkling that I should prepare UCB1400.conf file to define > >> control > >> elements that map to the registers (how ?). Then I should be able to > >> snd_ctl_elem_read() or .._write() to them. Perhaps there is other way > >> around: something like making ioctl() call on a driver directly w/o > >> libasound. I'm in lost. > > > > You have to implement an accessor (e.g. via ALSA control API) to the > > certain ac97 registers in the driver. There is no generic interface > > allowing you to access the all ac97 registers. > > (The proc file is an exception. It's provided only for debugging > > purpose.) > > > > > > Takashi > > > > > > ------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > > > ------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/alsa-devel > ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642