From mboxrd@z Thu Jan 1 00:00:00 1970 From: "alasinski" Subject: Re: Re: How to access vendor specific AC97 codec register ? Date: Thu, 20 Apr 2006 12:15:45 -0400 Message-ID: References: Return-path: 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 Thx Takashi, In my case I'm using pxa2xx-ac97 driver by N.Pitre. It has pxa2xx_ac97_write(ac97, reg, val) function that can write to any register reg value val. This function is being registered with generic pci/ac97/ac97_codec layer that implements ac97 spec. ac97_codec presents it in all in unified way to the client with the concept of elements. This is where I'm loosing on my tracing through the code and things becoming boor. I'm led to believe that driver is generic enough to handle any register call if I can find a way to request it. Does this picture make sense ? cheers -al "Takashi Iwai" wrote in message news:s5h64l4b5nh.wl%tiwai@suse.de... > 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 ------------------------------------------------------- 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