Skip to contentSkip to conversation

snd_pcm_hw_params and hw_params function call

DISCUSSION YongLi 2 participants 2 messages Sep 18, 2006 – Sep 19, 2006

lore
Share & tools
lore

YongLi

author
#0 lore raw

Hello All,

I am porting the linux 2.6.16 to my ARM board. I found a problem related to the sound codec driver.

In the sound codec driver, I defined a .hw_params function to set the IIS related DMA buffer. However,

I cannot get the runtime->period_size and runtime->frame_bits value. These values are assigned in the snd_pcm_hw_params function after hw_params call.

How to resolve this problem?

Thank you!

Tyler Li

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

#1 lore raw

At Mon, 18 Sep 2006 18:34:14 +0800,

Quoted 11 lines · YongLi

Hello All,

I am porting the linux 2.6.16 to my ARM board. I found a problem related to the sound codec driver.

In the sound codec driver, I defined a .hw_params function to set the IIS related DMA buffer. However,

I cannot get the runtime->period_size and runtime->frame_bits value. These values are assigned in the snd_pcm_hw_params function after hw_params call.

How to resolve this problem?

Hm, period_size is a vital field that the system doesn't work without it. Are other fields set correctly as expected?

Note that a correct period_size isn't always set at the first hw_params call. The hw_params callback can be called multiple times in the driver, depending on the app. If runtime->period_size isn't set properly at prepare callback, it's a big problem, though.

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV