Re: [Alsa-devel] PCM Params

2004-05-27 Thread Brian Furey
ok paul i had another look at the driver playback/capture tutorials. I have one question.Do applicationsinitialize and use a pcm_handle of the alsa driver when they begin interaction with it?Surely not

I thought that the driver would work totally independently of my VoIP and this is why I asked the question is it possible to change driver parameters directly.

Brian.
Paul Davis [EMAIL PROTECTED] wrote:
Im running OpenH323 a voice over ip application.What Iwere you asking about this on alsa-devel a couple of weeks ago?have found out from using it is that the alsa driveralways puts 32 msecs(256 bytes) of data into thesender buffer, or takes the same amount from thereceiver buffer.32 msecs is driver default if it's not set by theapplication? I thought if i change the relevantdefault params in alsa-driver/alsa-kernel/ andrecompile, it wud do the trick. ...Instead i should include this function call to setthe driver period..snd_pcm_hw_params_set_period_size()within my OpenH323 app with relevant header files???yes, although i am not sure you understand enough about how this allworks. and i am pretty sure i don't have time to explain. did you readeither o!
 f the
 tutorials on the ALSA site for programmers?
		  
Yahoo! Messenger - Communicate instantly..."Ping" your friends 
today! Download Messenger Now

[Alsa-devel] PCM Params

2004-05-25 Thread Brian Furey
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=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] PCM Params

2004-05-25 Thread Brian Furey
 --- Paul Davis [EMAIL PROTECTED] wrote: 
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()


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.


 
  






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=3149alloc_id=8166op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] alsa driver data rates

2004-04-15 Thread Brian Furey
Hi James,
Im asking you becuae looking thru the archives you asked a similar question a long time ago.i'm using an open source VoIP application with thealsa driver. My card is the onboard intel8x0.
 My problem is figuring out the patterns I amgetting with the alsa driver when transmittingpackets.For instance when I use the GSM codec with a packetssize of 80 msecs and 132 bytes, packets aretransmitted at alternate intervals of 64/96 msecs.When i use G.711 packets of 240 bytes are transmitted
every 32 msecs with an extra packet every 15 pkts.
With G.711 it is obvious that 256 bytes are added to driver sending buffer every 32 msecs.However this does not match for GSM because it needs only 132 bytes every 64/96 msecs.
Can the driver change the amount of data it gets from the soundcard to suit the codec?
Help appreciated,Brian.James Courtier-Dutton [EMAIL PROTECTED] wrote:
Brian Furey wrote: Hi all, I have an intel810 onboard soundcard.I am using the alsa driver with a VoIP session. The intel8x0.c file has a minimum period byte size of 32 bytes with the minimum no. of periods being 1.The min and max rate is set to 48k.   How can I find out what actual(runtime) size period the alsa driver is dealing with?   Does it use the minimum size as the period size?  Brian. Brian, I am working on a VoIP setup. I am updating the asterisk alsa console driver so that it actually works! The current driver is stuck round about alsa api 0.5.xThe period size that the sound card is actually using does not really matter, if just effects latency. The bigger the period size, the higher the latency.Just set the period size to t
 he
 smallest the sound card can do, and then just read and write to it.I found that PLAYBACK and CAPTURE directions can have different period sizes, so it is better to open separate handles for playback and capture.In the config setup, you set the buffer and period sizes, and before you set them, you can retrieve the current min/max period and buffer sizes.For playback, it is best to have a certain minimum buffer being full most of the time, due to network jitter, and this buffer can act as the jitter buffer. The actual size of this is probably best found out from trial and error (I have not finished testing this bit yet).For capture, just poll for input, and then read whatever is in the capture buffer and transmit it. You can experiment with different methods of early buffer reads, but again, I have not finished testing with that, so I can't give you any definite answers.Another thing to test with could be sampling and
 playback at 48k.Most sound cards work at 48k, and this would reduce the period_time. (period_size stays the same, but as one is using a higher rate, the period_time decreases, and thus latency.) The problems with that is that most VoIP is at 8k, so some resampling is required.CheersJames---This SF.Net email is sponsored by: IBM Linux TutorialsFree Linux tutorial presented by Daniel Robbins, President and CEO ofGenToo technologies. Learn everything from fundamentals to systemadministration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=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

[Alsa-devel] alsa substreams +rates

2004-04-09 Thread Brian Furey
Hi All,
  with the ALSA driver, what do the OSS substream
