LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 10-22-2007, 08:07 PM   #1
evilquesadilla
LQ Newbie
 
Registered: Oct 2007
Posts: 1

Rep: Reputation: 0
ALSA plugin programming question


Hello,

I have a question about programming ALSA plugins. Sorry if this has been asked before, but I did a search and did not find what I'm looking for.

I'm trying to write an ALSA plugin that adds audio processing effects to a stream. Basically modifies the incoming PCM stream and pumps out to a slave device that is a real ALSA hardware device. I've chosen to go with the external PCM plugin, since I will not be changing the sampling rate or anything, just modifying the sample data.

Now my questions:
1) I have access to the plugin's own snd_pcm_t data structure, but I can't get to the slave's snd_pcm_t info. I need to do this because I need two pieces of information: sampling rate, and memory map access method (interleaved or not). I won't be changing these, I just need to know what they are so I can set up my algorithm accordingly. Or, is it possible that these are not available due to the constraint of this type of plugin, and that the plugin's own snd_pcm_t settings will be synchronized with that of the slave's? If that's the case I can work with that too since I can just read my own plugin's pcm->access and pcm->rate for the info.

2) The .transfer callback returns the size. What is this for? What if I get a block of 256 samples to transfer, I only process half of them and return 128. Is it going retry again at sample #129?

3) I can't seem to find any resources on ALSA plugin programming. Are there websites, books that you can recommend? I've already looked at also-project.org, not much info there. In fact, that website has basically the same info as the comments in the source code.

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming a plugin system... juanbobo Programming 9 07-19-2007 07:27 PM
xmms ALSA plugin merchtemeagle Linux - Software 11 02-10-2007 09:36 AM
How to use ALSA hooks plugin correctly. Xplosion Linux - Software 0 08-28-2006 07:47 AM


All times are GMT -5. The time now is 02:51 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration