Skip to contentSkip to conversation

PCM Params

DISCUSSION Brian Furey 3 participants 6 messages May 25, 2004

lore
Share & tools
lore
#0 lore raw

Hi ,
i'm trying to change the fragment size that the alsa driver is capturing/playing out. It's currently set at 32 msecs(256 bytes).
They are set in the runtime structure...
runtime->period_max ...etc
Could anybody tell me which file these parameters are set in the alsa-driver directory?
Thanks,
Brian.

____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#1 lore raw
Quoted 8 lines

Hi ,
i'm trying to change the fragment size that the alsa driver is capturing/playing out. It's currently set at 32 msecs(256 bytes).
They are set in the runtime structure...
runtime->period_max ...etc
Could anybody tell me which file these parameters are set in the alsa-driver directory?

you should be using snd_pcm_hw_params_set_period_size()

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#2 lore raw

--- Paul Davis <[email protected]> wrote: >

Quoted 9 lines

Hi ,

Quoted 1 line

i'm trying to change the fragment size that the

alsa

Quoted 1 line

driver is capturing/playing out. It's currently set

at

Quoted 4 lines

32 msecs(256 bytes).
They are set in the runtime structure...
runtime->period_max ...etc
Could anybody tell me which file these parameters

Quoted 5 lines

are

Quoted 1 line

set in the alsa-driver directory?

you should be using
snd_pcm_hw_params_set_period_size()

Does this mean that i can change the period size without recompiling the driver?
Im am not developing an ALSA application myself, just trying to change the pcm parameters. snd_pcm_hw_params_set_period_size()...looks like a function call included in a user written ALSA application??
Excuse me if this is a stupid questions but,How do I use this function call in my case to change the driver period??
Brian.

Quoted 2 lines

____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#3 lore raw
Quoted 17 lines

--- Paul Davis <[email protected]> wrote: >

Quoted 9 lines

Hi ,

Quoted 1 line

i'm trying to change the fragment size that the

alsa

Quoted 1 line

driver is capturing/playing out. It's currently set

at

Quoted 4 lines

32 msecs(256 bytes).
They are set in the runtime structure...
runtime->period_max ...etc
Could anybody tell me which file these parameters

Quoted 5 lines

are

Quoted 1 line

set in the alsa-driver directory?

you should be using
snd_pcm_hw_params_set_period_size()

Quoted 10 lines

Does this mean that i can change the period size without recompiling the driver?
Im am not developing an ALSA application myself, just trying to change the pcm parameters. snd_pcm_hw_params_set_period_size()...looks like a function call included in a user written ALSA application??
Excuse me if this is a stupid questions but,How do I use this function call in my case to change the driver period??

i don't understand your question. if you mean "how, as a user, do i change the driver period", the answer is that it is controlled by the application, and you should use the facilities provided by the program. what software are you trying to use?

--p

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#4 lore raw

--- Paul Davis <[email protected]> wrote: >

Quoted 42 lines
Quoted 5 lines · --- Paul Davis
Quoted 5 lines

Hi ,

Quoted 1 line

i'm trying to change the fragment size that the

alsa

Quoted 1 line

driver is capturing/playing out. It's currently

set

Quoted 5 lines
Quoted 5 lines

at

Quoted 4 lines

32 msecs(256 bytes).
They are set in the runtime structure...
runtime->period_max ...etc
Could anybody tell me which file these

parameters

Quoted 10 lines
Quoted 5 lines

are

Quoted 1 line

set in the alsa-driver directory?

you should be using
snd_pcm_hw_params_set_period_size()

Does this mean that i can change the period size
without recompiling the driver?
Im am not developing an ALSA application myself,

just

Quoted 5 lines

trying to change the pcm parameters. snd_pcm_hw_params_set_period_size()...looks like a function call included in a user written ALSA application??
Excuse me if this is a stupid questions but,How do

I

Quoted 1 line

use this function call in my case to change the

driver

Quoted 1 line

period??

i don't understand your question. if you mean "how, as a user, do i
change the driver period", the answer is that it is controlled by the
application, and you should use the facilities provided by the
program. what software are you trying to use?

Quoted 1 line

--p

Im running OpenH323 a voice over ip application.What I have found out from using it is that the alsa driver always puts 32 msecs(256 bytes) of data into the sender buffer, or takes the same amount from the receiver buffer.
32 msecs is driver default if it's not set by the application? I thought if i change the relevant default params in alsa-driver/alsa-kernel/ and recompile, it wud do the trick.

...Instead i should include this function call to set the driver period..snd_pcm_hw_params_set_period_size() within my OpenH323 app with relevant header files???

Brian.

____________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click

#5 lore raw
Quoted 9 lines · Brian Furey

Im running OpenH323 a voice over ip application.What I have found out from using it is that the alsa driver always puts 32 msecs(256 bytes) of data into the sender buffer, or takes the same amount from the receiver buffer.
32 msecs is driver default if it's not set by the application? I thought if i change the relevant default params in alsa-driver/alsa-kernel/ and recompile, it wud do the trick.

It depends on the used lowlevel driver. This information is there.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click