All of lore.kernel.org
 help / color / mirror / Atom feed
From: "alasinski" <alasinski@rogers.com>
To: alsa-devel@lists.sourceforge.net
Subject: Re: Re: How to access vendor specific AC97 codec register ?
Date: Thu, 20 Apr 2006 12:15:45 -0400	[thread overview]
Message-ID: <e28c3k$7u8$1@sea.gmane.org> (raw)
In-Reply-To: s5h64l4b5nh.wl%tiwai@suse.de

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" <tiwai@suse.de> 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" <tiwai@suse.de> 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

  reply	other threads:[~2006-04-20 16:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-20 15:05 How to access vendor specific AC97 codec register ? alasinski
2006-04-20 15:20 ` Takashi Iwai
2006-04-20 15:34   ` alasinski
2006-04-20 15:58     ` Takashi Iwai
2006-04-20 16:15       ` alasinski [this message]
2006-04-20 15:27 ` Lee Revell
2006-04-20 15:48   ` How to access vendor specific AC97 codec register? alasinski
2006-04-20 16:13     ` Liam Girdwood
2006-04-20 16:19       ` Takashi Iwai
2006-04-20 16:37         ` Liam Girdwood
2006-04-20 16:37       ` Re: How to access vendor specific AC97 codecregister? alasinski
2006-04-20 16:57         ` Liam Girdwood
2006-04-20 17:40           ` Re: Re: How to access vendor specific AC97codecregister? alasinski
2006-04-20 18:14             ` Liam Girdwood
2006-04-20 18:54               ` Re: Re: Re: How to access vendor specificAC97codecregister? alasinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='e28c3k$7u8$1@sea.gmane.org' \
    --to=alasinski@rogers.com \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.