On Fri, 27 Jan 2006, satish wrote:

On Fri, 2006-01-27 at 13:02 +0000, James Courtier-Dutton wrote:

satish wrote:
Hi All,

  I got ALSA driver version 1.0.6 installed on my computer.
  I used the API to write very simple recording and playing programs.

  But I can't seem to get both recording and playing to work at the
  same time.  I can open the audio device for both recording and
playing,
  and set up (some) hardware parameters for both recording and playing.
  But I can only run

    snd_pcm_hw_params()

  either on the recording side *or* the playback side only once.

  Regardless of the order the 2nd call to snd_pcm_hw_params() fails.


Use a different file descriptor for playback and capture.
I.e. 2 file descriptors.
Don't open a single file descriptor as full-duplex.

James




Thanx for the response James,  but still the problem persists.
As an alternative, i tried using capture and playback in different time
intervals, instead of full duplex
eventhough in my 2nd call to   snd_pcm_hw_params()  i'm getting this
error message

"unable to set hw parameters: Invalid argument"

What he means is to have two open or fopen calls one for reading and one
for writing so that you get a read file descriptor and a write file
descriptor. Do not try to use the same one for both reading and writing. Do not make a second call to the same file.

--
William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     [EMAIL PROTECTED]
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Alsa-user mailing list
Alsa-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to