All of lore.kernel.org
 help / color / mirror / Atom feed
* I/O Error in mmapping ES 1969
@ 2003-10-10 12:29 Dr. med. Günther Montag
  2003-10-10 12:55 ` Paul Davis
  0 siblings, 1 reply; 3+ messages in thread
From: Dr. med. Günther Montag @ 2003-10-10 12:29 UTC (permalink / raw)
  To: alsa-devel

I mentioned my ham radio realtime program with mmap
in a posting on 3. Oct and before.
It works now with ALSA 0.9.7 with AC97 and maybe some other cards, thanks!!!
With ESS ES1969 mmap(ibuf, isize, PROT_READ, MAP_FILE | MAP_SHARED | 
MAP_FIXED, fd_audio, 0)
(and I tried also all other MAP_ options) it breaks with I / O error.
Do You know some help about mmap besides man,
or can I do something with "Scatter Gather" in ALSA API,
or does it help if i work myself into JACK for this problem?
hints welcome, tnx!!!

Safari.Doktor@addcom.de


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: I/O Error in mmapping ES 1969
  2003-10-10 12:29 I/O Error in mmapping ES 1969 Dr. med. Günther Montag
@ 2003-10-10 12:55 ` Paul Davis
  2003-10-10 12:58   ` Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Davis @ 2003-10-10 12:55 UTC (permalink / raw)
  To: Dr. med. Günther Montag; +Cc: alsa-devel

>I mentioned my ham radio realtime program with mmap
>in a posting on 3. Oct and before.
>It works now with ALSA 0.9.7 with AC97 and maybe some other cards, thanks!!!
>With ESS ES1969 mmap(ibuf, isize, PROT_READ, MAP_FILE | MAP_SHARED | 
>MAP_FIXED, fd_audio, 0)
>(and I tried also all other MAP_ options) it breaks with I / O error.
>Do You know some help about mmap besides man,

IIRC, mmap with OSS doesn't work unless you use the LD_PRELOAD
hack. this loads a library that intercepts all standard system calls
and routes them through alsa-lib. your app will not run without
this. why? mmap provides direct access to the DMA buffer of the
hardware, and thus bypasses most of what alsa-lib does. ALSA does
support such direct access, but not in the simplistic way that OSS
provides.

or can I do something with "Scatter Gather" in ALSA API,
>or does it help if i work myself into JACK for this problem?
>hints welcome, tnx!!!

either use ALSA natively, or use JACK, or use the LD_PRELOAD hack.


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

* Re: I/O Error in mmapping ES 1969
  2003-10-10 12:55 ` Paul Davis
@ 2003-10-10 12:58   ` Jaroslav Kysela
  0 siblings, 0 replies; 3+ messages in thread
From: Jaroslav Kysela @ 2003-10-10 12:58 UTC (permalink / raw)
  To: Paul Davis; +Cc: Dr. med. Günther Montag, alsa-devel

On Fri, 10 Oct 2003, Paul Davis wrote:

> >I mentioned my ham radio realtime program with mmap
> >in a posting on 3. Oct and before.
> >It works now with ALSA 0.9.7 with AC97 and maybe some other cards, thanks!!!
> >With ESS ES1969 mmap(ibuf, isize, PROT_READ, MAP_FILE | MAP_SHARED |
> >MAP_FIXED, fd_audio, 0)
> >(and I tried also all other MAP_ options) it breaks with I / O error.
> >Do You know some help about mmap besides man,
>
> IIRC, mmap with OSS doesn't work unless you use the LD_PRELOAD
> hack. this loads a library that intercepts all standard system calls
> and routes them through alsa-lib. your app will not run without
> this. why? mmap provides direct access to the DMA buffer of the
> hardware, and thus bypasses most of what alsa-lib does. ALSA does
> support such direct access, but not in the simplistic way that OSS
> provides.
>
> or can I do something with "Scatter Gather" in ALSA API,
> >or does it help if i work myself into JACK for this problem?
> >hints welcome, tnx!!!
>
> either use ALSA natively, or use JACK, or use the LD_PRELOAD hack.

Fully agree. Just to clarify: In-kernel OSS's mmap can be used when
the soundcard's DMA buffer has exactly same parameters as
application requested. We cannot do any automatic conversions
like in the read()/write() case.

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php

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

end of thread, other threads:[~2003-10-10 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-10 12:29 I/O Error in mmapping ES 1969 Dr. med. Günther Montag
2003-10-10 12:55 ` Paul Davis
2003-10-10 12:58   ` Jaroslav Kysela

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.