All of lore.kernel.org
 help / color / mirror / Atom feed
* alsa driver api
@ 2007-05-02 17:40 Michel Benoit
  2007-05-03  4:07 ` James Courtier-Dutton
  0 siblings, 1 reply; 3+ messages in thread
From: Michel Benoit @ 2007-05-02 17:40 UTC (permalink / raw)
  To: ciacciax, alsa-devel

Hi

Does anyone have some code examples that show how to send pcm samples
directly to an alsa driver.  I'm (still) having trouble building/using
alsa-lib and I want to make sure that my driver works correctly. If I
understand correctly it is possible to send sound samples using the
alsa driver api only (no alsa-lib).

All I want to do for now is send a fixed sine wave to the driver. I
saw some code snippets that seemed to do just that in a recent email
on this list but it would help a lot if I could have a look at the
complete application.

Thanks,

Michel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alsa driver api
@ 2007-05-02 17:56 Ciaccia
  0 siblings, 0 replies; 3+ messages in thread
From: Ciaccia @ 2007-05-02 17:56 UTC (permalink / raw)
  To: Michel Benoit, alsa-devel

Hi Michel,
Maybe you are referring to my post. I always use alsa-lib to send data to the driver, I think it is the easiest way and preferred way.

Months ago I wanted to do the same (i.e. send data to the alsa-driver without alsa-lib) but then I understood this was not the right way. I'm not saying you cannot or should not try that, but from my experience (I spent a lot of time) it's not going to work.

The problem I had was that my system did not support shared objects, nor -ldl, so I could not user the "standard" alsa-lib (which usually require pthread, dl, an *.so). Then Takashi gave me a patch for that, and now I'm an happy "static" alsa-lib user.

Maybe one of the gurus (Takashi?) will give you some tips, but I think you really need a good reason for that.

Good luck, sorry for not helping you
Andrea

----- Original Message ----
From: Michel Benoit <murpme@gmail.com>
To: ciacciax@yahoo.com; alsa-devel@alsa-project.org
Sent: Wednesday, May 2, 2007 7:40:29 PM
Subject: alsa driver api

Hi

Does anyone have some code examples that show how to send pcm samples
directly to an alsa driver.  I'm (still) having trouble building/using
alsa-lib and I want to make sure that my driver works correctly. If I
understand correctly it is possible to send sound samples using the
alsa driver api only (no alsa-lib).

All I want to do for now is send a fixed sine wave to the driver. I
saw some code snippets that seemed to do just that in a recent email
on this list but it would help a lot if I could have a look at the
complete application.

Thanks,

Michel




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: alsa driver api
  2007-05-02 17:40 alsa driver api Michel Benoit
@ 2007-05-03  4:07 ` James Courtier-Dutton
  0 siblings, 0 replies; 3+ messages in thread
From: James Courtier-Dutton @ 2007-05-03  4:07 UTC (permalink / raw)
  To: Michel Benoit; +Cc: alsa-devel

Michel Benoit wrote:
> Hi
> 
> Does anyone have some code examples that show how to send pcm samples
> directly to an alsa driver.  I'm (still) having trouble building/using
> alsa-lib and I want to make sure that my driver works correctly. If I
> understand correctly it is possible to send sound samples using the
> alsa driver api only (no alsa-lib).
> 
> All I want to do for now is send a fixed sine wave to the driver. I
> saw some code snippets that seemed to do just that in a recent email
> on this list but it would help a lot if I could have a look at the
> complete application.
> 
> Thanks,
> 
> Michel

There is an alsa tool already available to do the task.
It is called "speaker-test"
speaker-test -c2 -Dplug:front -twav    (voices)
speaker-test -c2 -Dplug:front -tsine   (sine wave)
speaker-test -c2 -Dplug:front -tpink   (pink noise)

You can then use any device name you wish to test.

James

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-03  4:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-02 17:40 alsa driver api Michel Benoit
2007-05-03  4:07 ` James Courtier-Dutton
  -- strict thread matches above, loose matches on Subject: below --
2007-05-02 17:56 Ciaccia

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.