Skip to contentSkip to conversation

Minimum Period-(Fragment) Size

DISCUSSION Brian Furey 2 participants 4 messages Mar 24, 2004 – Mar 26, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,
im using the ALSA driver 1.0.0 on two linux machines that connect a voice-over-ip session.
I need to know the minimum fragment size that the alsa driver can take from the soundcard and place in the sending/receiving buffer.Does it depend on the speed that the soundcard is operating at?

Any help appreciated,
Brian.

---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

#1 lore raw
Quoted 6 lines · On 24-Mar-2004 Brian Furey wrote:

Hi all,
im using the ALSA driver 1.0.0 on two linux machines that connect a voice-over-ip session. I need to know the minimum fragment size that the alsa driver can take from the soundcard and place in the sending/receiving buffer. Does it depend on the speed that the soundcard is operating at?

It may depend on any thing. Set buffer size and period size with one of these and use the value they return:

snd_pcm_hw_params_set_buffer_size_near()
snd_pcm_hw_params_set_period_size_near()
snd_pcm_hw_params_set_buffer_time_near()
snd_pcm_hw_params_set_period_time_near()

Look here for more infos:
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html

--
Giuliano.

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click

#2 lore raw

RE: Current Hardware Parameter Settings

Thanks Giuliano,

How can I get a dump of the current hardware configuration space?I have the ALSA driver 1.0.0 installed on my Redhat 9 Machine.

Brian.
Giuliano Pochini <[email protected]> wrote:

Quoted 6 lines · On 24-Mar-2004 Brian Furey wrote:

Hi all,
im using the ALSA driver 1.0.0 on two linux machines that connect a voice-over-ip session. I need to know the minimum fragment size that the alsa driver can take from the soundcard and place in the sending/receiving buffer. Does it depend on the speed that the soundcard is operating at?

It may depend on any thing. Set buffer size and period size with one of these and use the value they return:

snd_pcm_hw_params_set_buffer_size_near()
snd_pcm_hw_params_set_period_size_near()
snd_pcm_hw_params_set_buffer_time_near()
snd_pcm_hw_params_set_period_time_near()

Look here for more infos:
http://www.alsa-project.org/alsa-doc/alsa-lib/group___p_c_m___h_w___params.html

--
Giuliano.

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now

#3 lore raw

RE: Current Hardware Parameter Settings

Quoted 3 lines · On 25-Mar-2004 Brian Furey wrote:

Thanks Giuliano,

How can I get a dump of the current hardware configuration space?

Hmm, lspci ? :)
If you mean how to get the capabilities of the card, it's a bit tricky. The caps are not a static thing. Each setting may rure others. For example, a card has 8 channels and supports these
formats: S32_LE and S16_LE. But all combinations may not be available. When the application sets format=S16_LE the driver may restrict the max number of channels to 2. And if it sets channels=4 the driver removes S16_LE from the list.
I can't help you anyway because I know nearly nothing about the userspace API.

--
Giuliano.

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click