mean?If you have a 2 main capture channels, how many
substream would you have?
Also the capture stream is supposed to operate at 8000
Hz per second.Is it possible that it is actually say
8192, a value to the power-of-two? 
How can I find this out?

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: 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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] periods,packets and driver patterns not to mention patience!!!

2004-04-09 Thread Brian Furey
 Hi All,
   i'm using an open source VoIP application with the
alsa driver. My card is the onboard intel8x0.
   My problem is figuring out the patterns I am
getting with the alsa driver when transmitting
packets.

For instance when I use the GSM codec with a packets
size of 80 msecs and 132 bytes, packets are
transmitted at alternate intervals of 64/96 msecs.

When I configure the codec so the packet size is 128
bytes(power-of-two) and still 80 msecs, packets are
still transmitted at 64/96 msecs.

Now when i configure the codec so packet size is 132
bytes and 64 msces, packets are transmitted every 64
msces.
Given that the alsa driv interrupts at period
boundaries(which are defined in bytes), the tests i
have carried out prove otherwise..i.e that the driver
operates in millisecond power-of-two based periods.
??
Help appreciated,

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: 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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] alsa driver

2004-04-06 Thread Brian Furey
Jaroslav,
Busy system cant explain something as consequent as this.
When the packet size being transmitted is 30 msecs(240bytes) or 32 msecs(240bytes), the OpenH323 app sends packets every 32 msecs.

When the packet size is 80 msecs(132 bytes), the OpenH323 app sends packets at alternate intervals of 64 msecs and 96 msecs.Both are multiples of 32 msecs.
Surely it's to do with the period size being added to the driver sending buffer. The thing is I have got all the info about the period size,no of periods ..etc but it's not adding up yet.

Brian.Jaroslav Kysela [EMAIL PROTECTED] wrote:
On Tue, 6 Apr 2004, Brian Furey wrote: Hi all, i'm running the alsa-driver-1.0.0. Im using it with the OpenH323 application. Packets are transmitted or received in 32 millisecond intervals or multiples of 32 millisecond intervals. For example using the G711 codec, packets are transmitted every 32 milliseconds. For the GSM-06.10 codec, packets are transmitted at alternate intervals of 64 milliseconds or 96 milliseconds. Why is this?Busy system?Jaroslav-Jaroslav Kysela <[EMAIL PROTECTED]>Linux Kernel Sound MaintainerALSA Project, SuSE Labs---This SF.Net email is sponsored by: IBM Linux TutorialsFree Linux tutorial presented by Daniel Robbins, President and CEO ofGenToo technologies. Le!
 arn
 everything from fundamentals to systemadministration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=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

[Alsa-devel] Driver hardw + softw parameters

2004-04-02 Thread Brian Furey
Hi All,
   still trying to get the hardware and software
runtime paramters of the driver...
  In alsa-driver*/alsa-kernel/core there is the pcm.c
file.
  There are 2 functions in this file
snd_pcm_substream_proc_hw_params_read
and
snd_pcm_substream_proc_sw_params_read

Both of these print out to some output source the
information I need using i.e.

  snd_iprintf(buffer, period_size: %lu\n,
runtime-period_size);

snd_iprintf is in /alsa-driver/alsa-kernel/info.c

I traced this snd_iprintf function and it passes its
data in a buffer to the function vsnprintf(..).
Could someone enlighten me as to where it write
to...console, file, temporary storage


thanx,
Brian.






___
WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards  
www.yahoo.co.uk/internetcafes 


---
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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] intel8x0.c

2004-03-31 Thread Brian Furey
Thanks James,
   i'm using the GSM-06.10 codec with my VoIP
application.The frame rate is 160 timestamp units or
20 millisecond frames.4 frames are added to a packet
and transmitted. Packets are transmitted at alternate
intervals of 64 and 96 milliseconds. This is due to
the soundcard driver and the period sizes being read
into the buffer.Can the period size the driver is
capturing from the soundcard and putting into the
sending buffer change during execution of a VoIP
session or is it fixed.Given that I have not changed
it, what is the default period size for the ALSA
driver?
I'm basically trying to find out the reason packets
are transmitted at alternate intervals of 64 and 96
millisecondsand the runtime period size is the key
 
help appreciated,
brian.
--- James Courtier-Dutton [EMAIL PROTECTED]
wrote:  Brian Furey wrote:
  Hi all,
I have an intel810 onboard soundcard.I am using
 the
  alsa driver with a VoIP session.
