2011-09-13 08:29:07     codec register configuration from user space Alsa lib APIs

Document created by Aaronwu Employee on Aug 27, 2013
Version 1Show Document
  • View in full screen mode

2011-09-13 08:29:07     codec register configuration from user space Alsa lib APIs

John Peter (INDIA)

Message: 103371   

 

Hi,

 

We're working through developing the ALSA driver for the wm8978 codec.

 

  I need some guidance on configure the codec registers from user space  Alsa library APIs.

 

Becuase i need to configure particular register at run time from my application.

 

Please provide your suggestion on how to configure the codec registers from user sapce using Alsa library APIs .

 

 

 

Thank you,

 

Peter.

QuoteReplyEditDelete

 

 

2011-09-13 23:21:14     Re: codec register configuration from user space Alsa lib APIs

Sonic Zhang (CHINA)

Message: 103378   

 

It is unusual to set codec registers from user application directly in Linux.

 

You should implement this function in wm8978 codec driver via amixer control operations.

QuoteReplyEditDelete

 

 

2011-09-14 07:58:53     Re: codec register configuration from user space Alsa lib APIs

John Peter (INDIA)

Message: 103386   

 

Hi Sonic Zhang,

 

Thank you very much for your response.

 

yes.Its unusual to set codec registers from user application.

 

my question is the API details to communicate the alsa driver in the kernel sapce from user space like ioct calls to configure the codec registers whenever required.

 

i didnt get any sample codes as per my requirement and also amixer API details.

 

i need the APIs instead of exe.

 

could please share the API details or any document?

 

 

 

-Peter

QuoteReplyEditDelete

 

 

2011-09-14 23:03:01     Re: codec register configuration from user space Alsa lib APIs

Sonic Zhang (CHINA)

Message: 103392   

 

Please refer to amixer source code in alsa-utils and ALSA API at   www.alsa-project.org/alsa-doc/alsa-lib/

QuoteReplyEditDelete

 

 

2011-09-14 23:33:43     Re: codec register configuration from user space Alsa lib APIs

Scott Jiang (CHINA)

Message: 103393   

 

I have to say sound/soc/codecs/wm8978.c already exists.

QuoteReplyEditDelete

 

 

2011-09-21 05:55:35     Re: codec register configuration from user space Alsa lib APIs

John Peter (INDIA)

Message: 103476   

 

Hi Sonic,

 

Thanks for your information.

 

we can use mixer APIs to control the volume level,gain and etc.

 

But my requirement is need to change the codec registers value at run time.

 

one of the example is

 

i need to configure the codec for differnt sample rate base on the streams.so at the time i need to update the codec register value as per the sample rate.

 

so how can i update those register values in alsa driver model?

 

Any mixer apis support this requirement?

 

Please provide your suggestions.

 

-Peter

QuoteReplyEditDelete

 

 

2011-09-21 23:02:27     Re: codec register configuration from user space Alsa lib APIs

Scott Jiang (CHINA)

Message: 103487   

 

You should carefully read documents in alsa web first, they have told you how to do this. Hardware parameters can set sample rate.

Attachments

    Outcomes