The intel8x0.c file has a minimum period byte
 size
  of 32 bytes with the minimum no. of periods being
  1.The min and max rate is set to 48k. 
  
  How can I find out what actual(runtime) size
 period
  the alsa driver is dealing with? 
  
  Does it use the minimum size as the period size?
  
   Brian.
  
 
 Brian, I am working on a VoIP setup. I am updating
 the asterisk alsa 
 console driver so that it actually works! The
 current driver is stuck 
 round about alsa api 0.5.x
 The period size that the sound card is actually
 using does not really 
 matter, if just effects latency. The bigger the
 period size, the higher 
 the latency.
 Just set the period size to the smallest the sound
 card can do, and then 
 just read and write to it.
 I found that PLAYBACK and CAPTURE directions can
 have different period 
 sizes, so it is better to open separate handles for
 playback and capture.
 In the config setup, you set the buffer and period
 sizes, and before you 
 set them, you can retrieve the current min/max
 period and buffer sizes.
 For playback, it is best to have a certain minimum
 buffer being full 
 most of the time, due to network jitter, and this
 buffer can act as the 
 jitter buffer. The actual size of this is probably
 best found out from 
 trial and error (I have not finished testing this
 bit yet).
 For capture, just poll for input, and then read
 whatever is in the 
 capture buffer and transmit it. You can experiment
 with different 
 methods of early buffer reads, but again, I have not
 finished testing 
 with that, so I can't give you any definite answers.
 
 Another thing to test with could be sampling and
 playback at 48k.
 Most sound cards work at 48k, and this would reduce
 the period_time. 
 (period_size stays the same, but as one is using a
 higher rate, the 
 period_time decreases, and thus latency.) The
 problems with that is that 
 most VoIP is at 8k, so some resampling is required.
 
 Cheers
 James 





___
WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards  
www.yahoo.co.uk/internetcafes 


---
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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


[Alsa-devel] intel8x0.c

2004-03-30 Thread Brian Furey

Hi all,
  I have an intel810 onboard soundcard.I am using the
alsa driver with a VoIP session.
  The intel8x0.c file has a minimum period byte size
of 32 bytes with the minimum no. of periods being
1.The min and max rate is set to 48k. 

How can I find out what actual(runtime) size period
the alsa driver is dealing with? 

Does it use the minimum size as the period size?

 Brian.







___
WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards  
www.yahoo.co.uk/internetcafes 


---
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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


Re: [Alsa-devel] intel8x0.c

2004-03-30 Thread Brian Furey

Right Jaroslav,
   that means i would modify intel8x0.c to include a
call to 
snd_pcm_hw_params_get_period_size() or
snd_pcm_hw_params_get_period_time() in the appropriate
place. Write the values returned say to a text file.
Recompile the ALsa driver and re-insert it into the
kernel.Start my application and check contents of text
file.
Am I right in saying this?
Thanks in advance,
Brian.



 --- Jaroslav Kysela [EMAIL PROTECTED] wrote:  On Tue,
30 Mar 2004, Brian Furey wrote:
 
  
  Hi all,
I have an intel810 onboard soundcard.I am using
 the
  alsa driver with a VoIP session.
The intel8x0.c file has a minimum period byte
 size
  of 32 bytes with the minimum no. of periods being
  1.The min and max rate is set to 48k. 
  
  How can I find out what actual(runtime) size
 period
  the alsa driver is dealing with? 
 
 After the snd_pcm_hw_params() call, the given
 hardware parameter
 container will have the chosen period size or 
 snd_pcm_hw_params_current() creates the current
 hw_params
 container.
 
 Then use snd_pcm_hw_params_get_period_size() or
 snd_pcm_hw_params_get_period_time().
 
   Jaroslav
 
 -
 Jaroslav Kysela [EMAIL PROTECTED]
 Linux Kernel Sound Maintainer
 ALSA Project, SuSE Labs 





___
WIN FREE WORLDWIDE FLIGHTS - nominate a cafe in the Yahoo! Mail Internet Cafe Awards  
www.yahoo.co.uk/internetcafes 


---
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=1470alloc_id=3638op=click
___
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel


RE: [Alsa-devel] Current Hardware Parameter Settings

2004-03-25 Thread Brian Furey

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:
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 periodsize 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 TutorialsFree Linux tutorial presented by Daniel Robbins, President and CEO ofGenToo technologies. Learn everything from fundamentals to systemadministration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=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

[Alsa-devel] Minimum Period-(Fragment) Size

2004-03-24 Thread Brian Furey
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 drivercan 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